mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(editor): Extract root store into @n8n/stores package (no-changelog) (#15412)
This commit is contained in:
10
packages/frontend/@n8n/stores/.eslintrc.cjs
Normal file
10
packages/frontend/@n8n/stores/.eslintrc.cjs
Normal file
@@ -0,0 +1,10 @@
|
||||
const sharedOptions = require('@n8n/eslint-config/shared');
|
||||
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
*/
|
||||
module.exports = {
|
||||
extends: ['@n8n/eslint-config/frontend'],
|
||||
|
||||
...sharedOptions(__dirname, 'frontend'),
|
||||
};
|
||||
24
packages/frontend/@n8n/stores/.gitignore
vendored
Normal file
24
packages/frontend/@n8n/stores/.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
24
packages/frontend/@n8n/stores/README.md
Normal file
24
packages/frontend/@n8n/stores/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# @n8n/stores
|
||||
|
||||
A collection of Pinia stores that provide common data-related functionality across n8n's Front-End packages.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Features](#features)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
|
||||
## Features
|
||||
|
||||
- **Composable State Management**: Share and reuse stateful logic across multiple Vue components using Pinia stores.
|
||||
- **Consistent Patterns**: Promote uniform state handling and best practices throughout the front-end codebase.
|
||||
- **Easy Extensibility**: Add or modify stores as project requirements evolve, supporting scalable development.
|
||||
- **Composition API Support**: Designed to work seamlessly with Vue's Composition API for modern, maintainable code.
|
||||
|
||||
## Contributing
|
||||
|
||||
For more details, please read our [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
## License
|
||||
|
||||
For more details, please read our [LICENSE.md](LICENSE.md).
|
||||
4
packages/frontend/@n8n/stores/biome.jsonc
Normal file
4
packages/frontend/@n8n/stores/biome.jsonc
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"$schema": "../../../../node_modules/@biomejs/biome/configuration_schema.json",
|
||||
"extends": ["../../../../biome.jsonc"]
|
||||
}
|
||||
60
packages/frontend/@n8n/stores/package.json
Normal file
60
packages/frontend/@n8n/stores/package.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"name": "@n8n/stores",
|
||||
"type": "module",
|
||||
"version": "1.0.0",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"main": "dist/index.cjs",
|
||||
"module": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./*": {
|
||||
"types": "./dist/*.d.ts",
|
||||
"import": "./dist/*.js",
|
||||
"require": "./dist/*.cjs"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "pnpm run typecheck && tsup",
|
||||
"preview": "vite preview",
|
||||
"typecheck": "vue-tsc --noEmit",
|
||||
"test": "vitest run",
|
||||
"test:dev": "vitest --silent=false",
|
||||
"lint": "eslint src --ext .js,.ts,.vue --quiet",
|
||||
"lintfix": "eslint src --ext .js,.ts,.vue --fix",
|
||||
"format": "biome format --write . && prettier --write . --ignore-path ../../../../.prettierignore",
|
||||
"format:check": "biome ci . && prettier --check . --ignore-path ../../../../.prettierignore"
|
||||
},
|
||||
"dependencies": {
|
||||
"n8n-workflow": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@n8n/eslint-config": "workspace:*",
|
||||
"@n8n/typescript-config": "workspace:*",
|
||||
"@n8n/vitest-config": "workspace:*",
|
||||
"@testing-library/jest-dom": "catalog:frontend",
|
||||
"@testing-library/user-event": "catalog:frontend",
|
||||
"@testing-library/vue": "catalog:frontend",
|
||||
"@vitejs/plugin-vue": "catalog:frontend",
|
||||
"@vue/tsconfig": "catalog:frontend",
|
||||
"@vueuse/core": "catalog:frontend",
|
||||
"vue": "catalog:frontend",
|
||||
"tsup": "catalog:",
|
||||
"typescript": "catalog:frontend",
|
||||
"vite": "catalog:frontend",
|
||||
"vitest": "catalog:frontend",
|
||||
"vue-tsc": "catalog:frontend"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vueuse/core": "catalog:frontend",
|
||||
"vue": "catalog:frontend"
|
||||
},
|
||||
"license": "See LICENSE.md file in the root of the repository"
|
||||
}
|
||||
33
packages/frontend/@n8n/stores/src/constants.ts
Normal file
33
packages/frontend/@n8n/stores/src/constants.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
export const 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',
|
||||
MODULES: 'modules',
|
||||
} as const;
|
||||
1
packages/frontend/@n8n/stores/src/index.ts
Normal file
1
packages/frontend/@n8n/stores/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './constants';
|
||||
19
packages/frontend/@n8n/stores/src/shims.d.ts
vendored
Normal file
19
packages/frontend/@n8n/stores/src/shims.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
export {};
|
||||
|
||||
declare global {
|
||||
interface ImportMeta {
|
||||
env: {
|
||||
DEV: boolean;
|
||||
PROD: boolean;
|
||||
NODE_ENV: 'development' | 'production';
|
||||
VUE_APP_URL_BASE_API: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface Window {
|
||||
BASE_PATH: string;
|
||||
REST_ENDPOINT: string;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,40 @@
|
||||
import { CLOUD_BASE_URL_PRODUCTION, CLOUD_BASE_URL_STAGING, STORES } from '@/constants';
|
||||
import type { RootState } from '@/Interface';
|
||||
import { randomString, setGlobalState } from 'n8n-workflow';
|
||||
import { defineStore } from 'pinia';
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { STORES } from './constants';
|
||||
|
||||
const { VUE_APP_URL_BASE_API } = import.meta.env;
|
||||
|
||||
export type RootStoreState = {
|
||||
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 const useRootStore = defineStore(STORES.ROOT, () => {
|
||||
const state = ref<RootState>({
|
||||
const state = ref<RootStoreState>({
|
||||
baseUrl: VUE_APP_URL_BASE_API ?? window.BASE_PATH,
|
||||
restEndpoint:
|
||||
!window.REST_ENDPOINT || window.REST_ENDPOINT === '{{REST_ENDPOINT}}'
|
||||
@@ -85,13 +112,6 @@ export const useRootStore = defineStore(STORES.ROOT, () => {
|
||||
|
||||
const timezone = computed(() => state.value.timezone);
|
||||
|
||||
const restCloudApiContext = computed(() => ({
|
||||
baseUrl: window.location.host.includes('stage-app.n8n.cloud')
|
||||
? CLOUD_BASE_URL_STAGING
|
||||
: CLOUD_BASE_URL_PRODUCTION,
|
||||
pushRef: '',
|
||||
}));
|
||||
|
||||
const restApiContext = computed(() => ({
|
||||
baseUrl: restUrl.value,
|
||||
pushRef: state.value.pushRef,
|
||||
@@ -103,75 +123,75 @@ export const useRootStore = defineStore(STORES.ROOT, () => {
|
||||
// #region Methods
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const setUrlBaseWebhook = (urlBaseWebhook: string) => {
|
||||
const url = urlBaseWebhook.endsWith('/') ? urlBaseWebhook : `${urlBaseWebhook}/`;
|
||||
const setUrlBaseWebhook = (value: string) => {
|
||||
const url = value.endsWith('/') ? value : `${value}/`;
|
||||
state.value.urlBaseWebhook = url;
|
||||
};
|
||||
|
||||
const setUrlBaseEditor = (urlBaseEditor: string) => {
|
||||
const url = urlBaseEditor.endsWith('/') ? urlBaseEditor : `${urlBaseEditor}/`;
|
||||
const setUrlBaseEditor = (value: string) => {
|
||||
const url = value.endsWith('/') ? value : `${value}/`;
|
||||
state.value.urlBaseEditor = url;
|
||||
};
|
||||
|
||||
const setEndpointForm = (endpointForm: string) => {
|
||||
state.value.endpointForm = endpointForm;
|
||||
const setEndpointForm = (value: string) => {
|
||||
state.value.endpointForm = value;
|
||||
};
|
||||
|
||||
const setEndpointFormTest = (endpointFormTest: string) => {
|
||||
state.value.endpointFormTest = endpointFormTest;
|
||||
const setEndpointFormTest = (value: string) => {
|
||||
state.value.endpointFormTest = value;
|
||||
};
|
||||
|
||||
const setEndpointFormWaiting = (endpointFormWaiting: string) => {
|
||||
state.value.endpointFormWaiting = endpointFormWaiting;
|
||||
const setEndpointFormWaiting = (value: string) => {
|
||||
state.value.endpointFormWaiting = value;
|
||||
};
|
||||
|
||||
const setEndpointWebhook = (endpointWebhook: string) => {
|
||||
state.value.endpointWebhook = endpointWebhook;
|
||||
const setEndpointWebhook = (value: string) => {
|
||||
state.value.endpointWebhook = value;
|
||||
};
|
||||
|
||||
const setEndpointWebhookTest = (endpointWebhookTest: string) => {
|
||||
state.value.endpointWebhookTest = endpointWebhookTest;
|
||||
const setEndpointWebhookTest = (value: string) => {
|
||||
state.value.endpointWebhookTest = value;
|
||||
};
|
||||
|
||||
const setEndpointWebhookWaiting = (endpointWebhookWaiting: string) => {
|
||||
state.value.endpointWebhookWaiting = endpointWebhookWaiting;
|
||||
const setEndpointWebhookWaiting = (value: string) => {
|
||||
state.value.endpointWebhookWaiting = value;
|
||||
};
|
||||
|
||||
const setTimezone = (timezone: string) => {
|
||||
state.value.timezone = timezone;
|
||||
setGlobalState({ defaultTimezone: timezone });
|
||||
const setTimezone = (value: string) => {
|
||||
state.value.timezone = value;
|
||||
setGlobalState({ defaultTimezone: value });
|
||||
};
|
||||
|
||||
const setExecutionTimeout = (executionTimeout: number) => {
|
||||
state.value.executionTimeout = executionTimeout;
|
||||
const setExecutionTimeout = (value: number) => {
|
||||
state.value.executionTimeout = value;
|
||||
};
|
||||
|
||||
const setMaxExecutionTimeout = (maxExecutionTimeout: number) => {
|
||||
state.value.maxExecutionTimeout = maxExecutionTimeout;
|
||||
const setMaxExecutionTimeout = (value: number) => {
|
||||
state.value.maxExecutionTimeout = value;
|
||||
};
|
||||
|
||||
const setVersionCli = (version: string) => {
|
||||
state.value.versionCli = version;
|
||||
const setVersionCli = (value: string) => {
|
||||
state.value.versionCli = value;
|
||||
};
|
||||
|
||||
const setInstanceId = (instanceId: string) => {
|
||||
state.value.instanceId = instanceId;
|
||||
const setInstanceId = (value: string) => {
|
||||
state.value.instanceId = value;
|
||||
};
|
||||
|
||||
const setOauthCallbackUrls = (urls: RootState['oauthCallbackUrls']) => {
|
||||
state.value.oauthCallbackUrls = urls;
|
||||
const setOauthCallbackUrls = (value: RootStoreState['oauthCallbackUrls']) => {
|
||||
state.value.oauthCallbackUrls = value;
|
||||
};
|
||||
|
||||
const setN8nMetadata = (metadata: RootState['n8nMetadata']) => {
|
||||
state.value.n8nMetadata = metadata;
|
||||
const setN8nMetadata = (value: RootStoreState['n8nMetadata']) => {
|
||||
state.value.n8nMetadata = value;
|
||||
};
|
||||
|
||||
const setDefaultLocale = (locale: string) => {
|
||||
state.value.defaultLocale = locale;
|
||||
const setDefaultLocale = (value: string) => {
|
||||
state.value.defaultLocale = value;
|
||||
};
|
||||
|
||||
const setBinaryDataMode = (binaryDataMode: RootState['binaryDataMode']) => {
|
||||
state.value.binaryDataMode = binaryDataMode;
|
||||
const setBinaryDataMode = (value: RootStoreState['binaryDataMode']) => {
|
||||
state.value.binaryDataMode = value;
|
||||
};
|
||||
|
||||
// #endregion
|
||||
@@ -187,7 +207,6 @@ export const useRootStore = defineStore(STORES.ROOT, () => {
|
||||
webhookTestUrl,
|
||||
webhookWaitingUrl,
|
||||
restUrl,
|
||||
restCloudApiContext,
|
||||
restApiContext,
|
||||
urlBaseEditor,
|
||||
versionCli,
|
||||
11
packages/frontend/@n8n/stores/tsconfig.json
Normal file
11
packages/frontend/@n8n/stores/tsconfig.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "@n8n/typescript-config/tsconfig.frontend.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"rootDir": ".",
|
||||
"outDir": "dist",
|
||||
"types": ["vite/client", "vitest/globals"],
|
||||
"isolatedModules": true
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.vue", "vite.config.ts", "tsup.config.ts"]
|
||||
}
|
||||
11
packages/frontend/@n8n/stores/tsup.config.ts
Normal file
11
packages/frontend/@n8n/stores/tsup.config.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { defineConfig } from 'tsup';
|
||||
|
||||
export default defineConfig({
|
||||
entry: ['src/**/*.ts', '!src/**/*.test.ts', '!src/**/*.d.ts', '!src/__tests__**/*'],
|
||||
format: ['cjs', 'esm'],
|
||||
clean: true,
|
||||
dts: true,
|
||||
cjsInterop: true,
|
||||
splitting: true,
|
||||
sourcemap: true,
|
||||
});
|
||||
4
packages/frontend/@n8n/stores/vite.config.ts
Normal file
4
packages/frontend/@n8n/stores/vite.config.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { defineConfig, mergeConfig } from 'vite';
|
||||
import { vitestConfig } from '@n8n/vitest-config/frontend';
|
||||
|
||||
export default mergeConfig(defineConfig({}), vitestConfig);
|
||||
@@ -38,6 +38,7 @@
|
||||
"@n8n/composables": "workspace:*",
|
||||
"@n8n/design-system": "workspace:*",
|
||||
"@n8n/permissions": "workspace:*",
|
||||
"@n8n/stores": "workspace:*",
|
||||
"@n8n/utils": "workspace:*",
|
||||
"@replit/codemirror-indentation-markers": "^6.5.3",
|
||||
"@sentry/vue": "catalog:frontend",
|
||||
|
||||
@@ -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';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user