refactor(editor): Delete some barrel files and reduce circular dependencies (no-changelog) (#7838)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-11-28 12:15:08 +01:00
committed by GitHub
parent 3ab3ec9da8
commit 753cbc1e96
229 changed files with 539 additions and 507 deletions

View File

@@ -4,7 +4,8 @@ import { NO_OP_NODE_TYPE, STICKY_NODE_TYPE, STORES } from '@/constants';
import { faker } from '@faker-js/faker';
import { createTestingPinia } from '@pinia/testing';
import { setActivePinia } from 'pinia';
import { useSourceControlStore, useUIStore } from '@/stores';
import { useSourceControlStore } from '@/stores/sourceControl.store';
import { useUIStore } from '@/stores/ui.store';
const nodeFactory = (data: Partial<INodeUi> = {}): INodeUi => ({
id: faker.string.uuid(),

View File

@@ -1,5 +1,5 @@
import jp from 'jsonpath';
import { useDataSchema } from '@/composables';
import { useDataSchema } from '@/composables/useDataSchema';
import type { Schema } from '@/Interface';
describe('useDataSchema', () => {

View File

@@ -1,17 +0,0 @@
export { default as useCanvasMouseSelect } from './useCanvasMouseSelect';
export * from './useCopyToClipboard';
export * from './useDebounce';
export * from './useExternalHooks';
export * from './useExternalSecretsProvider';
export { default as useGlobalLinkActions } from './useGlobalLinkActions';
export * from './useHistoryHelper';
export * from './useI18n';
export * from './useLoadingService';
export * from './useMessage';
export * from './useTelemetry';
export * from './useTitleChange';
export * from './useToast';
export * from './useNodeSpecificationValues';
export * from './useDataSchema';
export * from './useExecutionDebugging';
export * from './useContextMenu';

View File

@@ -1,6 +1,6 @@
import type { INodeUi, XYPosition } from '@/Interface';
import { useDeviceSupport } from 'n8n-design-system';
import { useDeviceSupport } from 'n8n-design-system/composables/useDeviceSupport';
import { useUIStore } from '@/stores/ui.store';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { getMousePosition, getRelativePosition } from '@/utils/nodeViewUtils';

View File

@@ -4,7 +4,10 @@ import {
PIN_DATA_NODE_TYPES_DENYLIST,
STICKY_NODE_TYPE,
} from '@/constants';
import { useNodeTypesStore, useSourceControlStore, useUIStore, useWorkflowsStore } from '@/stores';
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
import { useSourceControlStore } from '@/stores/sourceControl.store';
import { useUIStore } from '@/stores/ui.store';
import { useWorkflowsStore } from '@/stores/workflows.store';
import type { IActionDropdownItem } from 'n8n-design-system/src/components/N8nActionDropdown/ActionDropdown.vue';
import type { INode, INodeTypeDescription } from 'n8n-workflow';
import { computed, ref, watch } from 'vue';

View File

@@ -8,7 +8,7 @@ import {
import { merge } from 'lodash-es';
import { generatePath } from '@/utils/mappingUtils';
import { isObj } from '@/utils/typeGuards';
import { useWorkflowsStore } from '@/stores';
import { useWorkflowsStore } from '@/stores/workflows.store';
export function useDataSchema() {
function getSchema(

View File

@@ -1,14 +1,18 @@
import { h, computed } from 'vue';
import { useRouter } from 'vue-router';
import { useI18n, useMessage, useToast } from '@/composables';
import { useI18n } from '@/composables/useI18n';
import { useMessage } from '@/composables/useMessage';
import { useToast } from '@/composables/useToast';
import {
DEBUG_PAYWALL_MODAL_KEY,
EnterpriseEditionFeature,
MODAL_CONFIRM,
VIEWS,
} from '@/constants';
import { useSettingsStore, useUIStore, useWorkflowsStore } from '@/stores';
import type { INodeUi } from '@/Interface';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { useSettingsStore } from '@/stores/settings.store';
import { useUIStore } from '@/stores/ui.store';
export const useExecutionDebugging = () => {
const router = useRouter();

View File

@@ -1,5 +1,5 @@
import type { IExternalHooks } from '@/Interface';
import { runExternalHook } from '@/utils';
import { runExternalHook } from '@/utils/externalHooks';
export function useExternalHooks(): IExternalHooks {
return {

View File

@@ -7,8 +7,8 @@ import { useUIStore } from '@/stores/ui.store';
import { ref, onMounted, onUnmounted, nextTick, getCurrentInstance } from 'vue';
import { useDebounceHelper } from './useDebounce';
import { useDeviceSupport } from 'n8n-design-system';
import { getNodeViewTab } from '@/utils';
import { useDeviceSupport } from 'n8n-design-system/composables/useDeviceSupport';
import { getNodeViewTab } from '@/utils/canvasUtils';
import type { Route } from 'vue-router';
const UNDO_REDO_DEBOUNCE_INTERVAL = 100;

View File

@@ -1,5 +1,5 @@
import type { WorkflowTitleStatus } from '@/Interface';
import { useSettingsStore } from '@/stores';
import { useSettingsStore } from '@/stores/settings.store';
export function useTitleChange() {
const prependBeta = (title: string) => {

View File

@@ -1,6 +1,6 @@
import { ElNotification as Notification } from 'element-plus';
import type { NotificationInstance, NotificationOptions, MessageBoxState } from 'element-plus';
import { sanitizeHtml } from '@/utils';
import { sanitizeHtml } from '@/utils/htmlUtils';
import { useTelemetry } from '@/composables/useTelemetry';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { useI18n } from './useI18n';