mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(editor): Extract root store into @n8n/stores package (no-changelog) (#15412)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { createEventBus } from '@n8n/utils/event-bus';
|
||||
import Modal from './Modal.vue';
|
||||
import { ABOUT_MODAL_KEY } from '../constants';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { useClipboard } from '@/composables/useClipboard';
|
||||
import { useDebugInfo } from '@/composables/useDebugInfo';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { API_KEY_CREATE_OR_EDIT_MODAL_KEY, STORES } from '@/constants';
|
||||
import { API_KEY_CREATE_OR_EDIT_MODAL_KEY } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { cleanupAppModals, createAppModals, mockedStore, retry } from '@/__tests__/utils';
|
||||
import ApiKeyEditModal from './ApiKeyCreateOrEditModal.vue';
|
||||
import { fireEvent } from '@testing-library/vue';
|
||||
|
||||
@@ -5,7 +5,7 @@ import { computed, onMounted, ref } from 'vue';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { createEventBus } from '@n8n/utils/event-bus';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useDocumentTitle } from '@/composables/useDocumentTitle';
|
||||
import { useApiKeysStore } from '@/stores/apiKeys.store';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
|
||||
@@ -10,7 +10,7 @@ import { faker } from '@faker-js/faker';
|
||||
import AskAssistantBuild from './AskAssistantBuild.vue';
|
||||
import { useBuilderStore } from '@/stores/builder.store';
|
||||
import { mockedStore } from '@/__tests__/utils';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
|
||||
vi.mock('@/event-bus', () => ({
|
||||
nodeViewEventBus: {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { createTestingPinia } from '@pinia/testing';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import Assignment from './Assignment.vue';
|
||||
import { defaultSettings } from '@/__tests__/defaults';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { merge } from 'lodash-es';
|
||||
import { cleanupAppModals, createAppModals } from '@/__tests__/utils';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import userEvent from '@testing-library/user-event';
|
||||
import { fireEvent, within } from '@testing-library/vue';
|
||||
import * as workflowHelpers from '@/composables/useWorkflowHelpers';
|
||||
import AssignmentCollection from './AssignmentCollection.vue';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { cleanupAppModals, createAppModals, SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
|
||||
const DEFAULT_SETUP = {
|
||||
|
||||
@@ -2,7 +2,8 @@ import { merge } from 'lodash-es';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import { ROLE, STORES } from '@/constants';
|
||||
import { ROLE } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import BannerStack from '@/components/banners/BannerStack.vue';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { DateTime } from 'luxon';
|
||||
import { defineStore } from 'pinia';
|
||||
import { computed, ref } from 'vue';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { useCloudPlanStore } from '@/stores/cloudPlan.store';
|
||||
import { useStorage } from '@/composables/useStorage';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { getBecomeCreatorCta } from '@/api/ctas';
|
||||
|
||||
const LOCAL_STORAGE_KEY = 'N8N_BECOME_TEMPLATE_CREATOR_CTA_DISMISSED_AT';
|
||||
|
||||
@@ -6,7 +6,7 @@ import ButtonParameter, { type Props } from '@/components/ButtonParameter/Button
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { usePostHog } from '@/stores/posthog.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
@@ -14,7 +14,7 @@ import type { INodeProperties } from 'n8n-workflow';
|
||||
vi.mock('@/stores/ndv.store');
|
||||
vi.mock('@/stores/workflows.store');
|
||||
vi.mock('@/stores/posthog.store');
|
||||
vi.mock('@/stores/root.store');
|
||||
vi.mock('@n8n/stores/useRootStore');
|
||||
vi.mock('@/api/ai');
|
||||
vi.mock('@/composables/useI18n');
|
||||
vi.mock('@/composables/useToast');
|
||||
|
||||
@@ -17,7 +17,7 @@ vi.mock('./utils', async () => {
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock('@/stores/root.store', () => ({
|
||||
vi.mock('@n8n/stores/useRootStore', () => ({
|
||||
useRootStore: () => ({
|
||||
pushRef: 'mockRootPushRef',
|
||||
restApiContext: {},
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useDataSchema } from '@/composables/useDataSchema';
|
||||
import { executionDataToJson } from '@/utils/nodeTypesUtils';
|
||||
import { generateCodeForPrompt } from '@/api/ai';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { type AskAiRequest } from '@/types/assistant.types';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { format } from 'prettier';
|
||||
|
||||
@@ -11,7 +11,7 @@ import CanvasChat from './CanvasChat.vue';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { createTestWorkflowObject } from '@/__tests__/mocks';
|
||||
import { mockedStore } from '@/__tests__/utils';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { ChatOptionsSymbol, ChatSymbol } from '@n8n/chat/constants';
|
||||
import { chatEventBus } from '@n8n/chat/event-buses';
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import ChatEmbedModal from '@/components/ChatEmbedModal.vue';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { CHAT_EMBED_MODAL_KEY, STORES, WEBHOOK_NODE_TYPE } from '@/constants';
|
||||
import { CHAT_EMBED_MODAL_KEY, WEBHOOK_NODE_TYPE } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { waitFor } from '@testing-library/vue';
|
||||
import { cleanupAppModals, createAppModals } from '@/__tests__/utils';
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { EventBus } from '@n8n/utils/event-bus';
|
||||
import { createEventBus } from '@n8n/utils/event-bus';
|
||||
import Modal from './Modal.vue';
|
||||
import { CHAT_EMBED_MODAL_KEY, CHAT_TRIGGER_NODE_TYPE, WEBHOOK_NODE_TYPE } from '../constants';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import HtmlEditor from '@/components/HtmlEditor/HtmlEditor.vue';
|
||||
import JsEditor from '@/components/JsEditor/JsEditor.vue';
|
||||
|
||||
@@ -16,7 +16,7 @@ import { useI18n } from '@/composables/useI18n';
|
||||
import { useMessage } from '@/composables/useMessage';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { executionDataToJson } from '@/utils/nodeTypesUtils';
|
||||
import {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { computed, onBeforeUnmount, onMounted, ref, toRaw, watch } from 'vue';
|
||||
|
||||
import { CODE_NODE_TYPE } from '@/constants';
|
||||
import { codeNodeEditorEventBus } from '@/event-bus';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
|
||||
import { useCodeEditor } from '@/composables/useCodeEditor';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import CollaborationPane from '@/components/MainHeader/CollaborationPane.vue';
|
||||
import type { IUser } from '@/Interface';
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import CommunityPackageInstallModal from './CommunityPackageInstallModal.vue';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { COMMUNITY_PACKAGE_INSTALL_MODAL_KEY, STORES } from '@/constants';
|
||||
import { COMMUNITY_PACKAGE_INSTALL_MODAL_KEY } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { cleanupAppModals, createAppModals, retry } from '@/__tests__/utils';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { IN8nPromptResponse, ModalKey } from '@/Interface';
|
||||
import { VALID_EMAIL_REGEX } from '@/constants';
|
||||
import Modal from '@/components/Modal.vue';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { createEventBus } from '@n8n/utils/event-bus';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { useNpsSurveyStore } from '@/stores/npsSurvey.store';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { merge } from 'lodash-es';
|
||||
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import CopyInput from '@/components/CopyInput.vue';
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { ICredentialDataDecryptedObject, ICredentialType } from 'n8n-workfl
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import type { RenderOptions } from '@/__tests__/render';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
|
||||
const defaultRenderOptions: RenderOptions = {
|
||||
pinia: createTestingPinia({
|
||||
|
||||
@@ -23,7 +23,7 @@ import type { PermissionsRecord } from '@/permissions';
|
||||
import { addCredentialTranslation } from '@/plugins/i18n';
|
||||
import { useCredentialsStore } from '@/stores/credentials.store';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import Banner from '../Banner.vue';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
|
||||
const { baseUrl } = useRootStore();
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import CredentialEdit from '@/components/CredentialEdit/CredentialEdit.vue';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { CREDENTIAL_EDIT_MODAL_KEY, STORES } from '@/constants';
|
||||
import { CREDENTIAL_EDIT_MODAL_KEY } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { cleanupAppModals, createAppModals, retry, mockedStore } from '@/__tests__/utils';
|
||||
import { useCredentialsStore } from '@/stores/credentials.store';
|
||||
import type { ICredentialsResponse } from '@/Interface';
|
||||
|
||||
@@ -6,7 +6,7 @@ import CredentialIcon from '@/components/CredentialIcon.vue';
|
||||
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { useCredentialsStore } from '@/stores/credentials.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useNodeTypesStore } from '../stores/nodeTypes.store';
|
||||
|
||||
describe('CredentialIcon', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useCredentialsStore } from '@/stores/credentials.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { getThemedValue } from '@/utils/nodeTypesUtils';
|
||||
import { N8nNodeIcon } from '@n8n/design-system';
|
||||
|
||||
@@ -5,7 +5,8 @@ import { getDropdownItems } from '@/__tests__/utils';
|
||||
import { createProjectListItem } from '@/__tests__/data/projects';
|
||||
import { createUser } from '@/__tests__/data/users';
|
||||
|
||||
import { DELETE_USER_MODAL_KEY, STORES } from '@/constants';
|
||||
import { DELETE_USER_MODAL_KEY } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { ProjectTypes } from '@/types/projects.types';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useClipboard } from '@/composables/useClipboard';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import type {
|
||||
IDataObject,
|
||||
INodeProperties,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { cleanupAppModals, createAppModals, SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import FilterConditions from '@/components/FilterConditions/FilterConditions.vue';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { cleanupAppModals, createAppModals, SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import FixedCollectionParameter, { type Props } from '@/components/FixedCollectionParameter.vue';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { setActivePinia } from 'pinia';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useUsersStore } from '@/stores/users.store';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { usePostHog } from '@/stores/posthog.store';
|
||||
import { useProjectsStore } from '@/stores/projects.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { renderComponent } from '@/__tests__/render';
|
||||
import { mockedStore } from '@/__tests__/utils';
|
||||
@@ -45,7 +45,7 @@ vi.mock('@/stores/projects.store', () => ({
|
||||
useProjectsStore: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock('@/stores/root.store', () => ({
|
||||
vi.mock('@n8n/stores/useRootStore', () => ({
|
||||
useRootStore: vi.fn(),
|
||||
}));
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import FromAiParametersModal from '@/components/FromAiParametersModal.vue';
|
||||
import { FROM_AI_PARAMETERS_MODAL_KEY, STORES, AI_MCP_TOOL_NODE_TYPE } from '@/constants';
|
||||
import { FROM_AI_PARAMETERS_MODAL_KEY, AI_MCP_TOOL_NODE_TYPE } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { useAgentRequestStore } from '@/stores/agentRequest.store';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
|
||||
import { renderComponent } from '@/__tests__/render';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createTestNode, createTestWorkflow, createTestWorkflowObject } from '@/__tests__/mocks';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import InputPanel, { type Props } from '@/components/InputPanel.vue';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { waitFor } from '@testing-library/vue';
|
||||
|
||||
@@ -4,10 +4,10 @@ import { type MockedStore, mockedStore } from '@/__tests__/utils';
|
||||
import {
|
||||
EnterpriseEditionFeature,
|
||||
MODAL_CONFIRM,
|
||||
STORES,
|
||||
VIEWS,
|
||||
WORKFLOW_SHARE_MODAL_KEY,
|
||||
} from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
|
||||
@@ -23,7 +23,7 @@ import BreakpointsObserver from '@/components/BreakpointsObserver.vue';
|
||||
import WorkflowHistoryButton from '@/components/MainHeader/WorkflowHistoryButton.vue';
|
||||
import CollaborationPane from '@/components/MainHeader/CollaborationPane.vue';
|
||||
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useSourceControlStore } from '@/stores/sourceControl.store';
|
||||
import { useTagsStore } from '@/stores/tags.store';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { computed, onBeforeUnmount, onMounted, ref, nextTick, type Ref } from 'v
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useBecomeTemplateCreatorStore } from '@/components/BecomeTemplateCreatorCta/becomeTemplateCreatorStore';
|
||||
import { useCloudPlanStore } from '@/stores/cloudPlan.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useTemplatesStore } from '@/stores/templates.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
|
||||
@@ -3,7 +3,8 @@ import { waitFor } from '@testing-library/vue';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { merge } from 'lodash-es';
|
||||
import { SOURCE_CONTROL_PULL_MODAL_KEY, SOURCE_CONTROL_PUSH_MODAL_KEY, STORES } from '@/constants';
|
||||
import { SOURCE_CONTROL_PULL_MODAL_KEY, SOURCE_CONTROL_PUSH_MODAL_KEY } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import MainSidebarSourceControl from '@/components/MainSidebarSourceControl.vue';
|
||||
import { useSourceControlStore } from '@/stores/sourceControl.store';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { VALID_EMAIL_REGEX, NPS_SURVEY_MODAL_KEY } from '@/constants';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import ModalDrawer from '@/components/ModalDrawer.vue';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { renderComponent } from '@/__tests__/render';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import ParameterInputWrapper from './ParameterInputWrapper.vue';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { cleanupAppModals, createAppModals, SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import { waitFor } from '@testing-library/vue';
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ import {
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import Modal from '@/components/Modal.vue';
|
||||
import type { IFormInputs, IPersonalizationLatestVersion } from '@/Interface';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { createFormEventBus } from '@n8n/design-system/utils';
|
||||
import { createEventBus } from '@n8n/utils/event-bus';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import PushConnectionTracker from '@/components/PushConnectionTracker.vue';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { setActivePinia } from 'pinia';
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';
|
||||
import { ndvEventBus } from '@/event-bus';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import {
|
||||
|
||||
@@ -2,7 +2,8 @@ import { createTestWorkflowObject, defaultNodeDescriptions } from '@/__tests__/m
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import RunData from '@/components/RunData.vue';
|
||||
import { SET_NODE_TYPE, STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { SET_NODE_TYPE } from '@/constants';
|
||||
import type { INodeUi, IRunDataDisplayMode, NodePanelType } from '@/Interface';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
|
||||
@@ -61,7 +61,7 @@ import { useToast } from '@/composables/useToast';
|
||||
import { dataPinningEventBus, ndvEventBus } from '@/event-bus';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useSourceControlStore } from '@/stores/sourceControl.store';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { executionDataToJson } from '@/utils/nodeTypesUtils';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { cleanup, waitFor } from '@testing-library/vue';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import RunDataPinButton from '@/components/RunDataPinButton.vue';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
|
||||
const renderComponent = createComponentRenderer(RunDataPinButton, {
|
||||
global: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as workflowHelpers from '@/composables/useWorkflowHelpers';
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
|
||||
import SqlEditor from '@/components/SqlEditor/SqlEditor.vue';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { merge } from 'lodash-es';
|
||||
import SSOLogin from '@/components/SSOLogin.vue';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { useSSOStore } from '@/stores/sso.store';
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import { afterEach } from 'vitest';
|
||||
|
||||
@@ -40,7 +40,7 @@ import InlineNameEdit from '@/components/InlineNameEdit.vue';
|
||||
import SaveButton from '@/components/SaveButton.vue';
|
||||
import EventSelection from '@/components/SettingsLogStreaming/EventSelection.ee.vue';
|
||||
import { useTelemetry } from '@/composables/useTelemetry';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
|
||||
import {
|
||||
webhookModalDescription,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useUserHelpers } from '@/composables/useUserHelpers';
|
||||
import type { IMenuItem } from '@n8n/design-system';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { hasPermission } from '@/utils/rbac/permissions';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { createComponentRenderer } from '@/__tests__/render';
|
||||
import type { MockedStore } from '@/__tests__/utils';
|
||||
import { mockedStore } from '@/__tests__/utils';
|
||||
import Telemetry from './Telemetry.vue';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { useTelemetry } from '@/composables/useTelemetry';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import type { ITelemetrySettings } from '@n8n/api-types';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { useProjectsStore } from '@/stores/projects.store';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { format, register } from 'timeago.js';
|
||||
import { convertToHumanReadableDate } from '@/utils/typesUtils';
|
||||
import { computed, onBeforeMount } from 'vue';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useOrchestrationStore } from '@/stores/orchestration.store';
|
||||
import { useDocumentTitle } from '@/composables/useDocumentTitle';
|
||||
import { usePushConnection } from '@/composables/usePushConnection';
|
||||
import { usePushConnectionStore } from '@/stores/pushConnection.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useTelemetry } from '@/composables/useTelemetry';
|
||||
import WorkerCard from './Workers/WorkerCard.ee.vue';
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ vi.mock('@/stores/ui.store', () => {
|
||||
})),
|
||||
};
|
||||
});
|
||||
vi.mock('@/stores/root.store', () => {
|
||||
vi.mock('@n8n/stores/useRootStore', () => {
|
||||
return {
|
||||
useRootStore: vi.fn(() => ({
|
||||
webhookUrl: 'http://webhook-base',
|
||||
|
||||
@@ -4,7 +4,7 @@ import Modal from '@/components/Modal.vue';
|
||||
import { WORKFLOW_ACTIVATION_CONFLICTING_WEBHOOK_MODAL_KEY } from '@/constants';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { computed } from 'vue';
|
||||
|
||||
const modalBus = createEventBus();
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
import type { WorkflowSettings } from 'n8n-workflow';
|
||||
import { deepCopy } from 'n8n-workflow';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useWorkflowsEEStore } from '@/stores/workflows.ee.store';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { createEventBus } from '@n8n/utils/event-bus';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { merge } from 'lodash-es';
|
||||
import type { ResourceMapperFields, ResourceMapperValue } from 'n8n-workflow';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { createTestingPinia } from '@pinia/testing';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { faker } from '@faker-js/faker';
|
||||
import ExecutionsFilter from '@/components/executions/ExecutionsFilter.vue';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import type { IWorkflowShortResponse, ExecutionFilterType } from '@/Interface';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import * as telemetryModule from '@/composables/useTelemetry';
|
||||
|
||||
@@ -3,7 +3,8 @@ import { merge } from 'lodash-es';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { faker } from '@faker-js/faker';
|
||||
import { STORES, VIEWS } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { VIEWS } from '@/constants';
|
||||
import ExecutionsList from '@/components/executions/global/GlobalExecutionsList.vue';
|
||||
import { randomInt, type ExecutionSummary } from 'n8n-workflow';
|
||||
import type { MockedStore } from '@/__tests__/utils';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createComponentRenderer } from '@/__tests__/render';
|
||||
import WorkflowExecutionsCard from '@/components/executions/workflow/WorkflowExecutionsCard.vue';
|
||||
import { setActivePinia } from 'pinia';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
|
||||
vi.mock('vue-router', () => ({
|
||||
useRoute: () => ({
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { MockedStore } from '@/__tests__/utils';
|
||||
import WorkflowExecutionsSidebar from '@/components/executions/workflow/WorkflowExecutionsSidebar.vue';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { mockedStore, SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { merge } from 'lodash-es';
|
||||
import { expect, it } from 'vitest';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user