mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix: remove import cycle.
This commit is contained in:
parent
206289a7b0
commit
beea77229c
|
@ -1,6 +1,6 @@
|
||||||
import PersonalizationModal from '@/components/PersonalizationModal.vue';
|
import PersonalizationModal from '@/components/PersonalizationModal.vue';
|
||||||
import { createTestingPinia } from '@pinia/testing';
|
import { createTestingPinia } from '@pinia/testing';
|
||||||
import { PERSONALIZATION_MODAL_KEY } from '@/constants';
|
import { PERSONALIZATION_MODAL_KEY, STORES } from '@/constants';
|
||||||
import { retry } from '@/__tests__/utils';
|
import { retry } from '@/__tests__/utils';
|
||||||
import { createComponentRenderer } from '@/__tests__/render';
|
import { createComponentRenderer } from '@/__tests__/render';
|
||||||
import { fireEvent } from '@testing-library/vue';
|
import { fireEvent } from '@testing-library/vue';
|
||||||
|
@ -8,12 +8,12 @@ import { fireEvent } from '@testing-library/vue';
|
||||||
const renderComponent = createComponentRenderer(PersonalizationModal, {
|
const renderComponent = createComponentRenderer(PersonalizationModal, {
|
||||||
pinia: createTestingPinia({
|
pinia: createTestingPinia({
|
||||||
initialState: {
|
initialState: {
|
||||||
ui: {
|
[STORES.UI]: {
|
||||||
modals: {
|
modals: {
|
||||||
[PERSONALIZATION_MODAL_KEY]: { open: true },
|
[PERSONALIZATION_MODAL_KEY]: { open: true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
settings: {
|
[STORES.SETTINGS]: {
|
||||||
settings: {
|
settings: {
|
||||||
templates: {
|
templates: {
|
||||||
host: '',
|
host: '',
|
||||||
|
|
|
@ -58,11 +58,11 @@ import { useNDVStore } from '@/stores/ndv.store';
|
||||||
import { useTemplatesStore } from '@/stores/templates.store';
|
import { useTemplatesStore } from '@/stores/templates.store';
|
||||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||||
import { useWorkflowsEEStore } from '@/stores/workflows.ee.store';
|
import { useWorkflowsEEStore } from '@/stores/workflows.ee.store';
|
||||||
|
import { useEnvironmentsStore } from '@/stores/environments.ee.store';
|
||||||
import { useUsersStore } from '@/stores/users.store';
|
import { useUsersStore } from '@/stores/users.store';
|
||||||
import type { IPermissions } from '@/permissions';
|
|
||||||
import { getWorkflowPermissions } from '@/permissions';
|
import { getWorkflowPermissions } from '@/permissions';
|
||||||
|
import type { IPermissions } from '@/permissions';
|
||||||
import type { ICredentialsResponse } from '@/Interface';
|
import type { ICredentialsResponse } from '@/Interface';
|
||||||
import { useEnvironmentsStore } from '@/stores';
|
|
||||||
|
|
||||||
export function resolveParameter(
|
export function resolveParameter(
|
||||||
parameter: NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[],
|
parameter: NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[],
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { CLOUD_BASE_URL_PRODUCTION, CLOUD_BASE_URL_STAGING, STORES } from '@/con
|
||||||
import type { IRestApiContext, RootState } from '@/Interface';
|
import type { IRestApiContext, RootState } from '@/Interface';
|
||||||
import type { IDataObject } from 'n8n-workflow';
|
import type { IDataObject } from 'n8n-workflow';
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { useNodeTypesStore } from './nodeTypes.store';
|
|
||||||
|
|
||||||
const { VUE_APP_URL_BASE_API } = import.meta.env;
|
const { VUE_APP_URL_BASE_API } = import.meta.env;
|
||||||
|
|
||||||
|
@ -62,15 +61,6 @@ export const useRootStore = defineStore(STORES.ROOT, {
|
||||||
sessionId: this.sessionId,
|
sessionId: this.sessionId,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* Getter for node default names ending with a number: `'S3'`, `'Magento 2'`, etc.
|
|
||||||
*/
|
|
||||||
nativelyNumberSuffixedDefaults: (): string[] => {
|
|
||||||
return useNodeTypesStore().allNodeTypes.reduce<string[]>((acc, cur) => {
|
|
||||||
if (/\d$/.test(cur.defaults.name as string)) acc.push(cur.defaults.name as string);
|
|
||||||
return acc;
|
|
||||||
}, []);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
setUrlBaseWebhook(urlBaseWebhook: string): void {
|
setUrlBaseWebhook(urlBaseWebhook: string): void {
|
||||||
|
|
|
@ -87,6 +87,15 @@ export const useNodeTypesStore = defineStore(STORES.NODE_TYPES, {
|
||||||
visibleNodeTypes(): INodeTypeDescription[] {
|
visibleNodeTypes(): INodeTypeDescription[] {
|
||||||
return this.allLatestNodeTypes.filter((nodeType: INodeTypeDescription) => !nodeType.hidden);
|
return this.allLatestNodeTypes.filter((nodeType: INodeTypeDescription) => !nodeType.hidden);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Getter for node default names ending with a number: `'S3'`, `'Magento 2'`, etc.
|
||||||
|
*/
|
||||||
|
nativelyNumberSuffixedDefaults(): string[] {
|
||||||
|
return this.allNodeTypes.reduce<string[]>((acc, cur) => {
|
||||||
|
if (/\d$/.test(cur.defaults.name as string)) acc.push(cur.defaults.name as string);
|
||||||
|
return acc;
|
||||||
|
}, []);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
setNodeTypes(newNodeTypes: INodeTypeDescription[] = []): void {
|
setNodeTypes(newNodeTypes: INodeTypeDescription[] = []): void {
|
||||||
|
|
|
@ -496,7 +496,7 @@ export default defineComponent({
|
||||||
useHistoryStore,
|
useHistoryStore,
|
||||||
),
|
),
|
||||||
nativelyNumberSuffixedDefaults(): string[] {
|
nativelyNumberSuffixedDefaults(): string[] {
|
||||||
return this.rootStore.nativelyNumberSuffixedDefaults;
|
return this.nodeTypesStore.nativelyNumberSuffixedDefaults;
|
||||||
},
|
},
|
||||||
currentUser(): IUser | null {
|
currentUser(): IUser | null {
|
||||||
return this.usersStore.currentUser;
|
return this.usersStore.currentUser;
|
||||||
|
|
|
@ -121,10 +121,10 @@ export default mergeConfig(
|
||||||
include: [
|
include: [
|
||||||
// 'src/components/__tests__/SQLEditor.test.ts',
|
// 'src/components/__tests__/SQLEditor.test.ts',
|
||||||
// 'src/components/__tests__/BannersStack.test.ts',
|
// 'src/components/__tests__/BannersStack.test.ts',
|
||||||
'src/components/__tests__/ExecutionFilter.test.ts',
|
// 'src/components/__tests__/ExecutionFilter.test.ts',
|
||||||
// 'src/components/__tests__/ExecutionsList.test.ts',
|
// 'src/components/__tests__/ExecutionsList.test.ts',
|
||||||
// 'src/components/__tests__/MainSidebarSourceControl.test.ts',
|
// 'src/components/__tests__/MainSidebarSourceControl.test.ts',
|
||||||
// 'src/components/__tests__/PersonalizationModal.spec.ts',
|
'src/components/__tests__/PersonalizationModal.spec.ts',
|
||||||
// 'src/components/__tests__/ResourceMapper.test.ts',
|
// 'src/components/__tests__/ResourceMapper.test.ts',
|
||||||
// 'src/components/__tests__/RunData.test.ts',
|
// 'src/components/__tests__/RunData.test.ts',
|
||||||
// 'src/components/__tests__/RunDataJson.test.ts',
|
// 'src/components/__tests__/RunDataJson.test.ts',
|
||||||
|
|
Loading…
Reference in a new issue