From 96e69ad5f2aef5605872f5e67f84407b10c75a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 26 Aug 2024 11:10:06 +0200 Subject: [PATCH] refactor(core): Standardize filename casing for environments and eventbus (no-changelog) (#10527) --- .../sourceControl/sourceControl.handler.ts | 8 ++--- .../workflow-execute-additional-data.test.ts | 2 +- packages/cli/src/commands/start.ts | 2 +- packages/cli/src/commands/worker.ts | 4 +-- .../cli/src/controllers/e2e.controller.ts | 2 +- .../source-control-export.service.test.ts | 4 +-- .../source-control-git.service.test.ts | 2 +- .../source-control-helper.ee.test.ts} | 10 +++--- .../sourceControlGit.service.test.ts | 4 +-- .../constants.ts | 0 .../source-control-enabled-middleware.ee.ts} | 4 +-- .../source-control-export.service.ee.ts} | 12 +++---- .../source-control-git.service.ee.ts} | 6 ++-- .../source-control-helper.ee.ts} | 6 ++-- .../source-control-import.service.ee.ts} | 10 +++--- .../source-control-preferences.service.ee.ts} | 6 ++-- .../source-control.controller.ee.ts} | 16 ++++----- .../source-control.service.ee.ts} | 26 +++++++-------- .../types/export-result.ts} | 0 .../types/exportable-credential.ts} | 2 +- .../types/exportable-workflow.ts} | 2 +- .../types/import-result.ts} | 0 .../types/key-pair-type.ts} | 0 .../types/key-pair.ts} | 0 .../types/requests.ts | 22 ++++++------- .../types/resource-owner.ts} | 0 .../types/source-control-commit.ts} | 0 .../types/source-control-disconnect.ts} | 0 .../source-control-generate-key-pair.ts} | 2 +- .../types/source-control-get-status.ts} | 0 .../types/source-control-preferences.ts} | 2 +- .../types/source-control-pull-work-folder.ts} | 0 .../types/source-control-push-work-folder.ts} | 2 +- .../types/source-control-push.ts} | 0 .../types/source-control-set-branch.ts} | 0 .../types/source-control-set-read-only.ts} | 0 .../types/source-control-stage.ts} | 0 .../source-control-workflow-version-id.ts} | 0 .../types/source-controlled-file.ts} | 0 ...nmentHelpers.ts => environment-helpers.ts} | 0 .../variables/variables.service.ee.ts | 2 +- .../abstract-event-message-options.ts} | 2 +- .../abstract-event-message.ts} | 4 +-- .../abstract-event-payload.ts} | 0 .../event-message-ai-node.ts} | 6 ++-- .../event-message-audit.ts} | 6 ++-- .../event-message-confirm.ts} | 0 .../event-message-execution.ts} | 6 ++-- .../event-message-generic.ts} | 6 ++-- .../event-message-node.ts} | 6 ++-- .../event-message-workflow.ts} | 6 ++-- .../index.ts | 12 +++---- .../cli/src/eventbus/eventBus.controller.ts | 12 +++---- packages/cli/src/eventbus/index.ts | 4 +-- .../message-event-bus-destination-from-db.ts} | 10 +++--- ...essage-event-bus-destination-sentry.ee.ts} | 6 ++-- ...essage-event-bus-destination-syslog.ee.ts} | 6 ++-- ...ssage-event-bus-destination-webhook.ee.ts} | 6 ++-- .../message-event-bus-destination.ee.ts} | 8 ++--- .../message-event-bus-log-writer-worker.ts} | 2 +- .../message-event-bus-log-writer.ts} | 33 ++++++++++--------- .../message-event-bus.ts} | 30 ++++++++--------- .../log-streaming-event-relay.test.ts | 2 +- .../src/events/log-streaming-event-relay.ts | 2 +- .../execution-recovery.service.test.ts | 4 +-- .../cli/src/executions/__tests__/utils.ts | 6 ++-- .../executions/execution-recovery.service.ts | 2 +- packages/cli/src/internal-hooks.ts | 2 +- .../prometheus-metrics.service.test.ts | 2 +- .../src/metrics/prometheus-metrics.service.ts | 2 +- packages/cli/src/server.ts | 6 ++-- .../__tests__/orchestration.service.test.ts | 2 +- packages/cli/src/services/frontend.service.ts | 2 +- .../main/handleCommandMessageMain.ts | 2 +- .../webhook/handleCommandMessageWebhook.ts | 2 +- .../worker/handleCommandMessageWorker.ts | 2 +- packages/cli/src/telemetry/index.ts | 2 +- .../src/workflow-execute-additional-data.ts | 2 +- .../integration/commands/worker.cmd.test.ts | 2 +- .../environments/SourceControl.test.ts | 6 ++-- .../source-control-import.service.test.ts | 6 ++-- .../cli/test/integration/eventbus.ee.test.ts | 18 +++++----- .../cli/test/integration/eventbus.test.ts | 2 +- .../integration/prometheus-metrics.test.ts | 2 +- .../integration/shared/utils/testServer.ts | 2 +- .../workflows/workflow.service.test.ts | 2 +- packages/cli/test/setup-mocks.ts | 2 +- 87 files changed, 207 insertions(+), 206 deletions(-) rename packages/cli/src/environments/{sourceControl => source-control}/__tests__/source-control-export.service.test.ts (93%) rename packages/cli/src/environments/{sourceControl => source-control}/__tests__/source-control-git.service.test.ts (91%) rename packages/cli/src/environments/{sourceControl/__tests__/sourceControlHelper.ee.test.ts => source-control/__tests__/source-control-helper.ee.test.ts} (96%) rename packages/cli/src/environments/{sourceControl => source-control}/__tests__/sourceControlGit.service.test.ts (88%) rename packages/cli/src/environments/{sourceControl => source-control}/constants.ts (100%) rename packages/cli/src/environments/{sourceControl/middleware/sourceControlEnabledMiddleware.ee.ts => source-control/middleware/source-control-enabled-middleware.ee.ts} (83%) rename packages/cli/src/environments/{sourceControl/sourceControlExport.service.ee.ts => source-control/source-control-export.service.ee.ts} (96%) rename packages/cli/src/environments/{sourceControl/sourceControlGit.service.ee.ts => source-control/source-control-git.service.ee.ts} (97%) rename packages/cli/src/environments/{sourceControl/sourceControlHelper.ee.ts => source-control/source-control-helper.ee.ts} (96%) rename packages/cli/src/environments/{sourceControl/sourceControlImport.service.ee.ts => source-control/source-control-import.service.ee.ts} (98%) rename packages/cli/src/environments/{sourceControl/sourceControlPreferences.service.ee.ts => source-control/source-control-preferences.service.ee.ts} (97%) rename packages/cli/src/environments/{sourceControl/sourceControl.controller.ee.ts => source-control/source-control.controller.ee.ts} (93%) rename packages/cli/src/environments/{sourceControl/sourceControl.service.ee.ts => source-control/source-control.service.ee.ts} (96%) rename packages/cli/src/environments/{sourceControl/types/exportResult.ts => source-control/types/export-result.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/exportableCredential.ts => source-control/types/exportable-credential.ts} (87%) rename packages/cli/src/environments/{sourceControl/types/exportableWorkflow.ts => source-control/types/exportable-workflow.ts} (83%) rename packages/cli/src/environments/{sourceControl/types/importResult.ts => source-control/types/import-result.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/keyPairType.ts => source-control/types/key-pair-type.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/keyPair.ts => source-control/types/key-pair.ts} (100%) rename packages/cli/src/environments/{sourceControl => source-control}/types/requests.ts (53%) rename packages/cli/src/environments/{sourceControl/types/resourceOwner.ts => source-control/types/resource-owner.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/sourceControlCommit.ts => source-control/types/source-control-commit.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/sourceControlDisconnect.ts => source-control/types/source-control-disconnect.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/sourceControlGenerateKeyPair.ts => source-control/types/source-control-generate-key-pair.ts} (78%) rename packages/cli/src/environments/{sourceControl/types/sourceControlGetStatus.ts => source-control/types/source-control-get-status.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/sourceControlPreferences.ts => source-control/types/source-control-preferences.ts} (96%) rename packages/cli/src/environments/{sourceControl/types/sourceControlPullWorkFolder.ts => source-control/types/source-control-pull-work-folder.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/sourceControlPushWorkFolder.ts => source-control/types/source-control-push-work-folder.ts} (82%) rename packages/cli/src/environments/{sourceControl/types/sourceControlPush.ts => source-control/types/source-control-push.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/sourceControlSetBranch.ts => source-control/types/source-control-set-branch.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/sourceControlSetReadOnly.ts => source-control/types/source-control-set-read-only.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/sourceControlStage.ts => source-control/types/source-control-stage.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/sourceControlWorkflowVersionId.ts => source-control/types/source-control-workflow-version-id.ts} (100%) rename packages/cli/src/environments/{sourceControl/types/sourceControlledFile.ts => source-control/types/source-controlled-file.ts} (100%) rename packages/cli/src/environments/variables/{environmentHelpers.ts => environment-helpers.ts} (100%) rename packages/cli/src/eventbus/{EventMessageClasses/AbstractEventMessageOptions.ts => event-message-classes/abstract-event-message-options.ts} (83%) rename packages/cli/src/eventbus/{EventMessageClasses/AbstractEventMessage.ts => event-message-classes/abstract-event-message.ts} (96%) rename packages/cli/src/eventbus/{EventMessageClasses/AbstractEventPayload.ts => event-message-classes/abstract-event-payload.ts} (100%) rename packages/cli/src/eventbus/{EventMessageClasses/EventMessageAiNode.ts => event-message-classes/event-message-ai-node.ts} (87%) rename packages/cli/src/eventbus/{EventMessageClasses/EventMessageAudit.ts => event-message-classes/event-message-audit.ts} (88%) rename packages/cli/src/eventbus/{EventMessageClasses/EventMessageConfirm.ts => event-message-classes/event-message-confirm.ts} (100%) rename packages/cli/src/eventbus/{EventMessageClasses/EventMessageExecution.ts => event-message-classes/event-message-execution.ts} (86%) rename packages/cli/src/eventbus/{EventMessageClasses/EventMessageGeneric.ts => event-message-classes/event-message-generic.ts} (85%) rename packages/cli/src/eventbus/{EventMessageClasses/EventMessageNode.ts => event-message-classes/event-message-node.ts} (87%) rename packages/cli/src/eventbus/{EventMessageClasses/EventMessageWorkflow.ts => event-message-classes/event-message-workflow.ts} (88%) rename packages/cli/src/eventbus/{EventMessageClasses => event-message-classes}/index.ts (84%) rename packages/cli/src/eventbus/{MessageEventBusDestination/MessageEventBusDestinationFromDb.ts => message-event-bus-destination/message-event-bus-destination-from-db.ts} (69%) rename packages/cli/src/eventbus/{MessageEventBusDestination/MessageEventBusDestinationSentry.ee.ts => message-event-bus-destination/message-event-bus-destination-sentry.ee.ts} (92%) rename packages/cli/src/eventbus/{MessageEventBusDestination/MessageEventBusDestinationSyslog.ee.ts => message-event-bus-destination/message-event-bus-destination-syslog.ee.ts} (93%) rename packages/cli/src/eventbus/{MessageEventBusDestination/MessageEventBusDestinationWebhook.ee.ts => message-event-bus-destination/message-event-bus-destination-webhook.ee.ts} (97%) rename packages/cli/src/eventbus/{MessageEventBusDestination/MessageEventBusDestination.ee.ts => message-event-bus-destination/message-event-bus-destination.ee.ts} (91%) rename packages/cli/src/eventbus/{MessageEventBusWriter/MessageEventBusLogWriterWorker.ts => message-event-bus-writer/message-event-bus-log-writer-worker.ts} (97%) rename packages/cli/src/eventbus/{MessageEventBusWriter/MessageEventBusLogWriter.ts => message-event-bus-writer/message-event-bus-log-writer.ts} (89%) rename packages/cli/src/eventbus/{MessageEventBus/MessageEventBus.ts => message-event-bus/message-event-bus.ts} (91%) diff --git a/packages/cli/src/PublicApi/v1/handlers/sourceControl/sourceControl.handler.ts b/packages/cli/src/PublicApi/v1/handlers/sourceControl/sourceControl.handler.ts index 7a3cf08ec0..330701f59c 100644 --- a/packages/cli/src/PublicApi/v1/handlers/sourceControl/sourceControl.handler.ts +++ b/packages/cli/src/PublicApi/v1/handlers/sourceControl/sourceControl.handler.ts @@ -3,13 +3,13 @@ import { Container } from 'typedi'; import type { StatusResult } from 'simple-git'; import type { PublicSourceControlRequest } from '../../../types'; import { globalScope } from '../../shared/middlewares/global.middleware'; -import type { ImportResult } from '@/environments/sourceControl/types/importResult'; -import { SourceControlService } from '@/environments/sourceControl/sourceControl.service.ee'; -import { SourceControlPreferencesService } from '@/environments/sourceControl/sourceControlPreferences.service.ee'; +import type { ImportResult } from '@/environments/source-control/types/import-result'; +import { SourceControlService } from '@/environments/source-control/source-control.service.ee'; +import { SourceControlPreferencesService } from '@/environments/source-control/source-control-preferences.service.ee'; import { getTrackingInformationFromPullResult, isSourceControlLicensed, -} from '@/environments/sourceControl/sourceControlHelper.ee'; +} from '@/environments/source-control/source-control-helper.ee'; import { EventService } from '@/events/event.service'; export = { diff --git a/packages/cli/src/__tests__/workflow-execute-additional-data.test.ts b/packages/cli/src/__tests__/workflow-execute-additional-data.test.ts index f51d994493..5bd84bf88f 100644 --- a/packages/cli/src/__tests__/workflow-execute-additional-data.test.ts +++ b/packages/cli/src/__tests__/workflow-execute-additional-data.test.ts @@ -1,6 +1,6 @@ import { VariablesService } from '@/environments/variables/variables.service.ee'; import { mockInstance } from '@test/mocking'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { getBase } from '@/workflow-execute-additional-data'; import Container from 'typedi'; import { CredentialsHelper } from '@/credentials-helper'; diff --git a/packages/cli/src/commands/start.ts b/packages/cli/src/commands/start.ts index 96e3849860..cc8ea6fa93 100644 --- a/packages/cli/src/commands/start.ts +++ b/packages/cli/src/commands/start.ts @@ -15,7 +15,7 @@ import { ActiveExecutions } from '@/active-executions'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; import { Server } from '@/server'; import { EDITOR_UI_DIST_DIR, LICENSE_FEATURES } from '@/constants'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { License } from '@/license'; import { OrchestrationService } from '@/services/orchestration.service'; import { OrchestrationHandlerMainService } from '@/services/orchestration/main/orchestration.handler.main.service'; diff --git a/packages/cli/src/commands/worker.ts b/packages/cli/src/commands/worker.ts index 594b2f5668..05062ac78a 100644 --- a/packages/cli/src/commands/worker.ts +++ b/packages/cli/src/commands/worker.ts @@ -12,9 +12,9 @@ import { N8N_VERSION, inTest } from '@/constants'; import type { ICredentialsOverwrite } from '@/Interfaces'; import { CredentialsOverwrites } from '@/credentials-overwrites'; import { rawBodyReader, bodyParser } from '@/middlewares'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import type { RedisServicePubSubSubscriber } from '@/services/redis/RedisServicePubSubSubscriber'; -import { EventMessageGeneric } from '@/eventbus/EventMessageClasses/EventMessageGeneric'; +import { EventMessageGeneric } from '@/eventbus/event-message-classes/event-message-generic'; import { OrchestrationHandlerWorkerService } from '@/services/orchestration/worker/orchestration.handler.worker.service'; import { OrchestrationWorkerService } from '@/services/orchestration/worker/orchestration.worker.service'; import { ServiceUnavailableError } from '@/errors/response-errors/service-unavailable.error'; diff --git a/packages/cli/src/controllers/e2e.controller.ts b/packages/cli/src/controllers/e2e.controller.ts index 6d8eb88fed..966221021b 100644 --- a/packages/cli/src/controllers/e2e.controller.ts +++ b/packages/cli/src/controllers/e2e.controller.ts @@ -4,7 +4,7 @@ import config from '@/config'; import { SettingsRepository } from '@db/repositories/settings.repository'; import { UserRepository } from '@db/repositories/user.repository'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { License } from '@/license'; import { LICENSE_FEATURES, LICENSE_QUOTAS, UNLIMITED_LICENSE_QUOTA, inE2ETests } from '@/constants'; import { Patch, Post, RestController } from '@/decorators'; diff --git a/packages/cli/src/environments/sourceControl/__tests__/source-control-export.service.test.ts b/packages/cli/src/environments/source-control/__tests__/source-control-export.service.test.ts similarity index 93% rename from packages/cli/src/environments/sourceControl/__tests__/source-control-export.service.test.ts rename to packages/cli/src/environments/source-control/__tests__/source-control-export.service.test.ts index 7746875f63..77f56d4d96 100644 --- a/packages/cli/src/environments/sourceControl/__tests__/source-control-export.service.test.ts +++ b/packages/cli/src/environments/source-control/__tests__/source-control-export.service.test.ts @@ -1,6 +1,6 @@ import mock from 'jest-mock-extended/lib/Mock'; -import { SourceControlExportService } from '../sourceControlExport.service.ee'; -import type { SourceControlledFile } from '../types/sourceControlledFile'; +import { SourceControlExportService } from '../source-control-export.service.ee'; +import type { SourceControlledFile } from '../types/source-controlled-file'; import { Cipher, type InstanceSettings } from 'n8n-core'; import { SharedCredentialsRepository } from '@/databases/repositories/sharedCredentials.repository'; import { mockInstance } from '@test/mocking'; diff --git a/packages/cli/src/environments/sourceControl/__tests__/source-control-git.service.test.ts b/packages/cli/src/environments/source-control/__tests__/source-control-git.service.test.ts similarity index 91% rename from packages/cli/src/environments/sourceControl/__tests__/source-control-git.service.test.ts rename to packages/cli/src/environments/source-control/__tests__/source-control-git.service.test.ts index 145ebe40c0..dc5ddfbedb 100644 --- a/packages/cli/src/environments/sourceControl/__tests__/source-control-git.service.test.ts +++ b/packages/cli/src/environments/source-control/__tests__/source-control-git.service.test.ts @@ -1,5 +1,5 @@ import { mock } from 'jest-mock-extended'; -import { SourceControlGitService } from '../sourceControlGit.service.ee'; +import { SourceControlGitService } from '../source-control-git.service.ee'; import { simpleGit } from 'simple-git'; const MOCK_BRANCHES = { diff --git a/packages/cli/src/environments/sourceControl/__tests__/sourceControlHelper.ee.test.ts b/packages/cli/src/environments/source-control/__tests__/source-control-helper.ee.test.ts similarity index 96% rename from packages/cli/src/environments/sourceControl/__tests__/sourceControlHelper.ee.test.ts rename to packages/cli/src/environments/source-control/__tests__/source-control-helper.ee.test.ts index 8b81bec7b2..3009101b5c 100644 --- a/packages/cli/src/environments/sourceControl/__tests__/sourceControlHelper.ee.test.ts +++ b/packages/cli/src/environments/source-control/__tests__/source-control-helper.ee.test.ts @@ -6,18 +6,18 @@ import { getTrackingInformationFromPrePushResult, getTrackingInformationFromPullResult, sourceControlFoldersExistCheck, -} from '@/environments/sourceControl/sourceControlHelper.ee'; +} from '@/environments/source-control/source-control-helper.ee'; import { License } from '@/license'; -import { SourceControlPreferencesService } from '@/environments/sourceControl/sourceControlPreferences.service.ee'; +import { SourceControlPreferencesService } from '@/environments/source-control/source-control-preferences.service.ee'; import { InstanceSettings } from 'n8n-core'; import path from 'path'; import { SOURCE_CONTROL_SSH_FOLDER, SOURCE_CONTROL_GIT_FOLDER, -} from '@/environments/sourceControl/constants'; +} from '@/environments/source-control/constants'; import { constants as fsConstants, accessSync } from 'fs'; -import type { SourceControlledFile } from '@/environments/sourceControl/types/sourceControlledFile'; -import type { SourceControlPreferences } from '@/environments/sourceControl/types/sourceControlPreferences'; +import type { SourceControlledFile } from '@/environments/source-control/types/source-controlled-file'; +import type { SourceControlPreferences } from '@/environments/source-control/types/source-control-preferences'; import { mockInstance } from '@test/mocking'; const pushResult: SourceControlledFile[] = [ diff --git a/packages/cli/src/environments/sourceControl/__tests__/sourceControlGit.service.test.ts b/packages/cli/src/environments/source-control/__tests__/sourceControlGit.service.test.ts similarity index 88% rename from packages/cli/src/environments/sourceControl/__tests__/sourceControlGit.service.test.ts rename to packages/cli/src/environments/source-control/__tests__/sourceControlGit.service.test.ts index f4a458ac35..519aef188b 100644 --- a/packages/cli/src/environments/sourceControl/__tests__/sourceControlGit.service.test.ts +++ b/packages/cli/src/environments/source-control/__tests__/sourceControlGit.service.test.ts @@ -1,6 +1,6 @@ -import { SourceControlGitService } from '@/environments/sourceControl/sourceControlGit.service.ee'; +import { SourceControlGitService } from '@/environments/source-control/source-control-git.service.ee'; import { mock } from 'jest-mock-extended'; -import type { SourceControlPreferences } from '@/environments/sourceControl/types/sourceControlPreferences'; +import type { SourceControlPreferences } from '@/environments/source-control/types/source-control-preferences'; import type { User } from '@/databases/entities/User'; import type { SimpleGit } from 'simple-git'; diff --git a/packages/cli/src/environments/sourceControl/constants.ts b/packages/cli/src/environments/source-control/constants.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/constants.ts rename to packages/cli/src/environments/source-control/constants.ts diff --git a/packages/cli/src/environments/sourceControl/middleware/sourceControlEnabledMiddleware.ee.ts b/packages/cli/src/environments/source-control/middleware/source-control-enabled-middleware.ee.ts similarity index 83% rename from packages/cli/src/environments/sourceControl/middleware/sourceControlEnabledMiddleware.ee.ts rename to packages/cli/src/environments/source-control/middleware/source-control-enabled-middleware.ee.ts index cc0debe3a5..24317ecbe1 100644 --- a/packages/cli/src/environments/sourceControl/middleware/sourceControlEnabledMiddleware.ee.ts +++ b/packages/cli/src/environments/source-control/middleware/source-control-enabled-middleware.ee.ts @@ -1,7 +1,7 @@ import type { RequestHandler } from 'express'; import { Container } from 'typedi'; -import { isSourceControlLicensed } from '../sourceControlHelper.ee'; -import { SourceControlPreferencesService } from '../sourceControlPreferences.service.ee'; +import { isSourceControlLicensed } from '../source-control-helper.ee'; +import { SourceControlPreferencesService } from '../source-control-preferences.service.ee'; export const sourceControlLicensedAndEnabledMiddleware: RequestHandler = (_req, res, next) => { const sourceControlPreferencesService = Container.get(SourceControlPreferencesService); diff --git a/packages/cli/src/environments/sourceControl/sourceControlExport.service.ee.ts b/packages/cli/src/environments/source-control/source-control-export.service.ee.ts similarity index 96% rename from packages/cli/src/environments/sourceControl/sourceControlExport.service.ee.ts rename to packages/cli/src/environments/source-control/source-control-export.service.ee.ts index 6d2d468e30..728b44c5dc 100644 --- a/packages/cli/src/environments/sourceControl/sourceControlExport.service.ee.ts +++ b/packages/cli/src/environments/source-control/source-control-export.service.ee.ts @@ -10,18 +10,18 @@ import { ApplicationError, type ICredentialDataDecryptedObject } from 'n8n-workf import { writeFile as fsWriteFile, rm as fsRm } from 'fs/promises'; import { rmSync } from 'fs'; import { Credentials, InstanceSettings } from 'n8n-core'; -import type { ExportableWorkflow } from './types/exportableWorkflow'; -import type { ExportableCredential } from './types/exportableCredential'; -import type { ExportResult } from './types/exportResult'; +import type { ExportableWorkflow } from './types/exportable-workflow'; +import type { ExportableCredential } from './types/exportable-credential'; +import type { ExportResult } from './types/export-result'; import { getCredentialExportPath, getVariablesPath, getWorkflowExportPath, sourceControlFoldersExistCheck, stringContainsExpression, -} from './sourceControlHelper.ee'; +} from './source-control-helper.ee'; import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; -import type { SourceControlledFile } from './types/sourceControlledFile'; +import type { SourceControlledFile } from './types/source-controlled-file'; import { VariablesService } from '../variables/variables.service.ee'; import { TagRepository } from '@db/repositories/tag.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; @@ -29,7 +29,7 @@ import { Logger } from '@/logger'; import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; import { WorkflowTagMappingRepository } from '@db/repositories/workflowTagMapping.repository'; -import type { ResourceOwner } from './types/resourceOwner'; +import type { ResourceOwner } from './types/resource-owner'; @Service() export class SourceControlExportService { diff --git a/packages/cli/src/environments/sourceControl/sourceControlGit.service.ee.ts b/packages/cli/src/environments/source-control/source-control-git.service.ee.ts similarity index 97% rename from packages/cli/src/environments/sourceControl/sourceControlGit.service.ee.ts rename to packages/cli/src/environments/source-control/source-control-git.service.ee.ts index 91220340b7..134aab9fd6 100644 --- a/packages/cli/src/environments/sourceControl/sourceControlGit.service.ee.ts +++ b/packages/cli/src/environments/source-control/source-control-git.service.ee.ts @@ -11,19 +11,19 @@ import type { SimpleGitOptions, StatusResult, } from 'simple-git'; -import type { SourceControlPreferences } from './types/sourceControlPreferences'; +import type { SourceControlPreferences } from './types/source-control-preferences'; import { SOURCE_CONTROL_DEFAULT_BRANCH, SOURCE_CONTROL_DEFAULT_EMAIL, SOURCE_CONTROL_DEFAULT_NAME, SOURCE_CONTROL_ORIGIN, } from './constants'; -import { sourceControlFoldersExistCheck } from './sourceControlHelper.ee'; +import { sourceControlFoldersExistCheck } from './source-control-helper.ee'; import type { User } from '@db/entities/User'; import { Logger } from '@/logger'; import { ApplicationError } from 'n8n-workflow'; import { OwnershipService } from '@/services/ownership.service'; -import { SourceControlPreferencesService } from './sourceControlPreferences.service.ee'; +import { SourceControlPreferencesService } from './source-control-preferences.service.ee'; @Service() export class SourceControlGitService { diff --git a/packages/cli/src/environments/sourceControl/sourceControlHelper.ee.ts b/packages/cli/src/environments/source-control/source-control-helper.ee.ts similarity index 96% rename from packages/cli/src/environments/sourceControl/sourceControlHelper.ee.ts rename to packages/cli/src/environments/source-control/source-control-helper.ee.ts index 65cd88bfa5..738f4212f5 100644 --- a/packages/cli/src/environments/sourceControl/sourceControlHelper.ee.ts +++ b/packages/cli/src/environments/source-control/source-control-helper.ee.ts @@ -1,16 +1,16 @@ import { Container } from 'typedi'; import { License } from '@/license'; import { generateKeyPairSync } from 'crypto'; -import type { KeyPair } from './types/keyPair'; +import type { KeyPair } from './types/key-pair'; import { constants as fsConstants, mkdirSync, accessSync } from 'fs'; import { SOURCE_CONTROL_GIT_KEY_COMMENT, SOURCE_CONTROL_TAGS_EXPORT_FILE, SOURCE_CONTROL_VARIABLES_EXPORT_FILE, } from './constants'; -import type { SourceControlledFile } from './types/sourceControlledFile'; +import type { SourceControlledFile } from './types/source-controlled-file'; import path from 'path'; -import type { KeyPairType } from './types/keyPairType'; +import type { KeyPairType } from './types/key-pair-type'; import { Logger } from '@/logger'; export function stringContainsExpression(testString: string): boolean { diff --git a/packages/cli/src/environments/sourceControl/sourceControlImport.service.ee.ts b/packages/cli/src/environments/source-control/source-control-import.service.ee.ts similarity index 98% rename from packages/cli/src/environments/sourceControl/sourceControlImport.service.ee.ts rename to packages/cli/src/environments/source-control/source-control-import.service.ee.ts index bd04937bc1..05ce8a0687 100644 --- a/packages/cli/src/environments/sourceControl/sourceControlImport.service.ee.ts +++ b/packages/cli/src/environments/source-control/source-control-import.service.ee.ts @@ -12,7 +12,7 @@ import { ApplicationError, jsonParse, ErrorReporterProxy as ErrorReporter } from import { readFile as fsReadFile } from 'fs/promises'; import { Credentials, InstanceSettings } from 'n8n-core'; import type { IWorkflowToImport } from '@/Interfaces'; -import type { ExportableCredential } from './types/exportableCredential'; +import type { ExportableCredential } from './types/exportable-credential'; import type { Variables } from '@db/entities/Variables'; import { SharedCredentials } from '@db/entities/SharedCredentials'; import type { WorkflowTagMapping } from '@db/entities/WorkflowTagMapping'; @@ -21,9 +21,9 @@ import { ActiveWorkflowManager } from '@/active-workflow-manager'; // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import import { In } from '@n8n/typeorm'; import { isUniqueConstraintError } from '@/response-helper'; -import type { SourceControlWorkflowVersionId } from './types/sourceControlWorkflowVersionId'; -import { getCredentialExportPath, getWorkflowExportPath } from './sourceControlHelper.ee'; -import type { SourceControlledFile } from './types/sourceControlledFile'; +import type { SourceControlWorkflowVersionId } from './types/source-control-workflow-version-id'; +import { getCredentialExportPath, getWorkflowExportPath } from './source-control-helper.ee'; +import type { SourceControlledFile } from './types/source-controlled-file'; import { VariablesService } from '../variables/variables.service.ee'; import { TagRepository } from '@db/repositories/tag.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; @@ -35,7 +35,7 @@ import { WorkflowTagMappingRepository } from '@db/repositories/workflowTagMappin import { VariablesRepository } from '@db/repositories/variables.repository'; import { ProjectRepository } from '@/databases/repositories/project.repository'; import type { Project } from '@/databases/entities/Project'; -import type { ResourceOwner } from './types/resourceOwner'; +import type { ResourceOwner } from './types/resource-owner'; import { assertNever } from '@/utils'; import { UserRepository } from '@/databases/repositories/user.repository'; diff --git a/packages/cli/src/environments/sourceControl/sourceControlPreferences.service.ee.ts b/packages/cli/src/environments/source-control/source-control-preferences.service.ee.ts similarity index 97% rename from packages/cli/src/environments/sourceControl/sourceControlPreferences.service.ee.ts rename to packages/cli/src/environments/source-control/source-control-preferences.service.ee.ts index 52a2f6192d..4e41770441 100644 --- a/packages/cli/src/environments/sourceControl/sourceControlPreferences.service.ee.ts +++ b/packages/cli/src/environments/source-control/source-control-preferences.service.ee.ts @@ -1,10 +1,10 @@ import { writeFile, chmod, readFile } from 'node:fs/promises'; import Container, { Service } from 'typedi'; -import { SourceControlPreferences } from './types/sourceControlPreferences'; +import { SourceControlPreferences } from './types/source-control-preferences'; import type { ValidationError } from 'class-validator'; import { validate } from 'class-validator'; import { rm as fsRm } from 'fs/promises'; -import { generateSshKeyPair, isSourceControlLicensed } from './sourceControlHelper.ee'; +import { generateSshKeyPair, isSourceControlLicensed } from './source-control-helper.ee'; import { Cipher, InstanceSettings } from 'n8n-core'; import { ApplicationError, jsonParse } from 'n8n-workflow'; import { @@ -14,7 +14,7 @@ import { SOURCE_CONTROL_PREFERENCES_DB_KEY, } from './constants'; import path from 'path'; -import type { KeyPairType } from './types/keyPairType'; +import type { KeyPairType } from './types/key-pair-type'; import config from '@/config'; import { Logger } from '@/logger'; import { SettingsRepository } from '@db/repositories/settings.repository'; diff --git a/packages/cli/src/environments/sourceControl/sourceControl.controller.ee.ts b/packages/cli/src/environments/source-control/source-control.controller.ee.ts similarity index 93% rename from packages/cli/src/environments/sourceControl/sourceControl.controller.ee.ts rename to packages/cli/src/environments/source-control/source-control.controller.ee.ts index f92b0bfb1f..d927ee2a9b 100644 --- a/packages/cli/src/environments/sourceControl/sourceControl.controller.ee.ts +++ b/packages/cli/src/environments/source-control/source-control.controller.ee.ts @@ -4,17 +4,17 @@ import { Get, Post, Patch, RestController, GlobalScope } from '@/decorators'; import { sourceControlLicensedMiddleware, sourceControlLicensedAndEnabledMiddleware, -} from './middleware/sourceControlEnabledMiddleware.ee'; -import { SourceControlService } from './sourceControl.service.ee'; +} from './middleware/source-control-enabled-middleware.ee'; +import { SourceControlService } from './source-control.service.ee'; import { SourceControlRequest } from './types/requests'; -import { SourceControlPreferencesService } from './sourceControlPreferences.service.ee'; -import type { SourceControlPreferences } from './types/sourceControlPreferences'; -import type { SourceControlledFile } from './types/sourceControlledFile'; +import { SourceControlPreferencesService } from './source-control-preferences.service.ee'; +import type { SourceControlPreferences } from './types/source-control-preferences'; +import type { SourceControlledFile } from './types/source-controlled-file'; import { SOURCE_CONTROL_DEFAULT_BRANCH } from './constants'; -import type { ImportResult } from './types/importResult'; +import type { ImportResult } from './types/import-result'; import { EventService } from '@/events/event.service'; -import { getRepoType } from './sourceControlHelper.ee'; -import { SourceControlGetStatus } from './types/sourceControlGetStatus'; +import { getRepoType } from './source-control-helper.ee'; +import { SourceControlGetStatus } from './types/source-control-get-status'; import { BadRequestError } from '@/errors/response-errors/bad-request.error'; @RestController('/source-control') diff --git a/packages/cli/src/environments/sourceControl/sourceControl.service.ee.ts b/packages/cli/src/environments/source-control/source-control.service.ee.ts similarity index 96% rename from packages/cli/src/environments/sourceControl/sourceControl.service.ee.ts rename to packages/cli/src/environments/source-control/source-control.service.ee.ts index 375352e4cc..d264e1f75a 100644 --- a/packages/cli/src/environments/sourceControl/sourceControl.service.ee.ts +++ b/packages/cli/src/environments/source-control/source-control.service.ee.ts @@ -7,29 +7,29 @@ import { getTrackingInformationFromPullResult, getVariablesPath, sourceControlFoldersExistCheck, -} from './sourceControlHelper.ee'; -import type { SourceControlPreferences } from './types/sourceControlPreferences'; +} from './source-control-helper.ee'; +import type { SourceControlPreferences } from './types/source-control-preferences'; import { SOURCE_CONTROL_DEFAULT_EMAIL, SOURCE_CONTROL_DEFAULT_NAME, SOURCE_CONTROL_README, } from './constants'; -import { SourceControlGitService } from './sourceControlGit.service.ee'; +import { SourceControlGitService } from './source-control-git.service.ee'; import type { PushResult } from 'simple-git'; -import { SourceControlExportService } from './sourceControlExport.service.ee'; -import type { ImportResult } from './types/importResult'; -import type { SourceControlPushWorkFolder } from './types/sourceControlPushWorkFolder'; -import type { SourceControllPullOptions } from './types/sourceControlPullWorkFolder'; -import type { SourceControlledFile } from './types/sourceControlledFile'; -import { SourceControlPreferencesService } from './sourceControlPreferences.service.ee'; +import { SourceControlExportService } from './source-control-export.service.ee'; +import type { ImportResult } from './types/import-result'; +import type { SourceControlPushWorkFolder } from './types/source-control-push-work-folder'; +import type { SourceControllPullOptions } from './types/source-control-pull-work-folder'; +import type { SourceControlledFile } from './types/source-controlled-file'; +import { SourceControlPreferencesService } from './source-control-preferences.service.ee'; import { writeFileSync } from 'fs'; -import { SourceControlImportService } from './sourceControlImport.service.ee'; +import { SourceControlImportService } from './source-control-import.service.ee'; import type { User } from '@db/entities/User'; -import type { SourceControlGetStatus } from './types/sourceControlGetStatus'; +import type { SourceControlGetStatus } from './types/source-control-get-status'; import type { TagEntity } from '@db/entities/TagEntity'; import type { Variables } from '@db/entities/Variables'; -import type { SourceControlWorkflowVersionId } from './types/sourceControlWorkflowVersionId'; -import type { ExportableCredential } from './types/exportableCredential'; +import type { SourceControlWorkflowVersionId } from './types/source-control-workflow-version-id'; +import type { ExportableCredential } from './types/exportable-credential'; import { EventService } from '@/events/event.service'; import { TagRepository } from '@db/repositories/tag.repository'; import { Logger } from '@/logger'; diff --git a/packages/cli/src/environments/sourceControl/types/exportResult.ts b/packages/cli/src/environments/source-control/types/export-result.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/exportResult.ts rename to packages/cli/src/environments/source-control/types/export-result.ts diff --git a/packages/cli/src/environments/sourceControl/types/exportableCredential.ts b/packages/cli/src/environments/source-control/types/exportable-credential.ts similarity index 87% rename from packages/cli/src/environments/sourceControl/types/exportableCredential.ts rename to packages/cli/src/environments/source-control/types/exportable-credential.ts index 7ef071117f..a15f5b4890 100644 --- a/packages/cli/src/environments/sourceControl/types/exportableCredential.ts +++ b/packages/cli/src/environments/source-control/types/exportable-credential.ts @@ -1,5 +1,5 @@ import type { ICredentialDataDecryptedObject } from 'n8n-workflow'; -import type { ResourceOwner } from './resourceOwner'; +import type { ResourceOwner } from './resource-owner'; export interface ExportableCredential { id: string; diff --git a/packages/cli/src/environments/sourceControl/types/exportableWorkflow.ts b/packages/cli/src/environments/source-control/types/exportable-workflow.ts similarity index 83% rename from packages/cli/src/environments/sourceControl/types/exportableWorkflow.ts rename to packages/cli/src/environments/source-control/types/exportable-workflow.ts index a0803bce87..56cec13537 100644 --- a/packages/cli/src/environments/sourceControl/types/exportableWorkflow.ts +++ b/packages/cli/src/environments/source-control/types/exportable-workflow.ts @@ -1,5 +1,5 @@ import type { INode, IConnections, IWorkflowSettings } from 'n8n-workflow'; -import type { ResourceOwner } from './resourceOwner'; +import type { ResourceOwner } from './resource-owner'; export interface ExportableWorkflow { id: string; diff --git a/packages/cli/src/environments/sourceControl/types/importResult.ts b/packages/cli/src/environments/source-control/types/import-result.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/importResult.ts rename to packages/cli/src/environments/source-control/types/import-result.ts diff --git a/packages/cli/src/environments/sourceControl/types/keyPairType.ts b/packages/cli/src/environments/source-control/types/key-pair-type.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/keyPairType.ts rename to packages/cli/src/environments/source-control/types/key-pair-type.ts diff --git a/packages/cli/src/environments/sourceControl/types/keyPair.ts b/packages/cli/src/environments/source-control/types/key-pair.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/keyPair.ts rename to packages/cli/src/environments/source-control/types/key-pair.ts diff --git a/packages/cli/src/environments/sourceControl/types/requests.ts b/packages/cli/src/environments/source-control/types/requests.ts similarity index 53% rename from packages/cli/src/environments/sourceControl/types/requests.ts rename to packages/cli/src/environments/source-control/types/requests.ts index e48cf94681..5855b0af4b 100644 --- a/packages/cli/src/environments/sourceControl/types/requests.ts +++ b/packages/cli/src/environments/source-control/types/requests.ts @@ -1,15 +1,15 @@ import type { AuthenticatedRequest } from '@/requests'; -import type { SourceControlPreferences } from './sourceControlPreferences'; -import type { SourceControlSetBranch } from './sourceControlSetBranch'; -import type { SourceControlCommit } from './sourceControlCommit'; -import type { SourceControlStage } from './sourceControlStage'; -import type { SourceControlPush } from './sourceControlPush'; -import type { SourceControlPushWorkFolder } from './sourceControlPushWorkFolder'; -import type { SourceControlPullWorkFolder } from './sourceControlPullWorkFolder'; -import type { SourceControlDisconnect } from './sourceControlDisconnect'; -import type { SourceControlSetReadOnly } from './sourceControlSetReadOnly'; -import type { SourceControlGetStatus } from './sourceControlGetStatus'; -import type { SourceControlGenerateKeyPair } from './sourceControlGenerateKeyPair'; +import type { SourceControlPreferences } from './source-control-preferences'; +import type { SourceControlSetBranch } from './source-control-set-branch'; +import type { SourceControlCommit } from './source-control-commit'; +import type { SourceControlStage } from './source-control-stage'; +import type { SourceControlPush } from './source-control-push'; +import type { SourceControlPushWorkFolder } from './source-control-push-work-folder'; +import type { SourceControlPullWorkFolder } from './source-control-pull-work-folder'; +import type { SourceControlDisconnect } from './source-control-disconnect'; +import type { SourceControlSetReadOnly } from './source-control-set-read-only'; +import type { SourceControlGetStatus } from './source-control-get-status'; +import type { SourceControlGenerateKeyPair } from './source-control-generate-key-pair'; export declare namespace SourceControlRequest { type UpdatePreferences = AuthenticatedRequest<{}, {}, Partial, {}>; diff --git a/packages/cli/src/environments/sourceControl/types/resourceOwner.ts b/packages/cli/src/environments/source-control/types/resource-owner.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/resourceOwner.ts rename to packages/cli/src/environments/source-control/types/resource-owner.ts diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlCommit.ts b/packages/cli/src/environments/source-control/types/source-control-commit.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/sourceControlCommit.ts rename to packages/cli/src/environments/source-control/types/source-control-commit.ts diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlDisconnect.ts b/packages/cli/src/environments/source-control/types/source-control-disconnect.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/sourceControlDisconnect.ts rename to packages/cli/src/environments/source-control/types/source-control-disconnect.ts diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlGenerateKeyPair.ts b/packages/cli/src/environments/source-control/types/source-control-generate-key-pair.ts similarity index 78% rename from packages/cli/src/environments/sourceControl/types/sourceControlGenerateKeyPair.ts rename to packages/cli/src/environments/source-control/types/source-control-generate-key-pair.ts index c625b1eb2b..9f9093b432 100644 --- a/packages/cli/src/environments/sourceControl/types/sourceControlGenerateKeyPair.ts +++ b/packages/cli/src/environments/source-control/types/source-control-generate-key-pair.ts @@ -1,5 +1,5 @@ import { IsOptional, IsString } from 'class-validator'; -import { KeyPairType } from './keyPairType'; +import { KeyPairType } from './key-pair-type'; export class SourceControlGenerateKeyPair { @IsOptional() diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlGetStatus.ts b/packages/cli/src/environments/source-control/types/source-control-get-status.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/sourceControlGetStatus.ts rename to packages/cli/src/environments/source-control/types/source-control-get-status.ts diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlPreferences.ts b/packages/cli/src/environments/source-control/types/source-control-preferences.ts similarity index 96% rename from packages/cli/src/environments/sourceControl/types/sourceControlPreferences.ts rename to packages/cli/src/environments/source-control/types/source-control-preferences.ts index 9b5c3a25ca..ecda479ef6 100644 --- a/packages/cli/src/environments/sourceControl/types/sourceControlPreferences.ts +++ b/packages/cli/src/environments/source-control/types/source-control-preferences.ts @@ -1,5 +1,5 @@ import { IsBoolean, IsHexColor, IsOptional, IsString } from 'class-validator'; -import { KeyPairType } from './keyPairType'; +import { KeyPairType } from './key-pair-type'; export class SourceControlPreferences { constructor(preferences: Partial | undefined = undefined) { diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlPullWorkFolder.ts b/packages/cli/src/environments/source-control/types/source-control-pull-work-folder.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/sourceControlPullWorkFolder.ts rename to packages/cli/src/environments/source-control/types/source-control-pull-work-folder.ts diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlPushWorkFolder.ts b/packages/cli/src/environments/source-control/types/source-control-push-work-folder.ts similarity index 82% rename from packages/cli/src/environments/sourceControl/types/sourceControlPushWorkFolder.ts rename to packages/cli/src/environments/source-control/types/source-control-push-work-folder.ts index a6b23025d8..20299a0139 100644 --- a/packages/cli/src/environments/sourceControl/types/sourceControlPushWorkFolder.ts +++ b/packages/cli/src/environments/source-control/types/source-control-push-work-folder.ts @@ -1,5 +1,5 @@ import { IsBoolean, IsOptional, IsString } from 'class-validator'; -import type { SourceControlledFile } from './sourceControlledFile'; +import type { SourceControlledFile } from './source-controlled-file'; export class SourceControlPushWorkFolder { @IsBoolean() diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlPush.ts b/packages/cli/src/environments/source-control/types/source-control-push.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/sourceControlPush.ts rename to packages/cli/src/environments/source-control/types/source-control-push.ts diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlSetBranch.ts b/packages/cli/src/environments/source-control/types/source-control-set-branch.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/sourceControlSetBranch.ts rename to packages/cli/src/environments/source-control/types/source-control-set-branch.ts diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlSetReadOnly.ts b/packages/cli/src/environments/source-control/types/source-control-set-read-only.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/sourceControlSetReadOnly.ts rename to packages/cli/src/environments/source-control/types/source-control-set-read-only.ts diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlStage.ts b/packages/cli/src/environments/source-control/types/source-control-stage.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/sourceControlStage.ts rename to packages/cli/src/environments/source-control/types/source-control-stage.ts diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlWorkflowVersionId.ts b/packages/cli/src/environments/source-control/types/source-control-workflow-version-id.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/sourceControlWorkflowVersionId.ts rename to packages/cli/src/environments/source-control/types/source-control-workflow-version-id.ts diff --git a/packages/cli/src/environments/sourceControl/types/sourceControlledFile.ts b/packages/cli/src/environments/source-control/types/source-controlled-file.ts similarity index 100% rename from packages/cli/src/environments/sourceControl/types/sourceControlledFile.ts rename to packages/cli/src/environments/source-control/types/source-controlled-file.ts diff --git a/packages/cli/src/environments/variables/environmentHelpers.ts b/packages/cli/src/environments/variables/environment-helpers.ts similarity index 100% rename from packages/cli/src/environments/variables/environmentHelpers.ts rename to packages/cli/src/environments/variables/environment-helpers.ts diff --git a/packages/cli/src/environments/variables/variables.service.ee.ts b/packages/cli/src/environments/variables/variables.service.ee.ts index 78a3d23fbe..768a9fa456 100644 --- a/packages/cli/src/environments/variables/variables.service.ee.ts +++ b/packages/cli/src/environments/variables/variables.service.ee.ts @@ -1,7 +1,7 @@ import { Container, Service } from 'typedi'; import type { Variables } from '@db/entities/Variables'; import { generateNanoId } from '@db/utils/generators'; -import { canCreateNewVariable } from './environmentHelpers'; +import { canCreateNewVariable } from './environment-helpers'; import { CacheService } from '@/services/cache/cache.service'; import { VariablesRepository } from '@db/repositories/variables.repository'; import { VariableCountLimitReachedError } from '@/errors/variable-count-limit-reached.error'; diff --git a/packages/cli/src/eventbus/EventMessageClasses/AbstractEventMessageOptions.ts b/packages/cli/src/eventbus/event-message-classes/abstract-event-message-options.ts similarity index 83% rename from packages/cli/src/eventbus/EventMessageClasses/AbstractEventMessageOptions.ts rename to packages/cli/src/eventbus/event-message-classes/abstract-event-message-options.ts index 95f3ef6432..7c70aa9ee5 100644 --- a/packages/cli/src/eventbus/EventMessageClasses/AbstractEventMessageOptions.ts +++ b/packages/cli/src/eventbus/event-message-classes/abstract-event-message-options.ts @@ -1,7 +1,7 @@ import type { DateTime } from 'luxon'; import type { EventMessageTypeNames } from 'n8n-workflow'; import type { EventNamesTypes } from '.'; -import type { AbstractEventPayload } from './AbstractEventPayload'; +import type { AbstractEventPayload } from './abstract-event-payload'; export interface AbstractEventMessageOptions { __type?: EventMessageTypeNames; diff --git a/packages/cli/src/eventbus/EventMessageClasses/AbstractEventMessage.ts b/packages/cli/src/eventbus/event-message-classes/abstract-event-message.ts similarity index 96% rename from packages/cli/src/eventbus/EventMessageClasses/AbstractEventMessage.ts rename to packages/cli/src/eventbus/event-message-classes/abstract-event-message.ts index f71b03a413..e74ba8c06a 100644 --- a/packages/cli/src/eventbus/EventMessageClasses/AbstractEventMessage.ts +++ b/packages/cli/src/eventbus/event-message-classes/abstract-event-message.ts @@ -2,8 +2,8 @@ import { DateTime } from 'luxon'; import type { EventMessageTypeNames, JsonObject } from 'n8n-workflow'; import { v4 as uuid } from 'uuid'; -import type { AbstractEventPayload } from './AbstractEventPayload'; -import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; +import type { AbstractEventPayload } from './abstract-event-payload'; +import type { AbstractEventMessageOptions } from './abstract-event-message-options'; import type { EventNamesTypes } from '.'; function modifyUnderscoredKeys( diff --git a/packages/cli/src/eventbus/EventMessageClasses/AbstractEventPayload.ts b/packages/cli/src/eventbus/event-message-classes/abstract-event-payload.ts similarity index 100% rename from packages/cli/src/eventbus/EventMessageClasses/AbstractEventPayload.ts rename to packages/cli/src/eventbus/event-message-classes/abstract-event-payload.ts diff --git a/packages/cli/src/eventbus/EventMessageClasses/EventMessageAiNode.ts b/packages/cli/src/eventbus/event-message-classes/event-message-ai-node.ts similarity index 87% rename from packages/cli/src/eventbus/EventMessageClasses/EventMessageAiNode.ts rename to packages/cli/src/eventbus/event-message-classes/event-message-ai-node.ts index 44d9feafbd..b1ee960993 100644 --- a/packages/cli/src/eventbus/EventMessageClasses/EventMessageAiNode.ts +++ b/packages/cli/src/eventbus/event-message-classes/event-message-ai-node.ts @@ -1,8 +1,8 @@ -import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage'; +import { AbstractEventMessage, isEventMessageOptionsWithType } from './abstract-event-message'; import type { EventNamesAiNodesType, JsonObject } from 'n8n-workflow'; import { EventMessageTypeNames } from 'n8n-workflow'; -import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; -import type { AbstractEventPayload } from './AbstractEventPayload'; +import type { AbstractEventMessageOptions } from './abstract-event-message-options'; +import type { AbstractEventPayload } from './abstract-event-payload'; // -------------------------------------- // EventMessage class for Node events diff --git a/packages/cli/src/eventbus/EventMessageClasses/EventMessageAudit.ts b/packages/cli/src/eventbus/event-message-classes/event-message-audit.ts similarity index 88% rename from packages/cli/src/eventbus/EventMessageClasses/EventMessageAudit.ts rename to packages/cli/src/eventbus/event-message-classes/event-message-audit.ts index 737a1ebf0a..4ae0fa485d 100644 --- a/packages/cli/src/eventbus/EventMessageClasses/EventMessageAudit.ts +++ b/packages/cli/src/eventbus/event-message-classes/event-message-audit.ts @@ -1,8 +1,8 @@ -import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage'; +import { AbstractEventMessage, isEventMessageOptionsWithType } from './abstract-event-message'; import { EventMessageTypeNames } from 'n8n-workflow'; import type { JsonObject, JsonValue } from 'n8n-workflow'; -import type { AbstractEventPayload } from './AbstractEventPayload'; -import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; +import type { AbstractEventPayload } from './abstract-event-payload'; +import type { AbstractEventMessageOptions } from './abstract-event-message-options'; import type { EventNamesAuditType } from '.'; // -------------------------------------- diff --git a/packages/cli/src/eventbus/EventMessageClasses/EventMessageConfirm.ts b/packages/cli/src/eventbus/event-message-classes/event-message-confirm.ts similarity index 100% rename from packages/cli/src/eventbus/EventMessageClasses/EventMessageConfirm.ts rename to packages/cli/src/eventbus/event-message-classes/event-message-confirm.ts diff --git a/packages/cli/src/eventbus/EventMessageClasses/EventMessageExecution.ts b/packages/cli/src/eventbus/event-message-classes/event-message-execution.ts similarity index 86% rename from packages/cli/src/eventbus/EventMessageClasses/EventMessageExecution.ts rename to packages/cli/src/eventbus/event-message-classes/event-message-execution.ts index 9a8864c7f0..e311e5354f 100644 --- a/packages/cli/src/eventbus/EventMessageClasses/EventMessageExecution.ts +++ b/packages/cli/src/eventbus/event-message-classes/event-message-execution.ts @@ -1,8 +1,8 @@ -import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage'; +import { AbstractEventMessage, isEventMessageOptionsWithType } from './abstract-event-message'; import type { JsonObject } from 'n8n-workflow'; import { EventMessageTypeNames } from 'n8n-workflow'; -import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; -import type { AbstractEventPayload } from './AbstractEventPayload'; +import type { AbstractEventMessageOptions } from './abstract-event-message-options'; +import type { AbstractEventPayload } from './abstract-event-payload'; import type { EventNamesExecutionType } from '.'; export interface EventPayloadExecution extends AbstractEventPayload { diff --git a/packages/cli/src/eventbus/EventMessageClasses/EventMessageGeneric.ts b/packages/cli/src/eventbus/event-message-classes/event-message-generic.ts similarity index 85% rename from packages/cli/src/eventbus/EventMessageClasses/EventMessageGeneric.ts rename to packages/cli/src/eventbus/event-message-classes/event-message-generic.ts index 0e49b33b4f..14d8bfb345 100644 --- a/packages/cli/src/eventbus/EventMessageClasses/EventMessageGeneric.ts +++ b/packages/cli/src/eventbus/event-message-classes/event-message-generic.ts @@ -1,8 +1,8 @@ import type { JsonObject } from 'n8n-workflow'; import { EventMessageTypeNames } from 'n8n-workflow'; -import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage'; -import type { AbstractEventPayload } from './AbstractEventPayload'; -import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; +import { AbstractEventMessage, isEventMessageOptionsWithType } from './abstract-event-message'; +import type { AbstractEventPayload } from './abstract-event-payload'; +import type { AbstractEventMessageOptions } from './abstract-event-message-options'; export const eventMessageGenericDestinationTestEvent = 'n8n.destination.test'; diff --git a/packages/cli/src/eventbus/EventMessageClasses/EventMessageNode.ts b/packages/cli/src/eventbus/event-message-classes/event-message-node.ts similarity index 87% rename from packages/cli/src/eventbus/EventMessageClasses/EventMessageNode.ts rename to packages/cli/src/eventbus/event-message-classes/event-message-node.ts index d9dda95e27..da36c2456c 100644 --- a/packages/cli/src/eventbus/EventMessageClasses/EventMessageNode.ts +++ b/packages/cli/src/eventbus/event-message-classes/event-message-node.ts @@ -1,8 +1,8 @@ -import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage'; +import { AbstractEventMessage, isEventMessageOptionsWithType } from './abstract-event-message'; import type { JsonObject } from 'n8n-workflow'; import { EventMessageTypeNames } from 'n8n-workflow'; -import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; -import type { AbstractEventPayload } from './AbstractEventPayload'; +import type { AbstractEventMessageOptions } from './abstract-event-message-options'; +import type { AbstractEventPayload } from './abstract-event-payload'; import type { EventNamesNodeType } from '.'; // -------------------------------------- diff --git a/packages/cli/src/eventbus/EventMessageClasses/EventMessageWorkflow.ts b/packages/cli/src/eventbus/event-message-classes/event-message-workflow.ts similarity index 88% rename from packages/cli/src/eventbus/EventMessageClasses/EventMessageWorkflow.ts rename to packages/cli/src/eventbus/event-message-classes/event-message-workflow.ts index 146e0ffcd3..22c0fc6b51 100644 --- a/packages/cli/src/eventbus/EventMessageClasses/EventMessageWorkflow.ts +++ b/packages/cli/src/eventbus/event-message-classes/event-message-workflow.ts @@ -1,8 +1,8 @@ -import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage'; +import { AbstractEventMessage, isEventMessageOptionsWithType } from './abstract-event-message'; import type { IWorkflowBase, JsonObject } from 'n8n-workflow'; import { EventMessageTypeNames } from 'n8n-workflow'; -import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; -import type { AbstractEventPayload } from './AbstractEventPayload'; +import type { AbstractEventMessageOptions } from './abstract-event-message-options'; +import type { AbstractEventPayload } from './abstract-event-payload'; import type { IExecutionBase } from '@/Interfaces'; import type { EventNamesWorkflowType } from '.'; diff --git a/packages/cli/src/eventbus/EventMessageClasses/index.ts b/packages/cli/src/eventbus/event-message-classes/index.ts similarity index 84% rename from packages/cli/src/eventbus/EventMessageClasses/index.ts rename to packages/cli/src/eventbus/event-message-classes/index.ts index 2e4d78560d..8e0f367571 100644 --- a/packages/cli/src/eventbus/EventMessageClasses/index.ts +++ b/packages/cli/src/eventbus/event-message-classes/index.ts @@ -1,9 +1,9 @@ -import type { EventMessageAiNode } from './EventMessageAiNode'; -import type { EventMessageAudit } from './EventMessageAudit'; -import type { EventMessageExecution } from './EventMessageExecution'; -import type { EventMessageGeneric } from './EventMessageGeneric'; -import type { EventMessageNode } from './EventMessageNode'; -import type { EventMessageWorkflow } from './EventMessageWorkflow'; +import type { EventMessageAiNode } from './event-message-ai-node'; +import type { EventMessageAudit } from './event-message-audit'; +import type { EventMessageExecution } from './event-message-execution'; +import type { EventMessageGeneric } from './event-message-generic'; +import type { EventMessageNode } from './event-message-node'; +import type { EventMessageWorkflow } from './event-message-workflow'; import { eventNamesAiNodes, type EventNamesAiNodesType } from 'n8n-workflow'; export const eventNamesWorkflow = [ diff --git a/packages/cli/src/eventbus/eventBus.controller.ts b/packages/cli/src/eventbus/eventBus.controller.ts index 419c4055aa..d9922b482e 100644 --- a/packages/cli/src/eventbus/eventBus.controller.ts +++ b/packages/cli/src/eventbus/eventBus.controller.ts @@ -1,4 +1,4 @@ -import { eventNamesAll } from './EventMessageClasses'; +import { eventNamesAll } from './event-message-classes'; import express from 'express'; import type { MessageEventBusDestinationWebhookOptions, @@ -10,17 +10,17 @@ import { RestController, Get, Post, Delete, GlobalScope, Licensed } from '@/deco import { AuthenticatedRequest } from '@/requests'; import { BadRequestError } from '@/errors/response-errors/bad-request.error'; -import { MessageEventBus } from './MessageEventBus/MessageEventBus'; +import { MessageEventBus } from './message-event-bus/message-event-bus'; import { isMessageEventBusDestinationSentryOptions, MessageEventBusDestinationSentry, -} from './MessageEventBusDestination/MessageEventBusDestinationSentry.ee'; +} from './message-event-bus-destination/message-event-bus-destination-sentry.ee'; import { isMessageEventBusDestinationSyslogOptions, MessageEventBusDestinationSyslog, -} from './MessageEventBusDestination/MessageEventBusDestinationSyslog.ee'; -import { MessageEventBusDestinationWebhook } from './MessageEventBusDestination/MessageEventBusDestinationWebhook.ee'; -import type { MessageEventBusDestination } from './MessageEventBusDestination/MessageEventBusDestination.ee'; +} from './message-event-bus-destination/message-event-bus-destination-syslog.ee'; +import { MessageEventBusDestinationWebhook } from './message-event-bus-destination/message-event-bus-destination-webhook.ee'; +import type { MessageEventBusDestination } from './message-event-bus-destination/message-event-bus-destination.ee'; const isWithIdString = (candidate: unknown): candidate is { id: string } => { const o = candidate as { id: string }; diff --git a/packages/cli/src/eventbus/index.ts b/packages/cli/src/eventbus/index.ts index fd3658c0a4..8f73005ba5 100644 --- a/packages/cli/src/eventbus/index.ts +++ b/packages/cli/src/eventbus/index.ts @@ -1,2 +1,2 @@ -export { EventMessageTypes } from './EventMessageClasses'; -export { EventPayloadWorkflow } from './EventMessageClasses/EventMessageWorkflow'; +export { EventMessageTypes } from './event-message-classes'; +export { EventPayloadWorkflow } from './event-message-classes/event-message-workflow'; diff --git a/packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationFromDb.ts b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-from-db.ts similarity index 69% rename from packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationFromDb.ts rename to packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-from-db.ts index 886d1e35dd..ebc5ec7a4b 100644 --- a/packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationFromDb.ts +++ b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-from-db.ts @@ -1,10 +1,10 @@ import { MessageEventBusDestinationTypeNames } from 'n8n-workflow'; import type { EventDestinations } from '@db/entities/EventDestinations'; -import type { MessageEventBus } from '../MessageEventBus/MessageEventBus'; -import type { MessageEventBusDestination } from './MessageEventBusDestination.ee'; -import { MessageEventBusDestinationSentry } from './MessageEventBusDestinationSentry.ee'; -import { MessageEventBusDestinationSyslog } from './MessageEventBusDestinationSyslog.ee'; -import { MessageEventBusDestinationWebhook } from './MessageEventBusDestinationWebhook.ee'; +import type { MessageEventBus } from '../message-event-bus/message-event-bus'; +import type { MessageEventBusDestination } from './message-event-bus-destination.ee'; +import { MessageEventBusDestinationSentry } from './message-event-bus-destination-sentry.ee'; +import { MessageEventBusDestinationSyslog } from './message-event-bus-destination-syslog.ee'; +import { MessageEventBusDestinationWebhook } from './message-event-bus-destination-webhook.ee'; import { Container } from 'typedi'; import { Logger } from '@/logger'; diff --git a/packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationSentry.ee.ts b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-sentry.ee.ts similarity index 92% rename from packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationSentry.ee.ts rename to packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-sentry.ee.ts index 25633c3ac6..d376d11610 100644 --- a/packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationSentry.ee.ts +++ b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-sentry.ee.ts @@ -1,15 +1,15 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import { MessageEventBusDestination } from './MessageEventBusDestination.ee'; +import { MessageEventBusDestination } from './message-event-bus-destination.ee'; import * as Sentry from '@sentry/node'; import { MessageEventBusDestinationTypeNames } from 'n8n-workflow'; import type { MessageEventBusDestinationOptions, MessageEventBusDestinationSentryOptions, } from 'n8n-workflow'; -import { eventMessageGenericDestinationTestEvent } from '../EventMessageClasses/EventMessageGeneric'; +import { eventMessageGenericDestinationTestEvent } from '../event-message-classes/event-message-generic'; import { N8N_VERSION } from '@/constants'; -import type { MessageEventBus, MessageWithCallback } from '../MessageEventBus/MessageEventBus'; +import type { MessageEventBus, MessageWithCallback } from '../message-event-bus/message-event-bus'; export const isMessageEventBusDestinationSentryOptions = ( candidate: unknown, diff --git a/packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationSyslog.ee.ts b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-syslog.ee.ts similarity index 93% rename from packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationSyslog.ee.ts rename to packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-syslog.ee.ts index 8d9b743829..a16718086d 100644 --- a/packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationSyslog.ee.ts +++ b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-syslog.ee.ts @@ -6,9 +6,9 @@ import type { MessageEventBusDestinationSyslogOptions, } from 'n8n-workflow'; import { MessageEventBusDestinationTypeNames } from 'n8n-workflow'; -import { MessageEventBusDestination } from './MessageEventBusDestination.ee'; -import { eventMessageGenericDestinationTestEvent } from '../EventMessageClasses/EventMessageGeneric'; -import type { MessageEventBus, MessageWithCallback } from '../MessageEventBus/MessageEventBus'; +import { MessageEventBusDestination } from './message-event-bus-destination.ee'; +import { eventMessageGenericDestinationTestEvent } from '../event-message-classes/event-message-generic'; +import type { MessageEventBus, MessageWithCallback } from '../message-event-bus/message-event-bus'; import Container from 'typedi'; import { Logger } from '@/logger'; export const isMessageEventBusDestinationSyslogOptions = ( diff --git a/packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationWebhook.ee.ts b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-webhook.ee.ts similarity index 97% rename from packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationWebhook.ee.ts rename to packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-webhook.ee.ts index 5521854952..01cffac93a 100644 --- a/packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationWebhook.ee.ts +++ b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-webhook.ee.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ -import { MessageEventBusDestination } from './MessageEventBusDestination.ee'; +import { MessageEventBusDestination } from './message-event-bus-destination.ee'; import axios from 'axios'; import type { AxiosRequestConfig, Method } from 'axios'; import { jsonParse, MessageEventBusDestinationTypeNames } from 'n8n-workflow'; @@ -13,8 +13,8 @@ import type { } from 'n8n-workflow'; import { CredentialsHelper } from '@/credentials-helper'; import { Agent as HTTPSAgent } from 'https'; -import { eventMessageGenericDestinationTestEvent } from '../EventMessageClasses/EventMessageGeneric'; -import type { MessageEventBus, MessageWithCallback } from '../MessageEventBus/MessageEventBus'; +import { eventMessageGenericDestinationTestEvent } from '../event-message-classes/event-message-generic'; +import type { MessageEventBus, MessageWithCallback } from '../message-event-bus/message-event-bus'; import * as SecretsHelpers from '@/external-secrets/external-secrets-helper.ee'; import Container from 'typedi'; diff --git a/packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestination.ee.ts b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination.ee.ts similarity index 91% rename from packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestination.ee.ts rename to packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination.ee.ts index 3cd86f4368..1b9085e9d0 100644 --- a/packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestination.ee.ts +++ b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination.ee.ts @@ -3,10 +3,10 @@ import { Container } from 'typedi'; import type { INodeCredentials, MessageEventBusDestinationOptions } from 'n8n-workflow'; import { MessageEventBusDestinationTypeNames } from 'n8n-workflow'; import { Logger } from '@/logger'; -import type { AbstractEventMessage } from '../EventMessageClasses/AbstractEventMessage'; -import type { EventMessageTypes } from '../EventMessageClasses'; -import type { EventMessageConfirmSource } from '../EventMessageClasses/EventMessageConfirm'; -import type { MessageEventBus, MessageWithCallback } from '../MessageEventBus/MessageEventBus'; +import type { AbstractEventMessage } from '../event-message-classes/abstract-event-message'; +import type { EventMessageTypes } from '../event-message-classes'; +import type { EventMessageConfirmSource } from '../event-message-classes/event-message-confirm'; +import type { MessageEventBus, MessageWithCallback } from '../message-event-bus/message-event-bus'; import { EventDestinationsRepository } from '@db/repositories/eventDestinations.repository'; import { License } from '@/license'; diff --git a/packages/cli/src/eventbus/MessageEventBusWriter/MessageEventBusLogWriterWorker.ts b/packages/cli/src/eventbus/message-event-bus-writer/message-event-bus-log-writer-worker.ts similarity index 97% rename from packages/cli/src/eventbus/MessageEventBusWriter/MessageEventBusLogWriterWorker.ts rename to packages/cli/src/eventbus/message-event-bus-writer/message-event-bus-log-writer-worker.ts index 69d2e8ce26..308d4508c1 100644 --- a/packages/cli/src/eventbus/MessageEventBusWriter/MessageEventBusLogWriterWorker.ts +++ b/packages/cli/src/eventbus/message-event-bus-writer/message-event-bus-log-writer-worker.ts @@ -1,7 +1,7 @@ import { appendFileSync, existsSync, rmSync, renameSync, openSync, closeSync } from 'fs'; import { stat } from 'fs/promises'; import { isMainThread, parentPort } from 'worker_threads'; -import type { MessageEventBusLogWriterOptions } from './MessageEventBusLogWriter'; +import type { MessageEventBusLogWriterOptions } from './message-event-bus-log-writer'; let logFileBasePath = ''; let loggingPaused = true; diff --git a/packages/cli/src/eventbus/MessageEventBusWriter/MessageEventBusLogWriter.ts b/packages/cli/src/eventbus/message-event-bus-writer/message-event-bus-log-writer.ts similarity index 89% rename from packages/cli/src/eventbus/MessageEventBusWriter/MessageEventBusLogWriter.ts rename to packages/cli/src/eventbus/message-event-bus-writer/message-event-bus-log-writer.ts index 617dacd283..fd6eb1db38 100644 --- a/packages/cli/src/eventbus/MessageEventBusWriter/MessageEventBusLogWriter.ts +++ b/packages/cli/src/eventbus/message-event-bus-writer/message-event-bus-log-writer.ts @@ -1,29 +1,29 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import { isEventMessageOptions } from '../EventMessageClasses/AbstractEventMessage'; +import { isEventMessageOptions } from '../event-message-classes/abstract-event-message'; import { InstanceSettings } from 'n8n-core'; import path, { parse } from 'path'; import { Worker } from 'worker_threads'; import { createReadStream, existsSync, rmSync } from 'fs'; import readline from 'readline'; import remove from 'lodash/remove'; -import type { EventMessageGenericOptions } from '../EventMessageClasses/EventMessageGeneric'; -import { EventMessageGeneric } from '../EventMessageClasses/EventMessageGeneric'; -import type { AbstractEventMessageOptions } from '../EventMessageClasses/AbstractEventMessageOptions'; -import type { EventMessageWorkflowOptions } from '../EventMessageClasses/EventMessageWorkflow'; -import { EventMessageWorkflow } from '../EventMessageClasses/EventMessageWorkflow'; +import type { EventMessageGenericOptions } from '../event-message-classes/event-message-generic'; +import { EventMessageGeneric } from '../event-message-classes/event-message-generic'; +import type { AbstractEventMessageOptions } from '../event-message-classes/abstract-event-message-options'; +import type { EventMessageWorkflowOptions } from '../event-message-classes/event-message-workflow'; +import { EventMessageWorkflow } from '../event-message-classes/event-message-workflow'; import { EventMessageTypeNames, jsonParse } from 'n8n-workflow'; -import type { EventMessageAuditOptions } from '../EventMessageClasses/EventMessageAudit'; -import { EventMessageAudit } from '../EventMessageClasses/EventMessageAudit'; -import type { EventMessageNodeOptions } from '../EventMessageClasses/EventMessageNode'; -import { EventMessageNode } from '../EventMessageClasses/EventMessageNode'; -import type { EventMessageReturnMode } from '../MessageEventBus/MessageEventBus'; -import type { EventMessageTypes } from '../EventMessageClasses'; -import type { EventMessageConfirmSource } from '../EventMessageClasses/EventMessageConfirm'; +import type { EventMessageAuditOptions } from '../event-message-classes/event-message-audit'; +import { EventMessageAudit } from '../event-message-classes/event-message-audit'; +import type { EventMessageNodeOptions } from '../event-message-classes/event-message-node'; +import { EventMessageNode } from '../event-message-classes/event-message-node'; +import type { EventMessageReturnMode } from '../message-event-bus/message-event-bus'; +import type { EventMessageTypes } from '../event-message-classes'; +import type { EventMessageConfirmSource } from '../event-message-classes/event-message-confirm'; import { EventMessageConfirm, isEventMessageConfirm, -} from '../EventMessageClasses/EventMessageConfirm'; +} from '../event-message-classes/event-message-confirm'; import { once as eventOnce } from 'events'; import { inTest } from '@/constants'; import { Logger } from '@/logger'; @@ -139,9 +139,10 @@ export class MessageEventBusLogWriter { const parsedName = parse(__filename); let workerFileName; if (inTest) { - workerFileName = './dist/eventbus/MessageEventBusWriter/MessageEventBusLogWriterWorker.js'; + workerFileName = + './dist/eventbus/message-event-bus-writer/message-event-bus-log-writer-worker.js'; } else { - workerFileName = path.join(parsedName.dir, `${parsedName.name}Worker${parsedName.ext}`); + workerFileName = path.join(parsedName.dir, `${parsedName.name}-worker${parsedName.ext}`); } this._worker = new Worker(workerFileName); if (this.worker) { diff --git a/packages/cli/src/eventbus/MessageEventBus/MessageEventBus.ts b/packages/cli/src/eventbus/message-event-bus/message-event-bus.ts similarity index 91% rename from packages/cli/src/eventbus/MessageEventBus/MessageEventBus.ts rename to packages/cli/src/eventbus/message-event-bus/message-event-bus.ts index 38ec4e8dc7..47d4d327d4 100644 --- a/packages/cli/src/eventbus/MessageEventBus/MessageEventBus.ts +++ b/packages/cli/src/eventbus/message-event-bus/message-event-bus.ts @@ -14,29 +14,29 @@ import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { OrchestrationService } from '@/services/orchestration.service'; import { Logger } from '@/logger'; -import type { EventMessageTypes } from '../EventMessageClasses/'; -import type { MessageEventBusDestination } from '../MessageEventBusDestination/MessageEventBusDestination.ee'; -import { MessageEventBusLogWriter } from '../MessageEventBusWriter/MessageEventBusLogWriter'; -import { messageEventBusDestinationFromDb } from '../MessageEventBusDestination/MessageEventBusDestinationFromDb'; -import type { EventMessageConfirmSource } from '../EventMessageClasses/EventMessageConfirm'; -import type { EventMessageAuditOptions } from '../EventMessageClasses/EventMessageAudit'; -import { EventMessageAudit } from '../EventMessageClasses/EventMessageAudit'; -import type { EventMessageWorkflowOptions } from '../EventMessageClasses/EventMessageWorkflow'; -import { EventMessageWorkflow } from '../EventMessageClasses/EventMessageWorkflow'; -import type { EventMessageNodeOptions } from '../EventMessageClasses/EventMessageNode'; -import { EventMessageNode } from '../EventMessageClasses/EventMessageNode'; +import type { EventMessageTypes } from '../event-message-classes/'; +import type { MessageEventBusDestination } from '../message-event-bus-destination/message-event-bus-destination.ee'; +import { MessageEventBusLogWriter } from '../message-event-bus-writer/message-event-bus-log-writer'; +import { messageEventBusDestinationFromDb } from '../message-event-bus-destination/message-event-bus-destination-from-db'; +import type { EventMessageConfirmSource } from '../event-message-classes/event-message-confirm'; +import type { EventMessageAuditOptions } from '../event-message-classes/event-message-audit'; +import { EventMessageAudit } from '../event-message-classes/event-message-audit'; +import type { EventMessageWorkflowOptions } from '../event-message-classes/event-message-workflow'; +import { EventMessageWorkflow } from '../event-message-classes/event-message-workflow'; +import type { EventMessageNodeOptions } from '../event-message-classes/event-message-node'; +import { EventMessageNode } from '../event-message-classes/event-message-node'; import { EventMessageGeneric, eventMessageGenericDestinationTestEvent, -} from '../EventMessageClasses/EventMessageGeneric'; +} from '../event-message-classes/event-message-generic'; import { ExecutionRecoveryService } from '../../executions/execution-recovery.service'; import { EventMessageAiNode, type EventMessageAiNodeOptions, -} from '../EventMessageClasses/EventMessageAiNode'; +} from '../event-message-classes/event-message-ai-node'; import { License } from '@/license'; -import type { EventMessageExecutionOptions } from '../EventMessageClasses/EventMessageExecution'; -import { EventMessageExecution } from '../EventMessageClasses/EventMessageExecution'; +import type { EventMessageExecutionOptions } from '../event-message-classes/event-message-execution'; +import { EventMessageExecution } from '../event-message-classes/event-message-execution'; import { GlobalConfig } from '@n8n/config'; export type EventMessageReturnMode = 'sent' | 'unsent' | 'all' | 'unfinished'; diff --git a/packages/cli/src/events/__tests__/log-streaming-event-relay.test.ts b/packages/cli/src/events/__tests__/log-streaming-event-relay.test.ts index 720e2d494c..3a30738e63 100644 --- a/packages/cli/src/events/__tests__/log-streaming-event-relay.test.ts +++ b/packages/cli/src/events/__tests__/log-streaming-event-relay.test.ts @@ -3,7 +3,7 @@ import { LogStreamingEventRelay } from '@/events/log-streaming-event-relay'; import { EventService } from '@/events/event.service'; import type { INode, IRun, IWorkflowBase } from 'n8n-workflow'; import type { IWorkflowDb } from '@/Interfaces'; -import type { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import type { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import type { RelayEventMap } from '@/events/relay-event-map'; describe('LogStreamingEventRelay', () => { diff --git a/packages/cli/src/events/log-streaming-event-relay.ts b/packages/cli/src/events/log-streaming-event-relay.ts index 2012775d91..db704128ea 100644 --- a/packages/cli/src/events/log-streaming-event-relay.ts +++ b/packages/cli/src/events/log-streaming-event-relay.ts @@ -1,5 +1,5 @@ import { Service } from 'typedi'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { Redactable } from '@/decorators/redactable'; import { EventRelay } from '@/events/event-relay'; import type { RelayEventMap } from '@/events/relay-event-map'; diff --git a/packages/cli/src/executions/__tests__/execution-recovery.service.test.ts b/packages/cli/src/executions/__tests__/execution-recovery.service.test.ts index f72c81a3ca..a6e8a01aaa 100644 --- a/packages/cli/src/executions/__tests__/execution-recovery.service.test.ts +++ b/packages/cli/src/executions/__tests__/execution-recovery.service.test.ts @@ -15,11 +15,11 @@ import { Push } from '@/push'; import { ARTIFICIAL_TASK_DATA } from '@/constants'; import { NodeCrashedError } from '@/errors/node-crashed.error'; import { WorkflowCrashedError } from '@/errors/workflow-crashed.error'; -import { EventMessageNode } from '@/eventbus/EventMessageClasses/EventMessageNode'; +import { EventMessageNode } from '@/eventbus/event-message-classes/event-message-node'; import { IN_PROGRESS_EXECUTION_DATA, OOM_WORKFLOW } from './constants'; import { setupMessages } from './utils'; -import type { EventMessageTypes as EventMessage } from '@/eventbus/EventMessageClasses'; +import type { EventMessageTypes as EventMessage } from '@/eventbus/event-message-classes'; describe('ExecutionRecoveryService', () => { const push = mockInstance(Push); diff --git a/packages/cli/src/executions/__tests__/utils.ts b/packages/cli/src/executions/__tests__/utils.ts index 6ffb9109ec..7c5ee85b3e 100644 --- a/packages/cli/src/executions/__tests__/utils.ts +++ b/packages/cli/src/executions/__tests__/utils.ts @@ -1,6 +1,6 @@ -import type { EventMessageTypes as EventMessage } from '@/eventbus/EventMessageClasses'; -import { EventMessageNode } from '@/eventbus/EventMessageClasses/EventMessageNode'; -import { EventMessageWorkflow } from '@/eventbus/EventMessageClasses/EventMessageWorkflow'; +import type { EventMessageTypes as EventMessage } from '@/eventbus/event-message-classes'; +import { EventMessageNode } from '@/eventbus/event-message-classes/event-message-node'; +import { EventMessageWorkflow } from '@/eventbus/event-message-classes/event-message-workflow'; export const setupMessages = (executionId: string, workflowName: string): EventMessage[] => { return [ diff --git a/packages/cli/src/executions/execution-recovery.service.ts b/packages/cli/src/executions/execution-recovery.service.ts index ffe4e04a45..1c8fe7d639 100644 --- a/packages/cli/src/executions/execution-recovery.service.ts +++ b/packages/cli/src/executions/execution-recovery.service.ts @@ -6,7 +6,7 @@ import { getWorkflowHooksMain } from '@/workflow-execute-additional-data'; // @T import type { DateTime } from 'luxon'; import type { IRun, ITaskData } from 'n8n-workflow'; import { InstanceSettings } from 'n8n-core'; -import type { EventMessageTypes } from '../eventbus/EventMessageClasses'; +import type { EventMessageTypes } from '../eventbus/event-message-classes'; import type { IExecutionResponse } from '@/Interfaces'; import { NodeCrashedError } from '@/errors/node-crashed.error'; import { WorkflowCrashedError } from '@/errors/workflow-crashed.error'; diff --git a/packages/cli/src/internal-hooks.ts b/packages/cli/src/internal-hooks.ts index b3d45b67c0..378a01ecaa 100644 --- a/packages/cli/src/internal-hooks.ts +++ b/packages/cli/src/internal-hooks.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { Telemetry } from '@/telemetry'; -import { MessageEventBus } from './eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from './eventbus/message-event-bus/message-event-bus'; /** * @deprecated Do not add to this class. It will be removed once we remove diff --git a/packages/cli/src/metrics/__tests__/prometheus-metrics.service.test.ts b/packages/cli/src/metrics/__tests__/prometheus-metrics.service.test.ts index 219170ac08..91f99f91b0 100644 --- a/packages/cli/src/metrics/__tests__/prometheus-metrics.service.test.ts +++ b/packages/cli/src/metrics/__tests__/prometheus-metrics.service.test.ts @@ -4,7 +4,7 @@ import promBundle from 'express-prom-bundle'; import { mock } from 'jest-mock-extended'; import { PrometheusMetricsService } from '../prometheus-metrics.service'; import type express from 'express'; -import type { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import type { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { mockInstance } from '@test/mocking'; import { GlobalConfig } from '@n8n/config'; diff --git a/packages/cli/src/metrics/prometheus-metrics.service.ts b/packages/cli/src/metrics/prometheus-metrics.service.ts index 1444f6f694..32522808fc 100644 --- a/packages/cli/src/metrics/prometheus-metrics.service.ts +++ b/packages/cli/src/metrics/prometheus-metrics.service.ts @@ -6,7 +6,7 @@ import semverParse from 'semver/functions/parse'; import { Service } from 'typedi'; import { CacheService } from '@/services/cache/cache.service'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { EventMessageTypeNames } from 'n8n-workflow'; import type { EventMessageTypes } from '@/eventbus'; import type { Includes, MetricCategory, MetricLabel } from './types'; diff --git a/packages/cli/src/server.ts b/packages/cli/src/server.ts index 30de80295a..04faa431fe 100644 --- a/packages/cli/src/server.ts +++ b/packages/cli/src/server.ts @@ -31,7 +31,7 @@ import { setupPushServer, setupPushHandler } from '@/push'; import { isLdapEnabled } from '@/ldap/helpers.ee'; import { AbstractServer } from '@/abstract-server'; import { PostHogClient } from '@/posthog'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { handleMfaDisable, isMfaFeatureEnabled } from '@/mfa/helpers'; import type { FrontendService } from '@/services/frontend.service'; import { OrchestrationService } from '@/services/orchestration.service'; @@ -155,10 +155,10 @@ export class Server extends AbstractServer { // ---------------------------------------- try { const { SourceControlService } = await import( - '@/environments/sourceControl/sourceControl.service.ee' + '@/environments/source-control/source-control.service.ee' ); await Container.get(SourceControlService).init(); - await import('@/environments/sourceControl/sourceControl.controller.ee'); + await import('@/environments/source-control/source-control.controller.ee'); await import('@/environments/variables/variables.controller.ee'); } catch (error) { this.logger.warn(`Source Control initialization failed: ${(error as Error).message}`); diff --git a/packages/cli/src/services/__tests__/orchestration.service.test.ts b/packages/cli/src/services/__tests__/orchestration.service.test.ts index 99c92ad070..811643b967 100644 --- a/packages/cli/src/services/__tests__/orchestration.service.test.ts +++ b/packages/cli/src/services/__tests__/orchestration.service.test.ts @@ -7,7 +7,7 @@ import type { WorkflowActivateMode } from 'n8n-workflow'; import config from '@/config'; import { OrchestrationService } from '@/services/orchestration.service'; import type { RedisServiceWorkerResponseObject } from '@/services/redis/RedisServiceCommands'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { RedisService } from '@/services/redis.service'; import { handleWorkerResponseMessageMain } from '@/services/orchestration/main/handleWorkerResponseMessageMain'; import { handleCommandMessageMain } from '@/services/orchestration/main/handleCommandMessageMain'; diff --git a/packages/cli/src/services/frontend.service.ts b/packages/cli/src/services/frontend.service.ts index 24f8a3505b..1e70c972a0 100644 --- a/packages/cli/src/services/frontend.service.ts +++ b/packages/cli/src/services/frontend.service.ts @@ -22,7 +22,7 @@ import { License } from '@/license'; import { getCurrentAuthenticationMethod } from '@/sso/sso-helpers'; import { getLdapLoginLabel } from '@/ldap/helpers.ee'; import { getSamlLoginLabel } from '@/sso/saml/saml-helpers'; -import { getVariablesLimit } from '@/environments/variables/environmentHelpers'; +import { getVariablesLimit } from '@/environments/variables/environment-helpers'; import { getWorkflowHistoryLicensePruneTime, getWorkflowHistoryPruneTime, diff --git a/packages/cli/src/services/orchestration/main/handleCommandMessageMain.ts b/packages/cli/src/services/orchestration/main/handleCommandMessageMain.ts index 1cdb3cf7f1..266304ff30 100644 --- a/packages/cli/src/services/orchestration/main/handleCommandMessageMain.ts +++ b/packages/cli/src/services/orchestration/main/handleCommandMessageMain.ts @@ -1,7 +1,7 @@ import { Container } from 'typedi'; import { debounceMessageReceiver, messageToRedisServiceCommandObject } from '../helpers'; import config from '@/config'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { ExternalSecretsManager } from '@/external-secrets/external-secrets-manager.ee'; import { License } from '@/license'; import { Logger } from '@/logger'; diff --git a/packages/cli/src/services/orchestration/webhook/handleCommandMessageWebhook.ts b/packages/cli/src/services/orchestration/webhook/handleCommandMessageWebhook.ts index c6f746db63..7f01017e72 100644 --- a/packages/cli/src/services/orchestration/webhook/handleCommandMessageWebhook.ts +++ b/packages/cli/src/services/orchestration/webhook/handleCommandMessageWebhook.ts @@ -1,6 +1,6 @@ import { ExternalSecretsManager } from '@/external-secrets/external-secrets-manager.ee'; import { License } from '@/license'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import Container from 'typedi'; import { Logger } from 'winston'; import { messageToRedisServiceCommandObject, debounceMessageReceiver } from '../helpers'; diff --git a/packages/cli/src/services/orchestration/worker/handleCommandMessageWorker.ts b/packages/cli/src/services/orchestration/worker/handleCommandMessageWorker.ts index 52727c37e1..f3a991fb16 100644 --- a/packages/cli/src/services/orchestration/worker/handleCommandMessageWorker.ts +++ b/packages/cli/src/services/orchestration/worker/handleCommandMessageWorker.ts @@ -4,7 +4,7 @@ import type { RedisServiceCommandObject } from '@/services/redis/RedisServiceCom import { COMMAND_REDIS_CHANNEL } from '@/services/redis/RedisConstants'; import * as os from 'os'; import { License } from '@/license'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { ExternalSecretsManager } from '@/external-secrets/external-secrets-manager.ee'; import { debounceMessageReceiver, getOsCpuString } from '../helpers'; import type { WorkerCommandReceivedHandlerOptions } from './types'; diff --git a/packages/cli/src/telemetry/index.ts b/packages/cli/src/telemetry/index.ts index 2aec0f07d2..15ed348fa9 100644 --- a/packages/cli/src/telemetry/index.ts +++ b/packages/cli/src/telemetry/index.ts @@ -11,7 +11,7 @@ import { Logger } from '@/logger'; import { License } from '@/license'; import { LOWEST_SHUTDOWN_PRIORITY, N8N_VERSION } from '@/constants'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; -import { SourceControlPreferencesService } from '../environments/sourceControl/sourceControlPreferences.service.ee'; +import { SourceControlPreferencesService } from '../environments/source-control/source-control-preferences.service.ee'; import { UserRepository } from '@db/repositories/user.repository'; import { ProjectRepository } from '@/databases/repositories/project.repository'; import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; diff --git a/packages/cli/src/workflow-execute-additional-data.ts b/packages/cli/src/workflow-execute-additional-data.ts index 459c946926..2e0bda061e 100644 --- a/packages/cli/src/workflow-execute-additional-data.ts +++ b/packages/cli/src/workflow-execute-additional-data.ts @@ -69,7 +69,7 @@ import { WorkflowStaticDataService } from './workflows/workflow-static-data.serv import { WorkflowRepository } from './databases/repositories/workflow.repository'; import { UrlService } from './services/url.service'; import { WorkflowExecutionService } from './workflows/workflow-execution.service'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { EventService } from './events/event.service'; import { GlobalConfig } from '@n8n/config'; import { SubworkflowPolicyChecker } from './subworkflows/subworkflow-policy-checker.service'; diff --git a/packages/cli/test/integration/commands/worker.cmd.test.ts b/packages/cli/test/integration/commands/worker.cmd.test.ts index aad419d23b..3bfac6a07c 100644 --- a/packages/cli/test/integration/commands/worker.cmd.test.ts +++ b/packages/cli/test/integration/commands/worker.cmd.test.ts @@ -3,7 +3,7 @@ import { BinaryDataService } from 'n8n-core'; import { Worker } from '@/commands/worker'; import config from '@/config'; import { ExternalSecretsManager } from '@/external-secrets/external-secrets-manager.ee'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials'; import { OrchestrationHandlerWorkerService } from '@/services/orchestration/worker/orchestration.handler.worker.service'; import { OrchestrationWorkerService } from '@/services/orchestration/worker/orchestration.worker.service'; diff --git a/packages/cli/test/integration/environments/SourceControl.test.ts b/packages/cli/test/integration/environments/SourceControl.test.ts index cac369422b..5bb5d8089b 100644 --- a/packages/cli/test/integration/environments/SourceControl.test.ts +++ b/packages/cli/test/integration/environments/SourceControl.test.ts @@ -2,9 +2,9 @@ import { Container } from 'typedi'; import type { User } from '@db/entities/User'; import config from '@/config'; -import { SourceControlPreferencesService } from '@/environments/sourceControl/sourceControlPreferences.service.ee'; -import { SourceControlService } from '@/environments/sourceControl/sourceControl.service.ee'; -import type { SourceControlledFile } from '@/environments/sourceControl/types/sourceControlledFile'; +import { SourceControlPreferencesService } from '@/environments/source-control/source-control-preferences.service.ee'; +import { SourceControlService } from '@/environments/source-control/source-control.service.ee'; +import type { SourceControlledFile } from '@/environments/source-control/types/source-controlled-file'; import * as utils from '../shared/utils/'; import { createUser } from '../shared/db/users'; diff --git a/packages/cli/test/integration/environments/source-control-import.service.test.ts b/packages/cli/test/integration/environments/source-control-import.service.test.ts index 4665178a3f..56ba90cddc 100644 --- a/packages/cli/test/integration/environments/source-control-import.service.test.ts +++ b/packages/cli/test/integration/environments/source-control-import.service.test.ts @@ -7,12 +7,12 @@ import { nanoid } from 'nanoid'; import type { InstanceSettings } from 'n8n-core'; import * as testDb from '../shared/testDb'; -import { SourceControlImportService } from '@/environments/sourceControl/sourceControlImport.service.ee'; +import { SourceControlImportService } from '@/environments/source-control/source-control-import.service.ee'; import { createMember, getGlobalOwner } from '../shared/db/users'; import { SharedCredentialsRepository } from '@/databases/repositories/sharedCredentials.repository'; import { mockInstance } from '../../shared/mocking'; -import type { SourceControlledFile } from '@/environments/sourceControl/types/sourceControlledFile'; -import type { ExportableCredential } from '@/environments/sourceControl/types/exportableCredential'; +import type { SourceControlledFile } from '@/environments/source-control/types/source-controlled-file'; +import type { ExportableCredential } from '@/environments/source-control/types/exportable-credential'; import { createTeamProject, getPersonalProject } from '../shared/db/projects'; import { ProjectRepository } from '@/databases/repositories/project.repository'; import { saveCredential } from '../shared/db/credentials'; diff --git a/packages/cli/test/integration/eventbus.ee.test.ts b/packages/cli/test/integration/eventbus.ee.test.ts index f21822683b..9146b8b87c 100644 --- a/packages/cli/test/integration/eventbus.ee.test.ts +++ b/packages/cli/test/integration/eventbus.ee.test.ts @@ -14,13 +14,13 @@ import { } from 'n8n-workflow'; import type { User } from '@db/entities/User'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; -import { EventMessageGeneric } from '@/eventbus/EventMessageClasses/EventMessageGeneric'; -import type { MessageEventBusDestinationSyslog } from '@/eventbus/MessageEventBusDestination/MessageEventBusDestinationSyslog.ee'; -import type { MessageEventBusDestinationWebhook } from '@/eventbus/MessageEventBusDestination/MessageEventBusDestinationWebhook.ee'; -import type { MessageEventBusDestinationSentry } from '@/eventbus/MessageEventBusDestination/MessageEventBusDestinationSentry.ee'; -import { EventMessageAudit } from '@/eventbus/EventMessageClasses/EventMessageAudit'; -import type { EventNamesTypes } from '@/eventbus/EventMessageClasses'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; +import { EventMessageGeneric } from '@/eventbus/event-message-classes/event-message-generic'; +import type { MessageEventBusDestinationSyslog } from '@/eventbus/message-event-bus-destination/message-event-bus-destination-syslog.ee'; +import type { MessageEventBusDestinationWebhook } from '@/eventbus/message-event-bus-destination/message-event-bus-destination-webhook.ee'; +import type { MessageEventBusDestinationSentry } from '@/eventbus/message-event-bus-destination/message-event-bus-destination-sentry.ee'; +import { EventMessageAudit } from '@/eventbus/event-message-classes/event-message-audit'; +import type { EventNamesTypes } from '@/eventbus/event-message-classes'; import { ExecutionRecoveryService } from '@/executions/execution-recovery.service'; import * as utils from './shared/utils'; @@ -28,7 +28,7 @@ import { createUser } from './shared/db/users'; import { mockInstance } from '../shared/mocking'; import type { SuperAgentTest } from './shared/types'; -jest.unmock('@/eventbus/MessageEventBus/MessageEventBus'); +jest.unmock('@/eventbus/message-event-bus/message-event-bus'); jest.mock('axios'); const mockedAxios = axios as jest.Mocked; jest.mock('syslog-client'); @@ -96,7 +96,7 @@ beforeAll(async () => { }); afterAll(async () => { - jest.mock('@/eventbus/MessageEventBus/MessageEventBus'); + jest.mock('@/eventbus/message-event-bus/message-event-bus'); await eventBus?.close(); }); diff --git a/packages/cli/test/integration/eventbus.test.ts b/packages/cli/test/integration/eventbus.test.ts index e4e58f96fa..3b36222ec2 100644 --- a/packages/cli/test/integration/eventbus.test.ts +++ b/packages/cli/test/integration/eventbus.test.ts @@ -1,5 +1,5 @@ import type { User } from '@db/entities/User'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { ExecutionRecoveryService } from '@/executions/execution-recovery.service'; import * as utils from './shared/utils/'; diff --git a/packages/cli/test/integration/prometheus-metrics.test.ts b/packages/cli/test/integration/prometheus-metrics.test.ts index 1eccb9b7d0..f6710ba3a5 100644 --- a/packages/cli/test/integration/prometheus-metrics.test.ts +++ b/packages/cli/test/integration/prometheus-metrics.test.ts @@ -7,7 +7,7 @@ import { PrometheusMetricsService } from '@/metrics/prometheus-metrics.service'; import { setupTestServer } from './shared/utils'; import { GlobalConfig } from '@n8n/config'; -jest.unmock('@/eventbus/MessageEventBus/MessageEventBus'); +jest.unmock('@/eventbus/message-event-bus/message-event-bus'); const toLines = (response: Response) => response.text.trim().split('\n'); diff --git a/packages/cli/test/integration/shared/utils/testServer.ts b/packages/cli/test/integration/shared/utils/testServer.ts index c40285829e..b75a7804b7 100644 --- a/packages/cli/test/integration/shared/utils/testServer.ts +++ b/packages/cli/test/integration/shared/utils/testServer.ts @@ -179,7 +179,7 @@ export const setupTestServer = ({ break; case 'sourceControl': - await import('@/environments/sourceControl/sourceControl.controller.ee'); + await import('@/environments/source-control/source-control.controller.ee'); break; case 'community-packages': diff --git a/packages/cli/test/integration/workflows/workflow.service.test.ts b/packages/cli/test/integration/workflows/workflow.service.test.ts index 1853c17839..084b41d212 100644 --- a/packages/cli/test/integration/workflows/workflow.service.test.ts +++ b/packages/cli/test/integration/workflows/workflow.service.test.ts @@ -3,7 +3,7 @@ import { mock } from 'jest-mock-extended'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; -import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; +import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { Telemetry } from '@/telemetry'; import { OrchestrationService } from '@/services/orchestration.service'; import { WorkflowService } from '@/workflows/workflow.service'; diff --git a/packages/cli/test/setup-mocks.ts b/packages/cli/test/setup-mocks.ts index c6db2d147c..63d60cd522 100644 --- a/packages/cli/test/setup-mocks.ts +++ b/packages/cli/test/setup-mocks.ts @@ -3,5 +3,5 @@ import 'reflect-metadata'; jest.mock('@sentry/node'); jest.mock('@n8n_io/license-sdk'); jest.mock('@/telemetry'); -jest.mock('@/eventbus/MessageEventBus/MessageEventBus'); +jest.mock('@/eventbus/message-event-bus/message-event-bus'); jest.mock('@/push');