refactor(core): Standardize filename casing for controllers and databases (no-changelog) (#10564)

This commit is contained in:
Iván Ovejero 2024-08-27 16:44:32 +02:00 committed by GitHub
parent be52176585
commit fd58a272e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
264 changed files with 566 additions and 565 deletions

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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

View file

@ -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';

View file

@ -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';

View file

@ -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', () => {

View file

@ -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';

View file

@ -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 {

View file

@ -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';

View file

@ -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';

View file

@ -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.

View file

@ -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';

View file

@ -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 (

View file

@ -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

View file

@ -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';

View file

@ -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 {

View file

@ -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[] {

View file

@ -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';

View file

@ -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 {

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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');

View file

@ -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,

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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 {

View file

@ -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')

View file

@ -1,4 +1,4 @@
import type { Project } from '@db/entities/Project';
import type { Project } from '@/databases/entities/project';
import {
Get,
Post,

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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()

View file

@ -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';

View file

@ -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';

View file

@ -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 {

View file

@ -1,4 +1,4 @@
import { User } from '@db/entities/User';
import { User } from '@/databases/entities/User';
describe('User Entity', () => {
describe('JSON.stringify', () => {

View file

@ -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';

View file

@ -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';

View file

@ -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()

View file

@ -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 {

View file

@ -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()

View file

@ -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'])

View file

@ -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 {

View file

@ -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,

View file

@ -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 {

View file

@ -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 {

View file

@ -1,5 +1,5 @@
import { Column, Entity, PrimaryColumn } from '@n8n/typeorm';
import { datetimeColumnType } from './AbstractEntity';
import { datetimeColumnType } from './abstract-entity';
@Entity()
export class InvalidAuthToken {

View file

@ -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 =

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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 {

View file

@ -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()

View file

@ -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 {

View file

@ -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',

View file

@ -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 {

View file

@ -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 {

View file

@ -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<CredentialsEntity, 'id' | 'name' | 'type'>;

View file

@ -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';

View file

@ -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) {

View file

@ -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 {

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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<AuthIdentity> {

View file

@ -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<AuthProviderSyncHistory> {

View file

@ -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<AuthUser> {

View file

@ -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';

View file

@ -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<EventDestinations> {

View file

@ -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<ExecutionData> {

View file

@ -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<ExecutionMetadata> {

View file

@ -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';

View file

@ -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<InstalledNodes> {

View file

@ -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()

View file

@ -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<InvalidAuthToken> {

Some files were not shown because too many files have changed in this diff Show more