diff --git a/packages/cli/src/Db.ts b/packages/cli/src/Db.ts index fd46292005..ccbafd2286 100644 --- a/packages/cli/src/Db.ts +++ b/packages/cli/src/Db.ts @@ -6,7 +6,7 @@ import { DataSource as Connection } from '@n8n/typeorm'; import { ErrorReporterProxy as ErrorReporter } from 'n8n-workflow'; import { inTest } from '@/constants'; -import { wrapMigration } from '@db/utils/migrationHelpers'; +import { wrapMigration } from '@/databases/utils/migration-helpers'; import type { Migration } from '@db/types'; import { getConnectionOptions } from '@db/config'; diff --git a/packages/cli/src/Interfaces.ts b/packages/cli/src/Interfaces.ts index 18102f8f4c..f10ad17601 100644 --- a/packages/cli/src/Interfaces.ts +++ b/packages/cli/src/Interfaces.ts @@ -31,10 +31,10 @@ import type { WorkflowExecute } from 'n8n-core'; import type PCancelable from 'p-cancelable'; -import type { AuthProviderType } from '@db/entities/AuthIdentity'; -import type { SharedCredentials } from '@db/entities/SharedCredentials'; -import type { TagEntity } from '@db/entities/TagEntity'; -import type { AssignableRole, GlobalRole, User } from '@db/entities/User'; +import type { AuthProviderType } from '@/databases/entities/auth-identity'; +import type { SharedCredentials } from '@/databases/entities/shared-credentials'; +import type { TagEntity } from '@/databases/entities/tag-entity'; +import type { AssignableRole, GlobalRole, User } from '@/databases/entities/User'; import type { CredentialsRepository } from '@db/repositories/credentials.repository'; import type { SettingsRepository } from '@db/repositories/settings.repository'; import type { UserRepository } from '@db/repositories/user.repository'; diff --git a/packages/cli/src/PublicApi/types.ts b/packages/cli/src/PublicApi/types.ts index 631a8c09d7..d25f306b81 100644 --- a/packages/cli/src/PublicApi/types.ts +++ b/packages/cli/src/PublicApi/types.ts @@ -1,7 +1,7 @@ import type { ExecutionStatus, ICredentialDataDecryptedObject } from 'n8n-workflow'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; -import type { TagEntity } from '@db/entities/TagEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; +import type { TagEntity } from '@/databases/entities/tag-entity'; import type { Risk } from '@/security-audit/types'; import type { AuthlessRequest, AuthenticatedRequest } from '@/requests'; diff --git a/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.handler.ts b/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.handler.ts index 2c13f6de56..16d3c0e9c9 100644 --- a/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.handler.ts +++ b/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.handler.ts @@ -3,7 +3,7 @@ import type express from 'express'; import { CredentialsHelper } from '@/credentials-helper'; import { CredentialTypes } from '@/credential-types'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; import type { CredentialTypeRequest, CredentialRequest } from '../../../types'; import { projectScope } from '../../shared/middlewares/global.middleware'; import { validCredentialsProperties, validCredentialType } from './credentials.middleware'; diff --git a/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.service.ts b/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.service.ts index 075c7fcf11..48e1adc424 100644 --- a/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.service.ts +++ b/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.service.ts @@ -7,15 +7,15 @@ import type { } from 'n8n-workflow'; import * as Db from '@/Db'; import type { ICredentialsDb } from '@/Interfaces'; -import { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import { SharedCredentials } from '@db/entities/SharedCredentials'; -import type { User } from '@db/entities/User'; +import { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import { SharedCredentials } from '@/databases/entities/shared-credentials'; +import type { User } from '@/databases/entities/User'; import { ExternalHooks } from '@/external-hooks'; import type { IDependency, IJsonSchema } from '../../../types'; import type { CredentialRequest } from '@/requests'; import { Container } from 'typedi'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { ProjectRepository } from '@/databases/repositories/project.repository'; import { EventService } from '@/events/event.service'; diff --git a/packages/cli/src/PublicApi/v1/handlers/tags/tags.handler.ts b/packages/cli/src/PublicApi/v1/handlers/tags/tags.handler.ts index 41ebd96228..ecc3132c09 100644 --- a/packages/cli/src/PublicApi/v1/handlers/tags/tags.handler.ts +++ b/packages/cli/src/PublicApi/v1/handlers/tags/tags.handler.ts @@ -1,6 +1,6 @@ import type express from 'express'; -import type { TagEntity } from '@db/entities/TagEntity'; +import type { TagEntity } from '@/databases/entities/tag-entity'; import { globalScope, validCursor } from '../../shared/middlewares/global.middleware'; import type { TagRequest } from '../../../types'; import { encodeNextCursor } from '../../shared/services/pagination.service'; diff --git a/packages/cli/src/PublicApi/v1/handlers/users/users.handler.ee.ts b/packages/cli/src/PublicApi/v1/handlers/users/users.handler.ee.ts index 59a7a4c3e3..ecff06013a 100644 --- a/packages/cli/src/PublicApi/v1/handlers/users/users.handler.ee.ts +++ b/packages/cli/src/PublicApi/v1/handlers/users/users.handler.ee.ts @@ -12,7 +12,7 @@ import { } from '../../shared/middlewares/global.middleware'; import type { UserRequest } from '@/requests'; import { EventService } from '@/events/event.service'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; import type { Response } from 'express'; import { InvitationController } from '@/controllers/invitation.controller'; import { UsersController } from '@/controllers/users.controller'; diff --git a/packages/cli/src/PublicApi/v1/handlers/users/users.service.ee.ts b/packages/cli/src/PublicApi/v1/handlers/users/users.service.ee.ts index e62c946574..4e432ec17c 100644 --- a/packages/cli/src/PublicApi/v1/handlers/users/users.service.ee.ts +++ b/packages/cli/src/PublicApi/v1/handlers/users/users.service.ee.ts @@ -1,6 +1,6 @@ import { Container } from 'typedi'; import { UserRepository } from '@db/repositories/user.repository'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import pick from 'lodash/pick'; import { validate as uuidValidate } from 'uuid'; // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import diff --git a/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts b/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts index 42c3e269ab..6b363752ea 100644 --- a/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts +++ b/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.handler.ts @@ -9,7 +9,7 @@ import { v4 as uuid } from 'uuid'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; import config from '@/config'; -import { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import { WorkflowEntity } from '@db/entities/workflow-entity'; import { ExternalHooks } from '@/external-hooks'; import { addNodeIds, replaceInvalidCredentials } from '@/workflow-helpers'; import type { WorkflowRequest } from '../../../types'; @@ -27,7 +27,7 @@ import { } from './workflows.service'; import { WorkflowService } from '@/workflows/workflow.service'; import { WorkflowHistoryService } from '@/workflows/workflow-history/workflow-history.service.ee'; -import { SharedWorkflowRepository } from '@/databases/repositories/sharedWorkflow.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { TagRepository } from '@/databases/repositories/tag.repository'; import { WorkflowRepository } from '@/databases/repositories/workflow.repository'; import { ProjectRepository } from '@/databases/repositories/project.repository'; diff --git a/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.service.ts b/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.service.ts index 5fba88ff16..54f492c93c 100644 --- a/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.service.ts +++ b/packages/cli/src/PublicApi/v1/handlers/workflows/workflows.service.ts @@ -1,12 +1,12 @@ import { Container } from 'typedi'; import * as Db from '@/Db'; -import type { User } from '@db/entities/User'; -import { WorkflowEntity } from '@db/entities/WorkflowEntity'; -import { WorkflowTagMapping } from '@db/entities/WorkflowTagMapping'; -import { SharedWorkflow, type WorkflowSharingRole } from '@db/entities/SharedWorkflow'; +import type { User } from '@/databases/entities/User'; +import { WorkflowEntity } from '@db/entities/workflow-entity'; +import { WorkflowTagMapping } from '@/databases/entities/workflow-tag-mapping'; +import { SharedWorkflow, type WorkflowSharingRole } from '@/databases/entities/shared-workflow'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; -import type { Project } from '@/databases/entities/Project'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import type { Project } from '@/databases/entities/project'; import { TagRepository } from '@db/repositories/tag.repository'; import { License } from '@/license'; import { WorkflowSharingService } from '@/workflows/workflow-sharing.service'; diff --git a/packages/cli/src/__tests__/credentials-helper.test.ts b/packages/cli/src/__tests__/credentials-helper.test.ts index 61c3f93013..b91c722e36 100644 --- a/packages/cli/src/__tests__/credentials-helper.test.ts +++ b/packages/cli/src/__tests__/credentials-helper.test.ts @@ -13,7 +13,7 @@ import { CredentialsHelper } from '@/credentials-helper'; import { NodeTypes } from '@/node-types'; import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { mockInstance } from '@test/mocking'; describe('CredentialsHelper', () => { diff --git a/packages/cli/src/__tests__/workflow-runner.test.ts b/packages/cli/src/__tests__/workflow-runner.test.ts index 56dcf97c7c..542046e21b 100644 --- a/packages/cli/src/__tests__/workflow-runner.test.ts +++ b/packages/cli/src/__tests__/workflow-runner.test.ts @@ -1,6 +1,6 @@ import Container from 'typedi'; import { WorkflowHooks, type ExecutionError, type IWorkflowExecuteHooks } from 'n8n-workflow'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { WorkflowRunner } from '@/workflow-runner'; import config from '@/config'; diff --git a/packages/cli/src/active-workflow-manager.ts b/packages/cli/src/active-workflow-manager.ts index 0db162a06e..3af6c1c3d0 100644 --- a/packages/cli/src/active-workflow-manager.ts +++ b/packages/cli/src/active-workflow-manager.ts @@ -30,7 +30,7 @@ import type { IWorkflowDb } from '@/Interfaces'; import * as WebhookHelpers from '@/webhooks/webhook-helpers'; import * as WorkflowExecuteAdditionalData from '@/workflow-execute-additional-data'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import { ActiveExecutions } from '@/active-executions'; import { ExecutionService } from './executions/execution.service'; import { diff --git a/packages/cli/src/auth/__tests__/auth.service.test.ts b/packages/cli/src/auth/__tests__/auth.service.test.ts index 82c820ac9e..dbb44c3974 100644 --- a/packages/cli/src/auth/__tests__/auth.service.test.ts +++ b/packages/cli/src/auth/__tests__/auth.service.test.ts @@ -5,8 +5,8 @@ import type { NextFunction, Response } from 'express'; import { AuthService } from '@/auth/auth.service'; import config from '@/config'; import { AUTH_COOKIE_NAME, Time } from '@/constants'; -import type { User } from '@db/entities/User'; -import type { InvalidAuthTokenRepository } from '@db/repositories/invalidAuthToken.repository'; +import type { User } from '@/databases/entities/User'; +import type { InvalidAuthTokenRepository } from '@/databases/repositories/invalid-auth-token.repository'; import type { UserRepository } from '@db/repositories/user.repository'; import { JwtService } from '@/services/jwt.service'; import type { UrlService } from '@/services/url.service'; diff --git a/packages/cli/src/auth/auth.service.ts b/packages/cli/src/auth/auth.service.ts index 7e83393f27..2e708fee60 100644 --- a/packages/cli/src/auth/auth.service.ts +++ b/packages/cli/src/auth/auth.service.ts @@ -5,8 +5,8 @@ import { JsonWebTokenError, TokenExpiredError } from 'jsonwebtoken'; import config from '@/config'; import { AUTH_COOKIE_NAME, RESPONSE_ERROR_MESSAGES, Time } from '@/constants'; -import type { User } from '@db/entities/User'; -import { InvalidAuthTokenRepository } from '@db/repositories/invalidAuthToken.repository'; +import type { User } from '@/databases/entities/User'; +import { InvalidAuthTokenRepository } from '@/databases/repositories/invalid-auth-token.repository'; import { UserRepository } from '@db/repositories/user.repository'; import { AuthError } from '@/errors/response-errors/auth.error'; import { ForbiddenError } from '@/errors/response-errors/forbidden.error'; diff --git a/packages/cli/src/auth/jwt.ts b/packages/cli/src/auth/jwt.ts index 1d63f97fa3..a51c6c966f 100644 --- a/packages/cli/src/auth/jwt.ts +++ b/packages/cli/src/auth/jwt.ts @@ -1,7 +1,7 @@ import { Container } from 'typedi'; import type { Response } from 'express'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { AuthService } from './auth.service'; // This method is still used by cloud hooks. diff --git a/packages/cli/src/auth/methods/email.ts b/packages/cli/src/auth/methods/email.ts index fb7213ef3b..030e3d6c73 100644 --- a/packages/cli/src/auth/methods/email.ts +++ b/packages/cli/src/auth/methods/email.ts @@ -1,4 +1,4 @@ -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { PasswordUtility } from '@/services/password.utility'; import { Container } from 'typedi'; import { isLdapLoginEnabled } from '@/ldap/helpers.ee'; diff --git a/packages/cli/src/auth/methods/ldap.ts b/packages/cli/src/auth/methods/ldap.ts index c3ec2150c7..84769d1008 100644 --- a/packages/cli/src/auth/methods/ldap.ts +++ b/packages/cli/src/auth/methods/ldap.ts @@ -10,7 +10,7 @@ import { createLdapAuthIdentity, updateLdapUserOnLocalDb, } from '@/ldap/helpers.ee'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { EventService } from '@/events/event.service'; export const handleLdapLogin = async ( diff --git a/packages/cli/src/commands/db/revert.ts b/packages/cli/src/commands/db/revert.ts index c52ce8a35c..ed34d24d46 100644 --- a/packages/cli/src/commands/db/revert.ts +++ b/packages/cli/src/commands/db/revert.ts @@ -7,7 +7,7 @@ import { Container } from 'typedi'; import { Logger } from '@/logger'; import { getConnectionOptions } from '@db/config'; import type { Migration } from '@db/types'; -import { wrapMigration } from '@db/utils/migrationHelpers'; +import { wrapMigration } from '@/databases/utils/migration-helpers'; // This function is extracted to make it easier to unit test it. // Mocking turned into a mess due to this command using typeorm and the db diff --git a/packages/cli/src/commands/executeBatch.ts b/packages/cli/src/commands/executeBatch.ts index bd2de6b5ed..b32811192f 100644 --- a/packages/cli/src/commands/executeBatch.ts +++ b/packages/cli/src/commands/executeBatch.ts @@ -12,7 +12,7 @@ import pick from 'lodash/pick'; import { ActiveExecutions } from '@/active-executions'; import { WorkflowRunner } from '@/workflow-runner'; import type { IWorkflowDb, IWorkflowExecutionDataProcess } from '@/Interfaces'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { OwnershipService } from '@/services/ownership.service'; import { findCliWorkflowStart } from '@/utils'; diff --git a/packages/cli/src/commands/import/credentials.ts b/packages/cli/src/commands/import/credentials.ts index f36d33ba7b..577a47aaba 100644 --- a/packages/cli/src/commands/import/credentials.ts +++ b/packages/cli/src/commands/import/credentials.ts @@ -7,14 +7,14 @@ import glob from 'fast-glob'; import type { EntityManager } from '@n8n/typeorm'; import * as Db from '@/Db'; -import { SharedCredentials } from '@db/entities/SharedCredentials'; -import { CredentialsEntity } from '@db/entities/CredentialsEntity'; +import { SharedCredentials } from '@/databases/entities/shared-credentials'; +import { CredentialsEntity } from '@/databases/entities/credentials-entity'; import { BaseCommand } from '../base-command'; import type { ICredentialsEncrypted } from 'n8n-workflow'; import { ApplicationError, jsonParse } from 'n8n-workflow'; import { UM_FIX_INSTRUCTION } from '@/constants'; import { ProjectRepository } from '@/databases/repositories/project.repository'; -import { Project } from '@/databases/entities/Project'; +import { Project } from '@/databases/entities/project'; import { User } from '@/databases/entities/User'; export class ImportCredentialsCommand extends BaseCommand { diff --git a/packages/cli/src/commands/import/workflow.ts b/packages/cli/src/commands/import/workflow.ts index d7173b591a..defa2f2178 100644 --- a/packages/cli/src/commands/import/workflow.ts +++ b/packages/cli/src/commands/import/workflow.ts @@ -5,14 +5,14 @@ import fs from 'fs'; import glob from 'fast-glob'; import { UM_FIX_INSTRUCTION } from '@/constants'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import { generateNanoId } from '@db/utils/generators'; import { UserRepository } from '@db/repositories/user.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import type { IWorkflowToImport } from '@/Interfaces'; import { ImportService } from '@/services/import.service'; import { BaseCommand } from '../base-command'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { ProjectRepository } from '@/databases/repositories/project.repository'; function assertHasWorkflowsToImport(workflows: unknown): asserts workflows is IWorkflowToImport[] { diff --git a/packages/cli/src/commands/ldap/reset.ts b/packages/cli/src/commands/ldap/reset.ts index c91564ead9..65f10368e4 100644 --- a/packages/cli/src/commands/ldap/reset.ts +++ b/packages/cli/src/commands/ldap/reset.ts @@ -1,7 +1,7 @@ import Container from 'typedi'; import { LDAP_DEFAULT_CONFIGURATION, LDAP_FEATURE_NAME } from '@/ldap/constants'; -import { AuthIdentityRepository } from '@db/repositories/authIdentity.repository'; -import { AuthProviderSyncHistoryRepository } from '@db/repositories/authProviderSyncHistory.repository'; +import { AuthIdentityRepository } from '@db/repositories/auth-identity.repository'; +import { AuthProviderSyncHistoryRepository } from '@/databases/repositories/auth-provider-sync-history.repository'; import { SettingsRepository } from '@db/repositories/settings.repository'; import { UserRepository } from '@db/repositories/user.repository'; import { BaseCommand } from '../base-command'; @@ -11,9 +11,9 @@ import { ProjectRepository } from '@/databases/repositories/project.repository'; import { WorkflowService } from '@/workflows/workflow.service'; // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import import { In } from '@n8n/typeorm'; -import { SharedWorkflowRepository } from '@/databases/repositories/sharedWorkflow.repository'; -import { SharedCredentialsRepository } from '@/databases/repositories/sharedCredentials.repository'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; import { CredentialsService } from '@/credentials/credentials.service'; import { UM_FIX_INSTRUCTION } from '@/constants'; diff --git a/packages/cli/src/commands/mfa/disable.ts b/packages/cli/src/commands/mfa/disable.ts index acc3439e3d..c7959d5cb5 100644 --- a/packages/cli/src/commands/mfa/disable.ts +++ b/packages/cli/src/commands/mfa/disable.ts @@ -1,6 +1,6 @@ import Container from 'typedi'; import { Flags } from '@oclif/core'; -import { AuthUserRepository } from '@db/repositories/authUser.repository'; +import { AuthUserRepository } from '@/databases/repositories/auth-user.repository'; import { BaseCommand } from '../base-command'; export class DisableMFACommand extends BaseCommand { diff --git a/packages/cli/src/commands/user-management/reset.ts b/packages/cli/src/commands/user-management/reset.ts index 992d367e13..f107b3b401 100644 --- a/packages/cli/src/commands/user-management/reset.ts +++ b/packages/cli/src/commands/user-management/reset.ts @@ -1,10 +1,10 @@ import { Container } from 'typedi'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import { User } from '@db/entities/User'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import { User } from '@/databases/entities/User'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; import { SettingsRepository } from '@db/repositories/settings.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { UserRepository } from '@db/repositories/user.repository'; import { BaseCommand } from '../base-command'; import { ProjectRepository } from '@/databases/repositories/project.repository'; diff --git a/packages/cli/src/controllers/__tests__/dynamic-node-parameters.controller.test.ts b/packages/cli/src/controllers/__tests__/dynamic-node-parameters.controller.test.ts index 0a129eb821..6d340d1a3b 100644 --- a/packages/cli/src/controllers/__tests__/dynamic-node-parameters.controller.test.ts +++ b/packages/cli/src/controllers/__tests__/dynamic-node-parameters.controller.test.ts @@ -1,4 +1,4 @@ -import { DynamicNodeParametersController } from '@/controllers/dynamicNodeParameters.controller'; +import { DynamicNodeParametersController } from '@/controllers/dynamic-node-parameters.controller'; import type { DynamicNodeParametersRequest } from '@/requests'; import type { DynamicNodeParametersService } from '@/services/dynamicNodeParameters.service'; import { mock } from 'jest-mock-extended'; diff --git a/packages/cli/src/controllers/__tests__/me.controller.test.ts b/packages/cli/src/controllers/__tests__/me.controller.test.ts index 99f4714023..c0d794528e 100644 --- a/packages/cli/src/controllers/__tests__/me.controller.test.ts +++ b/packages/cli/src/controllers/__tests__/me.controller.test.ts @@ -4,7 +4,7 @@ import jwt from 'jsonwebtoken'; import { mock, anyObject } from 'jest-mock-extended'; import type { PublicUser } from '@/Interfaces'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { API_KEY_PREFIX, MeController } from '@/controllers/me.controller'; import { AUTH_COOKIE_NAME } from '@/constants'; import type { AuthenticatedRequest, MeRequest } from '@/requests'; @@ -15,8 +15,8 @@ import { BadRequestError } from '@/errors/response-errors/bad-request.error'; import { EventService } from '@/events/event.service'; import { badPasswords } from '@test/testData'; import { mockInstance } from '@test/mocking'; -import { AuthUserRepository } from '@/databases/repositories/authUser.repository'; -import { InvalidAuthTokenRepository } from '@db/repositories/invalidAuthToken.repository'; +import { AuthUserRepository } from '@/databases/repositories/auth-user.repository'; +import { InvalidAuthTokenRepository } from '@/databases/repositories/invalid-auth-token.repository'; import { UserRepository } from '@db/repositories/user.repository'; import { MfaService } from '@/mfa/mfa.service'; import { InvalidMfaCodeError } from '@/errors/response-errors/invalid-mfa-code.error'; diff --git a/packages/cli/src/controllers/__tests__/owner.controller.test.ts b/packages/cli/src/controllers/__tests__/owner.controller.test.ts index 0170333e8a..a850c67338 100644 --- a/packages/cli/src/controllers/__tests__/owner.controller.test.ts +++ b/packages/cli/src/controllers/__tests__/owner.controller.test.ts @@ -6,7 +6,7 @@ import jwt from 'jsonwebtoken'; import type { AuthService } from '@/auth/auth.service'; import config from '@/config'; import { OwnerController } from '@/controllers/owner.controller'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import type { SettingsRepository } from '@db/repositories/settings.repository'; import type { UserRepository } from '@db/repositories/user.repository'; import { BadRequestError } from '@/errors/response-errors/bad-request.error'; diff --git a/packages/cli/src/controllers/__tests__/userSettings.controller.test.ts b/packages/cli/src/controllers/__tests__/user-settings.controller.test.ts similarity index 97% rename from packages/cli/src/controllers/__tests__/userSettings.controller.test.ts rename to packages/cli/src/controllers/__tests__/user-settings.controller.test.ts index 3794008641..f12920eecc 100644 --- a/packages/cli/src/controllers/__tests__/userSettings.controller.test.ts +++ b/packages/cli/src/controllers/__tests__/user-settings.controller.test.ts @@ -1,4 +1,4 @@ -import { UserSettingsController } from '@/controllers/userSettings.controller'; +import { UserSettingsController } from '@/controllers/user-settings.controller'; import type { NpsSurveyRequest } from '@/requests'; import type { UserService } from '@/services/user.service'; import { mock } from 'jest-mock-extended'; diff --git a/packages/cli/src/controllers/activeWorkflows.controller.ts b/packages/cli/src/controllers/active-workflows.controller.ts similarity index 100% rename from packages/cli/src/controllers/activeWorkflows.controller.ts rename to packages/cli/src/controllers/active-workflows.controller.ts diff --git a/packages/cli/src/controllers/aiAssistant.controller.ts b/packages/cli/src/controllers/ai-assistant.controller.ts similarity index 100% rename from packages/cli/src/controllers/aiAssistant.controller.ts rename to packages/cli/src/controllers/ai-assistant.controller.ts diff --git a/packages/cli/src/controllers/auth.controller.ts b/packages/cli/src/controllers/auth.controller.ts index fe48530831..4ebc2afc9a 100644 --- a/packages/cli/src/controllers/auth.controller.ts +++ b/packages/cli/src/controllers/auth.controller.ts @@ -4,7 +4,7 @@ import { Response } from 'express'; import { AuthService } from '@/auth/auth.service'; import { Get, Post, RestController } from '@/decorators'; import { RESPONSE_ERROR_MESSAGES } from '@/constants'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { AuthenticatedRequest, LoginRequest, UserRequest } from '@/requests'; import type { PublicUser } from '@/Interfaces'; import { handleEmailLogin, handleLdapLogin } from '@/auth'; diff --git a/packages/cli/src/controllers/binaryData.controller.ts b/packages/cli/src/controllers/binary-data.controller.ts similarity index 100% rename from packages/cli/src/controllers/binaryData.controller.ts rename to packages/cli/src/controllers/binary-data.controller.ts diff --git a/packages/cli/src/controllers/communityPackages.controller.ts b/packages/cli/src/controllers/community-packages.controller.ts similarity index 99% rename from packages/cli/src/controllers/communityPackages.controller.ts rename to packages/cli/src/controllers/community-packages.controller.ts index d9e7f49719..fcfd11ca2e 100644 --- a/packages/cli/src/controllers/communityPackages.controller.ts +++ b/packages/cli/src/controllers/community-packages.controller.ts @@ -5,7 +5,7 @@ import { } from '@/constants'; import { Delete, Get, Patch, Post, RestController, GlobalScope } from '@/decorators'; import { NodeRequest } from '@/requests'; -import type { InstalledPackages } from '@db/entities/InstalledPackages'; +import type { InstalledPackages } from '@/databases/entities/installed-packages'; import type { CommunityPackages } from '@/Interfaces'; import { Push } from '@/push'; import { CommunityPackagesService } from '@/services/communityPackages.service'; diff --git a/packages/cli/src/controllers/dynamicNodeParameters.controller.ts b/packages/cli/src/controllers/dynamic-node-parameters.controller.ts similarity index 100% rename from packages/cli/src/controllers/dynamicNodeParameters.controller.ts rename to packages/cli/src/controllers/dynamic-node-parameters.controller.ts diff --git a/packages/cli/src/controllers/e2e.controller.ts b/packages/cli/src/controllers/e2e.controller.ts index 966221021b..0b70a8b45a 100644 --- a/packages/cli/src/controllers/e2e.controller.ts +++ b/packages/cli/src/controllers/e2e.controller.ts @@ -16,7 +16,7 @@ import { CacheService } from '@/services/cache/cache.service'; import { PasswordUtility } from '@/services/password.utility'; import Container from 'typedi'; import { Logger } from '@/logger'; -import { AuthUserRepository } from '@/databases/repositories/authUser.repository'; +import { AuthUserRepository } from '@/databases/repositories/auth-user.repository'; if (!inE2ETests) { Container.get(Logger).error('E2E endpoints only allowed during E2E tests'); diff --git a/packages/cli/src/controllers/me.controller.ts b/packages/cli/src/controllers/me.controller.ts index 6cad9dcef5..8d3a74ada7 100644 --- a/packages/cli/src/controllers/me.controller.ts +++ b/packages/cli/src/controllers/me.controller.ts @@ -7,7 +7,7 @@ import { AuthService } from '@/auth/auth.service'; import { Delete, Get, Patch, Post, RestController } from '@/decorators'; import { PasswordUtility } from '@/services/password.utility'; import { validateEntity } from '@/generic-helpers'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { AuthenticatedRequest, MeRequest, diff --git a/packages/cli/src/controllers/nodeTypes.controller.ts b/packages/cli/src/controllers/node-types.controller.ts similarity index 100% rename from packages/cli/src/controllers/nodeTypes.controller.ts rename to packages/cli/src/controllers/node-types.controller.ts diff --git a/packages/cli/src/controllers/oauth/__tests__/oAuth1Credential.controller.test.ts b/packages/cli/src/controllers/oauth/__tests__/oAuth1Credential.controller.test.ts index d0031186f7..c5dc7db95f 100644 --- a/packages/cli/src/controllers/oauth/__tests__/oAuth1Credential.controller.test.ts +++ b/packages/cli/src/controllers/oauth/__tests__/oAuth1Credential.controller.test.ts @@ -5,12 +5,12 @@ import Csrf from 'csrf'; import { Cipher } from 'n8n-core'; import { mock } from 'jest-mock-extended'; -import { OAuth1CredentialController } from '@/controllers/oauth/oAuth1Credential.controller'; -import { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import type { User } from '@db/entities/User'; +import { OAuth1CredentialController } from '@/controllers/oauth/oauth1-credential.controller'; +import { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import type { User } from '@/databases/entities/User'; import type { OAuthRequest } from '@/requests'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { ExternalHooks } from '@/external-hooks'; import { Logger } from '@/logger'; import { VariablesService } from '@/environments/variables/variables.service.ee'; diff --git a/packages/cli/src/controllers/oauth/__tests__/oAuth2Credential.controller.test.ts b/packages/cli/src/controllers/oauth/__tests__/oAuth2Credential.controller.test.ts index c81a0c1559..7775ed07e2 100644 --- a/packages/cli/src/controllers/oauth/__tests__/oAuth2Credential.controller.test.ts +++ b/packages/cli/src/controllers/oauth/__tests__/oAuth2Credential.controller.test.ts @@ -5,12 +5,12 @@ import { type Response } from 'express'; import { Cipher } from 'n8n-core'; import { mock } from 'jest-mock-extended'; -import { OAuth2CredentialController } from '@/controllers/oauth/oAuth2Credential.controller'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import type { User } from '@db/entities/User'; +import { OAuth2CredentialController } from '@/controllers/oauth/oauth2-credential.controller'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import type { User } from '@/databases/entities/User'; import type { OAuthRequest } from '@/requests'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { ExternalHooks } from '@/external-hooks'; import { Logger } from '@/logger'; import { VariablesService } from '@/environments/variables/variables.service.ee'; diff --git a/packages/cli/src/controllers/oauth/abstractOAuth.controller.ts b/packages/cli/src/controllers/oauth/abstract-oauth.controller.ts similarity index 96% rename from packages/cli/src/controllers/oauth/abstractOAuth.controller.ts rename to packages/cli/src/controllers/oauth/abstract-oauth.controller.ts index 0d14b222d4..4255d6fc2f 100644 --- a/packages/cli/src/controllers/oauth/abstractOAuth.controller.ts +++ b/packages/cli/src/controllers/oauth/abstract-oauth.controller.ts @@ -5,9 +5,9 @@ import { Credentials } from 'n8n-core'; import type { ICredentialDataDecryptedObject, IWorkflowExecuteAdditionalData } from 'n8n-workflow'; import { jsonParse, ApplicationError } from 'n8n-workflow'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import type { ICredentialsDb } from '@/Interfaces'; import type { OAuthRequest } from '@/requests'; import { RESPONSE_ERROR_MESSAGES } from '@/constants'; diff --git a/packages/cli/src/controllers/oauth/oAuth1Credential.controller.ts b/packages/cli/src/controllers/oauth/oauth1-credential.controller.ts similarity index 99% rename from packages/cli/src/controllers/oauth/oAuth1Credential.controller.ts rename to packages/cli/src/controllers/oauth/oauth1-credential.controller.ts index 21bbe83f99..8707fed7c3 100644 --- a/packages/cli/src/controllers/oauth/oAuth1Credential.controller.ts +++ b/packages/cli/src/controllers/oauth/oauth1-credential.controller.ts @@ -7,7 +7,7 @@ import { createHmac } from 'crypto'; import { Get, RestController } from '@/decorators'; import { OAuthRequest } from '@/requests'; import { sendErrorResponse } from '@/response-helper'; -import { AbstractOAuthController, type CsrfStateParam } from './abstractOAuth.controller'; +import { AbstractOAuthController, type CsrfStateParam } from './abstract-oauth.controller'; import { NotFoundError } from '@/errors/response-errors/not-found.error'; interface OAuth1CredentialData { diff --git a/packages/cli/src/controllers/oauth/oAuth2Credential.controller.ts b/packages/cli/src/controllers/oauth/oauth2-credential.controller.ts similarity index 99% rename from packages/cli/src/controllers/oauth/oAuth2Credential.controller.ts rename to packages/cli/src/controllers/oauth/oauth2-credential.controller.ts index 5b7929495f..3ef4860a6f 100644 --- a/packages/cli/src/controllers/oauth/oAuth2Credential.controller.ts +++ b/packages/cli/src/controllers/oauth/oauth2-credential.controller.ts @@ -9,7 +9,7 @@ import split from 'lodash/split'; import { Get, RestController } from '@/decorators'; import { jsonStringify } from 'n8n-workflow'; import { OAuthRequest } from '@/requests'; -import { AbstractOAuthController, type CsrfStateParam } from './abstractOAuth.controller'; +import { AbstractOAuthController, type CsrfStateParam } from './abstract-oauth.controller'; import { GENERIC_OAUTH2_CREDENTIALS_WITH_EDITABLE_SCOPE as GENERIC_OAUTH2_CREDENTIALS_WITH_EDITABLE_SCOPE } from '../../constants'; @RestController('/oauth2-credential') diff --git a/packages/cli/src/controllers/passwordReset.controller.ts b/packages/cli/src/controllers/password-reset.controller.ts similarity index 100% rename from packages/cli/src/controllers/passwordReset.controller.ts rename to packages/cli/src/controllers/password-reset.controller.ts diff --git a/packages/cli/src/controllers/project.controller.ts b/packages/cli/src/controllers/project.controller.ts index e93b919ecb..9c3311af06 100644 --- a/packages/cli/src/controllers/project.controller.ts +++ b/packages/cli/src/controllers/project.controller.ts @@ -1,4 +1,4 @@ -import type { Project } from '@db/entities/Project'; +import type { Project } from '@/databases/entities/project'; import { Get, Post, diff --git a/packages/cli/src/controllers/userSettings.controller.ts b/packages/cli/src/controllers/user-settings.controller.ts similarity index 100% rename from packages/cli/src/controllers/userSettings.controller.ts rename to packages/cli/src/controllers/user-settings.controller.ts diff --git a/packages/cli/src/controllers/users.controller.ts b/packages/cli/src/controllers/users.controller.ts index 43916903fe..ffaae5860c 100644 --- a/packages/cli/src/controllers/users.controller.ts +++ b/packages/cli/src/controllers/users.controller.ts @@ -1,7 +1,7 @@ import { plainToInstance } from 'class-transformer'; import { AuthService } from '@/auth/auth.service'; -import { User } from '@db/entities/User'; +import { User } from '@/databases/entities/User'; import { GlobalScope, Delete, Get, RestController, Patch, Licensed } from '@/decorators'; import { ListQuery, @@ -10,9 +10,9 @@ import { UserSettingsUpdatePayload, } from '@/requests'; import type { PublicUser } from '@/Interfaces'; -import { AuthIdentity } from '@db/entities/AuthIdentity'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { AuthIdentity } from '@/databases/entities/auth-identity'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { UserRepository } from '@db/repositories/user.repository'; import { UserService } from '@/services/user.service'; import { listQueryMiddleware } from '@/middlewares'; @@ -23,7 +23,7 @@ import { BadRequestError } from '@/errors/response-errors/bad-request.error'; import { ExternalHooks } from '@/external-hooks'; import { validateEntity } from '@/generic-helpers'; import { ProjectRepository } from '@/databases/repositories/project.repository'; -import { Project } from '@/databases/entities/Project'; +import { Project } from '@/databases/entities/project'; import { WorkflowService } from '@/workflows/workflow.service'; import { CredentialsService } from '@/credentials/credentials.service'; import { ProjectService } from '@/services/project.service'; diff --git a/packages/cli/src/controllers/workflowStatistics.controller.ts b/packages/cli/src/controllers/workflow-statistics.controller.ts similarity index 90% rename from packages/cli/src/controllers/workflowStatistics.controller.ts rename to packages/cli/src/controllers/workflow-statistics.controller.ts index 2cae52e8cc..623a1efe1d 100644 --- a/packages/cli/src/controllers/workflowStatistics.controller.ts +++ b/packages/cli/src/controllers/workflow-statistics.controller.ts @@ -1,9 +1,9 @@ import { Response, NextFunction } from 'express'; import { Get, Middleware, RestController } from '@/decorators'; -import type { WorkflowStatistics } from '@db/entities/WorkflowStatistics'; -import { StatisticsNames } from '@db/entities/WorkflowStatistics'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; -import { WorkflowStatisticsRepository } from '@db/repositories/workflowStatistics.repository'; +import type { WorkflowStatistics } from '@/databases/entities/workflow-statistics'; +import { StatisticsNames } from '@/databases/entities/workflow-statistics'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { WorkflowStatisticsRepository } from '@/databases/repositories/workflow-statistics.repository'; import type { IWorkflowStatisticsDataLoaded } from '@/Interfaces'; import { Logger } from '@/logger'; import { NotFoundError } from '@/errors/response-errors/not-found.error'; diff --git a/packages/cli/src/credentials-helper.ts b/packages/cli/src/credentials-helper.ts index aa0491955c..100f731130 100644 --- a/packages/cli/src/credentials-helper.ts +++ b/packages/cli/src/credentials-helper.ts @@ -29,13 +29,13 @@ import { ICredentialsHelper, NodeHelpers, Workflow, ApplicationError } from 'n8n import type { ICredentialsDb } from '@/Interfaces'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; import { CredentialTypes } from '@/credential-types'; import { CredentialsOverwrites } from '@/credentials-overwrites'; import { RESPONSE_ERROR_MESSAGES } from './constants'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { CredentialNotFoundError } from './errors/credential-not-found.error'; // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import import { In } from '@n8n/typeorm'; diff --git a/packages/cli/src/credentials/__tests__/credentials.service.test.ts b/packages/cli/src/credentials/__tests__/credentials.service.test.ts index 8a5ce77e15..12bf0b6157 100644 --- a/packages/cli/src/credentials/__tests__/credentials.service.test.ts +++ b/packages/cli/src/credentials/__tests__/credentials.service.test.ts @@ -1,7 +1,7 @@ import { CREDENTIAL_EMPTY_VALUE, type ICredentialType } from 'n8n-workflow'; import { mock } from 'jest-mock-extended'; import { CREDENTIAL_BLANKING_VALUE } from '@/constants'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; import type { CredentialTypes } from '@/credential-types'; import { CredentialsService } from '@/credentials/credentials.service'; diff --git a/packages/cli/src/credentials/credentials.controller.ts b/packages/cli/src/credentials/credentials.controller.ts index b8dacf445f..636d804b75 100644 --- a/packages/cli/src/credentials/credentials.controller.ts +++ b/packages/cli/src/credentials/credentials.controller.ts @@ -26,9 +26,9 @@ import { UserManagementMailer } from '@/user-management/email'; import * as Db from '@/Db'; import * as utils from '@/utils'; import { listQueryMiddleware } from '@/middlewares'; -import { SharedCredentialsRepository } from '@/databases/repositories/sharedCredentials.repository'; -import { SharedCredentials } from '@/databases/entities/SharedCredentials'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; +import { SharedCredentials } from '@/databases/entities/shared-credentials'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; import { z } from 'zod'; import { EventService } from '@/events/event.service'; diff --git a/packages/cli/src/credentials/credentials.service.ee.ts b/packages/cli/src/credentials/credentials.service.ee.ts index 44fc614cbd..7aba293cdd 100644 --- a/packages/cli/src/credentials/credentials.service.ee.ts +++ b/packages/cli/src/credentials/credentials.service.ee.ts @@ -1,17 +1,17 @@ // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import import { In, type EntityManager } from '@n8n/typeorm'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { CredentialsService } from './credentials.service'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; -import type { CredentialsEntity } from '@/databases/entities/CredentialsEntity'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; import { Service } from 'typedi'; import type { ICredentialDataDecryptedObject } from 'n8n-workflow'; import { NotFoundError } from '@/errors/response-errors/not-found.error'; import { OwnershipService } from '@/services/ownership.service'; -import { Project } from '@/databases/entities/Project'; +import { Project } from '@/databases/entities/project'; import { ProjectService } from '@/services/project.service'; import { TransferCredentialError } from '@/errors/response-errors/transfer-credential.error'; -import { SharedCredentials } from '@/databases/entities/SharedCredentials'; +import { SharedCredentials } from '@/databases/entities/shared-credentials'; import { RoleService } from '@/services/role.service'; @Service() diff --git a/packages/cli/src/credentials/credentials.service.ts b/packages/cli/src/credentials/credentials.service.ts index e5d1a53252..6d98e3ffaf 100644 --- a/packages/cli/src/credentials/credentials.service.ts +++ b/packages/cli/src/credentials/credentials.service.ts @@ -18,24 +18,24 @@ import * as Db from '@/Db'; import type { ICredentialsDb } from '@/Interfaces'; import { createCredentialsFromCredentialsEntity } from '@/credentials-helper'; import { CREDENTIAL_BLANKING_VALUE } from '@/constants'; -import { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import { SharedCredentials } from '@db/entities/SharedCredentials'; +import { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import { SharedCredentials } from '@/databases/entities/shared-credentials'; import { validateEntity } from '@/generic-helpers'; import { ExternalHooks } from '@/external-hooks'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import type { CredentialRequest, ListQuery } from '@/requests'; import { CredentialTypes } from '@/credential-types'; import { OwnershipService } from '@/services/ownership.service'; import { Logger } from '@/logger'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { Service } from 'typedi'; import { CredentialsTester } from '@/services/credentials-tester.service'; import { ProjectRepository } from '@/databases/repositories/project.repository'; import { ProjectService } from '@/services/project.service'; import { BadRequestError } from '@/errors/response-errors/bad-request.error'; import { NotFoundError } from '@/errors/response-errors/not-found.error'; -import type { ProjectRelation } from '@/databases/entities/ProjectRelation'; +import type { ProjectRelation } from '@/databases/entities/project-relation'; import { RoleService } from '@/services/role.service'; import { UserRepository } from '@/databases/repositories/user.repository'; import { userHasScope } from '@/permissions/check-access'; diff --git a/packages/cli/src/databases/entities/User.ts b/packages/cli/src/databases/entities/User.ts index dad8bbbe80..7819757195 100644 --- a/packages/cli/src/databases/entities/User.ts +++ b/packages/cli/src/databases/entities/User.ts @@ -11,20 +11,20 @@ import { } from '@n8n/typeorm'; import { IsEmail, IsString, Length } from 'class-validator'; import type { IUser, IUserSettings } from 'n8n-workflow'; -import type { SharedWorkflow } from './SharedWorkflow'; -import type { SharedCredentials } from './SharedCredentials'; +import type { SharedWorkflow } from './shared-workflow'; +import type { SharedCredentials } from './shared-credentials'; import { NoXss } from '@/validators/no-xss.validator'; import { objectRetriever, lowerCaser } from '../utils/transformers'; -import { WithTimestamps, jsonColumnType } from './AbstractEntity'; +import { WithTimestamps, jsonColumnType } from './abstract-entity'; import type { IPersonalizationSurveyAnswers } from '@/Interfaces'; -import type { AuthIdentity } from './AuthIdentity'; +import type { AuthIdentity } from './auth-identity'; import { GLOBAL_OWNER_SCOPES, GLOBAL_MEMBER_SCOPES, GLOBAL_ADMIN_SCOPES, } from '@/permissions/global-roles'; import { hasScope, type ScopeOptions, type Scope } from '@n8n/permissions'; -import type { ProjectRelation } from './ProjectRelation'; +import type { ProjectRelation } from './project-relation'; import { NoUrl } from '@/validators/no-url.validator'; export type GlobalRole = 'global:owner' | 'global:admin' | 'global:member'; diff --git a/packages/cli/src/databases/entities/Variables.ts b/packages/cli/src/databases/entities/Variables.ts index da8272853f..7670e08f9f 100644 --- a/packages/cli/src/databases/entities/Variables.ts +++ b/packages/cli/src/databases/entities/Variables.ts @@ -1,5 +1,5 @@ import { Column, Entity } from '@n8n/typeorm'; -import { WithStringId } from './AbstractEntity'; +import { WithStringId } from './abstract-entity'; @Entity() export class Variables extends WithStringId { diff --git a/packages/cli/src/databases/entities/__tests__/user.entity.test.ts b/packages/cli/src/databases/entities/__tests__/user.entity.test.ts index aaa798b184..d135db04b0 100644 --- a/packages/cli/src/databases/entities/__tests__/user.entity.test.ts +++ b/packages/cli/src/databases/entities/__tests__/user.entity.test.ts @@ -1,4 +1,4 @@ -import { User } from '@db/entities/User'; +import { User } from '@/databases/entities/User'; describe('User Entity', () => { describe('JSON.stringify', () => { diff --git a/packages/cli/src/databases/entities/AbstractEntity.ts b/packages/cli/src/databases/entities/abstract-entity.ts similarity index 100% rename from packages/cli/src/databases/entities/AbstractEntity.ts rename to packages/cli/src/databases/entities/abstract-entity.ts diff --git a/packages/cli/src/databases/entities/AuthIdentity.ts b/packages/cli/src/databases/entities/auth-identity.ts similarity index 93% rename from packages/cli/src/databases/entities/AuthIdentity.ts rename to packages/cli/src/databases/entities/auth-identity.ts index ba3dd9d1c4..f8c012d2c2 100644 --- a/packages/cli/src/databases/entities/AuthIdentity.ts +++ b/packages/cli/src/databases/entities/auth-identity.ts @@ -1,5 +1,5 @@ import { Column, Entity, ManyToOne, PrimaryColumn, Unique } from '@n8n/typeorm'; -import { WithTimestamps } from './AbstractEntity'; +import { WithTimestamps } from './abstract-entity'; import { User } from './User'; export type AuthProviderType = 'ldap' | 'email' | 'saml'; // | 'google'; diff --git a/packages/cli/src/databases/entities/AuthProviderSyncHistory.ts b/packages/cli/src/databases/entities/auth-provider-sync-history.ts similarity index 85% rename from packages/cli/src/databases/entities/AuthProviderSyncHistory.ts rename to packages/cli/src/databases/entities/auth-provider-sync-history.ts index bb899b9da6..f988584312 100644 --- a/packages/cli/src/databases/entities/AuthProviderSyncHistory.ts +++ b/packages/cli/src/databases/entities/auth-provider-sync-history.ts @@ -1,6 +1,6 @@ import { Column, Entity, PrimaryGeneratedColumn } from '@n8n/typeorm'; -import { datetimeColumnType } from './AbstractEntity'; -import { AuthProviderType } from './AuthIdentity'; +import { datetimeColumnType } from './abstract-entity'; +import { AuthProviderType } from './auth-identity'; export type RunningMode = 'dry' | 'live'; export type SyncStatus = 'success' | 'error'; diff --git a/packages/cli/src/databases/entities/AuthUser.ts b/packages/cli/src/databases/entities/auth-user.ts similarity index 100% rename from packages/cli/src/databases/entities/AuthUser.ts rename to packages/cli/src/databases/entities/auth-user.ts diff --git a/packages/cli/src/databases/entities/CredentialsEntity.ts b/packages/cli/src/databases/entities/credentials-entity.ts similarity index 85% rename from packages/cli/src/databases/entities/CredentialsEntity.ts rename to packages/cli/src/databases/entities/credentials-entity.ts index 2c6206590e..ddbdf7e368 100644 --- a/packages/cli/src/databases/entities/CredentialsEntity.ts +++ b/packages/cli/src/databases/entities/credentials-entity.ts @@ -1,7 +1,7 @@ import { Column, Entity, Index, OneToMany } from '@n8n/typeorm'; import { IsObject, IsString, Length } from 'class-validator'; -import type { SharedCredentials } from './SharedCredentials'; -import { WithTimestampsAndStringId } from './AbstractEntity'; +import type { SharedCredentials } from './shared-credentials'; +import { WithTimestampsAndStringId } from './abstract-entity'; import type { ICredentialsDb } from '@/Interfaces'; @Entity() diff --git a/packages/cli/src/databases/entities/EventDestinations.ts b/packages/cli/src/databases/entities/event-destinations.ts similarity index 83% rename from packages/cli/src/databases/entities/EventDestinations.ts rename to packages/cli/src/databases/entities/event-destinations.ts index 27e594efa1..88829690b3 100644 --- a/packages/cli/src/databases/entities/EventDestinations.ts +++ b/packages/cli/src/databases/entities/event-destinations.ts @@ -1,6 +1,6 @@ import { MessageEventBusDestinationOptions } from 'n8n-workflow'; import { Column, Entity, PrimaryColumn } from '@n8n/typeorm'; -import { WithTimestamps, jsonColumnType } from './AbstractEntity'; +import { WithTimestamps, jsonColumnType } from './abstract-entity'; @Entity({ name: 'event_destinations' }) export class EventDestinations extends WithTimestamps { diff --git a/packages/cli/src/databases/entities/ExecutionData.ts b/packages/cli/src/databases/entities/execution-data.ts similarity index 88% rename from packages/cli/src/databases/entities/ExecutionData.ts rename to packages/cli/src/databases/entities/execution-data.ts index 5a1bd0cf58..b33b87659e 100644 --- a/packages/cli/src/databases/entities/ExecutionData.ts +++ b/packages/cli/src/databases/entities/execution-data.ts @@ -1,7 +1,7 @@ import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm'; import { idStringifier } from '../utils/transformers'; -import { ExecutionEntity } from './ExecutionEntity'; -import { jsonColumnType } from './AbstractEntity'; +import { ExecutionEntity } from './execution-entity'; +import { jsonColumnType } from './abstract-entity'; import { IWorkflowBase } from 'n8n-workflow'; @Entity() diff --git a/packages/cli/src/databases/entities/ExecutionEntity.ts b/packages/cli/src/databases/entities/execution-entity.ts similarity index 85% rename from packages/cli/src/databases/entities/ExecutionEntity.ts rename to packages/cli/src/databases/entities/execution-entity.ts index dbd597a828..f7a9455b5a 100644 --- a/packages/cli/src/databases/entities/ExecutionEntity.ts +++ b/packages/cli/src/databases/entities/execution-entity.ts @@ -11,11 +11,11 @@ import { Relation, DeleteDateColumn, } from '@n8n/typeorm'; -import { datetimeColumnType } from './AbstractEntity'; +import { datetimeColumnType } from './abstract-entity'; import { idStringifier } from '../utils/transformers'; -import type { ExecutionData } from './ExecutionData'; -import type { ExecutionMetadata } from './ExecutionMetadata'; -import { WorkflowEntity } from './WorkflowEntity'; +import type { ExecutionData } from './execution-data'; +import type { ExecutionMetadata } from './execution-metadata'; +import { WorkflowEntity } from './workflow-entity'; @Entity() @Index(['workflowId', 'id']) diff --git a/packages/cli/src/databases/entities/ExecutionMetadata.ts b/packages/cli/src/databases/entities/execution-metadata.ts similarity index 87% rename from packages/cli/src/databases/entities/ExecutionMetadata.ts rename to packages/cli/src/databases/entities/execution-metadata.ts index 34e09ca2df..1cdf6d8f68 100644 --- a/packages/cli/src/databases/entities/ExecutionMetadata.ts +++ b/packages/cli/src/databases/entities/execution-metadata.ts @@ -1,5 +1,5 @@ import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from '@n8n/typeorm'; -import { ExecutionEntity } from './ExecutionEntity'; +import { ExecutionEntity } from './execution-entity'; @Entity() export class ExecutionMetadata { diff --git a/packages/cli/src/databases/entities/index.ts b/packages/cli/src/databases/entities/index.ts index bd7d187486..275bf309c0 100644 --- a/packages/cli/src/databases/entities/index.ts +++ b/packages/cli/src/databases/entities/index.ts @@ -1,27 +1,27 @@ -import { AuthIdentity } from './AuthIdentity'; -import { AuthProviderSyncHistory } from './AuthProviderSyncHistory'; -import { AuthUser } from './AuthUser'; -import { CredentialsEntity } from './CredentialsEntity'; -import { EventDestinations } from './EventDestinations'; -import { ExecutionEntity } from './ExecutionEntity'; -import { InstalledNodes } from './InstalledNodes'; -import { InstalledPackages } from './InstalledPackages'; -import { Settings } from './Settings'; -import { SharedCredentials } from './SharedCredentials'; -import { SharedWorkflow } from './SharedWorkflow'; -import { TagEntity } from './TagEntity'; +import { AuthIdentity } from './auth-identity'; +import { AuthProviderSyncHistory } from './auth-provider-sync-history'; +import { AuthUser } from './auth-user'; +import { CredentialsEntity } from './credentials-entity'; +import { EventDestinations } from './event-destinations'; +import { ExecutionEntity } from './execution-entity'; +import { InstalledNodes } from './installed-nodes'; +import { InstalledPackages } from './installed-packages'; +import { Settings } from './settings'; +import { SharedCredentials } from './shared-credentials'; +import { SharedWorkflow } from './shared-workflow'; +import { TagEntity } from './tag-entity'; import { User } from './User'; import { Variables } from './Variables'; -import { WebhookEntity } from './WebhookEntity'; -import { WorkflowEntity } from './WorkflowEntity'; -import { WorkflowTagMapping } from './WorkflowTagMapping'; -import { WorkflowStatistics } from './WorkflowStatistics'; -import { ExecutionMetadata } from './ExecutionMetadata'; -import { ExecutionData } from './ExecutionData'; -import { WorkflowHistory } from './WorkflowHistory'; -import { Project } from './Project'; -import { ProjectRelation } from './ProjectRelation'; -import { InvalidAuthToken } from './InvalidAuthToken'; +import { WebhookEntity } from './webhook-entity'; +import { WorkflowEntity } from './workflow-entity'; +import { WorkflowTagMapping } from './workflow-tag-mapping'; +import { WorkflowStatistics } from './workflow-statistics'; +import { ExecutionMetadata } from './execution-metadata'; +import { ExecutionData } from './execution-data'; +import { WorkflowHistory } from './workflow-history'; +import { Project } from './project'; +import { ProjectRelation } from './project-relation'; +import { InvalidAuthToken } from './invalid-auth-token'; export const entities = { AuthIdentity, diff --git a/packages/cli/src/databases/entities/InstalledNodes.ts b/packages/cli/src/databases/entities/installed-nodes.ts similarity index 86% rename from packages/cli/src/databases/entities/InstalledNodes.ts rename to packages/cli/src/databases/entities/installed-nodes.ts index f3eee3ab9a..bed9175095 100644 --- a/packages/cli/src/databases/entities/InstalledNodes.ts +++ b/packages/cli/src/databases/entities/installed-nodes.ts @@ -1,5 +1,5 @@ import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from '@n8n/typeorm'; -import { InstalledPackages } from './InstalledPackages'; +import { InstalledPackages } from './installed-packages'; @Entity() export class InstalledNodes { diff --git a/packages/cli/src/databases/entities/InstalledPackages.ts b/packages/cli/src/databases/entities/installed-packages.ts similarity index 79% rename from packages/cli/src/databases/entities/InstalledPackages.ts rename to packages/cli/src/databases/entities/installed-packages.ts index 38cd52cd31..cea8fbaa49 100644 --- a/packages/cli/src/databases/entities/InstalledPackages.ts +++ b/packages/cli/src/databases/entities/installed-packages.ts @@ -1,6 +1,6 @@ import { Column, Entity, JoinColumn, OneToMany, PrimaryColumn } from '@n8n/typeorm'; -import type { InstalledNodes } from './InstalledNodes'; -import { WithTimestamps } from './AbstractEntity'; +import type { InstalledNodes } from './installed-nodes'; +import { WithTimestamps } from './abstract-entity'; @Entity() export class InstalledPackages extends WithTimestamps { diff --git a/packages/cli/src/databases/entities/InvalidAuthToken.ts b/packages/cli/src/databases/entities/invalid-auth-token.ts similarity index 77% rename from packages/cli/src/databases/entities/InvalidAuthToken.ts rename to packages/cli/src/databases/entities/invalid-auth-token.ts index e21860d146..53874f34d6 100644 --- a/packages/cli/src/databases/entities/InvalidAuthToken.ts +++ b/packages/cli/src/databases/entities/invalid-auth-token.ts @@ -1,5 +1,5 @@ import { Column, Entity, PrimaryColumn } from '@n8n/typeorm'; -import { datetimeColumnType } from './AbstractEntity'; +import { datetimeColumnType } from './abstract-entity'; @Entity() export class InvalidAuthToken { diff --git a/packages/cli/src/databases/entities/ProjectRelation.ts b/packages/cli/src/databases/entities/project-relation.ts similarity index 86% rename from packages/cli/src/databases/entities/ProjectRelation.ts rename to packages/cli/src/databases/entities/project-relation.ts index 2246dba0ea..f8084532bc 100644 --- a/packages/cli/src/databases/entities/ProjectRelation.ts +++ b/packages/cli/src/databases/entities/project-relation.ts @@ -1,7 +1,7 @@ import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm'; import { User } from './User'; -import { WithTimestamps } from './AbstractEntity'; -import { Project } from './Project'; +import { WithTimestamps } from './abstract-entity'; +import { Project } from './project'; // personalOwner is only used for personal projects export type ProjectRole = diff --git a/packages/cli/src/databases/entities/Project.ts b/packages/cli/src/databases/entities/project.ts similarity index 67% rename from packages/cli/src/databases/entities/Project.ts rename to packages/cli/src/databases/entities/project.ts index 3cee1e9c80..41cad38e4a 100644 --- a/packages/cli/src/databases/entities/Project.ts +++ b/packages/cli/src/databases/entities/project.ts @@ -1,8 +1,8 @@ import { Column, Entity, OneToMany } from '@n8n/typeorm'; -import { WithTimestampsAndStringId } from './AbstractEntity'; -import type { ProjectRelation } from './ProjectRelation'; -import type { SharedCredentials } from './SharedCredentials'; -import type { SharedWorkflow } from './SharedWorkflow'; +import { WithTimestampsAndStringId } from './abstract-entity'; +import type { ProjectRelation } from './project-relation'; +import type { SharedCredentials } from './shared-credentials'; +import type { SharedWorkflow } from './shared-workflow'; export type ProjectType = 'personal' | 'team'; diff --git a/packages/cli/src/databases/entities/Settings.ts b/packages/cli/src/databases/entities/settings.ts similarity index 100% rename from packages/cli/src/databases/entities/Settings.ts rename to packages/cli/src/databases/entities/settings.ts diff --git a/packages/cli/src/databases/entities/SharedCredentials.ts b/packages/cli/src/databases/entities/shared-credentials.ts similarity index 76% rename from packages/cli/src/databases/entities/SharedCredentials.ts rename to packages/cli/src/databases/entities/shared-credentials.ts index 35335ddf08..328d2dccfa 100644 --- a/packages/cli/src/databases/entities/SharedCredentials.ts +++ b/packages/cli/src/databases/entities/shared-credentials.ts @@ -1,7 +1,7 @@ import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm'; -import { CredentialsEntity } from './CredentialsEntity'; -import { WithTimestamps } from './AbstractEntity'; -import { Project } from './Project'; +import { CredentialsEntity } from './credentials-entity'; +import { WithTimestamps } from './abstract-entity'; +import { Project } from './project'; export type CredentialSharingRole = 'credential:owner' | 'credential:user'; diff --git a/packages/cli/src/databases/entities/SharedWorkflow.ts b/packages/cli/src/databases/entities/shared-workflow.ts similarity index 76% rename from packages/cli/src/databases/entities/SharedWorkflow.ts rename to packages/cli/src/databases/entities/shared-workflow.ts index a61fb00253..b2ed7f2b57 100644 --- a/packages/cli/src/databases/entities/SharedWorkflow.ts +++ b/packages/cli/src/databases/entities/shared-workflow.ts @@ -1,7 +1,7 @@ import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm'; -import { WorkflowEntity } from './WorkflowEntity'; -import { WithTimestamps } from './AbstractEntity'; -import { Project } from './Project'; +import { WorkflowEntity } from './workflow-entity'; +import { WithTimestamps } from './abstract-entity'; +import { Project } from './project'; export type WorkflowSharingRole = 'workflow:owner' | 'workflow:editor'; diff --git a/packages/cli/src/databases/entities/TagEntity.ts b/packages/cli/src/databases/entities/tag-entity.ts similarity index 75% rename from packages/cli/src/databases/entities/TagEntity.ts rename to packages/cli/src/databases/entities/tag-entity.ts index 5e7954df66..ce2d9e7aea 100644 --- a/packages/cli/src/databases/entities/TagEntity.ts +++ b/packages/cli/src/databases/entities/tag-entity.ts @@ -1,8 +1,8 @@ import { Column, Entity, Index, ManyToMany, OneToMany } from '@n8n/typeorm'; import { IsString, Length } from 'class-validator'; -import type { WorkflowEntity } from './WorkflowEntity'; -import type { WorkflowTagMapping } from './WorkflowTagMapping'; -import { WithTimestampsAndStringId } from './AbstractEntity'; +import type { WorkflowEntity } from './workflow-entity'; +import type { WorkflowTagMapping } from './workflow-tag-mapping'; +import { WithTimestampsAndStringId } from './abstract-entity'; @Entity() export class TagEntity extends WithTimestampsAndStringId { diff --git a/packages/cli/src/databases/entities/WebhookEntity.ts b/packages/cli/src/databases/entities/webhook-entity.ts similarity index 100% rename from packages/cli/src/databases/entities/WebhookEntity.ts rename to packages/cli/src/databases/entities/webhook-entity.ts diff --git a/packages/cli/src/databases/entities/WorkflowEntity.ts b/packages/cli/src/databases/entities/workflow-entity.ts similarity index 90% rename from packages/cli/src/databases/entities/WorkflowEntity.ts rename to packages/cli/src/databases/entities/workflow-entity.ts index 2d915d71c0..b0dd56635b 100644 --- a/packages/cli/src/databases/entities/WorkflowEntity.ts +++ b/packages/cli/src/databases/entities/workflow-entity.ts @@ -5,12 +5,12 @@ import type { IBinaryKeyData, INode, IPairedItemData } from 'n8n-workflow'; import { Column, Entity, Index, JoinColumn, JoinTable, ManyToMany, OneToMany } from '@n8n/typeorm'; -import type { TagEntity } from './TagEntity'; -import type { SharedWorkflow } from './SharedWorkflow'; -import type { WorkflowStatistics } from './WorkflowStatistics'; -import type { WorkflowTagMapping } from './WorkflowTagMapping'; +import type { TagEntity } from './tag-entity'; +import type { SharedWorkflow } from './shared-workflow'; +import type { WorkflowStatistics } from './workflow-statistics'; +import type { WorkflowTagMapping } from './workflow-tag-mapping'; import { objectRetriever, sqlite } from '../utils/transformers'; -import { WithTimestampsAndStringId, dbType, jsonColumnType } from './AbstractEntity'; +import { WithTimestampsAndStringId, dbType, jsonColumnType } from './abstract-entity'; import type { IWorkflowDb } from '@/Interfaces'; @Entity() diff --git a/packages/cli/src/databases/entities/WorkflowHistory.ts b/packages/cli/src/databases/entities/workflow-history.ts similarity index 81% rename from packages/cli/src/databases/entities/WorkflowHistory.ts rename to packages/cli/src/databases/entities/workflow-history.ts index b66bbff210..f15f2e76b9 100644 --- a/packages/cli/src/databases/entities/WorkflowHistory.ts +++ b/packages/cli/src/databases/entities/workflow-history.ts @@ -1,8 +1,8 @@ import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm'; -import { WithTimestamps, jsonColumnType } from './AbstractEntity'; +import { WithTimestamps, jsonColumnType } from './abstract-entity'; import { IConnections } from 'n8n-workflow'; import type { INode } from 'n8n-workflow'; -import { WorkflowEntity } from './WorkflowEntity'; +import { WorkflowEntity } from './workflow-entity'; @Entity() export class WorkflowHistory extends WithTimestamps { diff --git a/packages/cli/src/databases/entities/WorkflowStatistics.ts b/packages/cli/src/databases/entities/workflow-statistics.ts similarity index 84% rename from packages/cli/src/databases/entities/WorkflowStatistics.ts rename to packages/cli/src/databases/entities/workflow-statistics.ts index 5bdeffcb7c..e220bcfebe 100644 --- a/packages/cli/src/databases/entities/WorkflowStatistics.ts +++ b/packages/cli/src/databases/entities/workflow-statistics.ts @@ -1,6 +1,6 @@ import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm'; -import { datetimeColumnType } from './AbstractEntity'; -import { WorkflowEntity } from './WorkflowEntity'; +import { datetimeColumnType } from './abstract-entity'; +import { WorkflowEntity } from './workflow-entity'; export const enum StatisticsNames { productionSuccess = 'production_success', diff --git a/packages/cli/src/databases/entities/WorkflowTagMapping.ts b/packages/cli/src/databases/entities/workflow-tag-mapping.ts similarity index 80% rename from packages/cli/src/databases/entities/WorkflowTagMapping.ts rename to packages/cli/src/databases/entities/workflow-tag-mapping.ts index 2f0727272c..641113f083 100644 --- a/packages/cli/src/databases/entities/WorkflowTagMapping.ts +++ b/packages/cli/src/databases/entities/workflow-tag-mapping.ts @@ -1,6 +1,6 @@ import { Entity, JoinColumn, ManyToOne, PrimaryColumn } from '@n8n/typeorm'; -import type { TagEntity } from './TagEntity'; -import type { WorkflowEntity } from './WorkflowEntity'; +import type { TagEntity } from './tag-entity'; +import type { WorkflowEntity } from './workflow-entity'; @Entity({ name: 'workflows_tags' }) export class WorkflowTagMapping { diff --git a/packages/cli/src/databases/migrations/common/1620821879465-UniqueWorkflowNames.ts b/packages/cli/src/databases/migrations/common/1620821879465-UniqueWorkflowNames.ts index d867dcd51c..f245602c1f 100644 --- a/packages/cli/src/databases/migrations/common/1620821879465-UniqueWorkflowNames.ts +++ b/packages/cli/src/databases/migrations/common/1620821879465-UniqueWorkflowNames.ts @@ -1,4 +1,4 @@ -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import type { MigrationContext, ReversibleMigration } from '@db/types'; export class UniqueWorkflowNames1620821879465 implements ReversibleMigration { diff --git a/packages/cli/src/databases/migrations/common/1630330987096-UpdateWorkflowCredentials.ts b/packages/cli/src/databases/migrations/common/1630330987096-UpdateWorkflowCredentials.ts index e8de8dd9fc..32c16f71c9 100644 --- a/packages/cli/src/databases/migrations/common/1630330987096-UpdateWorkflowCredentials.ts +++ b/packages/cli/src/databases/migrations/common/1630330987096-UpdateWorkflowCredentials.ts @@ -1,6 +1,6 @@ import type { IWorkflowBase } from 'n8n-workflow'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import type { MigrationContext, ReversibleMigration } from '@db/types'; type Credential = Pick; diff --git a/packages/cli/src/databases/migrations/common/1658930531669-AddNodeIds.ts b/packages/cli/src/databases/migrations/common/1658930531669-AddNodeIds.ts index 84f1218e98..85c37b7c84 100644 --- a/packages/cli/src/databases/migrations/common/1658930531669-AddNodeIds.ts +++ b/packages/cli/src/databases/migrations/common/1658930531669-AddNodeIds.ts @@ -1,5 +1,5 @@ import type { INode } from 'n8n-workflow'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import type { MigrationContext, ReversibleMigration } from '@db/types'; import { v4 as uuid } from 'uuid'; diff --git a/packages/cli/src/databases/migrations/common/1671726148419-RemoveWorkflowDataLoadedFlag.ts b/packages/cli/src/databases/migrations/common/1671726148419-RemoveWorkflowDataLoadedFlag.ts index a310f8b30b..6bc183f3ab 100644 --- a/packages/cli/src/databases/migrations/common/1671726148419-RemoveWorkflowDataLoadedFlag.ts +++ b/packages/cli/src/databases/migrations/common/1671726148419-RemoveWorkflowDataLoadedFlag.ts @@ -1,5 +1,5 @@ import type { MigrationContext, ReversibleMigration } from '@db/types'; -import { StatisticsNames } from '@db/entities/WorkflowStatistics'; +import { StatisticsNames } from '@/databases/entities/workflow-statistics'; export class RemoveWorkflowDataLoadedFlag1671726148419 implements ReversibleMigration { async up({ escape, dbType, runQuery }: MigrationContext) { diff --git a/packages/cli/src/databases/migrations/common/1675940580449-PurgeInvalidWorkflowConnections.ts b/packages/cli/src/databases/migrations/common/1675940580449-PurgeInvalidWorkflowConnections.ts index 51526aaead..c4978fb550 100644 --- a/packages/cli/src/databases/migrations/common/1675940580449-PurgeInvalidWorkflowConnections.ts +++ b/packages/cli/src/databases/migrations/common/1675940580449-PurgeInvalidWorkflowConnections.ts @@ -1,4 +1,4 @@ -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import type { MigrationContext, IrreversibleMigration } from '@db/types'; interface Workflow { diff --git a/packages/cli/src/databases/migrations/common/1714133768519-CreateProject.ts b/packages/cli/src/databases/migrations/common/1714133768519-CreateProject.ts index b28d7a710b..feb0979b25 100644 --- a/packages/cli/src/databases/migrations/common/1714133768519-CreateProject.ts +++ b/packages/cli/src/databases/migrations/common/1714133768519-CreateProject.ts @@ -1,5 +1,5 @@ import type { MigrationContext, ReversibleMigration } from '@db/types'; -import type { ProjectRole } from '@/databases/entities/ProjectRelation'; +import type { ProjectRole } from '@/databases/entities/project-relation'; import type { User } from '@/databases/entities/User'; import { generateNanoId } from '@/databases/utils/generators'; import { ApplicationError } from 'n8n-workflow'; diff --git a/packages/cli/src/databases/repositories/__tests__/execution.repository.test.ts b/packages/cli/src/databases/repositories/__tests__/execution.repository.test.ts index 1a4929f5cd..ac598a89ac 100644 --- a/packages/cli/src/databases/repositories/__tests__/execution.repository.test.ts +++ b/packages/cli/src/databases/repositories/__tests__/execution.repository.test.ts @@ -6,7 +6,7 @@ import { BinaryDataService } from 'n8n-core'; import { nanoid } from 'nanoid'; import { mock } from 'jest-mock-extended'; -import { ExecutionEntity } from '@db/entities/ExecutionEntity'; +import { ExecutionEntity } from '@db/entities/execution-entity'; import { ExecutionRepository } from '@db/repositories/execution.repository'; import { mockInstance, mockEntityManager } from '@test/mocking'; diff --git a/packages/cli/src/databases/repositories/__tests__/sharedCredentials.repository.test.ts b/packages/cli/src/databases/repositories/__tests__/sharedCredentials.repository.test.ts index 6fb4bad4ea..14b827b8eb 100644 --- a/packages/cli/src/databases/repositories/__tests__/sharedCredentials.repository.test.ts +++ b/packages/cli/src/databases/repositories/__tests__/sharedCredentials.repository.test.ts @@ -3,10 +3,10 @@ import { In } from '@n8n/typeorm'; import { mock } from 'jest-mock-extended'; import { hasScope } from '@n8n/permissions'; -import type { User } from '@db/entities/User'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import { SharedCredentials } from '@db/entities/SharedCredentials'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import type { User } from '@/databases/entities/User'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import { SharedCredentials } from '@/databases/entities/shared-credentials'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { GLOBAL_MEMBER_SCOPES, GLOBAL_OWNER_SCOPES } from '@/permissions/global-roles'; import { mockEntityManager } from '@test/mocking'; diff --git a/packages/cli/src/databases/repositories/__tests__/workflowStatistics.test.ts b/packages/cli/src/databases/repositories/__tests__/workflowStatistics.test.ts index 7bed056549..c37ce9810e 100644 --- a/packages/cli/src/databases/repositories/__tests__/workflowStatistics.test.ts +++ b/packages/cli/src/databases/repositories/__tests__/workflowStatistics.test.ts @@ -2,8 +2,8 @@ import { Container } from 'typedi'; import { type InsertResult, QueryFailedError } from '@n8n/typeorm'; import { mock, mockClear } from 'jest-mock-extended'; -import { StatisticsNames, WorkflowStatistics } from '@db/entities/WorkflowStatistics'; -import { WorkflowStatisticsRepository } from '@db/repositories/workflowStatistics.repository'; +import { StatisticsNames, WorkflowStatistics } from '@/databases/entities/workflow-statistics'; +import { WorkflowStatisticsRepository } from '@/databases/repositories/workflow-statistics.repository'; import { mockEntityManager } from '@test/mocking'; diff --git a/packages/cli/src/databases/repositories/authIdentity.repository.ts b/packages/cli/src/databases/repositories/auth-identity.repository.ts similarity index 81% rename from packages/cli/src/databases/repositories/authIdentity.repository.ts rename to packages/cli/src/databases/repositories/auth-identity.repository.ts index d285d68582..abe6a55bae 100644 --- a/packages/cli/src/databases/repositories/authIdentity.repository.ts +++ b/packages/cli/src/databases/repositories/auth-identity.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, Repository } from '@n8n/typeorm'; -import { AuthIdentity } from '../entities/AuthIdentity'; +import { AuthIdentity } from '../entities/auth-identity'; @Service() export class AuthIdentityRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/authProviderSyncHistory.repository.ts b/packages/cli/src/databases/repositories/auth-provider-sync-history.repository.ts similarity index 78% rename from packages/cli/src/databases/repositories/authProviderSyncHistory.repository.ts rename to packages/cli/src/databases/repositories/auth-provider-sync-history.repository.ts index 86bacfae1b..03f9f96d49 100644 --- a/packages/cli/src/databases/repositories/authProviderSyncHistory.repository.ts +++ b/packages/cli/src/databases/repositories/auth-provider-sync-history.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, Repository } from '@n8n/typeorm'; -import { AuthProviderSyncHistory } from '../entities/AuthProviderSyncHistory'; +import { AuthProviderSyncHistory } from '../entities/auth-provider-sync-history'; @Service() export class AuthProviderSyncHistoryRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/authUser.repository.ts b/packages/cli/src/databases/repositories/auth-user.repository.ts similarity index 83% rename from packages/cli/src/databases/repositories/authUser.repository.ts rename to packages/cli/src/databases/repositories/auth-user.repository.ts index 7db9ab89ad..978ea458e6 100644 --- a/packages/cli/src/databases/repositories/authUser.repository.ts +++ b/packages/cli/src/databases/repositories/auth-user.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, Repository } from '@n8n/typeorm'; -import { AuthUser } from '../entities/AuthUser'; +import { AuthUser } from '../entities/auth-user'; @Service() export class AuthUserRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/credentials.repository.ts b/packages/cli/src/databases/repositories/credentials.repository.ts index a5162af015..5878d9913c 100644 --- a/packages/cli/src/databases/repositories/credentials.repository.ts +++ b/packages/cli/src/databases/repositories/credentials.repository.ts @@ -1,7 +1,7 @@ import { Service } from 'typedi'; import { DataSource, In, Repository, Like } from '@n8n/typeorm'; import type { FindManyOptions, FindOptionsWhere } from '@n8n/typeorm'; -import { CredentialsEntity } from '../entities/CredentialsEntity'; +import { CredentialsEntity } from '../entities/credentials-entity'; import type { ListQuery } from '@/requests'; import type { User } from '../entities/User'; import type { Scope } from '@n8n/permissions'; diff --git a/packages/cli/src/databases/repositories/eventDestinations.repository.ts b/packages/cli/src/databases/repositories/event-destinations.repository.ts similarity index 80% rename from packages/cli/src/databases/repositories/eventDestinations.repository.ts rename to packages/cli/src/databases/repositories/event-destinations.repository.ts index 98882bbb50..bc8368559f 100644 --- a/packages/cli/src/databases/repositories/eventDestinations.repository.ts +++ b/packages/cli/src/databases/repositories/event-destinations.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, Repository } from '@n8n/typeorm'; -import { EventDestinations } from '../entities/EventDestinations'; +import { EventDestinations } from '../entities/event-destinations'; @Service() export class EventDestinationsRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/executionData.repository.ts b/packages/cli/src/databases/repositories/execution-data.repository.ts similarity index 89% rename from packages/cli/src/databases/repositories/executionData.repository.ts rename to packages/cli/src/databases/repositories/execution-data.repository.ts index 5872f9888c..831ed478a3 100644 --- a/packages/cli/src/databases/repositories/executionData.repository.ts +++ b/packages/cli/src/databases/repositories/execution-data.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, In, Repository } from '@n8n/typeorm'; -import { ExecutionData } from '../entities/ExecutionData'; +import { ExecutionData } from '../entities/execution-data'; @Service() export class ExecutionDataRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/executionMetadata.repository.ts b/packages/cli/src/databases/repositories/execution-metadata.repository.ts similarity index 80% rename from packages/cli/src/databases/repositories/executionMetadata.repository.ts rename to packages/cli/src/databases/repositories/execution-metadata.repository.ts index d80cca12a6..5eb48e2d24 100644 --- a/packages/cli/src/databases/repositories/executionMetadata.repository.ts +++ b/packages/cli/src/databases/repositories/execution-metadata.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, Repository } from '@n8n/typeorm'; -import { ExecutionMetadata } from '../entities/ExecutionMetadata'; +import { ExecutionMetadata } from '../entities/execution-metadata'; @Service() export class ExecutionMetadataRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/execution.repository.ts b/packages/cli/src/databases/repositories/execution.repository.ts index dbcbfc994e..d722c75dc9 100644 --- a/packages/cli/src/databases/repositories/execution.repository.ts +++ b/packages/cli/src/databases/repositories/execution.repository.ts @@ -38,10 +38,10 @@ import type { } from '@/Interfaces'; import config from '@/config'; -import type { ExecutionData } from '../entities/ExecutionData'; -import { ExecutionEntity } from '../entities/ExecutionEntity'; -import { ExecutionMetadata } from '../entities/ExecutionMetadata'; -import { ExecutionDataRepository } from './executionData.repository'; +import type { ExecutionData } from '../entities/execution-data'; +import { ExecutionEntity } from '../entities/execution-entity'; +import { ExecutionMetadata } from '../entities/execution-metadata'; +import { ExecutionDataRepository } from './execution-data.repository'; import { Logger } from '@/logger'; import type { ExecutionSummaries } from '@/executions/execution.types'; import { PostgresLiveRowsRetrievalError } from '@/errors/postgres-live-rows-retrieval.error'; diff --git a/packages/cli/src/databases/repositories/installedNodes.repository.ts b/packages/cli/src/databases/repositories/installed-nodes.repository.ts similarity index 81% rename from packages/cli/src/databases/repositories/installedNodes.repository.ts rename to packages/cli/src/databases/repositories/installed-nodes.repository.ts index 6750f5dc84..e675331f85 100644 --- a/packages/cli/src/databases/repositories/installedNodes.repository.ts +++ b/packages/cli/src/databases/repositories/installed-nodes.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, Repository } from '@n8n/typeorm'; -import { InstalledNodes } from '../entities/InstalledNodes'; +import { InstalledNodes } from '../entities/installed-nodes'; @Service() export class InstalledNodesRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/installedPackages.repository.ts b/packages/cli/src/databases/repositories/installed-packages.repository.ts similarity index 90% rename from packages/cli/src/databases/repositories/installedPackages.repository.ts rename to packages/cli/src/databases/repositories/installed-packages.repository.ts index c7a39cded5..245b00e43b 100644 --- a/packages/cli/src/databases/repositories/installedPackages.repository.ts +++ b/packages/cli/src/databases/repositories/installed-packages.repository.ts @@ -1,7 +1,7 @@ import { Service } from 'typedi'; import { DataSource, Repository } from '@n8n/typeorm'; -import { InstalledPackages } from '../entities/InstalledPackages'; -import { InstalledNodesRepository } from './installedNodes.repository'; +import { InstalledPackages } from '../entities/installed-packages'; +import { InstalledNodesRepository } from './installed-nodes.repository'; import type { PackageDirectoryLoader } from 'n8n-core'; @Service() diff --git a/packages/cli/src/databases/repositories/invalidAuthToken.repository.ts b/packages/cli/src/databases/repositories/invalid-auth-token.repository.ts similarity index 80% rename from packages/cli/src/databases/repositories/invalidAuthToken.repository.ts rename to packages/cli/src/databases/repositories/invalid-auth-token.repository.ts index c6340ba88a..716175fa16 100644 --- a/packages/cli/src/databases/repositories/invalidAuthToken.repository.ts +++ b/packages/cli/src/databases/repositories/invalid-auth-token.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, Repository } from '@n8n/typeorm'; -import { InvalidAuthToken } from '../entities/InvalidAuthToken'; +import { InvalidAuthToken } from '../entities/invalid-auth-token'; @Service() export class InvalidAuthTokenRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/projectRelation.repository.ts b/packages/cli/src/databases/repositories/project-relation.repository.ts similarity index 95% rename from packages/cli/src/databases/repositories/projectRelation.repository.ts rename to packages/cli/src/databases/repositories/project-relation.repository.ts index 1f875d011f..999f6241f0 100644 --- a/packages/cli/src/databases/repositories/projectRelation.repository.ts +++ b/packages/cli/src/databases/repositories/project-relation.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, In, Repository } from '@n8n/typeorm'; -import { ProjectRelation, type ProjectRole } from '../entities/ProjectRelation'; +import { ProjectRelation, type ProjectRole } from '../entities/project-relation'; @Service() export class ProjectRelationRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/project.repository.ts b/packages/cli/src/databases/repositories/project.repository.ts index 086dfbc7cf..ff7ec545ba 100644 --- a/packages/cli/src/databases/repositories/project.repository.ts +++ b/packages/cli/src/databases/repositories/project.repository.ts @@ -1,7 +1,7 @@ import { Service } from 'typedi'; import type { EntityManager } from '@n8n/typeorm'; import { DataSource, Repository } from '@n8n/typeorm'; -import { Project } from '../entities/Project'; +import { Project } from '../entities/project'; @Service() export class ProjectRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/settings.repository.ts b/packages/cli/src/databases/repositories/settings.repository.ts index 6a745a8a70..635945e3a1 100644 --- a/packages/cli/src/databases/repositories/settings.repository.ts +++ b/packages/cli/src/databases/repositories/settings.repository.ts @@ -2,7 +2,7 @@ import { EXTERNAL_SECRETS_DB_KEY } from '@/external-secrets/constants'; import { Service } from 'typedi'; import { DataSource, Repository } from '@n8n/typeorm'; import { ErrorReporterProxy as ErrorReporter } from 'n8n-workflow'; -import { Settings } from '../entities/Settings'; +import { Settings } from '../entities/settings'; import config from '@/config'; @Service() diff --git a/packages/cli/src/databases/repositories/sharedCredentials.repository.ts b/packages/cli/src/databases/repositories/shared-credentials.repository.ts similarity index 96% rename from packages/cli/src/databases/repositories/sharedCredentials.repository.ts rename to packages/cli/src/databases/repositories/shared-credentials.repository.ts index 03acc24823..dd393b4e50 100644 --- a/packages/cli/src/databases/repositories/sharedCredentials.repository.ts +++ b/packages/cli/src/databases/repositories/shared-credentials.repository.ts @@ -1,12 +1,12 @@ import { Service } from 'typedi'; import type { EntityManager, FindOptionsRelations, FindOptionsWhere } from '@n8n/typeorm'; import { DataSource, In, Not, Repository } from '@n8n/typeorm'; -import { type CredentialSharingRole, SharedCredentials } from '../entities/SharedCredentials'; +import { type CredentialSharingRole, SharedCredentials } from '../entities/shared-credentials'; import type { User } from '../entities/User'; import { RoleService } from '@/services/role.service'; import type { Scope } from '@n8n/permissions'; -import type { Project } from '../entities/Project'; -import type { ProjectRole } from '../entities/ProjectRelation'; +import type { Project } from '../entities/project'; +import type { ProjectRole } from '../entities/project-relation'; @Service() export class SharedCredentialsRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/sharedWorkflow.repository.ts b/packages/cli/src/databases/repositories/shared-workflow.repository.ts similarity index 98% rename from packages/cli/src/databases/repositories/sharedWorkflow.repository.ts rename to packages/cli/src/databases/repositories/shared-workflow.repository.ts index d8e224fee2..b8d49d946c 100644 --- a/packages/cli/src/databases/repositories/sharedWorkflow.repository.ts +++ b/packages/cli/src/databases/repositories/shared-workflow.repository.ts @@ -1,11 +1,11 @@ import { Service } from 'typedi'; import { DataSource, Repository, In, Not } from '@n8n/typeorm'; import type { EntityManager, FindManyOptions, FindOptionsWhere } from '@n8n/typeorm'; -import { SharedWorkflow, type WorkflowSharingRole } from '../entities/SharedWorkflow'; +import { SharedWorkflow, type WorkflowSharingRole } from '../entities/shared-workflow'; import { type User } from '../entities/User'; import type { Scope } from '@n8n/permissions'; import { RoleService } from '@/services/role.service'; -import type { Project } from '../entities/Project'; +import type { Project } from '../entities/project'; @Service() export class SharedWorkflowRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/tag.repository.ts b/packages/cli/src/databases/repositories/tag.repository.ts index 1667ff2983..c4a36d77d2 100644 --- a/packages/cli/src/databases/repositories/tag.repository.ts +++ b/packages/cli/src/databases/repositories/tag.repository.ts @@ -1,8 +1,8 @@ import { Service } from 'typedi'; import type { EntityManager } from '@n8n/typeorm'; import { DataSource, In, Repository } from '@n8n/typeorm'; -import { TagEntity } from '../entities/TagEntity'; -import type { WorkflowEntity } from '../entities/WorkflowEntity'; +import { TagEntity } from '../entities/tag-entity'; +import type { WorkflowEntity } from '../entities/workflow-entity'; import intersection from 'lodash/intersection'; @Service() diff --git a/packages/cli/src/databases/repositories/user.repository.ts b/packages/cli/src/databases/repositories/user.repository.ts index d642df6445..52e1ec5501 100644 --- a/packages/cli/src/databases/repositories/user.repository.ts +++ b/packages/cli/src/databases/repositories/user.repository.ts @@ -4,8 +4,8 @@ import { DataSource, In, IsNull, Not, Repository } from '@n8n/typeorm'; import type { ListQuery } from '@/requests'; import { type GlobalRole, User } from '../entities/User'; -import { Project } from '../entities/Project'; -import { ProjectRelation } from '../entities/ProjectRelation'; +import { Project } from '../entities/project'; +import { ProjectRelation } from '../entities/project-relation'; @Service() export class UserRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/webhook.repository.ts b/packages/cli/src/databases/repositories/webhook.repository.ts index 9f211ec0ad..1ea710beec 100644 --- a/packages/cli/src/databases/repositories/webhook.repository.ts +++ b/packages/cli/src/databases/repositories/webhook.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, Repository } from '@n8n/typeorm'; -import { WebhookEntity } from '../entities/WebhookEntity'; +import { WebhookEntity } from '../entities/webhook-entity'; @Service() export class WebhookRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/workflowHistory.repository.ts b/packages/cli/src/databases/repositories/workflow-history.repository.ts similarity index 85% rename from packages/cli/src/databases/repositories/workflowHistory.repository.ts rename to packages/cli/src/databases/repositories/workflow-history.repository.ts index 4eb05b60fe..3e44eb91d1 100644 --- a/packages/cli/src/databases/repositories/workflowHistory.repository.ts +++ b/packages/cli/src/databases/repositories/workflow-history.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, LessThan, Repository } from '@n8n/typeorm'; -import { WorkflowHistory } from '../entities/WorkflowHistory'; +import { WorkflowHistory } from '../entities/workflow-history'; @Service() export class WorkflowHistoryRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/workflowStatistics.repository.ts b/packages/cli/src/databases/repositories/workflow-statistics.repository.ts similarity index 99% rename from packages/cli/src/databases/repositories/workflowStatistics.repository.ts rename to packages/cli/src/databases/repositories/workflow-statistics.repository.ts index 259dfa1fda..24d9024df7 100644 --- a/packages/cli/src/databases/repositories/workflowStatistics.repository.ts +++ b/packages/cli/src/databases/repositories/workflow-statistics.repository.ts @@ -1,7 +1,7 @@ import { Service } from 'typedi'; import { GlobalConfig } from '@n8n/config'; import { DataSource, MoreThanOrEqual, QueryFailedError, Repository } from '@n8n/typeorm'; -import { StatisticsNames, WorkflowStatistics } from '../entities/WorkflowStatistics'; +import { StatisticsNames, WorkflowStatistics } from '../entities/workflow-statistics'; import type { User } from '@/databases/entities/User'; type StatisticsInsertResult = 'insert' | 'failed' | 'alreadyExists'; diff --git a/packages/cli/src/databases/repositories/workflowTagMapping.repository.ts b/packages/cli/src/databases/repositories/workflow-tag-mapping.repository.ts similarity index 89% rename from packages/cli/src/databases/repositories/workflowTagMapping.repository.ts rename to packages/cli/src/databases/repositories/workflow-tag-mapping.repository.ts index 6bf4aa6b2a..43123023c8 100644 --- a/packages/cli/src/databases/repositories/workflowTagMapping.repository.ts +++ b/packages/cli/src/databases/repositories/workflow-tag-mapping.repository.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DataSource, Repository } from '@n8n/typeorm'; -import { WorkflowTagMapping } from '../entities/WorkflowTagMapping'; +import { WorkflowTagMapping } from '../entities/workflow-tag-mapping'; @Service() export class WorkflowTagMappingRepository extends Repository { diff --git a/packages/cli/src/databases/repositories/workflow.repository.ts b/packages/cli/src/databases/repositories/workflow.repository.ts index e9bfbea2e4..fcebc5190b 100644 --- a/packages/cli/src/databases/repositories/workflow.repository.ts +++ b/packages/cli/src/databases/repositories/workflow.repository.ts @@ -14,8 +14,8 @@ import { import type { ListQuery } from '@/requests'; import { isStringArray } from '@/utils'; import config from '@/config'; -import { WorkflowEntity } from '../entities/WorkflowEntity'; -import { WebhookEntity } from '../entities/WebhookEntity'; +import { WorkflowEntity } from '../entities/workflow-entity'; +import { WebhookEntity } from '../entities/webhook-entity'; @Service() export class WorkflowRepository extends Repository { diff --git a/packages/cli/src/databases/subscribers/index.ts b/packages/cli/src/databases/subscribers/index.ts index 9d9383c4d7..489492aa9c 100644 --- a/packages/cli/src/databases/subscribers/index.ts +++ b/packages/cli/src/databases/subscribers/index.ts @@ -1,4 +1,4 @@ -import { UserSubscriber } from './UserSubscriber'; +import { UserSubscriber } from './user-subscriber'; export const subscribers = { UserSubscriber, diff --git a/packages/cli/src/databases/subscribers/UserSubscriber.ts b/packages/cli/src/databases/subscribers/user-subscriber.ts similarity index 98% rename from packages/cli/src/databases/subscribers/UserSubscriber.ts rename to packages/cli/src/databases/subscribers/user-subscriber.ts index 52ef95871e..dbb5e45d20 100644 --- a/packages/cli/src/databases/subscribers/UserSubscriber.ts +++ b/packages/cli/src/databases/subscribers/user-subscriber.ts @@ -4,7 +4,7 @@ import { EventSubscriber } from '@n8n/typeorm'; import { ApplicationError, ErrorReporterProxy } from 'n8n-workflow'; import { Logger } from '@/logger'; -import { Project } from '../entities/Project'; +import { Project } from '../entities/project'; import { User } from '../entities/User'; import { UserRepository } from '../repositories/user.repository'; diff --git a/packages/cli/src/databases/utils/__tests__/migrationHelpers.test.ts b/packages/cli/src/databases/utils/__tests__/migration-helpers.ts similarity index 95% rename from packages/cli/src/databases/utils/__tests__/migrationHelpers.test.ts rename to packages/cli/src/databases/utils/__tests__/migration-helpers.ts index 17cded335d..0b55518511 100644 --- a/packages/cli/src/databases/utils/__tests__/migrationHelpers.test.ts +++ b/packages/cli/src/databases/utils/__tests__/migration-helpers.ts @@ -1,5 +1,5 @@ import type { IrreversibleMigration, ReversibleMigration } from '@/databases/types'; -import { wrapMigration } from '@/databases/utils/migrationHelpers'; +import { wrapMigration } from '@/databases/utils/migration-helpers'; describe('migrationHelpers.wrapMigration', () => { test('throws if passed a migration without up method', async () => { diff --git a/packages/cli/src/databases/utils/migrationHelpers.ts b/packages/cli/src/databases/utils/migration-helpers.ts similarity index 100% rename from packages/cli/src/databases/utils/migrationHelpers.ts rename to packages/cli/src/databases/utils/migration-helpers.ts diff --git a/packages/cli/src/environments/source-control/__tests__/source-control-export.service.test.ts b/packages/cli/src/environments/source-control/__tests__/source-control-export.service.test.ts index 77f56d4d96..88096f8206 100644 --- a/packages/cli/src/environments/source-control/__tests__/source-control-export.service.test.ts +++ b/packages/cli/src/environments/source-control/__tests__/source-control-export.service.test.ts @@ -2,11 +2,11 @@ import mock from 'jest-mock-extended/lib/Mock'; 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 { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { mockInstance } from '@test/mocking'; -import type { SharedCredentials } from '@/databases/entities/SharedCredentials'; -import type { CredentialsEntity } from '@/databases/entities/CredentialsEntity'; +import type { SharedCredentials } from '@/databases/entities/shared-credentials'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; import Container from 'typedi'; import { ApplicationError, deepCopy } from 'n8n-workflow'; diff --git a/packages/cli/src/environments/source-control/source-control-export.service.ee.ts b/packages/cli/src/environments/source-control/source-control-export.service.ee.ts index 728b44c5dc..dc1c8b68fb 100644 --- a/packages/cli/src/environments/source-control/source-control-export.service.ee.ts +++ b/packages/cli/src/environments/source-control/source-control-export.service.ee.ts @@ -20,15 +20,15 @@ import { sourceControlFoldersExistCheck, stringContainsExpression, } from './source-control-helper.ee'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; 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'; 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 { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { WorkflowTagMappingRepository } from '@/databases/repositories/workflow-tag-mapping.repository'; import type { ResourceOwner } from './types/resource-owner'; @Service() diff --git a/packages/cli/src/environments/source-control/source-control-git.service.ee.ts b/packages/cli/src/environments/source-control/source-control-git.service.ee.ts index 134aab9fd6..4180725410 100644 --- a/packages/cli/src/environments/source-control/source-control-git.service.ee.ts +++ b/packages/cli/src/environments/source-control/source-control-git.service.ee.ts @@ -19,7 +19,7 @@ import { SOURCE_CONTROL_ORIGIN, } from './constants'; import { sourceControlFoldersExistCheck } from './source-control-helper.ee'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { Logger } from '@/logger'; import { ApplicationError } from 'n8n-workflow'; import { OwnershipService } from '@/services/ownership.service'; diff --git a/packages/cli/src/environments/source-control/source-control-import.service.ee.ts b/packages/cli/src/environments/source-control/source-control-import.service.ee.ts index 05ce8a0687..7be5c6c42f 100644 --- a/packages/cli/src/environments/source-control/source-control-import.service.ee.ts +++ b/packages/cli/src/environments/source-control/source-control-import.service.ee.ts @@ -13,10 +13,10 @@ import { readFile as fsReadFile } from 'fs/promises'; import { Credentials, InstanceSettings } from 'n8n-core'; import type { IWorkflowToImport } from '@/Interfaces'; 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'; -import type { TagEntity } from '@db/entities/TagEntity'; +import type { Variables } from '@/databases/entities/Variables'; +import { SharedCredentials } from '@/databases/entities/shared-credentials'; +import type { WorkflowTagMapping } from '@/databases/entities/workflow-tag-mapping'; +import type { TagEntity } from '@/databases/entities/tag-entity'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import import { In } from '@n8n/typeorm'; @@ -29,12 +29,12 @@ import { TagRepository } from '@db/repositories/tag.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { Logger } from '@/logger'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; -import { WorkflowTagMappingRepository } from '@db/repositories/workflowTagMapping.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { WorkflowTagMappingRepository } from '@/databases/repositories/workflow-tag-mapping.repository'; import { VariablesRepository } from '@db/repositories/variables.repository'; import { ProjectRepository } from '@/databases/repositories/project.repository'; -import type { Project } from '@/databases/entities/Project'; +import type { Project } from '@/databases/entities/project'; 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/source-control/source-control.service.ee.ts b/packages/cli/src/environments/source-control/source-control.service.ee.ts index d264e1f75a..17bc878a44 100644 --- a/packages/cli/src/environments/source-control/source-control.service.ee.ts +++ b/packages/cli/src/environments/source-control/source-control.service.ee.ts @@ -24,10 +24,10 @@ import type { SourceControlledFile } from './types/source-controlled-file'; import { SourceControlPreferencesService } from './source-control-preferences.service.ee'; import { writeFileSync } from 'fs'; import { SourceControlImportService } from './source-control-import.service.ee'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; 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 { TagEntity } from '@/databases/entities/tag-entity'; +import type { Variables } from '@/databases/entities/Variables'; import type { SourceControlWorkflowVersionId } from './types/source-control-workflow-version-id'; import type { ExportableCredential } from './types/exportable-credential'; import { EventService } from '@/events/event.service'; diff --git a/packages/cli/src/environments/source-control/types/import-result.ts b/packages/cli/src/environments/source-control/types/import-result.ts index 2d90b40904..19b60bb57f 100644 --- a/packages/cli/src/environments/source-control/types/import-result.ts +++ b/packages/cli/src/environments/source-control/types/import-result.ts @@ -1,5 +1,5 @@ -import type { TagEntity } from '@db/entities/TagEntity'; -import type { WorkflowTagMapping } from '@db/entities/WorkflowTagMapping'; +import type { TagEntity } from '@/databases/entities/tag-entity'; +import type { WorkflowTagMapping } from '@/databases/entities/workflow-tag-mapping'; export interface ImportResult { workflows: Array<{ diff --git a/packages/cli/src/environments/variables/variables.service.ee.ts b/packages/cli/src/environments/variables/variables.service.ee.ts index 768a9fa456..83847acf46 100644 --- a/packages/cli/src/environments/variables/variables.service.ee.ts +++ b/packages/cli/src/environments/variables/variables.service.ee.ts @@ -1,5 +1,5 @@ import { Container, Service } from 'typedi'; -import type { Variables } from '@db/entities/Variables'; +import type { Variables } from '@/databases/entities/Variables'; import { generateNanoId } from '@db/utils/generators'; import { canCreateNewVariable } from './environment-helpers'; import { CacheService } from '@/services/cache/cache.service'; diff --git a/packages/cli/src/errors/subworkflow-policy-denial.error.ts b/packages/cli/src/errors/subworkflow-policy-denial.error.ts index 03149a6f11..e4f4850dae 100644 --- a/packages/cli/src/errors/subworkflow-policy-denial.error.ts +++ b/packages/cli/src/errors/subworkflow-policy-denial.error.ts @@ -1,5 +1,5 @@ import { WorkflowOperationError } from 'n8n-workflow'; -import type { Project } from '@/databases/entities/Project'; +import type { Project } from '@/databases/entities/project'; import type { INode } from 'n8n-workflow'; type SubworkflowPolicyDenialErrorParams = { diff --git a/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-from-db.ts b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-from-db.ts index ebc5ec7a4b..544afdbeab 100644 --- a/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-from-db.ts +++ b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination-from-db.ts @@ -1,5 +1,5 @@ import { MessageEventBusDestinationTypeNames } from 'n8n-workflow'; -import type { EventDestinations } from '@db/entities/EventDestinations'; +import type { EventDestinations } from '@/databases/entities/event-destinations'; 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'; diff --git a/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination.ee.ts b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination.ee.ts index 1b9085e9d0..e6b9552602 100644 --- a/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination.ee.ts +++ b/packages/cli/src/eventbus/message-event-bus-destination/message-event-bus-destination.ee.ts @@ -7,7 +7,7 @@ import type { AbstractEventMessage } from '../event-message-classes/abstract-eve 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 { EventDestinationsRepository } from '@/databases/repositories/event-destinations.repository'; import { License } from '@/license'; export abstract class MessageEventBusDestination implements MessageEventBusDestinationOptions { diff --git a/packages/cli/src/eventbus/message-event-bus/message-event-bus.ts b/packages/cli/src/eventbus/message-event-bus/message-event-bus.ts index 47d4d327d4..74f753dc6b 100644 --- a/packages/cli/src/eventbus/message-event-bus/message-event-bus.ts +++ b/packages/cli/src/eventbus/message-event-bus/message-event-bus.ts @@ -8,7 +8,7 @@ import uniqby from 'lodash/uniqBy'; import type { MessageEventBusDestinationOptions } from 'n8n-workflow'; import config from '@/config'; -import { EventDestinationsRepository } from '@db/repositories/eventDestinations.repository'; +import { EventDestinationsRepository } from '@/databases/repositories/event-destinations.repository'; import { ExecutionRepository } from '@db/repositories/execution.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { OrchestrationService } from '@/services/orchestration.service'; diff --git a/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts b/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts index 87d89841ad..a7be9772e4 100644 --- a/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts +++ b/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts @@ -9,10 +9,10 @@ import type { License } from '@/license'; import type { GlobalConfig } from '@n8n/config'; import type { WorkflowRepository } from '@/databases/repositories/workflow.repository'; import type { NodeTypes } from '@/node-types'; -import type { SharedWorkflowRepository } from '@/databases/repositories/sharedWorkflow.repository'; -import type { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import type { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import type { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; import type { RelayEventMap } from '@/events/relay-event-map'; -import type { WorkflowEntity } from '@/databases/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@/databases/entities/workflow-entity'; import { N8N_VERSION } from '@/constants'; const flushPromises = async () => await new Promise((resolve) => setImmediate(resolve)); diff --git a/packages/cli/src/events/relay-event-map.ts b/packages/cli/src/events/relay-event-map.ts index ffc9c9d716..7a2c7c0657 100644 --- a/packages/cli/src/events/relay-event-map.ts +++ b/packages/cli/src/events/relay-event-map.ts @@ -5,9 +5,9 @@ import type { IWorkflowBase, } from 'n8n-workflow'; import type { IWorkflowDb, IWorkflowExecutionDataProcess } from '@/Interfaces'; -import type { ProjectRole } from '@/databases/entities/ProjectRelation'; +import type { ProjectRole } from '@/databases/entities/project-relation'; import type { GlobalRole } from '@/databases/entities/User'; -import type { AuthProviderType } from '@/databases/entities/AuthIdentity'; +import type { AuthProviderType } from '@/databases/entities/auth-identity'; export type UserLike = { id: string; diff --git a/packages/cli/src/events/telemetry-event-relay.ts b/packages/cli/src/events/telemetry-event-relay.ts index dc1dae08a0..c7ffba499a 100644 --- a/packages/cli/src/events/telemetry-event-relay.ts +++ b/packages/cli/src/events/telemetry-event-relay.ts @@ -12,8 +12,8 @@ import type { ExecutionStatus, INodesGraphResult, ITelemetryTrackProperties } fr import { get as pslGet } from 'psl'; import { TelemetryHelpers } from 'n8n-workflow'; import { NodeTypes } from '@/node-types'; -import { SharedWorkflowRepository } from '@/databases/repositories/sharedWorkflow.repository'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; import type { IExecutionTrackProperties } from '@/Interfaces'; import { determineFinalExecutionStatus } from '@/execution-lifecycle-hooks/shared/shared-hook-functions'; import { EventRelay } from './event-relay'; diff --git a/packages/cli/src/executions/__tests__/constants.ts b/packages/cli/src/executions/__tests__/constants.ts index e681628e2c..ece7a0a3ff 100644 --- a/packages/cli/src/executions/__tests__/constants.ts +++ b/packages/cli/src/executions/__tests__/constants.ts @@ -1,4 +1,4 @@ -import type { WorkflowEntity } from '@/databases/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@/databases/entities/workflow-entity'; import { NodeConnectionType } from 'n8n-workflow'; /** diff --git a/packages/cli/src/executions/execution.types.ts b/packages/cli/src/executions/execution.types.ts index 10a2ec7285..d3d3c9fed8 100644 --- a/packages/cli/src/executions/execution.types.ts +++ b/packages/cli/src/executions/execution.types.ts @@ -1,4 +1,4 @@ -import type { ExecutionEntity } from '@/databases/entities/ExecutionEntity'; +import type { ExecutionEntity } from '@/databases/entities/execution-entity'; import type { AuthenticatedRequest } from '@/requests'; import type { Scope } from '@n8n/permissions'; import type { diff --git a/packages/cli/src/generic-helpers.ts b/packages/cli/src/generic-helpers.ts index 39bdc4c9c1..17241cf037 100644 --- a/packages/cli/src/generic-helpers.ts +++ b/packages/cli/src/generic-helpers.ts @@ -1,8 +1,8 @@ import { validate } from 'class-validator'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import type { TagEntity } from '@db/entities/TagEntity'; -import type { User } from '@db/entities/User'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import type { TagEntity } from '@/databases/entities/tag-entity'; +import type { User } from '@/databases/entities/User'; import type { UserRoleChangePayload, UserSettingsUpdatePayload, diff --git a/packages/cli/src/ldap/__tests__/helpers.test.ts b/packages/cli/src/ldap/__tests__/helpers.test.ts index 876a330520..116cbd45ad 100644 --- a/packages/cli/src/ldap/__tests__/helpers.test.ts +++ b/packages/cli/src/ldap/__tests__/helpers.test.ts @@ -1,7 +1,7 @@ import { UserRepository } from '@/databases/repositories/user.repository'; import { mockInstance } from '@test/mocking'; import * as helpers from '@/ldap/helpers.ee'; -import { AuthIdentity } from '@/databases/entities/AuthIdentity'; +import { AuthIdentity } from '@/databases/entities/auth-identity'; import { User } from '@/databases/entities/User'; import { generateNanoId } from '@/databases/utils/generators'; diff --git a/packages/cli/src/ldap/helpers.ee.ts b/packages/cli/src/ldap/helpers.ee.ts index d705fb66fa..a36d2daf21 100644 --- a/packages/cli/src/ldap/helpers.ee.ts +++ b/packages/cli/src/ldap/helpers.ee.ts @@ -6,9 +6,9 @@ import { randomString } from 'n8n-workflow'; import * as Db from '@/Db'; import config from '@/config'; -import { User } from '@db/entities/User'; -import { AuthIdentity } from '@db/entities/AuthIdentity'; -import type { AuthProviderSyncHistory } from '@db/entities/AuthProviderSyncHistory'; +import { User } from '@/databases/entities/User'; +import { AuthIdentity } from '@/databases/entities/auth-identity'; +import type { AuthProviderSyncHistory } from '@/databases/entities/auth-provider-sync-history'; import { BINARY_AD_ATTRIBUTES, @@ -19,8 +19,8 @@ import { import type { ConnectionSecurity, LdapConfig } from './types'; import { License } from '@/license'; import { UserRepository } from '@db/repositories/user.repository'; -import { AuthProviderSyncHistoryRepository } from '@db/repositories/authProviderSyncHistory.repository'; -import { AuthIdentityRepository } from '@db/repositories/authIdentity.repository'; +import { AuthProviderSyncHistoryRepository } from '@/databases/repositories/auth-provider-sync-history.repository'; +import { AuthIdentityRepository } from '@db/repositories/auth-identity.repository'; /** * Check whether the LDAP feature is disabled in the instance diff --git a/packages/cli/src/ldap/ldap.service.ee.ts b/packages/cli/src/ldap/ldap.service.ee.ts index c24cade682..5438640c1e 100644 --- a/packages/cli/src/ldap/ldap.service.ee.ts +++ b/packages/cli/src/ldap/ldap.service.ee.ts @@ -8,8 +8,8 @@ import { ApplicationError, jsonParse } from 'n8n-workflow'; import { Cipher } from 'n8n-core'; import config from '@/config'; -import type { User } from '@db/entities/User'; -import type { RunningMode, SyncStatus } from '@db/entities/AuthProviderSyncHistory'; +import type { User } from '@/databases/entities/User'; +import type { RunningMode, SyncStatus } from '@/databases/entities/auth-provider-sync-history'; import { SettingsRepository } from '@db/repositories/settings.repository'; import { Logger } from '@/logger'; diff --git a/packages/cli/src/ldap/types.ts b/packages/cli/src/ldap/types.ts index 4a897f4590..bc65ef2fdc 100644 --- a/packages/cli/src/ldap/types.ts +++ b/packages/cli/src/ldap/types.ts @@ -1,4 +1,4 @@ -import type { RunningMode } from '@db/entities/AuthProviderSyncHistory'; +import type { RunningMode } from '@/databases/entities/auth-provider-sync-history'; import type { AuthenticatedRequest } from '@/requests'; export type ConnectionSecurity = 'none' | 'tls' | 'startTls'; diff --git a/packages/cli/src/license/license.service.ts b/packages/cli/src/license/license.service.ts index 6125ed813b..7d7af80444 100644 --- a/packages/cli/src/license/license.service.ts +++ b/packages/cli/src/license/license.service.ts @@ -4,7 +4,7 @@ import axios from 'axios'; import { Logger } from '@/logger'; import { License } from '@/license'; import { EventService } from '@/events/event.service'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { BadRequestError } from '@/errors/response-errors/bad-request.error'; import { UrlService } from '@/services/url.service'; diff --git a/packages/cli/src/mfa/mfa.service.ts b/packages/cli/src/mfa/mfa.service.ts index aa6fddb5a9..2e490ec127 100644 --- a/packages/cli/src/mfa/mfa.service.ts +++ b/packages/cli/src/mfa/mfa.service.ts @@ -1,7 +1,7 @@ import { v4 as uuid } from 'uuid'; import { Service } from 'typedi'; import { Cipher } from 'n8n-core'; -import { AuthUserRepository } from '@db/repositories/authUser.repository'; +import { AuthUserRepository } from '@/databases/repositories/auth-user.repository'; import { TOTPService } from './totp.service'; import { InvalidMfaCodeError } from '@/errors/response-errors/invalid-mfa-code.error'; diff --git a/packages/cli/src/permissions/check-access.ts b/packages/cli/src/permissions/check-access.ts index d3aa60b148..e5a93bc50a 100644 --- a/packages/cli/src/permissions/check-access.ts +++ b/packages/cli/src/permissions/check-access.ts @@ -3,8 +3,8 @@ import { Container } from 'typedi'; import { In } from '@n8n/typeorm'; import { RoleService } from '@/services/role.service'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { ProjectRepository } from '@db/repositories/project.repository'; import type { User } from '@/databases/entities/User'; import type { Scope } from '@n8n/permissions'; diff --git a/packages/cli/src/push/__tests__/index.test.ts b/packages/cli/src/push/__tests__/index.test.ts index a61496b0c9..2a7caab8b8 100644 --- a/packages/cli/src/push/__tests__/index.test.ts +++ b/packages/cli/src/push/__tests__/index.test.ts @@ -2,7 +2,7 @@ import type { WebSocket } from 'ws'; import { mock } from 'jest-mock-extended'; import config from '@/config'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { Push } from '@/push'; import { SSEPush } from '@/push/sse.push'; import { WebSocketPush } from '@/push/websocket.push'; diff --git a/packages/cli/src/requests.ts b/packages/cli/src/requests.ts index bae7990c1a..baa26fb04d 100644 --- a/packages/cli/src/requests.ts +++ b/packages/cli/src/requests.ts @@ -16,14 +16,14 @@ import { Expose } from 'class-transformer'; import { IsBoolean, IsEmail, IsIn, IsOptional, IsString, Length } from 'class-validator'; import { NoXss } from '@/validators/no-xss.validator'; import type { PublicUser, SecretsProvider, SecretsProviderState } from '@/Interfaces'; -import { AssignableRole } from '@db/entities/User'; -import type { GlobalRole, User } from '@db/entities/User'; -import type { Variables } from '@db/entities/Variables'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import type { WorkflowHistory } from '@db/entities/WorkflowHistory'; -import type { Project, ProjectType } from '@db/entities/Project'; -import type { ProjectRole } from './databases/entities/ProjectRelation'; +import { AssignableRole } from '@/databases/entities/User'; +import type { GlobalRole, User } from '@/databases/entities/User'; +import type { Variables } from '@/databases/entities/Variables'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import type { WorkflowHistory } from '@/databases/entities/workflow-history'; +import type { Project, ProjectType } from '@/databases/entities/project'; +import type { ProjectRole } from './databases/entities/project-relation'; import type { Scope } from '@n8n/permissions'; import type { ScopesField } from './services/role.service'; import type { AiAssistantSDK } from '@n8n_io/ai-assistant-sdk'; diff --git a/packages/cli/src/security-audit/risk-reporters/credentials-risk-reporter.ts b/packages/cli/src/security-audit/risk-reporters/credentials-risk-reporter.ts index 04d20199b6..11d76f2b89 100644 --- a/packages/cli/src/security-audit/risk-reporters/credentials-risk-reporter.ts +++ b/packages/cli/src/security-audit/risk-reporters/credentials-risk-reporter.ts @@ -3,10 +3,10 @@ import type { IWorkflowBase } from 'n8n-workflow'; import config from '@/config'; import { CREDENTIALS_REPORT } from '@/security-audit/constants'; import type { RiskReporter, Risk } from '@/security-audit/types'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; import { ExecutionRepository } from '@db/repositories/execution.repository'; -import { ExecutionDataRepository } from '@db/repositories/executionData.repository'; +import { ExecutionDataRepository } from '@/databases/repositories/execution-data.repository'; @Service() export class CredentialsRiskReporter implements RiskReporter { diff --git a/packages/cli/src/security-audit/risk-reporters/database-risk-reporter.ts b/packages/cli/src/security-audit/risk-reporters/database-risk-reporter.ts index 2632917f8f..9f5df0fb3d 100644 --- a/packages/cli/src/security-audit/risk-reporters/database-risk-reporter.ts +++ b/packages/cli/src/security-audit/risk-reporters/database-risk-reporter.ts @@ -5,7 +5,7 @@ import { DB_QUERY_PARAMS_DOCS_URL, SQL_NODE_TYPES_WITH_QUERY_PARAMS, } from '@/security-audit/constants'; -import type { WorkflowEntity as Workflow } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity as Workflow } from '@db/entities/workflow-entity'; import type { RiskReporter, Risk } from '@/security-audit/types'; import { Service } from 'typedi'; diff --git a/packages/cli/src/security-audit/risk-reporters/filesystem-risk-reporter.ts b/packages/cli/src/security-audit/risk-reporters/filesystem-risk-reporter.ts index f2cb5eb092..738e96813f 100644 --- a/packages/cli/src/security-audit/risk-reporters/filesystem-risk-reporter.ts +++ b/packages/cli/src/security-audit/risk-reporters/filesystem-risk-reporter.ts @@ -1,6 +1,6 @@ import { getNodeTypes } from '@/security-audit/utils'; import { FILESYSTEM_INTERACTION_NODE_TYPES, FILESYSTEM_REPORT } from '@/security-audit/constants'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import type { RiskReporter, Risk } from '@/security-audit/types'; import { Service } from 'typedi'; diff --git a/packages/cli/src/security-audit/risk-reporters/instance-risk-reporter.ts b/packages/cli/src/security-audit/risk-reporters/instance-risk-reporter.ts index 323d1173f0..9f6002ba98 100644 --- a/packages/cli/src/security-audit/risk-reporters/instance-risk-reporter.ts +++ b/packages/cli/src/security-audit/risk-reporters/instance-risk-reporter.ts @@ -11,7 +11,7 @@ import { WEBHOOK_VALIDATOR_NODE_TYPES, } from '@/security-audit/constants'; import { getN8nPackageJson, inDevelopment } from '@/constants'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import type { RiskReporter, Risk, n8n } from '@/security-audit/types'; import { isApiEnabled } from '@/PublicApi'; import { Logger } from '@/logger'; diff --git a/packages/cli/src/security-audit/risk-reporters/nodes-risk-reporter.ts b/packages/cli/src/security-audit/risk-reporters/nodes-risk-reporter.ts index 9bd7b58466..589d928b73 100644 --- a/packages/cli/src/security-audit/risk-reporters/nodes-risk-reporter.ts +++ b/packages/cli/src/security-audit/risk-reporters/nodes-risk-reporter.ts @@ -10,7 +10,7 @@ import { COMMUNITY_NODES_RISKS_URL, NPM_PACKAGE_URL, } from '@/security-audit/constants'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import type { Risk, RiskReporter } from '@/security-audit/types'; import { CommunityPackagesService } from '@/services/communityPackages.service'; import { GlobalConfig } from '@n8n/config'; diff --git a/packages/cli/src/security-audit/types.ts b/packages/cli/src/security-audit/types.ts index 131eb0616d..1e9a97bffd 100644 --- a/packages/cli/src/security-audit/types.ts +++ b/packages/cli/src/security-audit/types.ts @@ -1,4 +1,4 @@ -import type { WorkflowEntity as Workflow } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity as Workflow } from '@db/entities/workflow-entity'; export namespace Risk { export type Category = 'database' | 'credentials' | 'nodes' | 'instance' | 'filesystem'; diff --git a/packages/cli/src/security-audit/utils.ts b/packages/cli/src/security-audit/utils.ts index 14dd1ff9d1..4b3d30a77d 100644 --- a/packages/cli/src/security-audit/utils.ts +++ b/packages/cli/src/security-audit/utils.ts @@ -1,4 +1,4 @@ -import type { WorkflowEntity as Workflow } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity as Workflow } from '@db/entities/workflow-entity'; import type { Risk } from '@/security-audit/types'; type Node = Workflow['nodes'][number]; diff --git a/packages/cli/src/server.ts b/packages/cli/src/server.ts index 04faa431fe..a6d9bc648e 100644 --- a/packages/cli/src/server.ts +++ b/packages/cli/src/server.ts @@ -37,27 +37,27 @@ import type { FrontendService } from '@/services/frontend.service'; import { OrchestrationService } from '@/services/orchestration.service'; import { LogStreamingEventRelay } from '@/events/log-streaming-event-relay'; -import '@/controllers/activeWorkflows.controller'; +import '@/controllers/active-workflows.controller'; import '@/controllers/auth.controller'; -import '@/controllers/binaryData.controller'; +import '@/controllers/binary-data.controller'; import '@/controllers/curl.controller'; -import '@/controllers/aiAssistant.controller'; -import '@/controllers/dynamicNodeParameters.controller'; +import '@/controllers/ai-assistant.controller'; +import '@/controllers/dynamic-node-parameters.controller'; import '@/controllers/invitation.controller'; import '@/controllers/me.controller'; -import '@/controllers/nodeTypes.controller'; -import '@/controllers/oauth/oAuth1Credential.controller'; -import '@/controllers/oauth/oAuth2Credential.controller'; +import '@/controllers/node-types.controller'; +import '@/controllers/oauth/oauth1-credential.controller'; +import '@/controllers/oauth/oauth2-credential.controller'; import '@/controllers/orchestration.controller'; import '@/controllers/owner.controller'; -import '@/controllers/passwordReset.controller'; +import '@/controllers/password-reset.controller'; import '@/controllers/project.controller'; import '@/controllers/role.controller'; import '@/controllers/tags.controller'; import '@/controllers/translation.controller'; import '@/controllers/users.controller'; -import '@/controllers/userSettings.controller'; -import '@/controllers/workflowStatistics.controller'; +import '@/controllers/user-settings.controller'; +import '@/controllers/workflow-statistics.controller'; import '@/credentials/credentials.controller'; import '@/eventbus/eventBus.controller'; import '@/executions/executions.controller'; @@ -121,7 +121,7 @@ export class Server extends AbstractServer { } if (this.globalConfig.nodes.communityPackages.enabled) { - await import('@/controllers/communityPackages.controller'); + await import('@/controllers/community-packages.controller'); } if (inE2ETests) { diff --git a/packages/cli/src/services/__tests__/ExecutionMetadataService.test.ts b/packages/cli/src/services/__tests__/ExecutionMetadataService.test.ts index 8b77b8b168..144aeb23f1 100644 --- a/packages/cli/src/services/__tests__/ExecutionMetadataService.test.ts +++ b/packages/cli/src/services/__tests__/ExecutionMetadataService.test.ts @@ -1,5 +1,5 @@ import { Container } from 'typedi'; -import { ExecutionMetadataRepository } from '@db/repositories/executionMetadata.repository'; +import { ExecutionMetadataRepository } from '@/databases/repositories/execution-metadata.repository'; import { ExecutionMetadataService } from '@/services/executionMetadata.service'; import { mockInstance } from '@test/mocking'; diff --git a/packages/cli/src/services/__tests__/activeWorkflows.service.test.ts b/packages/cli/src/services/__tests__/activeWorkflows.service.test.ts index 6b008e281b..ac0050e372 100644 --- a/packages/cli/src/services/__tests__/activeWorkflows.service.test.ts +++ b/packages/cli/src/services/__tests__/activeWorkflows.service.test.ts @@ -1,11 +1,11 @@ import type { ActivationErrorsService } from '@/activation-errors.service'; -import type { User } from '@db/entities/User'; -import type { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import type { User } from '@/databases/entities/User'; +import type { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import type { WorkflowRepository } from '@db/repositories/workflow.repository'; import { ActiveWorkflowsService } from '@/services/activeWorkflows.service'; import { mock } from 'jest-mock-extended'; import { BadRequestError } from '@/errors/response-errors/bad-request.error'; -import { WorkflowEntity } from '@/databases/entities/WorkflowEntity'; +import { WorkflowEntity } from '@/databases/entities/workflow-entity'; describe('ActiveWorkflowsService', () => { const user = mock(); diff --git a/packages/cli/src/services/__tests__/communityPackages.service.test.ts b/packages/cli/src/services/__tests__/communityPackages.service.test.ts index 7b2431c172..99dfeb70c1 100644 --- a/packages/cli/src/services/__tests__/communityPackages.service.test.ts +++ b/packages/cli/src/services/__tests__/communityPackages.service.test.ts @@ -13,12 +13,12 @@ import { NPM_PACKAGE_STATUS_GOOD, RESPONSE_ERROR_MESSAGES, } from '@/constants'; -import { InstalledPackages } from '@db/entities/InstalledPackages'; +import { InstalledPackages } from '@/databases/entities/installed-packages'; import type { CommunityPackages } from '@/Interfaces'; import { CommunityPackagesService } from '@/services/communityPackages.service'; -import { InstalledNodesRepository } from '@db/repositories/installedNodes.repository'; -import { InstalledPackagesRepository } from '@db/repositories/installedPackages.repository'; -import { InstalledNodes } from '@db/entities/InstalledNodes'; +import { InstalledNodesRepository } from '@/databases/repositories/installed-nodes.repository'; +import { InstalledPackagesRepository } from '@/databases/repositories/installed-packages.repository'; +import { InstalledNodes } from '@/databases/entities/installed-nodes'; import type { LoadNodesAndCredentials } from '@/load-nodes-and-credentials'; import type { License } from '@/license'; diff --git a/packages/cli/src/services/__tests__/hooks.service.test.ts b/packages/cli/src/services/__tests__/hooks.service.test.ts index 061d087b85..04bf854b24 100644 --- a/packages/cli/src/services/__tests__/hooks.service.test.ts +++ b/packages/cli/src/services/__tests__/hooks.service.test.ts @@ -1,7 +1,7 @@ import type { Response } from 'express'; import { mock } from 'jest-mock-extended'; -import type { AuthUser } from '@db/entities/AuthUser'; +import type { AuthUser } from '@/databases/entities/auth-user'; import type { CredentialsRepository } from '@db/repositories/credentials.repository'; import type { SettingsRepository } from '@db/repositories/settings.repository'; import type { UserRepository } from '@db/repositories/user.repository'; @@ -11,7 +11,7 @@ import type { UserService } from '@/services/user.service'; import { HooksService } from '@/services/hooks.service'; import type { Invitation } from '@/Interfaces'; import type { AuthenticatedRequest } from '@/requests'; -import type { AuthUserRepository } from '@/databases/repositories/authUser.repository'; +import type { AuthUserRepository } from '@/databases/repositories/auth-user.repository'; import RudderStack from '@rudderstack/rudder-sdk-node'; jest.mock('@rudderstack/rudder-sdk-node'); diff --git a/packages/cli/src/services/__tests__/naming.service.test.ts b/packages/cli/src/services/__tests__/naming.service.test.ts index 1ca2167346..6b8702c05a 100644 --- a/packages/cli/src/services/__tests__/naming.service.test.ts +++ b/packages/cli/src/services/__tests__/naming.service.test.ts @@ -2,8 +2,8 @@ import { WorkflowRepository } from '@/databases/repositories/workflow.repository import { CredentialsRepository } from '@/databases/repositories/credentials.repository'; import { mockInstance } from '@test/mocking'; import { NamingService } from '@/services/naming.service'; -import type { WorkflowEntity } from '@/databases/entities/WorkflowEntity'; -import type { CredentialsEntity } from '@/databases/entities/CredentialsEntity'; +import type { WorkflowEntity } from '@/databases/entities/workflow-entity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; describe('NamingService', () => { const workflowRepository = mockInstance(WorkflowRepository); diff --git a/packages/cli/src/services/__tests__/ownership.service.test.ts b/packages/cli/src/services/__tests__/ownership.service.test.ts index 8a3d40eb60..8390b9b4d4 100644 --- a/packages/cli/src/services/__tests__/ownership.service.test.ts +++ b/packages/cli/src/services/__tests__/ownership.service.test.ts @@ -1,15 +1,15 @@ import { OwnershipService } from '@/services/ownership.service'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; -import { SharedWorkflow } from '@db/entities/SharedWorkflow'; -import { User } from '@db/entities/User'; -import type { SharedCredentials } from '@db/entities/SharedCredentials'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { SharedWorkflow } from '@/databases/entities/shared-workflow'; +import { User } from '@/databases/entities/User'; +import type { SharedCredentials } from '@/databases/entities/shared-credentials'; import { mockInstance } from '@test/mocking'; -import { WorkflowEntity } from '@/databases/entities/WorkflowEntity'; +import { WorkflowEntity } from '@/databases/entities/workflow-entity'; import { UserRepository } from '@/databases/repositories/user.repository'; import { mock } from 'jest-mock-extended'; -import { Project } from '@/databases/entities/Project'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; -import { ProjectRelation } from '@/databases/entities/ProjectRelation'; +import { Project } from '@/databases/entities/project'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; +import { ProjectRelation } from '@/databases/entities/project-relation'; import { mockCredential, mockProject } from '@test/mockObjects'; describe('OwnershipService', () => { diff --git a/packages/cli/src/services/__tests__/user.service.test.ts b/packages/cli/src/services/__tests__/user.service.test.ts index 5aeb919220..af9723cf69 100644 --- a/packages/cli/src/services/__tests__/user.service.test.ts +++ b/packages/cli/src/services/__tests__/user.service.test.ts @@ -1,7 +1,7 @@ import { mock } from 'jest-mock-extended'; import { v4 as uuid } from 'uuid'; -import { User } from '@db/entities/User'; +import { User } from '@/databases/entities/User'; import { UserService } from '@/services/user.service'; import { UrlService } from '@/services/url.service'; import { mockInstance } from '@test/mocking'; diff --git a/packages/cli/src/services/__tests__/workflow-statistics.service.test.ts b/packages/cli/src/services/__tests__/workflow-statistics.service.test.ts index b3cc6b7998..910dbb8fac 100644 --- a/packages/cli/src/services/__tests__/workflow-statistics.service.test.ts +++ b/packages/cli/src/services/__tests__/workflow-statistics.service.test.ts @@ -11,14 +11,14 @@ import { mocked } from 'jest-mock'; import { mock } from 'jest-mock-extended'; import config from '@/config'; -import type { User } from '@db/entities/User'; -import type { WorkflowStatistics } from '@db/entities/WorkflowStatistics'; -import { WorkflowStatisticsRepository } from '@db/repositories/workflowStatistics.repository'; +import type { User } from '@/databases/entities/User'; +import type { WorkflowStatistics } from '@/databases/entities/workflow-statistics'; +import { WorkflowStatisticsRepository } from '@/databases/repositories/workflow-statistics.repository'; import { WorkflowStatisticsService } from '@/services/workflow-statistics.service'; import { UserService } from '@/services/user.service'; import { OwnershipService } from '@/services/ownership.service'; import { mockInstance } from '@test/mocking'; -import type { Project } from '@/databases/entities/Project'; +import type { Project } from '@/databases/entities/project'; import type { EventService } from '@/events/event.service'; describe('WorkflowStatisticsService', () => { diff --git a/packages/cli/src/services/activeWorkflows.service.ts b/packages/cli/src/services/activeWorkflows.service.ts index c900795a3a..4b1652910b 100644 --- a/packages/cli/src/services/activeWorkflows.service.ts +++ b/packages/cli/src/services/activeWorkflows.service.ts @@ -1,7 +1,7 @@ import { Service } from 'typedi'; -import type { User } from '@db/entities/User'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import type { User } from '@/databases/entities/User'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { ActivationErrorsService } from '@/activation-errors.service'; import { BadRequestError } from '@/errors/response-errors/bad-request.error'; diff --git a/packages/cli/src/services/communityPackages.service.ts b/packages/cli/src/services/communityPackages.service.ts index bfe7f6fef8..2718454d4c 100644 --- a/packages/cli/src/services/communityPackages.service.ts +++ b/packages/cli/src/services/communityPackages.service.ts @@ -11,8 +11,8 @@ import { InstanceSettings } from 'n8n-core'; import type { PackageDirectoryLoader } from 'n8n-core'; import { toError } from '@/utils'; -import { InstalledPackagesRepository } from '@db/repositories/installedPackages.repository'; -import type { InstalledPackages } from '@db/entities/InstalledPackages'; +import { InstalledPackagesRepository } from '@/databases/repositories/installed-packages.repository'; +import type { InstalledPackages } from '@/databases/entities/installed-packages'; import { LICENSE_FEATURES, NODE_PACKAGE_PREFIX, diff --git a/packages/cli/src/services/credentials-tester.service.ts b/packages/cli/src/services/credentials-tester.service.ts index 4f3475d303..1ed47f98ae 100644 --- a/packages/cli/src/services/credentials-tester.service.ts +++ b/packages/cli/src/services/credentials-tester.service.ts @@ -35,7 +35,7 @@ import { } from 'n8n-workflow'; import * as WorkflowExecuteAdditionalData from '@/workflow-execute-additional-data'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { NodeTypes } from '@/node-types'; import { CredentialTypes } from '@/credential-types'; import { RESPONSE_ERROR_MESSAGES } from '../constants'; diff --git a/packages/cli/src/services/cta.service.ts b/packages/cli/src/services/cta.service.ts index e5c08a437b..6319cc7550 100644 --- a/packages/cli/src/services/cta.service.ts +++ b/packages/cli/src/services/cta.service.ts @@ -1,5 +1,5 @@ import { Service } from 'typedi'; -import { WorkflowStatisticsRepository } from '@/databases/repositories/workflowStatistics.repository'; +import { WorkflowStatisticsRepository } from '@/databases/repositories/workflow-statistics.repository'; import type { User } from '@/databases/entities/User'; @Service() diff --git a/packages/cli/src/services/executionMetadata.service.ts b/packages/cli/src/services/executionMetadata.service.ts index e249107d4e..c586766062 100644 --- a/packages/cli/src/services/executionMetadata.service.ts +++ b/packages/cli/src/services/executionMetadata.service.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; -import { ExecutionMetadataRepository } from '@db/repositories/executionMetadata.repository'; -import type { ExecutionMetadata } from '@db/entities/ExecutionMetadata'; +import { ExecutionMetadataRepository } from '@/databases/repositories/execution-metadata.repository'; +import type { ExecutionMetadata } from '@/databases/entities/execution-metadata'; @Service() export class ExecutionMetadataService { diff --git a/packages/cli/src/services/hooks.service.ts b/packages/cli/src/services/hooks.service.ts index 53be3e244e..fcef153632 100644 --- a/packages/cli/src/services/hooks.service.ts +++ b/packages/cli/src/services/hooks.service.ts @@ -5,16 +5,16 @@ import type { QueryDeepPartialEntity } from '@n8n/typeorm/query-builder/QueryPar import type { FindManyOptions, FindOneOptions, FindOptionsWhere } from '@n8n/typeorm'; import { AuthService } from '@/auth/auth.service'; -import type { AuthUser } from '@db/entities/AuthUser'; -import type { User } from '@db/entities/User'; +import type { AuthUser } from '@/databases/entities/auth-user'; +import type { User } from '@/databases/entities/User'; import { UserRepository } from '@db/repositories/user.repository'; import { SettingsRepository } from '@db/repositories/settings.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import { AuthUserRepository } from '@db/repositories/authUser.repository'; -import type { Settings } from '@db/entities/Settings'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import { AuthUserRepository } from '@/databases/repositories/auth-user.repository'; +import type { Settings } from '@/databases/entities/settings'; import { UserService } from '@/services/user.service'; import type { AuthenticatedRequest } from '@/requests'; import type { Invitation } from '@/Interfaces'; diff --git a/packages/cli/src/services/import.service.ts b/packages/cli/src/services/import.service.ts index 7cf4a6493c..5ca2bf63f2 100644 --- a/packages/cli/src/services/import.service.ts +++ b/packages/cli/src/services/import.service.ts @@ -6,12 +6,12 @@ import { Logger } from '@/logger'; import * as Db from '@/Db'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; import { TagRepository } from '@db/repositories/tag.repository'; -import { SharedWorkflow } from '@db/entities/SharedWorkflow'; +import { SharedWorkflow } from '@/databases/entities/shared-workflow'; import { replaceInvalidCredentials } from '@/workflow-helpers'; -import { Project } from '@db/entities/Project'; -import { WorkflowEntity } from '@db/entities/WorkflowEntity'; -import { WorkflowTagMapping } from '@db/entities/WorkflowTagMapping'; -import type { TagEntity } from '@db/entities/TagEntity'; +import { Project } from '@/databases/entities/project'; +import { WorkflowEntity } from '@db/entities/workflow-entity'; +import { WorkflowTagMapping } from '@/databases/entities/workflow-tag-mapping'; +import type { TagEntity } from '@/databases/entities/tag-entity'; import type { ICredentialsDb } from '@/Interfaces'; @Service() diff --git a/packages/cli/src/services/ownership.service.ts b/packages/cli/src/services/ownership.service.ts index bda4ddcc4b..00fbf32e29 100644 --- a/packages/cli/src/services/ownership.service.ts +++ b/packages/cli/src/services/ownership.service.ts @@ -1,12 +1,12 @@ import { Service } from 'typedi'; import { CacheService } from '@/services/cache/cache.service'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { UserRepository } from '@db/repositories/user.repository'; import type { ListQuery } from '@/requests'; -import type { Project } from '@/databases/entities/Project'; +import type { Project } from '@/databases/entities/project'; import { ProjectRepository } from '@/databases/repositories/project.repository'; import type { User } from '@/databases/entities/User'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; @Service() export class OwnershipService { diff --git a/packages/cli/src/services/project.service.ts b/packages/cli/src/services/project.service.ts index 6905019017..5c588682ea 100644 --- a/packages/cli/src/services/project.service.ts +++ b/packages/cli/src/services/project.service.ts @@ -1,9 +1,9 @@ -import { Project, type ProjectType } from '@/databases/entities/Project'; -import { ProjectRelation } from '@/databases/entities/ProjectRelation'; -import type { ProjectRole } from '@/databases/entities/ProjectRelation'; +import { Project, type ProjectType } from '@/databases/entities/project'; +import { ProjectRelation } from '@/databases/entities/project-relation'; +import type { ProjectRole } from '@/databases/entities/project-relation'; import type { User } from '@/databases/entities/User'; import { ProjectRepository } from '@/databases/repositories/project.repository'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import import type { FindOptionsWhere, EntityManager } from '@n8n/typeorm'; import Container, { Service } from 'typedi'; @@ -13,8 +13,8 @@ import { In, Not } from '@n8n/typeorm'; import { RoleService } from './role.service'; import { ForbiddenError } from '@/errors/response-errors/forbidden.error'; import { NotFoundError } from '@/errors/response-errors/not-found.error'; -import { SharedWorkflowRepository } from '@/databases/repositories/sharedWorkflow.repository'; -import { SharedCredentialsRepository } from '@/databases/repositories/sharedCredentials.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { BadRequestError } from '@/errors/response-errors/bad-request.error'; import { CacheService } from './cache/cache.service'; import { License } from '@/license'; diff --git a/packages/cli/src/services/role.service.ts b/packages/cli/src/services/role.service.ts index 02631b20f0..e4f43e1929 100644 --- a/packages/cli/src/services/role.service.ts +++ b/packages/cli/src/services/role.service.ts @@ -1,9 +1,9 @@ -import type { ProjectRelation, ProjectRole } from '@/databases/entities/ProjectRelation'; +import type { ProjectRelation, ProjectRole } from '@/databases/entities/project-relation'; import type { CredentialSharingRole, SharedCredentials, -} from '@/databases/entities/SharedCredentials'; -import type { SharedWorkflow, WorkflowSharingRole } from '@/databases/entities/SharedWorkflow'; +} from '@/databases/entities/shared-credentials'; +import type { SharedWorkflow, WorkflowSharingRole } from '@/databases/entities/shared-workflow'; import type { GlobalRole, User } from '@/databases/entities/User'; import { GLOBAL_ADMIN_SCOPES, @@ -27,7 +27,7 @@ import { combineScopes, type Resource, type Scope } from '@n8n/permissions'; import { Service } from 'typedi'; import { ApplicationError } from 'n8n-workflow'; import { License } from '@/license'; -import type { CredentialsEntity } from '@/databases/entities/CredentialsEntity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; export type RoleNamespace = 'global' | 'project' | 'credential' | 'workflow'; diff --git a/packages/cli/src/services/tag.service.ts b/packages/cli/src/services/tag.service.ts index 141749cbf8..2866b953ab 100644 --- a/packages/cli/src/services/tag.service.ts +++ b/packages/cli/src/services/tag.service.ts @@ -2,7 +2,7 @@ import { TagRepository } from '@db/repositories/tag.repository'; import { Service } from 'typedi'; import { validateEntity } from '@/generic-helpers'; import type { ITagWithCountDb } from '@/Interfaces'; -import type { TagEntity } from '@db/entities/TagEntity'; +import type { TagEntity } from '@/databases/entities/tag-entity'; import { ExternalHooks } from '@/external-hooks'; type GetAllResult = T extends { withUsageCount: true } ? ITagWithCountDb[] : TagEntity[]; diff --git a/packages/cli/src/services/user.service.ts b/packages/cli/src/services/user.service.ts index 28bbe3d8a2..fff4541979 100644 --- a/packages/cli/src/services/user.service.ts +++ b/packages/cli/src/services/user.service.ts @@ -2,7 +2,7 @@ import { Service } from 'typedi'; import type { IUserSettings } from 'n8n-workflow'; import { ApplicationError, ErrorReporterProxy as ErrorReporter } from 'n8n-workflow'; -import type { User, AssignableRole } from '@db/entities/User'; +import type { User, AssignableRole } from '@/databases/entities/User'; import { UserRepository } from '@db/repositories/user.repository'; import type { Invitation, PublicUser } from '@/Interfaces'; import type { PostHogClient } from '@/posthog'; diff --git a/packages/cli/src/services/userOnboarding.service.ts b/packages/cli/src/services/userOnboarding.service.ts index d95d37d1b3..2ab1de1672 100644 --- a/packages/cli/src/services/userOnboarding.service.ts +++ b/packages/cli/src/services/userOnboarding.service.ts @@ -2,8 +2,8 @@ import { Service } from 'typedi'; // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import import { In } from '@n8n/typeorm'; -import type { User } from '@db/entities/User'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import type { User } from '@/databases/entities/User'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { UserService } from '@/services/user.service'; diff --git a/packages/cli/src/services/workflow-statistics.service.ts b/packages/cli/src/services/workflow-statistics.service.ts index a58b6ffbbf..4c9e23a578 100644 --- a/packages/cli/src/services/workflow-statistics.service.ts +++ b/packages/cli/src/services/workflow-statistics.service.ts @@ -1,7 +1,7 @@ import { Service } from 'typedi'; import type { INode, IRun, IWorkflowBase } from 'n8n-workflow'; -import { StatisticsNames } from '@db/entities/WorkflowStatistics'; -import { WorkflowStatisticsRepository } from '@db/repositories/workflowStatistics.repository'; +import { StatisticsNames } from '@/databases/entities/workflow-statistics'; +import { WorkflowStatisticsRepository } from '@/databases/repositories/workflow-statistics.repository'; import { UserService } from '@/services/user.service'; import { Logger } from '@/logger'; import { OwnershipService } from './ownership.service'; diff --git a/packages/cli/src/sso/saml/__tests__/samlHelpers.test.ts b/packages/cli/src/sso/saml/__tests__/samlHelpers.test.ts index 17355524d3..e00d4b7d34 100644 --- a/packages/cli/src/sso/saml/__tests__/samlHelpers.test.ts +++ b/packages/cli/src/sso/saml/__tests__/samlHelpers.test.ts @@ -4,8 +4,8 @@ import * as helpers from '@/sso/saml/saml-helpers'; import type { SamlUserAttributes } from '@/sso/saml/types/saml-user-attributes'; import { mockInstance } from '@test/mocking'; import { UserRepository } from '@/databases/repositories/user.repository'; -import type { AuthIdentity } from '@/databases/entities/AuthIdentity'; -import { AuthIdentityRepository } from '@/databases/repositories/authIdentity.repository'; +import type { AuthIdentity } from '@/databases/entities/auth-identity'; +import { AuthIdentityRepository } from '@/databases/repositories/auth-identity.repository'; const userRepository = mockInstance(UserRepository); mockInstance(AuthIdentityRepository); diff --git a/packages/cli/src/sso/saml/saml-helpers.ts b/packages/cli/src/sso/saml/saml-helpers.ts index c2dec7637f..1a1be67320 100644 --- a/packages/cli/src/sso/saml/saml-helpers.ts +++ b/packages/cli/src/sso/saml/saml-helpers.ts @@ -3,10 +3,10 @@ import type { FlowResult } from 'samlify/types/src/flow'; import { randomString } from 'n8n-workflow'; import config from '@/config'; -import { AuthIdentity } from '@db/entities/AuthIdentity'; -import type { User } from '@db/entities/User'; +import { AuthIdentity } from '@/databases/entities/auth-identity'; +import type { User } from '@/databases/entities/User'; import { UserRepository } from '@db/repositories/user.repository'; -import { AuthIdentityRepository } from '@db/repositories/authIdentity.repository'; +import { AuthIdentityRepository } from '@db/repositories/auth-identity.repository'; import { InternalServerError } from '@/errors/response-errors/internal-server.error'; import { AuthError } from '@/errors/response-errors/auth.error'; import { License } from '@/license'; diff --git a/packages/cli/src/sso/saml/saml.service.ee.ts b/packages/cli/src/sso/saml/saml.service.ee.ts index a9411535cc..e4b44b154b 100644 --- a/packages/cli/src/sso/saml/saml.service.ee.ts +++ b/packages/cli/src/sso/saml/saml.service.ee.ts @@ -1,6 +1,6 @@ import type express from 'express'; import Container, { Service } from 'typedi'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { ApplicationError, jsonParse } from 'n8n-workflow'; import { getServiceProviderInstance } from './service-provider.ee'; import type { SamlUserAttributes } from './types/saml-user-attributes'; @@ -19,7 +19,7 @@ import { setSamlLoginLabel, updateUserFromSamlAttributes, } from './saml-helpers'; -import type { Settings } from '@db/entities/Settings'; +import type { Settings } from '@/databases/entities/settings'; import axios from 'axios'; import https from 'https'; import type { SamlLoginBinding } from './types'; diff --git a/packages/cli/src/sso/sso-helpers.ts b/packages/cli/src/sso/sso-helpers.ts index 7a0b2b140e..e37ac32ca1 100644 --- a/packages/cli/src/sso/sso-helpers.ts +++ b/packages/cli/src/sso/sso-helpers.ts @@ -1,6 +1,6 @@ import config from '@/config'; import { SettingsRepository } from '@db/repositories/settings.repository'; -import type { AuthProviderType } from '@db/entities/AuthIdentity'; +import type { AuthProviderType } from '@/databases/entities/auth-identity'; import Container from 'typedi'; /** diff --git a/packages/cli/src/subworkflows/__tests__/subworkflow-policy-checker.test.ts b/packages/cli/src/subworkflows/__tests__/subworkflow-policy-checker.test.ts index d4d58051a0..72e5fc01b0 100644 --- a/packages/cli/src/subworkflows/__tests__/subworkflow-policy-checker.test.ts +++ b/packages/cli/src/subworkflows/__tests__/subworkflow-policy-checker.test.ts @@ -1,14 +1,14 @@ import { v4 as uuid } from 'uuid'; import type { Workflow } from 'n8n-workflow'; import { SubworkflowOperationError } from 'n8n-workflow'; -import { Project } from '@/databases/entities/Project'; +import { Project } from '@/databases/entities/project'; import { OwnershipService } from '@/services/ownership.service'; import { mockInstance } from '@test/mocking'; import config from '@/config'; import { mock } from 'jest-mock-extended'; import { SubworkflowPolicyChecker } from '../subworkflow-policy-checker.service'; -import type { WorkflowEntity } from '@/databases/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@/databases/entities/workflow-entity'; import type { License } from '@/license'; import type { GlobalConfig } from '@n8n/config'; diff --git a/packages/cli/src/telemetry/index.ts b/packages/cli/src/telemetry/index.ts index 15ed348fa9..8ea072f7e2 100644 --- a/packages/cli/src/telemetry/index.ts +++ b/packages/cli/src/telemetry/index.ts @@ -14,7 +14,7 @@ import { WorkflowRepository } from '@db/repositories/workflow.repository'; 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'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; import { OnShutdown } from '@/decorators/on-shutdown'; type ExecutionTrackDataKey = 'manual_error' | 'manual_success' | 'prod_error' | 'prod_success'; diff --git a/packages/cli/src/user-management/email/user-management-mailer.ts b/packages/cli/src/user-management/email/user-management-mailer.ts index 0c5e021d94..e73d22a203 100644 --- a/packages/cli/src/user-management/email/user-management-mailer.ts +++ b/packages/cli/src/user-management/email/user-management-mailer.ts @@ -5,8 +5,8 @@ import Handlebars from 'handlebars'; import { join as pathJoin } from 'path'; import { GlobalConfig } from '@n8n/config'; -import type { User } from '@db/entities/User'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { User } from '@/databases/entities/User'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import { UserRepository } from '@db/repositories/user.repository'; import { Logger } from '@/logger'; import { UrlService } from '@/services/url.service'; diff --git a/packages/cli/src/user-management/permission-checker.ts b/packages/cli/src/user-management/permission-checker.ts index f8759a4163..965b3786a3 100644 --- a/packages/cli/src/user-management/permission-checker.ts +++ b/packages/cli/src/user-management/permission-checker.ts @@ -3,7 +3,7 @@ import type { INode } from 'n8n-workflow'; import { CredentialAccessError, NodeOperationError } from 'n8n-workflow'; import { OwnershipService } from '@/services/ownership.service'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { ProjectService } from '@/services/project.service'; @Service() diff --git a/packages/cli/src/webhooks/__tests__/webhook.service.test.ts b/packages/cli/src/webhooks/__tests__/webhook.service.test.ts index 5a8e19e84c..878c7bdaf1 100644 --- a/packages/cli/src/webhooks/__tests__/webhook.service.test.ts +++ b/packages/cli/src/webhooks/__tests__/webhook.service.test.ts @@ -3,7 +3,7 @@ import config from '@/config'; import { WebhookRepository } from '@db/repositories/webhook.repository'; import { CacheService } from '@/services/cache/cache.service'; import { WebhookService } from '@/webhooks/webhook.service'; -import { WebhookEntity } from '@db/entities/WebhookEntity'; +import { WebhookEntity } from '@/databases/entities/webhook-entity'; import { mockInstance } from '@test/mocking'; const createWebhook = (method: string, path: string, webhookId?: string, pathSegments?: number) => diff --git a/packages/cli/src/webhooks/webhook-helpers.ts b/packages/cli/src/webhooks/webhook-helpers.ts index 725f0339a1..81104b64cd 100644 --- a/packages/cli/src/webhooks/webhook-helpers.ts +++ b/packages/cli/src/webhooks/webhook-helpers.ts @@ -52,7 +52,7 @@ import { Logger } from '@/logger'; import { NotFoundError } from '@/errors/response-errors/not-found.error'; import { InternalServerError } from '@/errors/response-errors/internal-server.error'; import { UnprocessableRequestError } from '@/errors/response-errors/unprocessable.error'; -import type { Project } from '@/databases/entities/Project'; +import type { Project } from '@/databases/entities/project'; import type { IExecutionDb, IWorkflowDb, IWorkflowExecutionDataProcess } from '@/Interfaces'; /** diff --git a/packages/cli/src/webhooks/webhook.service.ts b/packages/cli/src/webhooks/webhook.service.ts index 9840d90dec..67a9ce4f36 100644 --- a/packages/cli/src/webhooks/webhook.service.ts +++ b/packages/cli/src/webhooks/webhook.service.ts @@ -1,7 +1,7 @@ import { WebhookRepository } from '@db/repositories/webhook.repository'; import { Service } from 'typedi'; import { CacheService } from '@/services/cache/cache.service'; -import type { WebhookEntity } from '@db/entities/WebhookEntity'; +import type { WebhookEntity } from '@/databases/entities/webhook-entity'; import type { IHttpRequestMethods } from 'n8n-workflow'; type Method = NonNullable; diff --git a/packages/cli/src/workflow-helpers.ts b/packages/cli/src/workflow-helpers.ts index f78e9ee109..b8d9ee0a07 100644 --- a/packages/cli/src/workflow-helpers.ts +++ b/packages/cli/src/workflow-helpers.ts @@ -14,7 +14,7 @@ import type { } from 'n8n-workflow'; import type { IWorkflowExecutionDataProcess } from '@/Interfaces'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; import { VariablesService } from '@/environments/variables/variables.service.ee'; diff --git a/packages/cli/src/workflows/__tests__/workflow-execution.service.test.ts b/packages/cli/src/workflows/__tests__/workflow-execution.service.test.ts index b56cbffbbd..58d5fa5908 100644 --- a/packages/cli/src/workflows/__tests__/workflow-execution.service.test.ts +++ b/packages/cli/src/workflows/__tests__/workflow-execution.service.test.ts @@ -1,7 +1,7 @@ import type { INode } from 'n8n-workflow'; import { mock } from 'jest-mock-extended'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import type { IWorkflowDb } from '@/Interfaces'; import { WorkflowExecutionService } from '@/workflows/workflow-execution.service'; import type { WorkflowRunner } from '@/workflow-runner'; diff --git a/packages/cli/src/workflows/workflow-execution.service.ts b/packages/cli/src/workflows/workflow-execution.service.ts index 3611684ef1..11c4ecea03 100644 --- a/packages/cli/src/workflows/workflow-execution.service.ts +++ b/packages/cli/src/workflows/workflow-execution.service.ts @@ -16,7 +16,7 @@ import { ErrorReporterProxy as ErrorReporter, } from 'n8n-workflow'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { ExecutionRepository } from '@db/repositories/execution.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import * as WorkflowHelpers from '@/workflow-helpers'; @@ -32,7 +32,7 @@ import { WorkflowRunner } from '@/workflow-runner'; import * as WorkflowExecuteAdditionalData from '@/workflow-execute-additional-data'; import { TestWebhooks } from '@/webhooks/test-webhooks'; import { Logger } from '@/logger'; -import type { Project } from '@/databases/entities/Project'; +import type { Project } from '@/databases/entities/project'; import { GlobalConfig } from '@n8n/config'; import { SubworkflowPolicyChecker } from '@/subworkflows/subworkflow-policy-checker.service'; diff --git a/packages/cli/src/workflows/workflow-history/__tests__/workflow-history.service.ee.test.ts b/packages/cli/src/workflows/workflow-history/__tests__/workflow-history.service.ee.test.ts index 0417908d1c..a18291c778 100644 --- a/packages/cli/src/workflows/workflow-history/__tests__/workflow-history.service.ee.test.ts +++ b/packages/cli/src/workflows/workflow-history/__tests__/workflow-history.service.ee.test.ts @@ -1,7 +1,7 @@ import { mockClear } from 'jest-mock-extended'; -import { User } from '@db/entities/User'; -import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { User } from '@/databases/entities/User'; +import { WorkflowHistoryRepository } from '@db/repositories/workflow-history.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { WorkflowHistoryService } from '@/workflows/workflow-history/workflow-history.service.ee'; import { Logger } from '@/logger'; import { mockInstance } from '@test/mocking'; diff --git a/packages/cli/src/workflows/workflow-history/workflow-history-manager.ee.ts b/packages/cli/src/workflows/workflow-history/workflow-history-manager.ee.ts index d6eb214d8c..d692b08684 100644 --- a/packages/cli/src/workflows/workflow-history/workflow-history-manager.ee.ts +++ b/packages/cli/src/workflows/workflow-history/workflow-history-manager.ee.ts @@ -1,6 +1,6 @@ import { Service } from 'typedi'; import { DateTime } from 'luxon'; -import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository'; +import { WorkflowHistoryRepository } from '@db/repositories/workflow-history.repository'; import { WORKFLOW_HISTORY_PRUNE_INTERVAL } from './constants'; import { getWorkflowHistoryPruneTime, diff --git a/packages/cli/src/workflows/workflow-history/workflow-history.service.ee.ts b/packages/cli/src/workflows/workflow-history/workflow-history.service.ee.ts index 55cb085f42..644763ddc2 100644 --- a/packages/cli/src/workflows/workflow-history/workflow-history.service.ee.ts +++ b/packages/cli/src/workflows/workflow-history/workflow-history.service.ee.ts @@ -1,8 +1,8 @@ -import type { User } from '@db/entities/User'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; -import type { WorkflowHistory } from '@db/entities/WorkflowHistory'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; -import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository'; +import type { User } from '@/databases/entities/User'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; +import type { WorkflowHistory } from '@/databases/entities/workflow-history'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { WorkflowHistoryRepository } from '@db/repositories/workflow-history.repository'; import { Service } from 'typedi'; import { isWorkflowHistoryEnabled } from './workflow-history-helper.ee'; import { Logger } from '@/logger'; diff --git a/packages/cli/src/workflows/workflow-sharing.service.ts b/packages/cli/src/workflows/workflow-sharing.service.ts index 111e50b581..7a7c4a2caa 100644 --- a/packages/cli/src/workflows/workflow-sharing.service.ts +++ b/packages/cli/src/workflows/workflow-sharing.service.ts @@ -2,13 +2,13 @@ import { Service } from 'typedi'; // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import import { In } from '@n8n/typeorm'; -import type { User } from '@db/entities/User'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import type { User } from '@/databases/entities/User'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { RoleService } from '@/services/role.service'; import type { Scope } from '@n8n/permissions'; -import type { ProjectRole } from '@/databases/entities/ProjectRelation'; -import type { WorkflowSharingRole } from '@/databases/entities/SharedWorkflow'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import type { ProjectRole } from '@/databases/entities/project-relation'; +import type { WorkflowSharingRole } from '@/databases/entities/shared-workflow'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; @Service() export class WorkflowSharingService { diff --git a/packages/cli/src/workflows/workflow.service.ee.ts b/packages/cli/src/workflows/workflow.service.ee.ts index e3aae3a4e9..6f16753093 100644 --- a/packages/cli/src/workflows/workflow.service.ee.ts +++ b/packages/cli/src/workflows/workflow.service.ee.ts @@ -2,12 +2,12 @@ import { Service } from 'typedi'; import omit from 'lodash/omit'; import { ApplicationError, NodeOperationError, WorkflowActivationError } from 'n8n-workflow'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import type { User } from '@db/entities/User'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import type { User } from '@/databases/entities/User'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { CredentialsService } from '@/credentials/credentials.service'; import { BadRequestError } from '@/errors/response-errors/bad-request.error'; import { NotFoundError } from '@/errors/response-errors/not-found.error'; @@ -19,11 +19,11 @@ import type { import { OwnershipService } from '@/services/ownership.service'; // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import import { In, type EntityManager } from '@n8n/typeorm'; -import { Project } from '@/databases/entities/Project'; +import { Project } from '@/databases/entities/project'; import { ProjectService } from '@/services/project.service'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; import { TransferWorkflowError } from '@/errors/response-errors/transfer-workflow.error'; -import { SharedWorkflow } from '@/databases/entities/SharedWorkflow'; +import { SharedWorkflow } from '@/databases/entities/shared-workflow'; @Service() export class EnterpriseWorkflowService { diff --git a/packages/cli/src/workflows/workflow.service.ts b/packages/cli/src/workflows/workflow.service.ts index fb0619726f..ffc62c82ff 100644 --- a/packages/cli/src/workflows/workflow.service.ts +++ b/packages/cli/src/workflows/workflow.service.ts @@ -6,10 +6,10 @@ import { v4 as uuid } from 'uuid'; import { BinaryDataService } from 'n8n-core'; import config from '@/config'; -import type { User } from '@db/entities/User'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; -import { WorkflowTagMappingRepository } from '@db/repositories/workflowTagMapping.repository'; +import type { User } from '@/databases/entities/User'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { WorkflowTagMappingRepository } from '@/databases/repositories/workflow-tag-mapping.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; import * as WorkflowHelpers from '@/workflow-helpers'; @@ -32,7 +32,7 @@ import type { Scope } from '@n8n/permissions'; import type { EntityManager } from '@n8n/typeorm'; // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import import { In } from '@n8n/typeorm'; -import { SharedWorkflow } from '@/databases/entities/SharedWorkflow'; +import { SharedWorkflow } from '@/databases/entities/shared-workflow'; import { EventService } from '@/events/event.service'; @Service() diff --git a/packages/cli/src/workflows/workflows.controller.ts b/packages/cli/src/workflows/workflows.controller.ts index 821bddd295..a9265ba4dc 100644 --- a/packages/cli/src/workflows/workflows.controller.ts +++ b/packages/cli/src/workflows/workflows.controller.ts @@ -8,9 +8,9 @@ import * as WorkflowHelpers from '@/workflow-helpers'; import type { IWorkflowResponse } from '@/Interfaces'; import config from '@/config'; import { Delete, Get, Patch, Post, ProjectScope, Put, RestController } from '@/decorators'; -import { SharedWorkflow } from '@db/entities/SharedWorkflow'; -import { WorkflowEntity } from '@db/entities/WorkflowEntity'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { SharedWorkflow } from '@/databases/entities/shared-workflow'; +import { WorkflowEntity } from '@db/entities/workflow-entity'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { TagRepository } from '@db/repositories/tag.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { validateEntity } from '@/generic-helpers'; @@ -38,8 +38,8 @@ import { ProjectService } from '@/services/project.service'; import { ApplicationError } from 'n8n-workflow'; // eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import import { In, type FindOptionsRelations } from '@n8n/typeorm'; -import type { Project } from '@/databases/entities/Project'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import type { Project } from '@/databases/entities/project'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; import { z } from 'zod'; import { EventService } from '@/events/event.service'; import { GlobalConfig } from '@n8n/config'; diff --git a/packages/cli/src/workflows/workflows.types.ts b/packages/cli/src/workflows/workflows.types.ts index f8c7d81773..9ab870e90b 100644 --- a/packages/cli/src/workflows/workflows.types.ts +++ b/packages/cli/src/workflows/workflows.types.ts @@ -1,5 +1,5 @@ -import type { SharedWorkflow } from '@db/entities/SharedWorkflow'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { SharedWorkflow } from '@/databases/entities/shared-workflow'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import type { SlimProject } from '@/requests'; export interface WorkflowWithSharingsAndCredentials extends Omit { diff --git a/packages/cli/test/integration/active-workflow-manager.test.ts b/packages/cli/test/integration/active-workflow-manager.test.ts index 39d6c3b272..28752e8f0d 100644 --- a/packages/cli/test/integration/active-workflow-manager.test.ts +++ b/packages/cli/test/integration/active-workflow-manager.test.ts @@ -11,7 +11,7 @@ import { SecretsHelper } from '@/secrets-helpers'; import { WebhookService } from '@/webhooks/webhook.service'; import * as WebhookHelpers from '@/webhooks/webhook-helpers'; import * as AdditionalData from '@/workflow-execute-additional-data'; -import type { WebhookEntity } from '@db/entities/WebhookEntity'; +import type { WebhookEntity } from '@/databases/entities/webhook-entity'; import { NodeTypes } from '@/node-types'; import { ExecutionService } from '@/executions/execution.service'; import { WorkflowService } from '@/workflows/workflow.service'; @@ -21,7 +21,7 @@ import * as testDb from './shared/testDb'; import { createOwner } from './shared/db/users'; import { createWorkflow } from './shared/db/workflows'; import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials'; -import type { WorkflowEntity } from '@/databases/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@/databases/entities/workflow-entity'; mockInstance(ActiveExecutions); mockInstance(Push); diff --git a/packages/cli/test/integration/auth.api.test.ts b/packages/cli/test/integration/auth.api.test.ts index d56a1004ed..3624355d70 100644 --- a/packages/cli/test/integration/auth.api.test.ts +++ b/packages/cli/test/integration/auth.api.test.ts @@ -3,7 +3,7 @@ import validator from 'validator'; import config from '@/config'; import { AUTH_COOKIE_NAME } from '@/constants'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { UserRepository } from '@db/repositories/user.repository'; import { MfaService } from '@/mfa/mfa.service'; diff --git a/packages/cli/test/integration/commands/ldap/reset.test.ts b/packages/cli/test/integration/commands/ldap/reset.test.ts index 52350733ca..e1f73831aa 100644 --- a/packages/cli/test/integration/commands/ldap/reset.test.ts +++ b/packages/cli/test/integration/commands/ldap/reset.test.ts @@ -6,8 +6,8 @@ import { Reset } from '@/commands/ldap/reset'; import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { getLdapSynchronizations, saveLdapSynchronization } from '@/ldap/helpers.ee'; import { LdapService } from '@/ldap/ldap.service.ee'; import { Push } from '@/push'; diff --git a/packages/cli/test/integration/commands/reset.cmd.test.ts b/packages/cli/test/integration/commands/reset.cmd.test.ts index 73bb7877fe..dd5d0c216c 100644 --- a/packages/cli/test/integration/commands/reset.cmd.test.ts +++ b/packages/cli/test/integration/commands/reset.cmd.test.ts @@ -3,10 +3,10 @@ import { Container } from 'typedi'; import { Reset } from '@/commands/user-management/reset'; import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials'; import { NodeTypes } from '@/node-types'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { CredentialsEntity } from '@db/entities/CredentialsEntity'; +import { CredentialsEntity } from '@/databases/entities/credentials-entity'; import { SettingsRepository } from '@db/repositories/settings.repository'; import { UserRepository } from '@db/repositories/user.repository'; diff --git a/packages/cli/test/integration/community-packages.api.test.ts b/packages/cli/test/integration/community-packages.api.test.ts index ff935a2c5b..78b03c1396 100644 --- a/packages/cli/test/integration/community-packages.api.test.ts +++ b/packages/cli/test/integration/community-packages.api.test.ts @@ -1,7 +1,7 @@ import path from 'path'; -import type { InstalledPackages } from '@db/entities/InstalledPackages'; -import type { InstalledNodes } from '@db/entities/InstalledNodes'; +import type { InstalledPackages } from '@/databases/entities/installed-packages'; +import type { InstalledNodes } from '@/databases/entities/installed-nodes'; import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials'; import { CommunityPackagesService } from '@/services/communityPackages.service'; diff --git a/packages/cli/test/integration/controllers/invitation/invitation.controller.integration.test.ts b/packages/cli/test/integration/controllers/invitation/invitation.controller.integration.test.ts index 3f7e55f866..99d981a2d8 100644 --- a/packages/cli/test/integration/controllers/invitation/invitation.controller.integration.test.ts +++ b/packages/cli/test/integration/controllers/invitation/invitation.controller.integration.test.ts @@ -24,7 +24,7 @@ import { import type { User } from '@/databases/entities/User'; import type { UserInvitationResult } from '../../shared/utils/users'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; describe('InvitationController', () => { const mailer = mockInstance(UserManagementMailer); diff --git a/packages/cli/test/integration/controllers/oauth/oauth2.api.test.ts b/packages/cli/test/integration/controllers/oauth/oauth2.api.test.ts index 46ce3b89a9..1d7648052a 100644 --- a/packages/cli/test/integration/controllers/oauth/oauth2.api.test.ts +++ b/packages/cli/test/integration/controllers/oauth/oauth2.api.test.ts @@ -3,10 +3,10 @@ import { response as Response } from 'express'; import nock from 'nock'; import { parse as parseQs } from 'querystring'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import type { User } from '@db/entities/User'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import type { User } from '@/databases/entities/User'; import { CredentialsHelper } from '@/credentials-helper'; -import { OAuth2CredentialController } from '@/controllers/oauth/oAuth2Credential.controller'; +import { OAuth2CredentialController } from '@/controllers/oauth/oauth2-credential.controller'; import { createOwner } from '@test-integration/db/users'; import { saveCredential } from '@test-integration/db/credentials'; diff --git a/packages/cli/test/integration/credentials/credentials.api.ee.test.ts b/packages/cli/test/integration/credentials/credentials.api.ee.test.ts index 18f45a518b..3207ba4286 100644 --- a/packages/cli/test/integration/credentials/credentials.api.ee.test.ts +++ b/packages/cli/test/integration/credentials/credentials.api.ee.test.ts @@ -3,10 +3,10 @@ import { In } from '@n8n/typeorm'; import config from '@/config'; import type { ListQuery } from '@/requests'; -import type { User } from '@db/entities/User'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import type { User } from '@/databases/entities/User'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { ProjectRepository } from '@db/repositories/project.repository'; -import type { Project } from '@db/entities/Project'; +import type { Project } from '@/databases/entities/project'; import { ProjectService } from '@/services/project.service'; import { UserManagementMailer } from '@/user-management/email'; diff --git a/packages/cli/test/integration/credentials/credentials.api.test.ts b/packages/cli/test/integration/credentials/credentials.api.test.ts index cd461b3daf..5eab07208b 100644 --- a/packages/cli/test/integration/credentials/credentials.api.test.ts +++ b/packages/cli/test/integration/credentials/credentials.api.test.ts @@ -5,11 +5,11 @@ import { Credentials } from 'n8n-core'; import { randomString } from 'n8n-workflow'; import type { ListQuery } from '@/requests'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { ProjectRepository } from '@db/repositories/project.repository'; -import type { Project } from '@db/entities/Project'; +import type { Project } from '@/databases/entities/project'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import * as testDb from '../shared/testDb'; import { setupTestServer } from '../shared/utils'; diff --git a/packages/cli/test/integration/credentials/credentials.service.test.ts b/packages/cli/test/integration/credentials/credentials.service.test.ts index 827ec5fdba..6b2ee33386 100644 --- a/packages/cli/test/integration/credentials/credentials.service.test.ts +++ b/packages/cli/test/integration/credentials/credentials.service.test.ts @@ -1,9 +1,9 @@ import type { User } from '@/databases/entities/User'; -import type { CredentialsEntity } from '@/databases/entities/CredentialsEntity'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; import { saveCredential, shareCredentialWithUsers } from '../shared/db/credentials'; import { createMember } from '../shared/db/users'; import { randomCredentialPayload } from '../shared/random'; -import { SharedCredentialsRepository } from '@/databases/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import Container from 'typedi'; import { CredentialsService } from '@/credentials/credentials.service'; import * as testDb from '../shared/testDb'; diff --git a/packages/cli/test/integration/cta.service.test.ts b/packages/cli/test/integration/cta.service.test.ts index 27cdc7b604..2b29d9f304 100644 --- a/packages/cli/test/integration/cta.service.test.ts +++ b/packages/cli/test/integration/cta.service.test.ts @@ -5,7 +5,7 @@ import { createUser } from './shared/db/users'; import { createManyWorkflows } from './shared/db/workflows'; import type { User } from '@/databases/entities/User'; import { createWorkflowStatisticsItem } from './shared/db/workflowStatistics'; -import { StatisticsNames } from '@/databases/entities/WorkflowStatistics'; +import { StatisticsNames } from '@/databases/entities/workflow-statistics'; describe('CtaService', () => { let ctaService: CtaService; diff --git a/packages/cli/test/integration/database/repositories/execution.repository.test.ts b/packages/cli/test/integration/database/repositories/execution.repository.test.ts index cfb897d627..3c34ae1027 100644 --- a/packages/cli/test/integration/database/repositories/execution.repository.test.ts +++ b/packages/cli/test/integration/database/repositories/execution.repository.test.ts @@ -1,6 +1,6 @@ import Container from 'typedi'; import { ExecutionRepository } from '@db/repositories/execution.repository'; -import { ExecutionDataRepository } from '@db/repositories/executionData.repository'; +import { ExecutionDataRepository } from '@/databases/repositories/execution-data.repository'; import * as testDb from '../../shared/testDb'; import { createWorkflow } from '../../shared/db/workflows'; diff --git a/packages/cli/test/integration/database/repositories/project.repository.test.ts b/packages/cli/test/integration/database/repositories/project.repository.test.ts index 449277adba..7c94273ac6 100644 --- a/packages/cli/test/integration/database/repositories/project.repository.test.ts +++ b/packages/cli/test/integration/database/repositories/project.repository.test.ts @@ -4,7 +4,7 @@ import * as testDb from '../../shared/testDb'; import { ProjectRepository } from '@/databases/repositories/project.repository'; import { EntityNotFoundError } from '@n8n/typeorm'; import { createTeamProject } from '../../shared/db/projects'; -import { AuthIdentity } from '@/databases/entities/AuthIdentity'; +import { AuthIdentity } from '@/databases/entities/auth-identity'; import { UserRepository } from '@/databases/repositories/user.repository'; describe('ProjectRepository', () => { diff --git a/packages/cli/test/integration/debug.controller.test.ts b/packages/cli/test/integration/debug.controller.test.ts index a85eb57705..09ffe280ec 100644 --- a/packages/cli/test/integration/debug.controller.test.ts +++ b/packages/cli/test/integration/debug.controller.test.ts @@ -1,7 +1,7 @@ import { WorkflowRepository } from '@/databases/repositories/workflow.repository'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; import { generateNanoId } from '@/databases/utils/generators'; -import type { WorkflowEntity } from '@/databases/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@/databases/entities/workflow-entity'; import { OrchestrationService } from '@/services/orchestration.service'; import { MultiMainSetup } from '@/services/orchestration/main/MultiMainSetup.ee'; diff --git a/packages/cli/test/integration/environments/SourceControl.test.ts b/packages/cli/test/integration/environments/SourceControl.test.ts index 5bb5d8089b..a5537459a0 100644 --- a/packages/cli/test/integration/environments/SourceControl.test.ts +++ b/packages/cli/test/integration/environments/SourceControl.test.ts @@ -1,6 +1,6 @@ import { Container } from 'typedi'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import config from '@/config'; import { SourceControlPreferencesService } from '@/environments/source-control/source-control-preferences.service.ee'; import { SourceControlService } from '@/environments/source-control/source-control.service.ee'; 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 56ba90cddc..1d61943745 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 @@ -9,7 +9,7 @@ import type { InstanceSettings } from 'n8n-core'; import * as testDb from '../shared/testDb'; 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 { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { mockInstance } from '../../shared/mocking'; import type { SourceControlledFile } from '@/environments/source-control/types/source-controlled-file'; import type { ExportableCredential } from '@/environments/source-control/types/exportable-credential'; diff --git a/packages/cli/test/integration/eventbus.ee.test.ts b/packages/cli/test/integration/eventbus.ee.test.ts index 9146b8b87c..ec4786b068 100644 --- a/packages/cli/test/integration/eventbus.ee.test.ts +++ b/packages/cli/test/integration/eventbus.ee.test.ts @@ -13,7 +13,7 @@ import { defaultMessageEventBusDestinationWebhookOptions, } from 'n8n-workflow'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; 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'; diff --git a/packages/cli/test/integration/eventbus.test.ts b/packages/cli/test/integration/eventbus.test.ts index 3b36222ec2..05019966e6 100644 --- a/packages/cli/test/integration/eventbus.test.ts +++ b/packages/cli/test/integration/eventbus.test.ts @@ -1,4 +1,4 @@ -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { ExecutionRecoveryService } from '@/executions/execution-recovery.service'; diff --git a/packages/cli/test/integration/execution.service.integration.test.ts b/packages/cli/test/integration/execution.service.integration.test.ts index 41dcec3ce6..18f2df542a 100644 --- a/packages/cli/test/integration/execution.service.integration.test.ts +++ b/packages/cli/test/integration/execution.service.integration.test.ts @@ -7,7 +7,7 @@ import { createExecution } from './shared/db/executions'; import * as testDb from './shared/testDb'; import { WorkflowRepository } from '@/databases/repositories/workflow.repository'; import type { ExecutionSummaries } from '@/executions/execution.types'; -import { ExecutionMetadataRepository } from '@/databases/repositories/executionMetadata.repository'; +import { ExecutionMetadataRepository } from '@/databases/repositories/execution-metadata.repository'; describe('ExecutionService', () => { let executionService: ExecutionService; diff --git a/packages/cli/test/integration/executions.controller.test.ts b/packages/cli/test/integration/executions.controller.test.ts index 4c20f7244c..9f9895a9d3 100644 --- a/packages/cli/test/integration/executions.controller.test.ts +++ b/packages/cli/test/integration/executions.controller.test.ts @@ -1,4 +1,4 @@ -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { createSuccessfulExecution, getAllExecutions } from './shared/db/executions'; import { createMember, createOwner } from './shared/db/users'; diff --git a/packages/cli/test/integration/import.service.test.ts b/packages/cli/test/integration/import.service.test.ts index 99252bdab6..775edd9d01 100644 --- a/packages/cli/test/integration/import.service.test.ts +++ b/packages/cli/test/integration/import.service.test.ts @@ -6,9 +6,9 @@ import type { INode } from 'n8n-workflow'; import { CredentialsRepository } from '@/databases/repositories/credentials.repository'; import { TagRepository } from '@/databases/repositories/tag.repository'; import { ImportService } from '@/services/import.service'; -import { TagEntity } from '@/databases/entities/TagEntity'; +import { TagEntity } from '@/databases/entities/tag-entity'; import { WorkflowRepository } from '@/databases/repositories/workflow.repository'; -import { SharedWorkflowRepository } from '@/databases/repositories/sharedWorkflow.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import * as testDb from './shared/testDb'; import { mockInstance } from '../shared/mocking'; @@ -20,8 +20,8 @@ import { newWorkflow, } from './shared/db/workflows'; -import type { User } from '@db/entities/User'; -import type { Project } from '@/databases/entities/Project'; +import type { User } from '@/databases/entities/User'; +import type { Project } from '@/databases/entities/project'; import { getPersonalProject } from './shared/db/projects'; describe('ImportService', () => { diff --git a/packages/cli/test/integration/ldap/ldap.api.test.ts b/packages/cli/test/integration/ldap/ldap.api.test.ts index e3805674f3..757e1942f8 100644 --- a/packages/cli/test/integration/ldap/ldap.api.test.ts +++ b/packages/cli/test/integration/ldap/ldap.api.test.ts @@ -4,9 +4,9 @@ import { Not } from '@n8n/typeorm'; import { Cipher } from 'n8n-core'; import config from '@/config'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { UserRepository } from '@db/repositories/user.repository'; -import { AuthProviderSyncHistoryRepository } from '@db/repositories/authProviderSyncHistory.repository'; +import { AuthProviderSyncHistoryRepository } from '@/databases/repositories/auth-provider-sync-history.repository'; import { LDAP_DEFAULT_CONFIGURATION } from '@/ldap/constants'; import { LdapService } from '@/ldap/ldap.service.ee'; import { saveLdapSynchronization } from '@/ldap/helpers.ee'; diff --git a/packages/cli/test/integration/license-metrics.repository.test.ts b/packages/cli/test/integration/license-metrics.repository.test.ts index 55b156fe1e..2776c842de 100644 --- a/packages/cli/test/integration/license-metrics.repository.test.ts +++ b/packages/cli/test/integration/license-metrics.repository.test.ts @@ -4,8 +4,8 @@ import * as testDb from './shared/testDb'; import Container from 'typedi'; import { createManyWorkflows } from './shared/db/workflows'; import { createManyCredentials } from './shared/db/credentials'; -import { WorkflowStatisticsRepository } from '@/databases/repositories/workflowStatistics.repository'; -import { StatisticsNames } from '@/databases/entities/WorkflowStatistics'; +import { WorkflowStatisticsRepository } from '@/databases/repositories/workflow-statistics.repository'; +import { StatisticsNames } from '@/databases/entities/workflow-statistics'; describe('LicenseMetricsRepository', () => { let licenseMetricsRepository: LicenseMetricsRepository; diff --git a/packages/cli/test/integration/license.api.test.ts b/packages/cli/test/integration/license.api.test.ts index 1428de8663..e04f738d5f 100644 --- a/packages/cli/test/integration/license.api.test.ts +++ b/packages/cli/test/integration/license.api.test.ts @@ -1,7 +1,7 @@ import nock from 'nock'; import config from '@/config'; import { RESPONSE_ERROR_MESSAGES } from '@/constants'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import type { ILicensePostResponse, ILicenseReadResponse } from '@/Interfaces'; import { License } from '@/license'; diff --git a/packages/cli/test/integration/me.api.test.ts b/packages/cli/test/integration/me.api.test.ts index b644d61550..092c618620 100644 --- a/packages/cli/test/integration/me.api.test.ts +++ b/packages/cli/test/integration/me.api.test.ts @@ -2,7 +2,7 @@ import { Container } from 'typedi'; import { IsNull } from '@n8n/typeorm'; import validator from 'validator'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { UserRepository } from '@db/repositories/user.repository'; import { ProjectRepository } from '@db/repositories/project.repository'; diff --git a/packages/cli/test/integration/mfa/mfa.api.test.ts b/packages/cli/test/integration/mfa/mfa.api.test.ts index 7bfdc01477..713aba196d 100644 --- a/packages/cli/test/integration/mfa/mfa.api.test.ts +++ b/packages/cli/test/integration/mfa/mfa.api.test.ts @@ -3,8 +3,8 @@ import { randomInt, randomString } from 'n8n-workflow'; import { AuthService } from '@/auth/auth.service'; import config from '@/config'; -import type { User } from '@db/entities/User'; -import { AuthUserRepository } from '@db/repositories/authUser.repository'; +import type { User } from '@/databases/entities/User'; +import { AuthUserRepository } from '@/databases/repositories/auth-user.repository'; import { TOTPService } from '@/mfa/totp.service'; import * as testDb from '../shared/testDb'; diff --git a/packages/cli/test/integration/owner.api.test.ts b/packages/cli/test/integration/owner.api.test.ts index d917eeab4f..181e8d7fa7 100644 --- a/packages/cli/test/integration/owner.api.test.ts +++ b/packages/cli/test/integration/owner.api.test.ts @@ -2,7 +2,7 @@ import { Container } from 'typedi'; import validator from 'validator'; import config from '@/config'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { UserRepository } from '@db/repositories/user.repository'; import { diff --git a/packages/cli/test/integration/passwordReset.api.test.ts b/packages/cli/test/integration/passwordReset.api.test.ts index bfc5c2b35e..5005f5543c 100644 --- a/packages/cli/test/integration/passwordReset.api.test.ts +++ b/packages/cli/test/integration/passwordReset.api.test.ts @@ -7,7 +7,7 @@ import { randomString } from 'n8n-workflow'; import { AuthService } from '@/auth/auth.service'; import { License } from '@/license'; import config from '@/config'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { setCurrentAuthenticationMethod } from '@/sso/sso-helpers'; import { ExternalHooks } from '@/external-hooks'; import { JwtService } from '@/services/jwt.service'; diff --git a/packages/cli/test/integration/permission-checker.test.ts b/packages/cli/test/integration/permission-checker.test.ts index f35603a1b6..171a779c73 100644 --- a/packages/cli/test/integration/permission-checker.test.ts +++ b/packages/cli/test/integration/permission-checker.test.ts @@ -2,9 +2,9 @@ import { v4 as uuid } from 'uuid'; import { Container } from 'typedi'; import type { INode, INodeTypeData } from 'n8n-workflow'; import { randomInt } from 'n8n-workflow'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials'; import { NodeTypes } from '@/node-types'; import { OwnershipService } from '@/services/ownership.service'; @@ -16,10 +16,10 @@ import * as testDb from './shared/testDb'; import type { SaveCredentialFunction } from './shared/types'; import { affixRoleToSaveCredential } from './shared/db/credentials'; import { createOwner, createUser } from './shared/db/users'; -import { SharedCredentialsRepository } from '@/databases/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { getPersonalProject } from './shared/db/projects'; -import type { WorkflowEntity } from '@/databases/entities/WorkflowEntity'; -import type { Project } from '@/databases/entities/Project'; +import type { WorkflowEntity } from '@/databases/entities/workflow-entity'; +import type { Project } from '@/databases/entities/project'; import { ProjectRepository } from '@/databases/repositories/project.repository'; const ownershipService = mockInstance(OwnershipService); diff --git a/packages/cli/test/integration/project.api.test.ts b/packages/cli/test/integration/project.api.test.ts index 4fb7f08a02..bcb73b08f2 100644 --- a/packages/cli/test/integration/project.api.test.ts +++ b/packages/cli/test/integration/project.api.test.ts @@ -9,9 +9,9 @@ import { getProjectRelations, } from './shared/db/projects'; import Container from 'typedi'; -import type { Project } from '@/databases/entities/Project'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; -import type { ProjectRole } from '@/databases/entities/ProjectRelation'; +import type { Project } from '@/databases/entities/project'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; +import type { ProjectRole } from '@/databases/entities/project-relation'; import { EntityNotFoundError } from '@n8n/typeorm'; import { createWorkflow, shareWorkflowWithProjects } from './shared/db/workflows'; import { @@ -21,8 +21,8 @@ import { } from './shared/db/credentials'; import { randomCredentialPayload } from './shared/random'; import { getWorkflowById } from '@/PublicApi/v1/handlers/workflows/workflows.service'; -import { SharedWorkflowRepository } from '@/databases/repositories/sharedWorkflow.repository'; -import { SharedCredentialsRepository } from '@/databases/repositories/sharedCredentials.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import type { GlobalRole } from '@/databases/entities/User'; import type { Scope } from '@n8n/permissions'; import { CacheService } from '@/services/cache/cache.service'; diff --git a/packages/cli/test/integration/project.service.integration.test.ts b/packages/cli/test/integration/project.service.integration.test.ts index 7fe55ade06..0d81ec7b1e 100644 --- a/packages/cli/test/integration/project.service.integration.test.ts +++ b/packages/cli/test/integration/project.service.integration.test.ts @@ -1,7 +1,7 @@ import Container from 'typedi'; import { ProjectService } from '@/services/project.service'; import * as testDb from './shared/testDb'; -import { SharedWorkflowRepository } from '@/databases/repositories/sharedWorkflow.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { createUser } from './shared/db/users'; import { createWorkflow } from './shared/db/workflows'; import { linkUserToProject, createTeamProject } from './shared/db/projects'; diff --git a/packages/cli/test/integration/pruning.service.test.ts b/packages/cli/test/integration/pruning.service.test.ts index f5deabf756..9875217701 100644 --- a/packages/cli/test/integration/pruning.service.test.ts +++ b/packages/cli/test/integration/pruning.service.test.ts @@ -4,8 +4,8 @@ import type { ExecutionStatus } from 'n8n-workflow'; import Container from 'typedi'; import * as testDb from './shared/testDb'; -import type { ExecutionEntity } from '@db/entities/ExecutionEntity'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { ExecutionEntity } from '@db/entities/execution-entity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import { ExecutionRepository } from '@db/repositories/execution.repository'; import { TIME } from '@/constants'; import { PruningService } from '@/services/pruning.service'; diff --git a/packages/cli/test/integration/publicApi/credentials.test.ts b/packages/cli/test/integration/publicApi/credentials.test.ts index b5ed2bfb31..c24042f3a7 100644 --- a/packages/cli/test/integration/publicApi/credentials.test.ts +++ b/packages/cli/test/integration/publicApi/credentials.test.ts @@ -1,9 +1,9 @@ import { Container } from 'typedi'; import { randomString } from 'n8n-workflow'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; import { randomApiKey, randomName } from '../shared/random'; import * as utils from '../shared/utils/'; diff --git a/packages/cli/test/integration/publicApi/executions.test.ts b/packages/cli/test/integration/publicApi/executions.test.ts index 9994dc8a85..38d4188091 100644 --- a/packages/cli/test/integration/publicApi/executions.test.ts +++ b/packages/cli/test/integration/publicApi/executions.test.ts @@ -1,4 +1,4 @@ -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import type { ActiveWorkflowManager } from '@/active-workflow-manager'; import { randomApiKey } from '../shared/random'; @@ -21,7 +21,7 @@ import type { SuperAgentTest } from '../shared/types'; import { mockInstance } from '@test/mocking'; import { Telemetry } from '@/telemetry'; import { createTeamProject } from '@test-integration/db/projects'; -import type { ExecutionEntity } from '@/databases/entities/ExecutionEntity'; +import type { ExecutionEntity } from '@/databases/entities/execution-entity'; let owner: User; let user1: User; diff --git a/packages/cli/test/integration/publicApi/tags.test.ts b/packages/cli/test/integration/publicApi/tags.test.ts index 70798efba4..eb9bc816e6 100644 --- a/packages/cli/test/integration/publicApi/tags.test.ts +++ b/packages/cli/test/integration/publicApi/tags.test.ts @@ -1,5 +1,5 @@ import { Container } from 'typedi'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { TagRepository } from '@db/repositories/tag.repository'; import { randomApiKey } from '../shared/random'; diff --git a/packages/cli/test/integration/publicApi/workflows.test.ts b/packages/cli/test/integration/publicApi/workflows.test.ts index 66736aa03d..5dcf684e78 100644 --- a/packages/cli/test/integration/publicApi/workflows.test.ts +++ b/packages/cli/test/integration/publicApi/workflows.test.ts @@ -3,12 +3,12 @@ import type { INode } from 'n8n-workflow'; import config from '@/config'; import { STARTING_NODES } from '@/constants'; -import type { TagEntity } from '@db/entities/TagEntity'; -import type { User } from '@db/entities/User'; -import type { Project } from '@db/entities/Project'; +import type { TagEntity } from '@/databases/entities/tag-entity'; +import type { User } from '@/databases/entities/User'; +import type { Project } from '@/databases/entities/project'; import { ProjectRepository } from '@db/repositories/project.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; -import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; +import { WorkflowHistoryRepository } from '@db/repositories/workflow-history.repository'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; import { ExecutionService } from '@/executions/execution.service'; diff --git a/packages/cli/test/integration/role.api.test.ts b/packages/cli/test/integration/role.api.test.ts index c912d99a0d..7291bff61c 100644 --- a/packages/cli/test/integration/role.api.test.ts +++ b/packages/cli/test/integration/role.api.test.ts @@ -1,10 +1,10 @@ import { Container } from 'typedi'; import type { Scope } from '@n8n/permissions'; -import type { GlobalRole } from '@db/entities/User'; -import type { ProjectRole } from '@db/entities/ProjectRelation'; -import type { CredentialSharingRole } from '@db/entities/SharedCredentials'; -import type { WorkflowSharingRole } from '@db/entities/SharedWorkflow'; +import type { GlobalRole } from '@/databases/entities/User'; +import type { ProjectRole } from '@/databases/entities/project-relation'; +import type { CredentialSharingRole } from '@/databases/entities/shared-credentials'; +import type { WorkflowSharingRole } from '@/databases/entities/shared-workflow'; import { RoleService } from '@/services/role.service'; import * as utils from './shared/utils/'; diff --git a/packages/cli/test/integration/saml/saml.api.test.ts b/packages/cli/test/integration/saml/saml.api.test.ts index eef02fcfe2..5c0b3fd915 100644 --- a/packages/cli/test/integration/saml/saml.api.test.ts +++ b/packages/cli/test/integration/saml/saml.api.test.ts @@ -1,4 +1,4 @@ -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { setSamlLoginEnabled } from '@/sso/saml/saml-helpers'; import { getCurrentAuthenticationMethod, setCurrentAuthenticationMethod } from '@/sso/sso-helpers'; diff --git a/packages/cli/test/integration/security-audit/CredentialsRiskReporter.test.ts b/packages/cli/test/integration/security-audit/CredentialsRiskReporter.test.ts index bd9cd124ed..7108606aef 100644 --- a/packages/cli/test/integration/security-audit/CredentialsRiskReporter.test.ts +++ b/packages/cli/test/integration/security-audit/CredentialsRiskReporter.test.ts @@ -9,7 +9,7 @@ import { WorkflowRepository } from '@db/repositories/workflow.repository'; import Container from 'typedi'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; import { ExecutionRepository } from '@db/repositories/execution.repository'; -import { ExecutionDataRepository } from '@db/repositories/executionData.repository'; +import { ExecutionDataRepository } from '@/databases/repositories/execution-data.repository'; let securityAuditService: SecurityAuditService; diff --git a/packages/cli/test/integration/security-audit/utils.ts b/packages/cli/test/integration/security-audit/utils.ts index 59b6904559..42f358dd7d 100644 --- a/packages/cli/test/integration/security-audit/utils.ts +++ b/packages/cli/test/integration/security-audit/utils.ts @@ -3,8 +3,8 @@ import { v4 as uuid } from 'uuid'; import { toReportTitle } from '@/security-audit/utils'; import * as constants from '@/constants'; import type { Risk } from '@/security-audit/types'; -import type { InstalledNodes } from '@db/entities/InstalledNodes'; -import type { InstalledPackages } from '@db/entities/InstalledPackages'; +import type { InstalledNodes } from '@/databases/entities/installed-nodes'; +import type { InstalledPackages } from '@/databases/entities/installed-packages'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import Container from 'typedi'; import { GlobalConfig } from '@n8n/config'; diff --git a/packages/cli/test/integration/services/executionMetadata.service.test.ts b/packages/cli/test/integration/services/executionMetadata.service.test.ts index 32ca89b7b6..d9c7bb535a 100644 --- a/packages/cli/test/integration/services/executionMetadata.service.test.ts +++ b/packages/cli/test/integration/services/executionMetadata.service.test.ts @@ -1,6 +1,6 @@ import * as testDb from '../shared/testDb'; import Container from 'typedi'; -import { ExecutionMetadataRepository } from '@/databases/repositories/executionMetadata.repository'; +import { ExecutionMetadataRepository } from '@/databases/repositories/execution-metadata.repository'; import { ExecutionMetadataService } from '@/services/executionMetadata.service'; import { createExecution } from '@test-integration/db/executions'; import { createWorkflow } from '@test-integration/db/workflows'; diff --git a/packages/cli/test/integration/services/project.service.test.ts b/packages/cli/test/integration/services/project.service.test.ts index 54cdad2b3c..e709419fc9 100644 --- a/packages/cli/test/integration/services/project.service.test.ts +++ b/packages/cli/test/integration/services/project.service.test.ts @@ -3,8 +3,8 @@ import * as testDb from '../shared/testDb'; import Container from 'typedi'; import { createMember } from '../shared/db/users'; import { ProjectRepository } from '@/databases/repositories/project.repository'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; -import type { ProjectRole } from '@/databases/entities/ProjectRelation'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; +import type { ProjectRole } from '@/databases/entities/project-relation'; import type { Scope } from '@n8n/permissions'; let projectRepository: ProjectRepository; diff --git a/packages/cli/test/integration/shared/db/credentials.ts b/packages/cli/test/integration/shared/db/credentials.ts index 4aedb09324..9257180e81 100644 --- a/packages/cli/test/integration/shared/db/credentials.ts +++ b/packages/cli/test/integration/shared/db/credentials.ts @@ -1,13 +1,13 @@ import { Container } from 'typedi'; -import { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import type { User } from '@db/entities/User'; +import { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import type { User } from '@/databases/entities/User'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; -import type { CredentialSharingRole } from '@db/entities/SharedCredentials'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; +import type { CredentialSharingRole } from '@/databases/entities/shared-credentials'; import type { ICredentialsDb } from '@/Interfaces'; import type { CredentialPayload } from '../types'; import { ProjectRepository } from '@/databases/repositories/project.repository'; -import type { Project } from '@/databases/entities/Project'; +import type { Project } from '@/databases/entities/project'; export async function encryptCredentialData( credential: CredentialsEntity, diff --git a/packages/cli/test/integration/shared/db/executions.ts b/packages/cli/test/integration/shared/db/executions.ts index 199cf9c90a..12747e0365 100644 --- a/packages/cli/test/integration/shared/db/executions.ts +++ b/packages/cli/test/integration/shared/db/executions.ts @@ -1,10 +1,10 @@ import Container from 'typedi'; -import type { ExecutionData } from '@db/entities/ExecutionData'; -import type { ExecutionEntity } from '@db/entities/ExecutionEntity'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { ExecutionData } from '@/databases/entities/execution-data'; +import type { ExecutionEntity } from '@db/entities/execution-entity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import { ExecutionRepository } from '@db/repositories/execution.repository'; -import { ExecutionDataRepository } from '@db/repositories/executionData.repository'; -import { ExecutionMetadataRepository } from '@/databases/repositories/executionMetadata.repository'; +import { ExecutionDataRepository } from '@/databases/repositories/execution-data.repository'; +import { ExecutionMetadataRepository } from '@/databases/repositories/execution-metadata.repository'; export async function createManyExecutions( amount: number, diff --git a/packages/cli/test/integration/shared/db/projects.ts b/packages/cli/test/integration/shared/db/projects.ts index 3de7de5bb9..4f64b3c395 100644 --- a/packages/cli/test/integration/shared/db/projects.ts +++ b/packages/cli/test/integration/shared/db/projects.ts @@ -2,10 +2,10 @@ import Container from 'typedi'; import { ProjectRepository } from '@/databases/repositories/project.repository'; import { randomName } from '../random'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; import type { User } from '@/databases/entities/User'; -import type { Project } from '@/databases/entities/Project'; -import type { ProjectRelation, ProjectRole } from '@/databases/entities/ProjectRelation'; +import type { Project } from '@/databases/entities/project'; +import type { ProjectRelation, ProjectRole } from '@/databases/entities/project-relation'; export const createTeamProject = async (name?: string, adminUser?: User) => { const projectRepository = Container.get(ProjectRepository); diff --git a/packages/cli/test/integration/shared/db/tags.ts b/packages/cli/test/integration/shared/db/tags.ts index 53bfb2ef5c..5bed30a097 100644 --- a/packages/cli/test/integration/shared/db/tags.ts +++ b/packages/cli/test/integration/shared/db/tags.ts @@ -1,8 +1,8 @@ import Container from 'typedi'; -import type { TagEntity } from '@db/entities/TagEntity'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { TagEntity } from '@/databases/entities/tag-entity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import { TagRepository } from '@db/repositories/tag.repository'; -import { WorkflowTagMappingRepository } from '@db/repositories/workflowTagMapping.repository'; +import { WorkflowTagMappingRepository } from '@/databases/repositories/workflow-tag-mapping.repository'; import { generateNanoId } from '@db/utils/generators'; import { randomName } from '../random'; diff --git a/packages/cli/test/integration/shared/db/users.ts b/packages/cli/test/integration/shared/db/users.ts index a939ce7b74..b95c3024e7 100644 --- a/packages/cli/test/integration/shared/db/users.ts +++ b/packages/cli/test/integration/shared/db/users.ts @@ -1,14 +1,14 @@ import Container from 'typedi'; import { hash } from 'bcryptjs'; -import { AuthIdentity } from '@db/entities/AuthIdentity'; -import { type GlobalRole, type User } from '@db/entities/User'; -import { AuthIdentityRepository } from '@db/repositories/authIdentity.repository'; +import { AuthIdentity } from '@/databases/entities/auth-identity'; +import { type GlobalRole, type User } from '@/databases/entities/User'; +import { AuthIdentityRepository } from '@db/repositories/auth-identity.repository'; import { UserRepository } from '@db/repositories/user.repository'; import { TOTPService } from '@/mfa/totp.service'; import { MfaService } from '@/mfa/mfa.service'; import { randomApiKey, randomEmail, randomName, randomValidPassword } from '../random'; -import { AuthUserRepository } from '@/databases/repositories/authUser.repository'; +import { AuthUserRepository } from '@/databases/repositories/auth-user.repository'; // pre-computed bcrypt hash for the string 'password', using `await hash('password', 10)` const passwordHash = '$2a$10$njedH7S6V5898mj6p0Jr..IGY9Ms.qNwR7RbSzzX9yubJocKfvGGK'; diff --git a/packages/cli/test/integration/shared/db/workflowHistory.ts b/packages/cli/test/integration/shared/db/workflowHistory.ts index ab4109cef7..75e579b787 100644 --- a/packages/cli/test/integration/shared/db/workflowHistory.ts +++ b/packages/cli/test/integration/shared/db/workflowHistory.ts @@ -1,7 +1,7 @@ import Container from 'typedi'; import { v4 as uuid } from 'uuid'; -import type { WorkflowHistory } from '@db/entities/WorkflowHistory'; -import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository'; +import type { WorkflowHistory } from '@/databases/entities/workflow-history'; +import { WorkflowHistoryRepository } from '@db/repositories/workflow-history.repository'; export async function createWorkflowHistoryItem( workflowId: string, diff --git a/packages/cli/test/integration/shared/db/workflowStatistics.ts b/packages/cli/test/integration/shared/db/workflowStatistics.ts index e690cb726a..1a5de72287 100644 --- a/packages/cli/test/integration/shared/db/workflowStatistics.ts +++ b/packages/cli/test/integration/shared/db/workflowStatistics.ts @@ -1,7 +1,7 @@ import Container from 'typedi'; -import { StatisticsNames, type WorkflowStatistics } from '@/databases/entities/WorkflowStatistics'; +import { StatisticsNames, type WorkflowStatistics } from '@/databases/entities/workflow-statistics'; import type { Workflow } from 'n8n-workflow'; -import { WorkflowStatisticsRepository } from '@/databases/repositories/workflowStatistics.repository'; +import { WorkflowStatisticsRepository } from '@/databases/repositories/workflow-statistics.repository'; export async function createWorkflowStatisticsItem( workflowId: Workflow['id'], diff --git a/packages/cli/test/integration/shared/db/workflows.ts b/packages/cli/test/integration/shared/db/workflows.ts index dc5490f9f3..25858dc2c8 100644 --- a/packages/cli/test/integration/shared/db/workflows.ts +++ b/packages/cli/test/integration/shared/db/workflows.ts @@ -2,13 +2,13 @@ import Container from 'typedi'; import type { DeepPartial } from '@n8n/typeorm'; import { v4 as uuid } from 'uuid'; -import { User } from '@db/entities/User'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { User } from '@/databases/entities/User'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; -import type { SharedWorkflow, WorkflowSharingRole } from '@db/entities/SharedWorkflow'; +import type { SharedWorkflow, WorkflowSharingRole } from '@/databases/entities/shared-workflow'; import { ProjectRepository } from '@/databases/repositories/project.repository'; -import { Project } from '@/databases/entities/Project'; +import { Project } from '@/databases/entities/project'; import { NodeConnectionType } from 'n8n-workflow'; export async function createManyWorkflows( diff --git a/packages/cli/test/integration/shared/testDb.ts b/packages/cli/test/integration/shared/testDb.ts index 1449b75f7a..5dae224161 100644 --- a/packages/cli/test/integration/shared/testDb.ts +++ b/packages/cli/test/integration/shared/testDb.ts @@ -7,6 +7,7 @@ import { randomString } from 'n8n-workflow'; import * as Db from '@/Db'; import { getOptionOverrides } from '@db/config'; +import { kebabCase } from 'lodash'; export const testDbPrefix = 'n8n_test_'; @@ -80,7 +81,7 @@ const repositories = [ export async function truncate(names: Array<(typeof repositories)[number]>) { for (const name of names) { const RepositoryClass: Class> = ( - await import(`@db/repositories/${name.charAt(0).toLowerCase() + name.slice(1)}.repository`) + await import(`@db/repositories/${kebabCase(name)}.repository`) )[`${name}Repository`]; await Container.get(RepositoryClass).delete({}); } diff --git a/packages/cli/test/integration/shared/types.ts b/packages/cli/test/integration/shared/types.ts index cb794d0f95..2813d448df 100644 --- a/packages/cli/test/integration/shared/types.ts +++ b/packages/cli/test/integration/shared/types.ts @@ -3,11 +3,11 @@ import type { ICredentialDataDecryptedObject } from 'n8n-workflow'; import type TestAgent from 'supertest/lib/agent'; import type { Server } from 'http'; -import type { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import type { User } from '@db/entities/User'; +import type { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import type { User } from '@/databases/entities/User'; import type { BooleanLicenseFeature, ICredentialsDb, NumericLicenseFeature } from '@/Interfaces'; import type { LicenseMocker } from './license'; -import type { Project } from '@/databases/entities/Project'; +import type { Project } from '@/databases/entities/project'; type EndpointGroup = | 'me' diff --git a/packages/cli/test/integration/shared/utils/communityNodes.ts b/packages/cli/test/integration/shared/utils/communityNodes.ts index 1587313c51..d1b4a83eba 100644 --- a/packages/cli/test/integration/shared/utils/communityNodes.ts +++ b/packages/cli/test/integration/shared/utils/communityNodes.ts @@ -1,10 +1,10 @@ import { NODE_PACKAGE_PREFIX } from '@/constants'; -import { InstalledPackages } from '@db/entities/InstalledPackages'; +import { InstalledPackages } from '@/databases/entities/installed-packages'; import { randomName } from '../random'; import { COMMUNITY_NODE_VERSION, COMMUNITY_PACKAGE_VERSION } from '../constants'; -import { InstalledNodesRepository } from '@db/repositories/installedNodes.repository'; -import { InstalledPackagesRepository } from '@db/repositories/installedPackages.repository'; +import { InstalledNodesRepository } from '@/databases/repositories/installed-nodes.repository'; +import { InstalledPackagesRepository } from '@/databases/repositories/installed-packages.repository'; import Container from 'typedi'; export const mockPackageName = () => NODE_PACKAGE_PREFIX + randomName(); diff --git a/packages/cli/test/integration/shared/utils/index.ts b/packages/cli/test/integration/shared/utils/index.ts index 329b9d7b8a..0fb4df2312 100644 --- a/packages/cli/test/integration/shared/utils/index.ts +++ b/packages/cli/test/integration/shared/utils/index.ts @@ -10,7 +10,7 @@ import type request from 'supertest'; import { v4 as uuid } from 'uuid'; import config from '@/config'; -import { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import { WorkflowEntity } from '@db/entities/workflow-entity'; import { SettingsRepository } from '@db/repositories/settings.repository'; import { AUTH_COOKIE_NAME } from '@/constants'; import { ExecutionService } from '@/executions/execution.service'; diff --git a/packages/cli/test/integration/shared/utils/testServer.ts b/packages/cli/test/integration/shared/utils/testServer.ts index b75a7804b7..b1c0a3e299 100644 --- a/packages/cli/test/integration/shared/utils/testServer.ts +++ b/packages/cli/test/integration/shared/utils/testServer.ts @@ -7,7 +7,7 @@ import { URL } from 'url'; import config from '@/config'; import { AUTH_COOKIE_NAME } from '@/constants'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { ControllerRegistry } from '@/decorators'; import { rawBodyReader, bodyParser } from '@/middlewares'; import { PostHogClient } from '@/posthog'; @@ -158,7 +158,7 @@ export const setupTestServer = ({ break; case 'oauth2': - await import('@/controllers/oauth/oAuth2Credential.controller'); + await import('@/controllers/oauth/oauth2-credential.controller'); break; case 'mfa': @@ -183,7 +183,7 @@ export const setupTestServer = ({ break; case 'community-packages': - await import('@/controllers/communityPackages.controller'); + await import('@/controllers/community-packages.controller'); break; case 'me': @@ -191,7 +191,7 @@ export const setupTestServer = ({ break; case 'passwordReset': - await import('@/controllers/passwordReset.controller'); + await import('@/controllers/password-reset.controller'); break; case 'owner': @@ -219,7 +219,7 @@ export const setupTestServer = ({ break; case 'binaryData': - await import('@/controllers/binaryData.controller'); + await import('@/controllers/binary-data.controller'); break; case 'debug': @@ -235,7 +235,7 @@ export const setupTestServer = ({ break; case 'dynamic-node-parameters': - await import('@/controllers/dynamicNodeParameters.controller'); + await import('@/controllers/dynamic-node-parameters.controller'); break; } } diff --git a/packages/cli/test/integration/shared/workflow.ts b/packages/cli/test/integration/shared/workflow.ts index 0b2b12f53a..26e2dede8e 100644 --- a/packages/cli/test/integration/shared/workflow.ts +++ b/packages/cli/test/integration/shared/workflow.ts @@ -1,5 +1,5 @@ import type { INode } from 'n8n-workflow'; -import { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import { WorkflowEntity } from '@db/entities/workflow-entity'; export const FIRST_CREDENTIAL_ID = '1'; export const SECOND_CREDENTIAL_ID = '2'; diff --git a/packages/cli/test/integration/user.repository.test.ts b/packages/cli/test/integration/user.repository.test.ts index d333454aa5..2aa5c230a1 100644 --- a/packages/cli/test/integration/user.repository.test.ts +++ b/packages/cli/test/integration/user.repository.test.ts @@ -3,7 +3,7 @@ import { UserRepository } from '@db/repositories/user.repository'; import { createAdmin, createMember, createOwner } from './shared/db/users'; import * as testDb from './shared/testDb'; import { randomEmail } from './shared/random'; -import { ProjectRelationRepository } from '@/databases/repositories/projectRelation.repository'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; describe('UserRepository', () => { let userRepository: UserRepository; diff --git a/packages/cli/test/integration/users.api.test.ts b/packages/cli/test/integration/users.api.test.ts index 26183cba39..333eefa84e 100644 --- a/packages/cli/test/integration/users.api.test.ts +++ b/packages/cli/test/integration/users.api.test.ts @@ -3,12 +3,12 @@ import { v4 as uuid } from 'uuid'; import { RESPONSE_ERROR_MESSAGES } from '@/constants'; import { UsersController } from '@/controllers/users.controller'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { ProjectRepository } from '@db/repositories/project.repository'; -import { ProjectRelationRepository } from '@db/repositories/projectRelation.repository'; +import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; import { UserRepository } from '@db/repositories/user.repository'; -import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { CacheService } from '@/services/cache/cache.service'; import { ExecutionService } from '@/executions/execution.service'; diff --git a/packages/cli/test/integration/variables.test.ts b/packages/cli/test/integration/variables.test.ts index 0cd1ebe824..bf60263cfe 100644 --- a/packages/cli/test/integration/variables.test.ts +++ b/packages/cli/test/integration/variables.test.ts @@ -1,6 +1,6 @@ import { Container } from 'typedi'; -import type { Variables } from '@db/entities/Variables'; +import type { Variables } from '@/databases/entities/Variables'; import { VariablesRepository } from '@db/repositories/variables.repository'; import { generateNanoId } from '@db/utils/generators'; import { VariablesService } from '@/environments/variables/variables.service.ee'; diff --git a/packages/cli/test/integration/webhooks.api.test.ts b/packages/cli/test/integration/webhooks.api.test.ts index 630fe7350e..15b262c465 100644 --- a/packages/cli/test/integration/webhooks.api.test.ts +++ b/packages/cli/test/integration/webhooks.api.test.ts @@ -6,7 +6,7 @@ import { AbstractServer } from '@/abstract-server'; import { ExternalHooks } from '@/external-hooks'; import { NodeTypes } from '@/node-types'; import { Push } from '@/push'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import { mockInstance } from '../shared/mocking'; import { initActiveWorkflowManager } from './shared/utils'; diff --git a/packages/cli/test/integration/workflow-tag-mapping.repository.integration.test.ts b/packages/cli/test/integration/workflow-tag-mapping.repository.integration.test.ts index 7cf1dcdaed..f59ca5749d 100644 --- a/packages/cli/test/integration/workflow-tag-mapping.repository.integration.test.ts +++ b/packages/cli/test/integration/workflow-tag-mapping.repository.integration.test.ts @@ -1,7 +1,7 @@ import Container from 'typedi'; import * as testDb from './shared/testDb'; -import { WorkflowTagMappingRepository } from '@/databases/repositories/workflowTagMapping.repository'; +import { WorkflowTagMappingRepository } from '@/databases/repositories/workflow-tag-mapping.repository'; import { createWorkflow } from './shared/db/workflows'; import { TagRepository } from '@/databases/repositories/tag.repository'; diff --git a/packages/cli/test/integration/workflowHistory.api.test.ts b/packages/cli/test/integration/workflowHistory.api.test.ts index cfd3921b32..4c0cd7c806 100644 --- a/packages/cli/test/integration/workflowHistory.api.test.ts +++ b/packages/cli/test/integration/workflowHistory.api.test.ts @@ -1,4 +1,4 @@ -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import * as testDb from './shared/testDb'; import * as utils from './shared/utils/'; diff --git a/packages/cli/test/integration/workflowHistoryManager.test.ts b/packages/cli/test/integration/workflowHistoryManager.test.ts index fa2da33e55..69d793964d 100644 --- a/packages/cli/test/integration/workflowHistoryManager.test.ts +++ b/packages/cli/test/integration/workflowHistoryManager.test.ts @@ -3,7 +3,7 @@ import { In } from '@n8n/typeorm'; import { DateTime } from 'luxon'; import config from '@/config'; -import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository'; +import { WorkflowHistoryRepository } from '@db/repositories/workflow-history.repository'; import { License } from '@/license'; import { WorkflowHistoryManager } from '@/workflows/workflow-history/workflow-history-manager.ee'; diff --git a/packages/cli/test/integration/workflows/workflow.service.ee.test.ts b/packages/cli/test/integration/workflows/workflow.service.ee.test.ts index 6e3b00bd58..5675878252 100644 --- a/packages/cli/test/integration/workflows/workflow.service.ee.test.ts +++ b/packages/cli/test/integration/workflows/workflow.service.ee.test.ts @@ -1,8 +1,8 @@ import Container from 'typedi'; import { mock } from 'jest-mock-extended'; -import { CredentialsEntity } from '@db/entities/CredentialsEntity'; +import { CredentialsEntity } from '@/databases/entities/credentials-entity'; import { CredentialsRepository } from '@db/repositories/credentials.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { Telemetry } from '@/telemetry'; import { EnterpriseWorkflowService } from '@/workflows/workflow.service.ee'; diff --git a/packages/cli/test/integration/workflows/workflow.service.test.ts b/packages/cli/test/integration/workflows/workflow.service.test.ts index 084b41d212..b6fe3576db 100644 --- a/packages/cli/test/integration/workflows/workflow.service.test.ts +++ b/packages/cli/test/integration/workflows/workflow.service.test.ts @@ -1,7 +1,7 @@ import Container from 'typedi'; import { mock } from 'jest-mock-extended'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'; import { Telemetry } from '@/telemetry'; diff --git a/packages/cli/test/integration/workflows/workflowSharing.service.test.ts b/packages/cli/test/integration/workflows/workflowSharing.service.test.ts index 58bed7d1e3..740da03354 100644 --- a/packages/cli/test/integration/workflows/workflowSharing.service.test.ts +++ b/packages/cli/test/integration/workflows/workflowSharing.service.test.ts @@ -1,6 +1,6 @@ import Container from 'typedi'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { WorkflowSharingService } from '@/workflows/workflow-sharing.service'; import * as testDb from '../shared/testDb'; diff --git a/packages/cli/test/integration/workflows/workflows.controller-with-active-workflow-manager.ee.test.ts b/packages/cli/test/integration/workflows/workflows.controller-with-active-workflow-manager.ee.test.ts index d32722c23d..7d976e59f8 100644 --- a/packages/cli/test/integration/workflows/workflows.controller-with-active-workflow-manager.ee.test.ts +++ b/packages/cli/test/integration/workflows/workflows.controller-with-active-workflow-manager.ee.test.ts @@ -1,4 +1,4 @@ -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import * as utils from '../shared/utils/'; import * as testDb from '../shared/testDb'; diff --git a/packages/cli/test/integration/workflows/workflows.controller.ee.test.ts b/packages/cli/test/integration/workflows/workflows.controller.ee.test.ts index 060eba25e2..8884ef9835 100644 --- a/packages/cli/test/integration/workflows/workflows.controller.ee.test.ts +++ b/packages/cli/test/integration/workflows/workflows.controller.ee.test.ts @@ -3,10 +3,10 @@ import { v4 as uuid } from 'uuid'; import { ApplicationError, WorkflowActivationError, type INode } from 'n8n-workflow'; import config from '@/config'; -import type { Project } from '@db/entities/Project'; +import type { Project } from '@/databases/entities/project'; import { ProjectRepository } from '@db/repositories/project.repository'; -import type { User } from '@db/entities/User'; -import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository'; +import type { User } from '@/databases/entities/User'; +import { WorkflowHistoryRepository } from '@db/repositories/workflow-history.repository'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; import { License } from '@/license'; import { UserManagementMailer } from '@/user-management/email'; diff --git a/packages/cli/test/integration/workflows/workflows.controller.test.ts b/packages/cli/test/integration/workflows/workflows.controller.test.ts index d021df875b..4d6e42ec8b 100644 --- a/packages/cli/test/integration/workflows/workflows.controller.test.ts +++ b/packages/cli/test/integration/workflows/workflows.controller.test.ts @@ -3,12 +3,12 @@ import { v4 as uuid } from 'uuid'; import type { INode, IPinData } from 'n8n-workflow'; import type { Scope } from '@n8n/permissions'; -import type { User } from '@db/entities/User'; +import type { User } from '@/databases/entities/User'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; -import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; +import type { WorkflowEntity } from '@db/entities/workflow-entity'; import type { ListQuery } from '@/requests'; -import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository'; -import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository'; +import { WorkflowHistoryRepository } from '@db/repositories/workflow-history.repository'; +import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository'; import { ProjectRepository } from '@db/repositories/project.repository'; import { ProjectService } from '@/services/project.service'; import { ActiveWorkflowManager } from '@/active-workflow-manager'; diff --git a/packages/cli/test/shared/mockObjects.ts b/packages/cli/test/shared/mockObjects.ts index a8795e8e10..3465b68ece 100644 --- a/packages/cli/test/shared/mockObjects.ts +++ b/packages/cli/test/shared/mockObjects.ts @@ -1,7 +1,7 @@ import { randomInt } from 'n8n-workflow'; -import { User } from '@db/entities/User'; -import { CredentialsEntity } from '@db/entities/CredentialsEntity'; -import { Project } from '@db/entities/Project'; +import { User } from '@/databases/entities/User'; +import { CredentialsEntity } from '@/databases/entities/credentials-entity'; +import { Project } from '@/databases/entities/project'; import { randomCredentialPayload,