mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(editor): Extract root store into @n8n/stores package (no-changelog) (#15412)
This commit is contained in:
@@ -11,7 +11,7 @@ import AskAssistantFloatingButton from '@/components/AskAssistant/Chat/AskAssist
|
||||
import AssistantsHub from '@/components/AskAssistant/AssistantsHub.vue';
|
||||
import { loadLanguage } from '@/plugins/i18n';
|
||||
import { APP_MODALS_ELEMENT_ID, HIRING_BANNER, VIEWS } from '@/constants';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useAssistantStore } from '@/stores/assistant.store';
|
||||
import { useBuilderStore } from '@/stores/builder.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
|
||||
@@ -970,33 +970,6 @@ export interface WorkflowsState {
|
||||
isInDebugMode?: boolean;
|
||||
}
|
||||
|
||||
export interface RootState {
|
||||
baseUrl: string;
|
||||
restEndpoint: string;
|
||||
defaultLocale: string;
|
||||
endpointForm: string;
|
||||
endpointFormTest: string;
|
||||
endpointFormWaiting: string;
|
||||
endpointMcp: string;
|
||||
endpointMcpTest: string;
|
||||
endpointWebhook: string;
|
||||
endpointWebhookTest: string;
|
||||
endpointWebhookWaiting: string;
|
||||
timezone: string;
|
||||
executionTimeout: number;
|
||||
maxExecutionTimeout: number;
|
||||
versionCli: string;
|
||||
oauthCallbackUrls: object;
|
||||
n8nMetadata: {
|
||||
[key: string]: string | number | undefined;
|
||||
};
|
||||
pushRef: string;
|
||||
urlBaseWebhook: string;
|
||||
urlBaseEditor: string;
|
||||
instanceId: string;
|
||||
binaryDataMode: 'default' | 'filesystem' | 's3';
|
||||
}
|
||||
|
||||
export interface NodeMetadataMap {
|
||||
[nodeName: string]: INodeMetadata;
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ vi.mock('@/stores/ndv.store', () => ({
|
||||
})),
|
||||
}));
|
||||
|
||||
vi.mock('@/stores/root.store', () => ({
|
||||
vi.mock('@n8n/stores/useRootStore', () => ({
|
||||
useRootStore: vi.fn(() => ({
|
||||
instanceId: 'test-instance-id',
|
||||
})),
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ExpressionExtensions } from 'n8n-workflow';
|
||||
import { EditorView, type ViewUpdate } from '@codemirror/view';
|
||||
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useTelemetry } from '../composables/useTelemetry';
|
||||
import type { Compartment } from '@codemirror/state';
|
||||
import { debounce } from 'lodash-es';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useBeforeUnload } from '@/composables/useBeforeUnload';
|
||||
import { STORES, VIEWS } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { VIEWS } from '@/constants';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useCanvasStore } from '@/stores/canvas.store';
|
||||
import type { useRoute } from 'vue-router';
|
||||
|
||||
@@ -13,7 +13,8 @@ import {
|
||||
mockNodes,
|
||||
mockNodeTypeDescription,
|
||||
} from '@/__tests__/mocks';
|
||||
import { MANUAL_TRIGGER_NODE_TYPE, SET_NODE_TYPE, STICKY_NODE_TYPE, STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { MANUAL_TRIGGER_NODE_TYPE, SET_NODE_TYPE, STICKY_NODE_TYPE } from '@/constants';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { createCanvasConnectionHandleString, createCanvasConnectionId } from '@/utils/canvasUtils';
|
||||
import { CanvasConnectionMode, CanvasNodeRenderType } from '@/types';
|
||||
@@ -21,7 +22,7 @@ import { MarkerType } from '@vue-flow/core';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { mockedStore } from '@/__tests__/utils';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
import { useRootStore } from '../stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
|
||||
beforeEach(() => {
|
||||
const pinia = createTestingPinia({
|
||||
|
||||
@@ -43,9 +43,9 @@ import {
|
||||
FORM_TRIGGER_NODE_TYPE,
|
||||
SET_NODE_TYPE,
|
||||
STICKY_NODE_TYPE,
|
||||
STORES,
|
||||
WEBHOOK_NODE_TYPE,
|
||||
} from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import type { Connection } from '@vue-flow/core';
|
||||
import { useClipboard } from '@/composables/useClipboard';
|
||||
import { createCanvasConnectionHandleString } from '@/utils/canvasUtils';
|
||||
|
||||
@@ -48,7 +48,7 @@ import { useHistoryStore } from '@/stores/history.store';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useNodeCreatorStore } from '@/stores/nodeCreator.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useTagsStore } from '@/stores/tags.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
import { useDebugInfo } from './useDebugInfo';
|
||||
import type { RootState } from '@/Interface';
|
||||
import type { RootStoreState } from '@n8n/stores/useRootStore';
|
||||
import type { useSettingsStore as useSettingsStoreType } from '@/stores/settings.store';
|
||||
import type { RecursivePartial } from '@/type-utils';
|
||||
|
||||
vi.mock('@/stores/root.store', () => ({
|
||||
useRootStore: (): Partial<RootState> => ({
|
||||
vi.mock('@n8n/stores/useRootStore', () => ({
|
||||
useRootStore: (): Partial<RootStoreState> => ({
|
||||
versionCli: '0.123.0',
|
||||
}),
|
||||
}));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useDeviceSupport } from '@n8n/composables/useDeviceSupport';
|
||||
import type { WorkflowSettings } from 'n8n-workflow';
|
||||
|
||||
@@ -14,7 +14,7 @@ import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useTelemetry } from './useTelemetry';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { isFullExecutionResponse } from '@/utils/typeGuards';
|
||||
import { sanitizeHtml } from '@/utils/htmlUtils';
|
||||
import { usePageRedirectionHelper } from './usePageRedirectionHelper';
|
||||
|
||||
@@ -15,7 +15,7 @@ import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
import { useTelemetry } from '@/composables/useTelemetry';
|
||||
import type { MaybeRef } from 'vue';
|
||||
import { computed, unref } from 'vue';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useNodeType } from '@/composables/useNodeType';
|
||||
import { useDataSchema } from './useDataSchema';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
SINGLE_WEBHOOK_TRIGGERS,
|
||||
} from '@/constants';
|
||||
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { displayForm } from '@/utils/executionUtils';
|
||||
import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
|
||||
@@ -48,7 +48,7 @@ import { useNodeHelpers } from '@/composables/useNodeHelpers';
|
||||
import { get } from 'lodash-es';
|
||||
|
||||
import { useEnvironmentsStore } from '@/stores/environments.ee.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
import { useTemplatesStore } from '@/stores/templates.store';
|
||||
|
||||
@@ -691,39 +691,6 @@ export const CURL_IMPORT_NODES_PROTOCOLS: { [key: string]: string } = {
|
||||
imaps: 'IMAP',
|
||||
};
|
||||
|
||||
export const enum STORES {
|
||||
COMMUNITY_NODES = 'communityNodes',
|
||||
ROOT = 'root',
|
||||
SETTINGS = 'settings',
|
||||
UI = 'ui',
|
||||
USERS = 'users',
|
||||
WORKFLOWS = 'workflows',
|
||||
WORKFLOWS_V2 = 'workflowsV2',
|
||||
WORKFLOWS_EE = 'workflowsEE',
|
||||
EXECUTIONS = 'executions',
|
||||
NDV = 'ndv',
|
||||
TEMPLATES = 'templates',
|
||||
NODE_TYPES = 'nodeTypes',
|
||||
CREDENTIALS = 'credentials',
|
||||
TAGS = 'tags',
|
||||
ANNOTATION_TAGS = 'annotationTags',
|
||||
VERSIONS = 'versions',
|
||||
NODE_CREATOR = 'nodeCreator',
|
||||
WEBHOOKS = 'webhooks',
|
||||
HISTORY = 'history',
|
||||
CLOUD_PLAN = 'cloudPlan',
|
||||
RBAC = 'rbac',
|
||||
PUSH = 'push',
|
||||
COLLABORATION = 'collaboration',
|
||||
ASSISTANT = 'assistant',
|
||||
BUILDER = 'builder',
|
||||
BECOME_TEMPLATE_CREATOR = 'becomeTemplateCreator',
|
||||
PROJECTS = 'projects',
|
||||
API_KEYS = 'apiKeys',
|
||||
TEST_DEFINITION = 'testDefinition',
|
||||
FOLDERS = 'folders',
|
||||
}
|
||||
|
||||
export const enum SignInType {
|
||||
LDAP = 'ldap',
|
||||
EMAIL = 'email',
|
||||
@@ -836,10 +803,6 @@ export const CLOUD_CHANGE_PLAN_PAGE = window.location.host.includes('stage-app.n
|
||||
? 'https://stage-app.n8n.cloud/account/change-plan'
|
||||
: 'https://app.n8n.cloud/account/change-plan';
|
||||
|
||||
export const CLOUD_BASE_URL_STAGING = 'https://stage-api.n8n.cloud';
|
||||
|
||||
export const CLOUD_BASE_URL_PRODUCTION = 'https://api.n8n.cloud';
|
||||
|
||||
export const CLOUD_TRIAL_CHECK_INTERVAL = 5000;
|
||||
|
||||
// A path that does not exist so that nothing is selected by default
|
||||
|
||||
@@ -3,7 +3,7 @@ import { defineStore } from 'pinia';
|
||||
import { useAsyncState } from '@vueuse/core';
|
||||
import type { ListInsightsWorkflowQueryDto, InsightsDateRange } from '@n8n/api-types';
|
||||
import * as insightsApi from '@/features/insights/insights.api';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { transformInsightsSummary } from '@/features/insights/insights.utils';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useUsersStore } from '@/stores/users.store';
|
||||
import { useCloudPlanStore } from '@/stores/cloudPlan.store';
|
||||
import { useSourceControlStore } from '@/stores/sourceControl.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { initializeAuthenticatedFeatures, initializeCore } from '@/init';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { setActivePinia } from 'pinia';
|
||||
@@ -20,7 +20,7 @@ vi.mock('@/stores/users.store', () => ({
|
||||
useUsersStore: vi.fn().mockReturnValue({ initialize: vi.fn() }),
|
||||
}));
|
||||
|
||||
vi.mock('@/stores/root.store', () => ({
|
||||
vi.mock('@n8n/stores/useRootStore', () => ({
|
||||
useRootStore: vi.fn(),
|
||||
}));
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { h } from 'vue';
|
||||
import { useCloudPlanStore } from '@/stores/cloudPlan.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
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 { useUsersStore } from '@/stores/users.store';
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { INodeProperties, INodePropertyCollection, INodePropertyOptions } f
|
||||
import type { INodeTranslationHeaders } from '@/Interface';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import englishBaseText from './locales/en.json';
|
||||
import {
|
||||
deriveMiddleKey,
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
SLACK_NODE_TYPE,
|
||||
TELEGRAM_NODE_TYPE,
|
||||
} from '@/constants';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { usePostHog } from '@/stores/posthog.store';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { defineStore } from 'pinia';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
|
||||
import * as publicApiApi from '@/api/api-keys';
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
@@ -2,17 +2,17 @@ import { chatWithAssistant, replaceCode } from '@/api/ai';
|
||||
import {
|
||||
VIEWS,
|
||||
EDITABLE_CANVAS_VIEWS,
|
||||
STORES,
|
||||
PLACEHOLDER_EMPTY_WORKFLOW_ID,
|
||||
CREDENTIAL_EDIT_MODAL_KEY,
|
||||
ASK_AI_SLIDE_OUT_DURATION_MS,
|
||||
} from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import type { ChatRequest } from '@/types/assistant.types';
|
||||
import type { ChatUI } from '@n8n/design-system/types/assistant';
|
||||
import { defineStore } from 'pinia';
|
||||
import type { PushPayload } from '@n8n/api-types';
|
||||
import { computed, h, ref, watch } from 'vue';
|
||||
import { useRootStore } from './root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useUsersStore } from './users.store';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useSettingsStore } from './settings.store';
|
||||
|
||||
@@ -3,14 +3,14 @@ import type { VIEWS } from '@/constants';
|
||||
import {
|
||||
ASK_AI_SLIDE_OUT_DURATION_MS,
|
||||
EDITABLE_CANVAS_VIEWS,
|
||||
STORES,
|
||||
WORKFLOW_BUILDER_EXPERIMENT,
|
||||
} from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import type { ChatRequest } from '@/types/assistant.types';
|
||||
import type { ChatUI } from '@n8n/design-system/types/assistant';
|
||||
import { defineStore } from 'pinia';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useRootStore } from './root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useUsersStore } from './users.store';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useSettingsStore } from './settings.store';
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { computed, reactive } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import type { CloudPlanState } from '@/Interface';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { getAdminPanelLoginCode, getCurrentPlan, getCurrentUsage } from '@/api/cloudPlans';
|
||||
import { DateTime } from 'luxon';
|
||||
import { CLOUD_TRIAL_CHECK_INTERVAL, STORES } from '@/constants';
|
||||
import { CLOUD_TRIAL_CHECK_INTERVAL } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { hasPermission } from '@/utils/rbac/permissions';
|
||||
|
||||
const DEFAULT_STATE: CloudPlanState = {
|
||||
@@ -167,9 +168,7 @@ export const useCloudPlanStore = defineStore(STORES.CLOUD_PLAN, () => {
|
||||
state.initialized = true;
|
||||
};
|
||||
|
||||
const generateCloudDashboardAutoLoginLink = async (data: {
|
||||
redirectionPath: string;
|
||||
}) => {
|
||||
const generateCloudDashboardAutoLoginLink = async (data: { redirectionPath: string }) => {
|
||||
const searchParams = new URLSearchParams();
|
||||
|
||||
const adminPanelHost = new URL(window.location.href).host.split('.').slice(1).join('.');
|
||||
|
||||
@@ -3,7 +3,8 @@ import { ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import type { Collaborator } from '@n8n/api-types';
|
||||
|
||||
import { STORES, PLACEHOLDER_EMPTY_WORKFLOW_ID, TIME } from '@/constants';
|
||||
import { PLACEHOLDER_EMPTY_WORKFLOW_ID, TIME } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { useBeforeUnload } from '@/composables/useBeforeUnload';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { usePushConnectionStore } from '@/stores/pushConnection.store';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import * as communityNodesApi from '@/api/communityNodes';
|
||||
import { getAvailableCommunityPackageCount } from '@/api/settings';
|
||||
import { defineStore } from 'pinia';
|
||||
import { useRootStore } from './root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import type { PublicInstalledPackage } from 'n8n-workflow';
|
||||
import type { CommunityPackageMap } from '@/Interface';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
const LOADER_DELAY = 300;
|
||||
|
||||
@@ -9,7 +9,8 @@ import type {
|
||||
} from '@/Interface';
|
||||
import * as credentialsApi from '@/api/credentials';
|
||||
import * as credentialsEeApi from '@/api/credentials.ee';
|
||||
import { EnterpriseEditionFeature, STORES } from '@/constants';
|
||||
import { EnterpriseEditionFeature } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { i18n } from '@/plugins/i18n';
|
||||
import type { ProjectSharingData } from '@/types/projects.types';
|
||||
import { makeRestApiRequest } from '@/utils/apiUtils';
|
||||
@@ -24,7 +25,7 @@ import type {
|
||||
import { defineStore } from 'pinia';
|
||||
import { computed, ref } from 'vue';
|
||||
import { useNodeTypesStore } from './nodeTypes.store';
|
||||
import { useRootStore } from './root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useSettingsStore } from './settings.store';
|
||||
import * as aiApi from '@/api/ai';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { defineStore } from 'pinia';
|
||||
import { computed, ref } from 'vue';
|
||||
import type { EnvironmentVariable } from '@/Interface';
|
||||
import * as environmentsApi from '@/api/environments.ee';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { ExpressionError } from 'n8n-workflow';
|
||||
|
||||
export const useEnvironmentsStore = defineStore('environments', () => {
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
IExecutionsListResponse,
|
||||
IExecutionsStopData,
|
||||
} from '@/Interface';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { makeRestApiRequest, unflattenExecutionData } from '@/utils/apiUtils';
|
||||
import { executionFilterToQueryFilter, getDefaultExecutionFilters } from '@/utils/executionUtils';
|
||||
import { useProjectsStore } from '@/stores/projects.store';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { computed, reactive } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import { EnterpriseEditionFeature } from '@/constants';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import * as externalSecretsApi from '@/api/externalSecrets.ee';
|
||||
import { connectProvider } from '@/api/externalSecrets.ee';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import type {
|
||||
ChangeLocationSearchResult,
|
||||
FolderCreateResponse,
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
FolderTreeResponseItem,
|
||||
} from '@/Interface';
|
||||
import * as workflowsApi from '@/api/workflows';
|
||||
import { useRootStore } from './root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
import type { DragTarget, DropTarget } from '@/composables/useFolders';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Command, Undoable } from '@/models/history';
|
||||
import { BulkCommand } from '@/models/history';
|
||||
import { STORES } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import type { HistoryState } from '@/Interface';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
saveDestinationToDb,
|
||||
sendTestMessageToDestination,
|
||||
} from '@/api/eventbus.ee';
|
||||
import { useRootStore } from './root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { ref } from 'vue';
|
||||
|
||||
export interface EventSelectionItem {
|
||||
|
||||
@@ -17,8 +17,8 @@ import {
|
||||
LOCAL_STORAGE_NDV_INPUT_PANEL_DISPLAY_MODE,
|
||||
LOCAL_STORAGE_NDV_OUTPUT_PANEL_DISPLAY_MODE,
|
||||
LOCAL_STORAGE_TABLE_HOVER_IS_ONBOARDED,
|
||||
STORES,
|
||||
} from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import type { INodeIssues } from 'n8n-workflow';
|
||||
import { NodeConnectionTypes } from 'n8n-workflow';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
@@ -6,9 +6,9 @@ import {
|
||||
CUSTOM_API_CALL_KEY,
|
||||
NODE_CREATOR_OPEN_SOURCES,
|
||||
REGULAR_NODE_CREATOR_VIEW,
|
||||
STORES,
|
||||
TRIGGER_NODE_CREATOR_VIEW,
|
||||
} from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import type {
|
||||
NodeFilterType,
|
||||
NodeCreatorOpenSource,
|
||||
|
||||
@@ -5,7 +5,8 @@ import type {
|
||||
ResourceMapperFieldsRequestDto,
|
||||
} from '@n8n/api-types';
|
||||
import * as nodeTypesApi from '@/api/nodeTypes';
|
||||
import { HTTP_REQUEST_NODE_TYPE, STORES, CREDENTIAL_ONLY_HTTP_NODE_VERSION } from '@/constants';
|
||||
import { HTTP_REQUEST_NODE_TYPE, CREDENTIAL_ONLY_HTTP_NODE_VERSION } from '@/constants';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import type { NodeTypesByTypeNameAndVersion } from '@/Interface';
|
||||
import { addHeaders, addNodeTranslation } from '@/plugins/i18n';
|
||||
import { omit } from '@/utils/typesUtils';
|
||||
@@ -21,7 +22,7 @@ import type {
|
||||
import { NodeConnectionTypes, NodeHelpers } from 'n8n-workflow';
|
||||
import { defineStore } from 'pinia';
|
||||
import { useCredentialsStore } from './credentials.store';
|
||||
import { useRootStore } from './root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import * as utils from '@/utils/credentialOnlyNodes';
|
||||
import { groupNodeTypesByNameAndType } from '@/utils/nodeTypes/nodeTypeTransforms';
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
NPS_SURVEY_MODAL_KEY,
|
||||
CONTACT_PROMPT_MODAL_KEY,
|
||||
} from '@/constants';
|
||||
import { useRootStore } from './root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import type { IUserSettings, NpsSurveyState } from 'n8n-workflow';
|
||||
import { useSettingsStore } from './settings.store';
|
||||
import { updateNpsSurveyState } from '@/api/npsSurvey';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import type { WorkerStatus } from '@n8n/api-types';
|
||||
|
||||
import { useRootStore } from './root.store';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { sendGetWorkerStatus } from '../api/orchestration';
|
||||
|
||||
export const WORKER_HISTORY_LENGTH = 100;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user