mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Standardize filenames in cli (no-changelog) (#10484)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Container from 'typedi';
|
||||
import * as testDb from '../integration/shared/testDb';
|
||||
|
||||
import { CredentialsHelper } from '@/CredentialsHelper';
|
||||
import { CredentialsHelper } from '@/credentials-helper';
|
||||
import { createOwner, createAdmin, createMember } from './shared/db/users';
|
||||
import type { User } from '@/databases/entities/User';
|
||||
import { saveCredential } from './shared/db/credentials';
|
||||
|
||||
@@ -3,12 +3,12 @@ import { Cipher } from 'n8n-core';
|
||||
import { jsonParse, type IDataObject } from 'n8n-workflow';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
|
||||
import { License } from '@/License';
|
||||
import { License } from '@/license';
|
||||
import type { ExternalSecretsSettings, SecretsProviderState } from '@/Interfaces';
|
||||
import { SettingsRepository } from '@db/repositories/settings.repository';
|
||||
import { ExternalSecretsProviders } from '@/ExternalSecrets/ExternalSecretsProviders.ee';
|
||||
import { ExternalSecretsProviders } from '@/external-secrets/external-secrets-providers.ee';
|
||||
import config from '@/config';
|
||||
import { ExternalSecretsManager } from '@/ExternalSecrets/ExternalSecretsManager.ee';
|
||||
import { ExternalSecretsManager } from '@/external-secrets/external-secrets-manager.ee';
|
||||
import { CREDENTIAL_BLANKING_VALUE } from '@/constants';
|
||||
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ActivationErrorsService } from '@/ActivationErrors.service';
|
||||
import { ActivationErrorsService } from '@/activation-errors.service';
|
||||
import { CacheService } from '@/services/cache/cache.service';
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { mockInstance } from '@test/mocking';
|
||||
|
||||
@@ -3,16 +3,16 @@ import { mock } from 'jest-mock-extended';
|
||||
import { NodeApiError, NodeOperationError, Workflow } from 'n8n-workflow';
|
||||
import type { IWebhookData, WorkflowActivateMode } from 'n8n-workflow';
|
||||
|
||||
import { ActiveExecutions } from '@/ActiveExecutions';
|
||||
import { ActiveWorkflowManager } from '@/ActiveWorkflowManager';
|
||||
import { ExternalHooks } from '@/ExternalHooks';
|
||||
import { ActiveExecutions } from '@/active-executions';
|
||||
import { ActiveWorkflowManager } from '@/active-workflow-manager';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { Push } from '@/push';
|
||||
import { SecretsHelper } from '@/SecretsHelpers';
|
||||
import { SecretsHelper } from '@/secrets-helpers';
|
||||
import { WebhookService } from '@/webhooks/webhook.service';
|
||||
import * as WebhookHelpers from '@/webhooks/WebhookHelpers';
|
||||
import * as AdditionalData from '@/WorkflowExecuteAdditionalData';
|
||||
import * as WebhookHelpers from '@/webhooks/webhook-helpers';
|
||||
import * as AdditionalData from '@/workflow-execute-additional-data';
|
||||
import type { WebhookEntity } from '@db/entities/WebhookEntity';
|
||||
import { NodeTypes } from '@/NodeTypes';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import { ExecutionService } from '@/executions/execution.service';
|
||||
import { WorkflowService } from '@/workflows/workflow.service';
|
||||
|
||||
@@ -20,7 +20,7 @@ import { mockInstance } from '../shared/mocking';
|
||||
import * as testDb from './shared/testDb';
|
||||
import { createOwner } from './shared/db/users';
|
||||
import { createWorkflow } from './shared/db/workflows';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import type { WorkflowEntity } from '@/databases/entities/WorkflowEntity';
|
||||
|
||||
mockInstance(ActiveExecutions);
|
||||
|
||||
@@ -5,7 +5,7 @@ import config from '@/config';
|
||||
import { AUTH_COOKIE_NAME } from '@/constants';
|
||||
import type { User } from '@db/entities/User';
|
||||
import { UserRepository } from '@db/repositories/user.repository';
|
||||
import { MfaService } from '@/Mfa/mfa.service';
|
||||
import { MfaService } from '@/mfa/mfa.service';
|
||||
|
||||
import { LOGGED_OUT_RESPONSE_BODY } from './shared/constants';
|
||||
import { randomValidPassword } from './shared/random';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ActiveWorkflowManager } from '@/ActiveWorkflowManager';
|
||||
import { ActiveWorkflowManager } from '@/active-workflow-manager';
|
||||
|
||||
import * as utils from './shared/utils/';
|
||||
import { createUser } from './shared/db/users';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
import { ImportCredentialsCommand } from '@/commands/import/credentials';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
import { ImportWorkflowsCommand } from '@/commands/import/workflow';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
|
||||
@@ -3,13 +3,13 @@ import { v4 as uuid } from 'uuid';
|
||||
import { EntityNotFoundError } from '@n8n/typeorm';
|
||||
|
||||
import { Reset } from '@/commands/ldap/reset';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
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 { getLdapSynchronizations, saveLdapSynchronization } from '@/Ldap/helpers.ee';
|
||||
import { LdapService } from '@/Ldap/ldap.service.ee';
|
||||
import { getLdapSynchronizations, saveLdapSynchronization } from '@/ldap/helpers.ee';
|
||||
import { LdapService } from '@/ldap/ldap.service.ee';
|
||||
import { Push } from '@/push';
|
||||
import { Telemetry } from '@/telemetry';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { License } from '@/License';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { License } from '@/license';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { ClearLicenseCommand } from '@/commands/license/clear';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import { Reset } from '@/commands/user-management/reset';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { NodeTypes } from '@/NodeTypes';
|
||||
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 { CredentialsRepository } from '@db/repositories/credentials.repository';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { UpdateWorkflowCommand } from '@/commands/update/workflow';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
|
||||
@@ -2,13 +2,13 @@ import { BinaryDataService } from 'n8n-core';
|
||||
|
||||
import { Worker } from '@/commands/worker';
|
||||
import config from '@/config';
|
||||
import { ExternalSecretsManager } from '@/ExternalSecrets/ExternalSecretsManager.ee';
|
||||
import { ExternalSecretsManager } from '@/external-secrets/external-secrets-manager.ee';
|
||||
import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { OrchestrationHandlerWorkerService } from '@/services/orchestration/worker/orchestration.handler.worker.service';
|
||||
import { OrchestrationWorkerService } from '@/services/orchestration/worker/orchestration.worker.service';
|
||||
import { License } from '@/License';
|
||||
import { ExternalHooks } from '@/ExternalHooks';
|
||||
import { License } from '@/license';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { ScalingService } from '@/scaling/scaling.service';
|
||||
|
||||
import { setupTestCommand } from '@test-integration/utils/testCommand';
|
||||
|
||||
@@ -2,7 +2,7 @@ import path from 'path';
|
||||
|
||||
import type { InstalledPackages } from '@db/entities/InstalledPackages';
|
||||
import type { InstalledNodes } from '@db/entities/InstalledNodes';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { CommunityPackagesService } from '@/services/communityPackages.service';
|
||||
|
||||
import { mockInstance } from '../shared/mocking';
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
import { mock } from 'jest-mock-extended';
|
||||
|
||||
import { DynamicNodeParametersService } from '@/services/dynamicNodeParameters.service';
|
||||
import * as AdditionalData from '@/WorkflowExecuteAdditionalData';
|
||||
import * as AdditionalData from '@/workflow-execute-additional-data';
|
||||
|
||||
import { createOwner } from '../shared/db/users';
|
||||
import { setupTestServer } from '../shared/utils';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Container from 'typedi';
|
||||
import { Not } from '@n8n/typeorm';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { ExternalHooks } from '@/ExternalHooks';
|
||||
import { UserManagementMailer } from '@/UserManagement/email';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { UserManagementMailer } from '@/user-management/email';
|
||||
import { UserRepository } from '@/databases/repositories/user.repository';
|
||||
import { PasswordUtility } from '@/services/password.utility';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { parse as parseQs } from 'querystring';
|
||||
|
||||
import type { CredentialsEntity } from '@db/entities/CredentialsEntity';
|
||||
import type { User } from '@db/entities/User';
|
||||
import { CredentialsHelper } from '@/CredentialsHelper';
|
||||
import { CredentialsHelper } from '@/credentials-helper';
|
||||
import { OAuth2CredentialController } from '@/controllers/oauth/oAuth2Credential.controller';
|
||||
|
||||
import { createOwner } from '@test-integration/db/users';
|
||||
|
||||
@@ -8,7 +8,7 @@ import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.
|
||||
import { ProjectRepository } from '@db/repositories/project.repository';
|
||||
import type { Project } from '@db/entities/Project';
|
||||
import { ProjectService } from '@/services/project.service';
|
||||
import { UserManagementMailer } from '@/UserManagement/email';
|
||||
import { UserManagementMailer } from '@/user-management/email';
|
||||
|
||||
import { randomCredentialPayload } from '../shared/random';
|
||||
import * as testDb from '../shared/testDb';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
|
||||
import { ActiveWorkflowManager } from '@/ActiveWorkflowManager';
|
||||
import { ActiveWorkflowManager } from '@/active-workflow-manager';
|
||||
import { generateNanoId } from '@/databases/utils/generators';
|
||||
import type { WorkflowEntity } from '@/databases/entities/WorkflowEntity';
|
||||
import { OrchestrationService } from '@/services/orchestration.service';
|
||||
|
||||
@@ -8,7 +8,7 @@ import { setupTestServer } from './shared/utils';
|
||||
import { mockInstance } from '../shared/mocking';
|
||||
|
||||
import { ConcurrencyControlService } from '@/concurrency/concurrency-control.service';
|
||||
import { WaitTracker } from '@/WaitTracker';
|
||||
import { WaitTracker } from '@/wait-tracker';
|
||||
import { createTeamProject, linkUserToProject } from './shared/db/projects';
|
||||
|
||||
mockInstance(WaitTracker);
|
||||
|
||||
@@ -7,10 +7,10 @@ import config from '@/config';
|
||||
import type { User } from '@db/entities/User';
|
||||
import { UserRepository } from '@db/repositories/user.repository';
|
||||
import { AuthProviderSyncHistoryRepository } from '@db/repositories/authProviderSyncHistory.repository';
|
||||
import { LDAP_DEFAULT_CONFIGURATION } from '@/Ldap/constants';
|
||||
import { LdapService } from '@/Ldap/ldap.service.ee';
|
||||
import { saveLdapSynchronization } from '@/Ldap/helpers.ee';
|
||||
import { getCurrentAuthenticationMethod, setCurrentAuthenticationMethod } from '@/sso/ssoHelpers';
|
||||
import { LDAP_DEFAULT_CONFIGURATION } from '@/ldap/constants';
|
||||
import { LdapService } from '@/ldap/ldap.service.ee';
|
||||
import { saveLdapSynchronization } from '@/ldap/helpers.ee';
|
||||
import { getCurrentAuthenticationMethod, setCurrentAuthenticationMethod } from '@/sso/sso-helpers';
|
||||
|
||||
import { randomEmail, randomName, uniqueId } from './../shared/random';
|
||||
import * as testDb from './../shared/testDb';
|
||||
|
||||
@@ -3,7 +3,7 @@ import config from '@/config';
|
||||
import { RESPONSE_ERROR_MESSAGES } from '@/constants';
|
||||
import type { User } from '@db/entities/User';
|
||||
import type { ILicensePostResponse, ILicenseReadResponse } from '@/Interfaces';
|
||||
import { License } from '@/License';
|
||||
import { License } from '@/license';
|
||||
|
||||
import * as testDb from './shared/testDb';
|
||||
import * as utils from './shared/utils/';
|
||||
|
||||
@@ -5,7 +5,7 @@ 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 { TOTPService } from '@/Mfa/totp.service';
|
||||
import { TOTPService } from '@/mfa/totp.service';
|
||||
|
||||
import * as testDb from '../shared/testDb';
|
||||
import * as utils from '../shared/utils';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createServer } from 'http';
|
||||
import { gzipSync, deflateSync } from 'zlib';
|
||||
import type { Request, Response } from 'express';
|
||||
import request from 'supertest';
|
||||
import { rawBodyReader, bodyParser } from '@/middlewares/bodyParser';
|
||||
import { rawBodyReader, bodyParser } from '@/middlewares/body-parser';
|
||||
|
||||
describe('bodyParser', () => {
|
||||
const server = createServer((req: Request, res: Response) => {
|
||||
|
||||
@@ -5,13 +5,13 @@ import { mock } from 'jest-mock-extended';
|
||||
import { randomString } from 'n8n-workflow';
|
||||
|
||||
import { AuthService } from '@/auth/auth.service';
|
||||
import { License } from '@/License';
|
||||
import { License } from '@/license';
|
||||
import config from '@/config';
|
||||
import type { User } from '@db/entities/User';
|
||||
import { setCurrentAuthenticationMethod } from '@/sso/ssoHelpers';
|
||||
import { ExternalHooks } from '@/ExternalHooks';
|
||||
import { setCurrentAuthenticationMethod } from '@/sso/sso-helpers';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { JwtService } from '@/services/jwt.service';
|
||||
import { UserManagementMailer } from '@/UserManagement/email';
|
||||
import { UserManagementMailer } from '@/user-management/email';
|
||||
import { UserRepository } from '@db/repositories/user.repository';
|
||||
import { PasswordUtility } from '@/services/password.utility';
|
||||
|
||||
|
||||
@@ -5,17 +5,17 @@ import { randomInt } from 'n8n-workflow';
|
||||
import type { User } from '@db/entities/User';
|
||||
import { WorkflowRepository } from '@db/repositories/workflow.repository';
|
||||
import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { NodeTypes } from '@/NodeTypes';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import { OwnershipService } from '@/services/ownership.service';
|
||||
import { PermissionChecker } from '@/UserManagement/PermissionChecker';
|
||||
import { PermissionChecker } from '@/user-management/permission-checker';
|
||||
|
||||
import { mockInstance } from '../shared/mocking';
|
||||
import { randomCredentialPayload as randomCred } from '../integration/shared/random';
|
||||
import * as testDb from '../integration/shared/testDb';
|
||||
import type { SaveCredentialFunction } from '../integration/shared/types';
|
||||
import { affixRoleToSaveCredential } from '../integration/shared/db/credentials';
|
||||
import { createOwner, createUser } from '../integration/shared/db/users';
|
||||
import { randomCredentialPayload as randomCred } from './shared/random';
|
||||
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 { getPersonalProject } from './shared/db/projects';
|
||||
import type { WorkflowEntity } from '@/databases/entities/WorkflowEntity';
|
||||
@@ -27,7 +27,7 @@ import type { GlobalRole } from '@/databases/entities/User';
|
||||
import type { Scope } from '@n8n/permissions';
|
||||
import { CacheService } from '@/services/cache/cache.service';
|
||||
import { mockInstance } from '../shared/mocking';
|
||||
import { ActiveWorkflowManager } from '@/ActiveWorkflowManager';
|
||||
import { ActiveWorkflowManager } from '@/active-workflow-manager';
|
||||
import { ProjectRepository } from '@/databases/repositories/project.repository';
|
||||
import { RoleService } from '@/services/role.service';
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
|
||||
import { ExecutionRepository } from '@db/repositories/execution.repository';
|
||||
import { TIME } from '@/constants';
|
||||
import { PruningService } from '@/services/pruning.service';
|
||||
import { Logger } from '@/Logger';
|
||||
import { Logger } from '@/logger';
|
||||
|
||||
import { mockInstance } from '../shared/mocking';
|
||||
import { createWorkflow } from './shared/db/workflows';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { User } from '@db/entities/User';
|
||||
import type { ActiveWorkflowManager } from '@/ActiveWorkflowManager';
|
||||
import type { ActiveWorkflowManager } from '@/active-workflow-manager';
|
||||
|
||||
import { randomApiKey } from '../shared/random';
|
||||
import * as utils from '../shared/utils/';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import validator from 'validator';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { License } from '@/License';
|
||||
import { License } from '@/license';
|
||||
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
import { randomApiKey } from '../shared/random';
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { Project } from '@db/entities/Project';
|
||||
import { ProjectRepository } from '@db/repositories/project.repository';
|
||||
import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository';
|
||||
import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository';
|
||||
import { ActiveWorkflowManager } from '@/ActiveWorkflowManager';
|
||||
import { ActiveWorkflowManager } from '@/active-workflow-manager';
|
||||
import { ExecutionService } from '@/executions/execution.service';
|
||||
|
||||
import { randomApiKey } from '../shared/random';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { User } from '@db/entities/User';
|
||||
import { setSamlLoginEnabled } from '@/sso/saml/samlHelpers';
|
||||
import { getCurrentAuthenticationMethod, setCurrentAuthenticationMethod } from '@/sso/ssoHelpers';
|
||||
import { setSamlLoginEnabled } from '@/sso/saml/saml-helpers';
|
||||
import { getCurrentAuthenticationMethod, setCurrentAuthenticationMethod } from '@/sso/sso-helpers';
|
||||
|
||||
import { randomEmail, randomName, randomValidPassword } from '../shared/random';
|
||||
import * as utils from '../shared/utils/';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as helpers from '@/sso/saml/samlHelpers';
|
||||
import type { SamlUserAttributes } from '@/sso/saml/types/samlUserAttributes';
|
||||
import * as helpers from '@/sso/saml/saml-helpers';
|
||||
import type { SamlUserAttributes } from '@/sso/saml/types/saml-user-attributes';
|
||||
import { getPersonalProject } from '../../integration/shared/db/projects';
|
||||
|
||||
import * as testDb from '../shared/testDb';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import config from '@/config';
|
||||
import { SecurityAuditService } from '@/security-audit/SecurityAudit.service';
|
||||
import { SecurityAuditService } from '@/security-audit/security-audit.service';
|
||||
import { CREDENTIALS_REPORT } from '@/security-audit/constants';
|
||||
import { getRiskSection } from './utils';
|
||||
import * as testDb from '../shared/testDb';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { SecurityAuditService } from '@/security-audit/SecurityAudit.service';
|
||||
import { SecurityAuditService } from '@/security-audit/security-audit.service';
|
||||
import {
|
||||
DATABASE_REPORT,
|
||||
SQL_NODE_TYPES,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { SecurityAuditService } from '@/security-audit/SecurityAudit.service';
|
||||
import { SecurityAuditService } from '@/security-audit/security-audit.service';
|
||||
import { FILESYSTEM_INTERACTION_NODE_TYPES, FILESYSTEM_REPORT } from '@/security-audit/constants';
|
||||
import { getRiskSection, saveManualTriggerWorkflow } from './utils';
|
||||
import * as testDb from '../shared/testDb';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { SecurityAuditService } from '@/security-audit/SecurityAudit.service';
|
||||
import { SecurityAuditService } from '@/security-audit/security-audit.service';
|
||||
import { INSTANCE_REPORT, WEBHOOK_VALIDATOR_NODE_TYPES } from '@/security-audit/constants';
|
||||
import {
|
||||
getRiskSection,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { Container } from 'typedi';
|
||||
import { SecurityAuditService } from '@/security-audit/SecurityAudit.service';
|
||||
import { SecurityAuditService } from '@/security-audit/security-audit.service';
|
||||
import { OFFICIAL_RISKY_NODE_TYPES, NODES_REPORT } from '@/security-audit/constants';
|
||||
import { toReportTitle } from '@/security-audit/utils';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { NodeTypes } from '@/NodeTypes';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import { CommunityPackagesService } from '@/services/communityPackages.service';
|
||||
import { WorkflowRepository } from '@db/repositories/workflow.repository';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { WorkflowStaticDataService } from '@/workflows/workflowStaticData.service';
|
||||
import { WorkflowStaticDataService } from '@/workflows/workflow-static-data.service';
|
||||
import * as testDb from '@test-integration/testDb';
|
||||
import Container from 'typedi';
|
||||
import { createWorkflow } from '@test-integration/db/workflows';
|
||||
import { Workflow } from 'n8n-workflow';
|
||||
import { mockInstance } from '@test/mocking';
|
||||
import { NodeTypes } from '@/NodeTypes';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
|
||||
|
||||
const nodeTypes = mockInstance(NodeTypes);
|
||||
|
||||
@@ -12,7 +12,7 @@ import type { Project } from '@/databases/entities/Project';
|
||||
export async function encryptCredentialData(
|
||||
credential: CredentialsEntity,
|
||||
): Promise<ICredentialsDb> {
|
||||
const { createCredentialsFromCredentialsEntity } = await import('@/CredentialsHelper');
|
||||
const { createCredentialsFromCredentialsEntity } = await import('@/credentials-helper');
|
||||
const coreCredential = createCredentialsFromCredentialsEntity(credential, true);
|
||||
|
||||
// @ts-ignore
|
||||
|
||||
@@ -4,8 +4,8 @@ import { AuthIdentity } from '@db/entities/AuthIdentity';
|
||||
import { type GlobalRole, type User } from '@db/entities/User';
|
||||
import { AuthIdentityRepository } from '@db/repositories/authIdentity.repository';
|
||||
import { UserRepository } from '@db/repositories/user.repository';
|
||||
import { TOTPService } from '@/Mfa/totp.service';
|
||||
import { MfaService } from '@/Mfa/mfa.service';
|
||||
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';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { LDAP_DEFAULT_CONFIGURATION, LDAP_FEATURE_NAME } from '@/Ldap/constants';
|
||||
import type { LdapConfig } from '@/Ldap/types';
|
||||
import { LDAP_DEFAULT_CONFIGURATION, LDAP_FEATURE_NAME } from '@/ldap/constants';
|
||||
import type { LdapConfig } from '@/ldap/types';
|
||||
import { SettingsRepository } from '@/databases/repositories/settings.repository';
|
||||
import { jsonParse } from 'n8n-workflow';
|
||||
import Container from 'typedi';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { BooleanLicenseFeature, NumericLicenseFeature } from '@/Interfaces';
|
||||
import type { License } from '@/License';
|
||||
import type { License } from '@/license';
|
||||
|
||||
export interface LicenseMockDefaults {
|
||||
features?: BooleanLicenseFeature[];
|
||||
|
||||
@@ -14,7 +14,7 @@ import { WorkflowEntity } from '@db/entities/WorkflowEntity';
|
||||
import { SettingsRepository } from '@db/repositories/settings.repository';
|
||||
import { AUTH_COOKIE_NAME } from '@/constants';
|
||||
import { ExecutionService } from '@/executions/execution.service';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { Push } from '@/push';
|
||||
import { OrchestrationService } from '@/services/orchestration.service';
|
||||
|
||||
@@ -37,7 +37,7 @@ export async function initActiveWorkflowManager() {
|
||||
|
||||
mockInstance(Push);
|
||||
mockInstance(ExecutionService);
|
||||
const { ActiveWorkflowManager } = await import('@/ActiveWorkflowManager');
|
||||
const { ActiveWorkflowManager } = await import('@/active-workflow-manager');
|
||||
const activeWorkflowManager = Container.get(ActiveWorkflowManager);
|
||||
await activeWorkflowManager.init();
|
||||
return activeWorkflowManager;
|
||||
|
||||
@@ -2,11 +2,11 @@ import type { Config } from '@oclif/core';
|
||||
import type { Class } from 'n8n-core';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
|
||||
import type { BaseCommand } from '@/commands/BaseCommand';
|
||||
import type { BaseCommand } from '@/commands/base-command';
|
||||
import * as testDb from '../testDb';
|
||||
import { TelemetryEventRelay } from '@/events/telemetry-event-relay';
|
||||
import { mockInstance } from '@test/mocking';
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { InternalHooks } from '@/internal-hooks';
|
||||
|
||||
mockInstance(InternalHooks);
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ import { ControllerRegistry } from '@/decorators';
|
||||
import { rawBodyReader, bodyParser } from '@/middlewares';
|
||||
import { PostHogClient } from '@/posthog';
|
||||
import { Push } from '@/push';
|
||||
import { License } from '@/License';
|
||||
import { Logger } from '@/Logger';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logger';
|
||||
import { AuthService } from '@/auth/auth.service';
|
||||
import type { APIRequest } from '@/requests';
|
||||
|
||||
@@ -166,14 +166,14 @@ export const setupTestServer = ({
|
||||
break;
|
||||
|
||||
case 'ldap':
|
||||
const { LdapService } = await import('@/Ldap/ldap.service.ee');
|
||||
await import('@/Ldap/ldap.controller.ee');
|
||||
const { LdapService } = await import('@/ldap/ldap.service.ee');
|
||||
await import('@/ldap/ldap.controller.ee');
|
||||
testServer.license.enable('feat:ldap');
|
||||
await Container.get(LdapService).init();
|
||||
break;
|
||||
|
||||
case 'saml':
|
||||
const { setSamlLoginEnabled } = await import('@/sso/saml/samlHelpers');
|
||||
const { setSamlLoginEnabled } = await import('@/sso/saml/saml-helpers');
|
||||
await import('@/sso/saml/routes/saml.controller.ee');
|
||||
await setSamlLoginEnabled(true);
|
||||
break;
|
||||
@@ -211,11 +211,11 @@ export const setupTestServer = ({
|
||||
break;
|
||||
|
||||
case 'externalSecrets':
|
||||
await import('@/ExternalSecrets/ExternalSecrets.controller.ee');
|
||||
await import('@/external-secrets/external-secrets.controller.ee');
|
||||
break;
|
||||
|
||||
case 'workflowHistory':
|
||||
await import('@/workflows/workflowHistory/workflowHistory.controller.ee');
|
||||
await import('@/workflows/workflow-history/workflow-history.controller.ee');
|
||||
break;
|
||||
|
||||
case 'binaryData':
|
||||
|
||||
@@ -2,9 +2,9 @@ import { readFileSync } from 'fs';
|
||||
import { agent as testAgent } from 'supertest';
|
||||
import type { INodeType, INodeTypeDescription, IWebhookFunctions } from 'n8n-workflow';
|
||||
|
||||
import { AbstractServer } from '@/AbstractServer';
|
||||
import { ExternalHooks } from '@/ExternalHooks';
|
||||
import { NodeTypes } from '@/NodeTypes';
|
||||
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';
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@ import type SuperAgentTest from 'supertest/lib/agent';
|
||||
import { agent as testAgent } from 'supertest';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
|
||||
import { AbstractServer } from '@/AbstractServer';
|
||||
import { LiveWebhooks } from '@/webhooks/LiveWebhooks';
|
||||
import { ExternalHooks } from '@/ExternalHooks';
|
||||
import { TestWebhooks } from '@/webhooks/TestWebhooks';
|
||||
import { WaitingWebhooks } from '@/webhooks/WaitingWebhooks';
|
||||
import { WaitingForms } from '@/WaitingForms';
|
||||
import { AbstractServer } from '@/abstract-server';
|
||||
import { LiveWebhooks } from '@/webhooks/live-webhooks';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { TestWebhooks } from '@/webhooks/test-webhooks';
|
||||
import { WaitingWebhooks } from '@/webhooks/waiting-webhooks';
|
||||
import { WaitingForms } from '@/waiting-forms';
|
||||
import type { IWebhookResponseCallbackData } from '@/webhooks/webhook.types';
|
||||
|
||||
import { mockInstance } from '@test/mocking';
|
||||
|
||||
@@ -4,8 +4,8 @@ import { DateTime } from 'luxon';
|
||||
|
||||
import config from '@/config';
|
||||
import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository';
|
||||
import { License } from '@/License';
|
||||
import { WorkflowHistoryManager } from '@/workflows/workflowHistory/workflowHistoryManager.ee';
|
||||
import { License } from '@/license';
|
||||
import { WorkflowHistoryManager } from '@/workflows/workflow-history/workflow-history-manager.ee';
|
||||
|
||||
import { mockInstance } from '../shared/mocking';
|
||||
import * as testDb from './shared/testDb';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Container from 'typedi';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import { ActiveWorkflowManager } from '@/ActiveWorkflowManager';
|
||||
import { ActiveWorkflowManager } from '@/active-workflow-manager';
|
||||
import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository';
|
||||
import { WorkflowRepository } from '@db/repositories/workflow.repository';
|
||||
import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import Container from 'typedi';
|
||||
|
||||
import type { User } from '@db/entities/User';
|
||||
import { WorkflowSharingService } from '@/workflows/workflowSharing.service';
|
||||
import { WorkflowSharingService } from '@/workflows/workflow-sharing.service';
|
||||
|
||||
import * as testDb from '../shared/testDb';
|
||||
import { createUser } from '../shared/db/users';
|
||||
import { createWorkflow, shareWorkflowWithUsers } from '../shared/db/workflows';
|
||||
import { ProjectService } from '@/services/project.service';
|
||||
import { LicenseMocker } from '../shared/license';
|
||||
import { License } from '@/License';
|
||||
import { License } from '@/license';
|
||||
|
||||
let owner: User;
|
||||
let member: User;
|
||||
|
||||
@@ -7,9 +7,9 @@ import type { Project } from '@db/entities/Project';
|
||||
import { ProjectRepository } from '@db/repositories/project.repository';
|
||||
import type { User } from '@db/entities/User';
|
||||
import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository';
|
||||
import { ActiveWorkflowManager } from '@/ActiveWorkflowManager';
|
||||
import { License } from '@/License';
|
||||
import { UserManagementMailer } from '@/UserManagement/email';
|
||||
import { ActiveWorkflowManager } from '@/active-workflow-manager';
|
||||
import { License } from '@/license';
|
||||
import { UserManagementMailer } from '@/user-management/email';
|
||||
import type { WorkflowWithSharingsMetaDataAndCredentials } from '@/workflows/workflows.types';
|
||||
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
|
||||
@@ -11,9 +11,9 @@ import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repo
|
||||
import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository';
|
||||
import { ProjectRepository } from '@db/repositories/project.repository';
|
||||
import { ProjectService } from '@/services/project.service';
|
||||
import { ActiveWorkflowManager } from '@/ActiveWorkflowManager';
|
||||
import { ActiveWorkflowManager } from '@/active-workflow-manager';
|
||||
import { EnterpriseWorkflowService } from '@/workflows/workflow.service.ee';
|
||||
import { License } from '@/License';
|
||||
import { License } from '@/license';
|
||||
|
||||
import { mockInstance } from '../../shared/mocking';
|
||||
import * as utils from '../shared/utils/';
|
||||
|
||||
Reference in New Issue
Block a user