diff --git a/packages/cli/src/commands/BaseCommand.ts b/packages/cli/src/commands/BaseCommand.ts index d748d06f65..abf7257eda 100644 --- a/packages/cli/src/commands/BaseCommand.ts +++ b/packages/cli/src/commands/BaseCommand.ts @@ -21,9 +21,6 @@ import { InternalHooks } from '@/InternalHooks'; import { PostHogClient } from '@/posthog'; import { License } from '@/License'; -export const UM_FIX_INSTRUCTION = - 'Please fix the database by running ./packages/cli/bin/n8n user-management:reset'; - export abstract class BaseCommand extends Command { protected logger = LoggerProxy.init(getLogger()); diff --git a/packages/cli/src/commands/import/credentials.ts b/packages/cli/src/commands/import/credentials.ts index 6eb87aebd2..942d5c518b 100644 --- a/packages/cli/src/commands/import/credentials.ts +++ b/packages/cli/src/commands/import/credentials.ts @@ -10,10 +10,11 @@ import { SharedCredentials } from '@db/entities/SharedCredentials'; import type { Role } from '@db/entities/Role'; import { CredentialsEntity } from '@db/entities/CredentialsEntity'; import { disableAutoGeneratedIds } from '@db/utils/commandHelpers'; -import { BaseCommand, UM_FIX_INSTRUCTION } from '../BaseCommand'; +import { BaseCommand } from '../BaseCommand'; import type { ICredentialsEncrypted } from 'n8n-workflow'; import { jsonParse } from 'n8n-workflow'; import { RoleService } from '@/services/role.service'; +import { UM_FIX_INSTRUCTION } from '@/constants'; export class ImportCredentialsCommand extends BaseCommand { static description = 'Import credentials'; diff --git a/packages/cli/src/commands/import/workflow.ts b/packages/cli/src/commands/import/workflow.ts index 5ae3a529d7..177014e460 100644 --- a/packages/cli/src/commands/import/workflow.ts +++ b/packages/cli/src/commands/import/workflow.ts @@ -14,10 +14,11 @@ import type { User } from '@db/entities/User'; import { disableAutoGeneratedIds } from '@db/utils/commandHelpers'; import type { ICredentialsDb, IWorkflowToImport } from '@/Interfaces'; import { replaceInvalidCredentials } from '@/WorkflowHelpers'; -import { BaseCommand, UM_FIX_INSTRUCTION } from '../BaseCommand'; +import { BaseCommand } from '../BaseCommand'; import { generateNanoId } from '@db/utils/generators'; import { RoleService } from '@/services/role.service'; import { TagService } from '@/services/tag.service'; +import { UM_FIX_INSTRUCTION } from '@/constants'; function assertHasWorkflowsToImport(workflows: unknown): asserts workflows is IWorkflowToImport[] { if (!Array.isArray(workflows)) { diff --git a/packages/cli/src/constants.ts b/packages/cli/src/constants.ts index caef03bcb2..88808c0491 100644 --- a/packages/cli/src/constants.ts +++ b/packages/cli/src/constants.ts @@ -90,3 +90,6 @@ export const LICENSE_QUOTAS = { export const UNLIMITED_LICENSE_QUOTA = -1; export const CREDENTIAL_BLANKING_VALUE = '__n8n_BLANK_VALUE_e5362baf-c777-4d57-a609-6eaf1f9e87f6'; + +export const UM_FIX_INSTRUCTION = + 'Please fix the database by running ./packages/cli/bin/n8n user-management:reset'; diff --git a/packages/cli/src/environments/sourceControl/sourceControlImport.service.ee.ts b/packages/cli/src/environments/sourceControl/sourceControlImport.service.ee.ts index a35d18d2f3..85a6ad83fd 100644 --- a/packages/cli/src/environments/sourceControl/sourceControlImport.service.ee.ts +++ b/packages/cli/src/environments/sourceControl/sourceControlImport.service.ee.ts @@ -15,7 +15,6 @@ import { Credentials, UserSettings } from 'n8n-core'; import type { IWorkflowToImport } from '@/Interfaces'; import type { ExportableCredential } from './types/exportableCredential'; import type { Variables } from '@db/entities/Variables'; -import { UM_FIX_INSTRUCTION } from '@/commands/BaseCommand'; import { SharedCredentials } from '@db/entities/SharedCredentials'; import type { WorkflowTagMapping } from '@db/entities/WorkflowTagMapping'; import type { TagEntity } from '@db/entities/TagEntity'; @@ -28,6 +27,7 @@ import type { SourceControlledFile } from './types/sourceControlledFile'; import { RoleService } from '@/services/role.service'; import { VariablesService } from '../variables/variables.service'; import { TagRepository } from '@/databases/repositories'; +import { UM_FIX_INSTRUCTION } from '@/constants'; @Service() export class SourceControlImportService {