refactor: Integrate consistent-type-imports in BE packages (no-changelog) (#5270)

This commit is contained in:
Iván Ovejero 2023-01-27 14:56:56 +01:00 committed by GitHub
parent 7d7418140e
commit 2ca959b383
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
148 changed files with 452 additions and 421 deletions

View file

@ -16,6 +16,8 @@ module.exports = {
], ],
rules: { rules: {
'@typescript-eslint/consistent-type-imports': 'error',
// TODO: Remove this // TODO: Remove this
'import/no-cycle': 'warn', 'import/no-cycle': 'warn',
'import/order': 'off', 'import/order': 'off',

View file

@ -8,11 +8,8 @@ import compression from 'compression';
import parseUrl from 'parseurl'; import parseUrl from 'parseurl';
import type { RedisOptions } from 'ioredis'; import type { RedisOptions } from 'ioredis';
import { import type { WebhookHttpMethod } from 'n8n-workflow';
ErrorReporterProxy as ErrorReporter, import { ErrorReporterProxy as ErrorReporter, LoggerProxy as Logger } from 'n8n-workflow';
LoggerProxy as Logger,
WebhookHttpMethod,
} from 'n8n-workflow';
import config from '@/config'; import config from '@/config';
import { N8N_VERSION, inDevelopment } from '@/constants'; import { N8N_VERSION, inDevelopment } from '@/constants';
import * as ActiveWorkflowRunner from '@/ActiveWorkflowRunner'; import * as ActiveWorkflowRunner from '@/ActiveWorkflowRunner';

View file

@ -5,18 +5,14 @@
/* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { import type { IDeferredPromise, IExecuteResponsePromiseData, IRun } from 'n8n-workflow';
createDeferredPromise, import { createDeferredPromise } from 'n8n-workflow';
IDeferredPromise,
IExecuteResponsePromiseData,
IRun,
} from 'n8n-workflow';
import type { ChildProcess } from 'child_process'; import type { ChildProcess } from 'child_process';
import { stringify } from 'flatted'; import { stringify } from 'flatted';
import PCancelable from 'p-cancelable'; import type PCancelable from 'p-cancelable';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { import type {
IExecutingWorkflowData, IExecutingWorkflowData,
IExecutionDb, IExecutionDb,
IExecutionFlattedDb, IExecutionFlattedDb,

View file

@ -11,7 +11,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { ActiveWorkflows, NodeExecuteFunctions } from 'n8n-core'; import { ActiveWorkflows, NodeExecuteFunctions } from 'n8n-core';
import { import type {
ExecutionError, ExecutionError,
IDeferredPromise, IDeferredPromise,
IExecuteData, IExecuteData,
@ -24,21 +24,23 @@ import {
IRunExecutionData, IRunExecutionData,
IWorkflowBase, IWorkflowBase,
IWorkflowExecuteAdditionalData as IWorkflowExecuteAdditionalDataWorkflow, IWorkflowExecuteAdditionalData as IWorkflowExecuteAdditionalDataWorkflow,
NodeHelpers,
WebhookHttpMethod, WebhookHttpMethod,
Workflow,
WorkflowActivateMode, WorkflowActivateMode,
WorkflowActivationError,
WorkflowExecuteMode, WorkflowExecuteMode,
LoggerProxy as Logger,
ErrorReporterProxy as ErrorReporter,
INodeType, INodeType,
} from 'n8n-workflow'; } from 'n8n-workflow';
import {
NodeHelpers,
Workflow,
WorkflowActivationError,
LoggerProxy as Logger,
ErrorReporterProxy as ErrorReporter,
} from 'n8n-workflow';
import express from 'express'; import type express from 'express';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { import type {
IActivationError, IActivationError,
IQueuedWorkflowActivations, IQueuedWorkflowActivations,
IResponseCallbackData, IResponseCallbackData,
@ -51,7 +53,7 @@ import * as WorkflowHelpers from '@/WorkflowHelpers';
import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData'; import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData';
import config from '@/config'; import config from '@/config';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
import type { WebhookEntity } from '@db/entities/WebhookEntity'; import type { WebhookEntity } from '@db/entities/WebhookEntity';
import * as ActiveExecutions from '@/ActiveExecutions'; import * as ActiveExecutions from '@/ActiveExecutions';

View file

@ -5,7 +5,8 @@ import { exec } from 'child_process';
import { access as fsAccess, mkdir as fsMkdir } from 'fs/promises'; import { access as fsAccess, mkdir as fsMkdir } from 'fs/promises';
import axios from 'axios'; import axios from 'axios';
import { UserSettings } from 'n8n-core'; import { UserSettings } from 'n8n-core';
import { LoggerProxy, PublicInstalledPackage } from 'n8n-workflow'; import type { PublicInstalledPackage } from 'n8n-workflow';
import { LoggerProxy } from 'n8n-workflow';
import { import {
NODE_PACKAGE_PREFIX, NODE_PACKAGE_PREFIX,
@ -14,7 +15,7 @@ import {
RESPONSE_ERROR_MESSAGES, RESPONSE_ERROR_MESSAGES,
UNKNOWN_FAILURE_REASON, UNKNOWN_FAILURE_REASON,
} from '@/constants'; } from '@/constants';
import { InstalledPackages } from '@db/entities/InstalledPackages'; import type { InstalledPackages } from '@db/entities/InstalledPackages';
import config from '@/config'; import config from '@/config';
import type { CommunityPackages } from '@/Interfaces'; import type { CommunityPackages } from '@/Interfaces';

View file

@ -1,4 +1,5 @@
import { INodeTypeData, INodeTypeNameVersion, LoggerProxy } from 'n8n-workflow'; import type { INodeTypeData, INodeTypeNameVersion } from 'n8n-workflow';
import { LoggerProxy } from 'n8n-workflow';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { InstalledNodes } from '@db/entities/InstalledNodes'; import { InstalledNodes } from '@db/entities/InstalledNodes';
import { InstalledPackages } from '@db/entities/InstalledPackages'; import { InstalledPackages } from '@db/entities/InstalledPackages';

View file

@ -9,11 +9,10 @@
import { Credentials, NodeExecuteFunctions } from 'n8n-core'; import { Credentials, NodeExecuteFunctions } from 'n8n-core';
import get from 'lodash.get'; import get from 'lodash.get';
import { import type {
ICredentialDataDecryptedObject, ICredentialDataDecryptedObject,
ICredentialsDecrypted, ICredentialsDecrypted,
ICredentialsExpressionResolveValues, ICredentialsExpressionResolveValues,
ICredentialsHelper,
ICredentialTestFunction, ICredentialTestFunction,
ICredentialTestRequestData, ICredentialTestRequestData,
IHttpRequestOptions, IHttpRequestOptions,
@ -25,28 +24,31 @@ import {
INodeProperties, INodeProperties,
INodeType, INodeType,
IVersionedNodeType, IVersionedNodeType,
VersionedNodeType,
IRequestOptionsSimplified, IRequestOptionsSimplified,
IRunExecutionData, IRunExecutionData,
IWorkflowDataProxyAdditionalKeys, IWorkflowDataProxyAdditionalKeys,
NodeHelpers,
RoutingNode,
Workflow,
WorkflowExecuteMode, WorkflowExecuteMode,
ITaskDataConnections, ITaskDataConnections,
LoggerProxy as Logger,
ErrorReporterProxy as ErrorReporter,
IHttpRequestHelper, IHttpRequestHelper,
INodeTypeData, INodeTypeData,
INodeTypes, INodeTypes,
ICredentialTypes, ICredentialTypes,
} from 'n8n-workflow'; } from 'n8n-workflow';
import {
ICredentialsHelper,
VersionedNodeType,
NodeHelpers,
RoutingNode,
Workflow,
LoggerProxy as Logger,
ErrorReporterProxy as ErrorReporter,
} from 'n8n-workflow';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { ICredentialsDb } from '@/Interfaces'; import type { ICredentialsDb } from '@/Interfaces';
import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData'; import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import { CredentialsEntity } from '@db/entities/CredentialsEntity'; import type { CredentialsEntity } from '@db/entities/CredentialsEntity';
import { NodeTypes } from '@/NodeTypes'; import { NodeTypes } from '@/NodeTypes';
import { CredentialTypes } from '@/CredentialTypes'; import { CredentialTypes } from '@/CredentialTypes';
import { CredentialsOverwrites } from '@/CredentialsOverwrites'; import { CredentialsOverwrites } from '@/CredentialsOverwrites';

View file

@ -3,8 +3,7 @@
/* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable no-case-declarations */ /* eslint-disable no-case-declarations */
/* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/naming-convention */
import { import type {
DataSource as Connection,
DataSourceOptions as ConnectionOptions, DataSourceOptions as ConnectionOptions,
EntityManager, EntityManager,
EntityTarget, EntityTarget,
@ -12,8 +11,9 @@ import {
ObjectLiteral, ObjectLiteral,
Repository, Repository,
} from 'typeorm'; } from 'typeorm';
import { TlsOptions } from 'tls'; import { DataSource as Connection } from 'typeorm';
import { DatabaseType, IDatabaseCollections } from '@/Interfaces'; import type { TlsOptions } from 'tls';
import type { DatabaseType, IDatabaseCollections } from '@/Interfaces';
import * as GenericHelpers from '@/GenericHelpers'; import * as GenericHelpers from '@/GenericHelpers';
import config from '@/config'; import config from '@/config';

View file

@ -2,7 +2,11 @@
/* eslint-disable import/no-dynamic-require */ /* eslint-disable import/no-dynamic-require */
/* eslint-disable no-restricted-syntax */ /* eslint-disable no-restricted-syntax */
import * as Db from '@/Db'; import * as Db from '@/Db';
import { IExternalHooksClass, IExternalHooksFileData, IExternalHooksFunctions } from '@/Interfaces'; import type {
IExternalHooksClass,
IExternalHooksFileData,
IExternalHooksFunctions,
} from '@/Interfaces';
import config from '@/config'; import config from '@/config';

View file

@ -4,9 +4,9 @@
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
/* eslint-disable no-underscore-dangle */ /* eslint-disable no-underscore-dangle */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
import express from 'express'; import type express from 'express';
import { readFile as fsReadFile } from 'fs/promises'; import { readFile as fsReadFile } from 'fs/promises';
import { import type {
ExecutionError, ExecutionError,
IDataObject, IDataObject,
INode, INode,
@ -17,14 +17,14 @@ import {
import { validate } from 'class-validator'; import { validate } from 'class-validator';
import config from '@/config'; import config from '@/config';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { ICredentialsDb, IExecutionDb, IExecutionFlattedDb, IWorkflowDb } from '@/Interfaces'; import type { ICredentialsDb, IExecutionDb, IExecutionFlattedDb, IWorkflowDb } from '@/Interfaces';
import * as ResponseHelper from '@/ResponseHelper'; import * as ResponseHelper from '@/ResponseHelper';
// eslint-disable-next-line import/order // eslint-disable-next-line import/order
import { Like } from 'typeorm'; import { Like } from 'typeorm';
import { WorkflowEntity } from '@db/entities/WorkflowEntity'; import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
import { CredentialsEntity } from '@db/entities/CredentialsEntity'; import type { CredentialsEntity } from '@db/entities/CredentialsEntity';
import { TagEntity } from '@db/entities/TagEntity'; import type { TagEntity } from '@db/entities/TagEntity';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
/** /**
* Returns the base URL n8n is reachable from * Returns the base URL n8n is reachable from

View file

@ -3,16 +3,16 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { snakeCase } from 'change-case'; import { snakeCase } from 'change-case';
import { BinaryDataManager } from 'n8n-core'; import { BinaryDataManager } from 'n8n-core';
import { import type {
INodesGraphResult, INodesGraphResult,
INodeTypes, INodeTypes,
IRun, IRun,
ITelemetryTrackProperties, ITelemetryTrackProperties,
IWorkflowBase, IWorkflowBase,
TelemetryHelpers,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { TelemetryHelpers } from 'n8n-workflow';
import { get as pslGet } from 'psl'; import { get as pslGet } from 'psl';
import { import type {
IDiagnosticInfo, IDiagnosticInfo,
IInternalHooksClass, IInternalHooksClass,
ITelemetryUserDeletionData, ITelemetryUserDeletionData,
@ -20,7 +20,7 @@ import {
IExecutionTrackProperties, IExecutionTrackProperties,
IWorkflowExecutionDataProcess, IWorkflowExecutionDataProcess,
} from '@/Interfaces'; } from '@/Interfaces';
import { Telemetry } from '@/telemetry'; import type { Telemetry } from '@/telemetry';
import type { AuthProviderType } from '@db/entities/AuthIdentity'; import type { AuthProviderType } from '@db/entities/AuthIdentity';
import { RoleService } from './role/role.service'; import { RoleService } from './role/role.service';
import { eventBus } from './eventbus'; import { eventBus } from './eventbus';

View file

@ -1,4 +1,4 @@
import { INodeTypes } from 'n8n-workflow'; import type { INodeTypes } from 'n8n-workflow';
import { InternalHooksClass } from '@/InternalHooks'; import { InternalHooksClass } from '@/InternalHooks';
import { Telemetry } from '@/telemetry'; import { Telemetry } from '@/telemetry';

View file

@ -1,9 +1,10 @@
/* eslint-disable no-underscore-dangle */ /* eslint-disable no-underscore-dangle */
import { Client, Entry as LdapUser, ClientOptions } from 'ldapts'; import type { Entry as LdapUser, ClientOptions } from 'ldapts';
import { Client } from 'ldapts';
import type { LdapConfig } from './types'; import type { LdapConfig } from './types';
import { formatUrl, getMappingAttributes } from './helpers'; import { formatUrl, getMappingAttributes } from './helpers';
import { BINARY_AD_ATTRIBUTES } from './constants'; import { BINARY_AD_ATTRIBUTES } from './constants';
import { ConnectionOptions } from 'tls'; import type { ConnectionOptions } from 'tls';
export class LdapService { export class LdapService {
private client: Client | undefined; private client: Client | undefined;

View file

@ -1,7 +1,7 @@
import type { Entry as LdapUser } from 'ldapts'; import type { Entry as LdapUser } from 'ldapts';
import { LoggerProxy as Logger } from 'n8n-workflow'; import { LoggerProxy as Logger } from 'n8n-workflow';
import { QueryFailedError } from 'typeorm/error/QueryFailedError'; import { QueryFailedError } from 'typeorm/error/QueryFailedError';
import { LdapService } from './LdapService.ee'; import type { LdapService } from './LdapService.ee';
import type { LdapConfig } from './types'; import type { LdapConfig } from './types';
import { import {
getLdapUserRole, getLdapUserRole,

View file

@ -1,5 +1,5 @@
import type { RunningMode } from '@db/entities/AuthProviderSyncHistory'; import type { RunningMode } from '@db/entities/AuthProviderSyncHistory';
import { AuthenticatedRequest } from '@/requests'; import type { AuthenticatedRequest } from '@/requests';
export type ConnectionSecurity = 'none' | 'tls' | 'startTls'; export type ConnectionSecurity = 'none' | 'tls' | 'startTls';

View file

@ -1,5 +1,6 @@
import { LicenseManager, TEntitlement, TLicenseContainerStr } from '@n8n_io/license-sdk'; import type { TEntitlement, TLicenseContainerStr } from '@n8n_io/license-sdk';
import { ILogger } from 'n8n-workflow'; import { LicenseManager } from '@n8n_io/license-sdk';
import type { ILogger } from 'n8n-workflow';
import { getLogger } from './Logger'; import { getLogger } from './Logger';
import config from '@/config'; import config from '@/config';
import * as Db from '@/Db'; import * as Db from '@/Db';

View file

@ -1,12 +1,11 @@
import uniq from 'lodash.uniq'; import uniq from 'lodash.uniq';
import type { DirectoryLoader, Types } from 'n8n-core';
import { import {
CUSTOM_EXTENSION_ENV, CUSTOM_EXTENSION_ENV,
UserSettings, UserSettings,
CustomDirectoryLoader, CustomDirectoryLoader,
DirectoryLoader,
PackageDirectoryLoader, PackageDirectoryLoader,
LazyPackageDirectoryLoader, LazyPackageDirectoryLoader,
Types,
} from 'n8n-core'; } from 'n8n-core';
import type { import type {
ICredentialTypes, ICredentialTypes,
@ -27,8 +26,8 @@ import {
} from 'fs/promises'; } from 'fs/promises';
import path from 'path'; import path from 'path';
import config from '@/config'; import config from '@/config';
import { InstalledPackages } from '@db/entities/InstalledPackages'; import type { InstalledPackages } from '@db/entities/InstalledPackages';
import { InstalledNodes } from '@db/entities/InstalledNodes'; import type { InstalledNodes } from '@db/entities/InstalledNodes';
import { executeCommand } from '@/CommunityNodes/helpers'; import { executeCommand } from '@/CommunityNodes/helpers';
import { CLI_DIR, GENERATED_STATIC_DIR, RESPONSE_ERROR_MESSAGES } from '@/constants'; import { CLI_DIR, GENERATED_STATIC_DIR, RESPONSE_ERROR_MESSAGES } from '@/constants';
import { import {

View file

@ -6,7 +6,7 @@
import { inspect } from 'util'; import { inspect } from 'util';
import winston from 'winston'; import winston from 'winston';
import { IDataObject, ILogger, LogTypes } from 'n8n-workflow'; import type { IDataObject, ILogger, LogTypes } from 'n8n-workflow';
import callsites from 'callsites'; import callsites from 'callsites';
import { basename } from 'path'; import { basename } from 'path';

View file

@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/naming-convention */
import express, { Router } from 'express'; import type { Router } from 'express';
import express from 'express';
import fs from 'fs/promises'; import fs from 'fs/promises';
import path from 'path'; import path from 'path';

View file

@ -1,5 +1,5 @@
import express from 'express'; import type express from 'express';
import { IDataObject } from 'n8n-workflow'; import type { IDataObject } from 'n8n-workflow';
import type { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
@ -7,7 +7,7 @@ import type { Role } from '@db/entities/Role';
import type { WorkflowEntity } from '@db/entities/WorkflowEntity'; import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
import * as UserManagementMailer from '@/UserManagement/email/UserManagementMailer'; import type * as UserManagementMailer from '@/UserManagement/email/UserManagementMailer';
import type { Risk } from '@/audit/types'; import type { Risk } from '@/audit/types';

View file

@ -1,11 +1,11 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */ /* eslint-disable @typescript-eslint/no-unsafe-argument */
import express from 'express'; import type express from 'express';
import { CredentialsHelper } from '@/CredentialsHelper'; import { CredentialsHelper } from '@/CredentialsHelper';
import { CredentialTypes } from '@/CredentialTypes'; import { CredentialTypes } from '@/CredentialTypes';
import { CredentialsEntity } from '@db/entities/CredentialsEntity'; import type { CredentialsEntity } from '@db/entities/CredentialsEntity';
import { CredentialRequest } from '@/requests'; import type { CredentialRequest } from '@/requests';
import { CredentialTypeRequest } from '../../../types'; import type { CredentialTypeRequest } from '../../../types';
import { authorize } from '../../shared/middlewares/global.middleware'; import { authorize } from '../../shared/middlewares/global.middleware';
import { validCredentialsProperties, validCredentialType } from './credentials.middleware'; import { validCredentialsProperties, validCredentialType } from './credentials.middleware';

View file

@ -1,11 +1,11 @@
/* eslint-disable @typescript-eslint/no-invalid-void-type */ /* eslint-disable @typescript-eslint/no-invalid-void-type */
import express from 'express'; import type express from 'express';
import { validate } from 'jsonschema'; import { validate } from 'jsonschema';
import { CredentialsHelper } from '@/CredentialsHelper'; import { CredentialsHelper } from '@/CredentialsHelper';
import { CredentialTypes } from '@/CredentialTypes'; import { CredentialTypes } from '@/CredentialTypes';
import { CredentialRequest } from '../../../types'; import type { CredentialRequest } from '../../../types';
import { toJsonSchema } from './credentials.service'; import { toJsonSchema } from './credentials.service';
export const validCredentialType = ( export const validCredentialType = (

View file

@ -1,13 +1,13 @@
import { UserSettings, Credentials } from 'n8n-core'; import { UserSettings, Credentials } from 'n8n-core';
import { IDataObject, INodeProperties, INodePropertyOptions } from 'n8n-workflow'; import type { IDataObject, INodeProperties, INodePropertyOptions } from 'n8n-workflow';
import * as Db from '@/Db'; import * as Db from '@/Db';
import type { ICredentialsDb } from '@/Interfaces'; import type { ICredentialsDb } from '@/Interfaces';
import { CredentialsEntity } from '@db/entities/CredentialsEntity'; import { CredentialsEntity } from '@db/entities/CredentialsEntity';
import { SharedCredentials } from '@db/entities/SharedCredentials'; import { SharedCredentials } from '@db/entities/SharedCredentials';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import { ExternalHooks } from '@/ExternalHooks'; import { ExternalHooks } from '@/ExternalHooks';
import { IDependency, IJsonSchema } from '../../../types'; import type { IDependency, IJsonSchema } from '../../../types';
import { CredentialRequest } from '@/requests'; import type { CredentialRequest } from '@/requests';
export async function getCredentials(credentialId: string): Promise<ICredentialsDb | null> { export async function getCredentials(credentialId: string): Promise<ICredentialsDb | null> {
return Db.collections.Credentials.findOneBy({ id: credentialId }); return Db.collections.Credentials.findOneBy({ id: credentialId });

View file

@ -1,4 +1,4 @@
import express from 'express'; import type express from 'express';
import { BinaryDataManager } from 'n8n-core'; import { BinaryDataManager } from 'n8n-core';
@ -10,7 +10,7 @@ import {
} from './executions.service'; } from './executions.service';
import * as ActiveExecutions from '@/ActiveExecutions'; import * as ActiveExecutions from '@/ActiveExecutions';
import { authorize, validCursor } from '../../shared/middlewares/global.middleware'; import { authorize, validCursor } from '../../shared/middlewares/global.middleware';
import { ExecutionRequest } from '../../../types'; import type { ExecutionRequest } from '../../../types';
import { getSharedWorkflowIds } from '../workflows/workflows.service'; import { getSharedWorkflowIds } from '../workflows/workflows.service';
import { encodeNextCursor } from '../../shared/services/pagination.service'; import { encodeNextCursor } from '../../shared/services/pagination.service';
import { InternalHooksManager } from '@/InternalHooksManager'; import { InternalHooksManager } from '@/InternalHooksManager';

View file

@ -1,5 +1,6 @@
import { parse } from 'flatted'; import { parse } from 'flatted';
import { In, Not, Raw, LessThan, IsNull, FindOptionsWhere } from 'typeorm'; import type { FindOptionsWhere } from 'typeorm';
import { In, Not, Raw, LessThan, IsNull } from 'typeorm';
import * as Db from '@/Db'; import * as Db from '@/Db';
import type { IExecutionFlattedDb, IExecutionResponseApi } from '@/Interfaces'; import type { IExecutionFlattedDb, IExecutionResponseApi } from '@/Interfaces';

View file

@ -1,6 +1,6 @@
import * as Db from '@/Db'; import * as Db from '@/Db';
import { Role } from '@db/entities/Role'; import type { Role } from '@db/entities/Role';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
export function isInstanceOwner(user: User): boolean { export function isInstanceOwner(user: User): boolean {
return user.globalRole.name === 'owner'; return user.globalRole.name === 'owner';

View file

@ -1,6 +1,7 @@
import express from 'express'; import type express from 'express';
import { FindManyOptions, FindOptionsWhere, In } from 'typeorm'; import type { FindManyOptions, FindOptionsWhere } from 'typeorm';
import { In } from 'typeorm';
import * as ActiveWorkflowRunner from '@/ActiveWorkflowRunner'; import * as ActiveWorkflowRunner from '@/ActiveWorkflowRunner';
import config from '@/config'; import config from '@/config';
@ -8,7 +9,7 @@ import { WorkflowEntity } from '@db/entities/WorkflowEntity';
import { InternalHooksManager } from '@/InternalHooksManager'; import { InternalHooksManager } from '@/InternalHooksManager';
import { ExternalHooks } from '@/ExternalHooks'; import { ExternalHooks } from '@/ExternalHooks';
import { addNodeIds, replaceInvalidCredentials } from '@/WorkflowHelpers'; import { addNodeIds, replaceInvalidCredentials } from '@/WorkflowHelpers';
import { WorkflowRequest } from '../../../types'; import type { WorkflowRequest } from '../../../types';
import { authorize, validCursor } from '../../shared/middlewares/global.middleware'; import { authorize, validCursor } from '../../shared/middlewares/global.middleware';
import { encodeNextCursor } from '../../shared/services/pagination.service'; import { encodeNextCursor } from '../../shared/services/pagination.service';
import { getWorkflowOwnerRole, isInstanceOwner } from '../users/users.service'; import { getWorkflowOwnerRole, isInstanceOwner } from '../users/users.service';

View file

@ -1,14 +1,15 @@
import { FindManyOptions, In, UpdateResult } from 'typeorm'; import type { FindManyOptions, UpdateResult } from 'typeorm';
import { In } from 'typeorm';
import intersection from 'lodash.intersection'; import intersection from 'lodash.intersection';
import type { INode } from 'n8n-workflow'; import type { INode } from 'n8n-workflow';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import { WorkflowEntity } from '@db/entities/WorkflowEntity'; import { WorkflowEntity } from '@db/entities/WorkflowEntity';
import { SharedWorkflow } from '@db/entities/SharedWorkflow'; import { SharedWorkflow } from '@db/entities/SharedWorkflow';
import { isInstanceOwner } from '../users/users.service'; import { isInstanceOwner } from '../users/users.service';
import { Role } from '@db/entities/Role'; import type { Role } from '@db/entities/Role';
import config from '@/config'; import config from '@/config';
function insertIf(condition: boolean, elements: string[]): string[] { function insertIf(condition: boolean, elements: string[]): string[] {

View file

@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/no-invalid-void-type */ /* eslint-disable @typescript-eslint/no-invalid-void-type */
import express from 'express'; import type express from 'express';
import { AuthenticatedRequest, PaginatatedRequest } from '../../../types'; import type { AuthenticatedRequest, PaginatatedRequest } from '../../../types';
import { decodeCursor } from '../services/pagination.service'; import { decodeCursor } from '../services/pagination.service';
export const authorize = export const authorize =

View file

@ -1,5 +1,5 @@
import { jsonParse } from 'n8n-workflow'; import { jsonParse } from 'n8n-workflow';
import { import type {
CursorPagination, CursorPagination,
OffsetPagination, OffsetPagination,
PaginationCursorDecoded, PaginationCursorDecoded,

View file

@ -1,6 +1,6 @@
import type Bull from 'bull'; import type Bull from 'bull';
import type { RedisOptions } from 'ioredis'; import type { RedisOptions } from 'ioredis';
import { IExecuteResponsePromiseData } from 'n8n-workflow'; import type { IExecuteResponsePromiseData } from 'n8n-workflow';
import config from '@/config'; import config from '@/config';
import * as ActiveExecutions from '@/ActiveExecutions'; import * as ActiveExecutions from '@/ActiveExecutions';
import * as WebhookHelpers from '@/WebhookHelpers'; import * as WebhookHelpers from '@/WebhookHelpers';

View file

@ -3,7 +3,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { Request, Response } from 'express'; import type { Request, Response } from 'express';
import { parse, stringify } from 'flatted'; import { parse, stringify } from 'flatted';
import picocolors from 'picocolors'; import picocolors from 'picocolors';
import { ErrorReporterProxy as ErrorReporter, NodeApiError } from 'n8n-workflow'; import { ErrorReporterProxy as ErrorReporter, NodeApiError } from 'n8n-workflow';

View file

@ -35,9 +35,12 @@ import { createHmac } from 'crypto';
import { promisify } from 'util'; import { promisify } from 'util';
import cookieParser from 'cookie-parser'; import cookieParser from 'cookie-parser';
import express from 'express'; import express from 'express';
import { FindManyOptions, In } from 'typeorm'; import type { FindManyOptions } from 'typeorm';
import axios, { AxiosRequestConfig } from 'axios'; import { In } from 'typeorm';
import clientOAuth1, { RequestOptions } from 'oauth-1.0a'; import type { AxiosRequestConfig } from 'axios';
import axios from 'axios';
import type { RequestOptions } from 'oauth-1.0a';
import clientOAuth1 from 'oauth-1.0a';
// IMPORTANT! Do not switch to anther bcrypt library unless really necessary and // IMPORTANT! Do not switch to anther bcrypt library unless really necessary and
// tested with all possible systems like Windows, Alpine on ARM, FreeBSD, ... // tested with all possible systems like Windows, Alpine on ARM, FreeBSD, ...
import { compare } from 'bcryptjs'; import { compare } from 'bcryptjs';
@ -50,7 +53,7 @@ import {
UserSettings, UserSettings,
} from 'n8n-core'; } from 'n8n-core';
import { import type {
INodeCredentials, INodeCredentials,
INodeCredentialsDetails, INodeCredentialsDetails,
INodeListSearchResult, INodeListSearchResult,
@ -58,12 +61,11 @@ import {
INodePropertyOptions, INodePropertyOptions,
INodeTypeNameVersion, INodeTypeNameVersion,
ITelemetrySettings, ITelemetrySettings,
LoggerProxy,
jsonParse,
WorkflowExecuteMode, WorkflowExecuteMode,
INodeTypes, INodeTypes,
ICredentialTypes, ICredentialTypes,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { LoggerProxy, jsonParse } from 'n8n-workflow';
import basicAuth from 'basic-auth'; import basicAuth from 'basic-auth';
import jwt from 'jsonwebtoken'; import jwt from 'jsonwebtoken';
@ -124,7 +126,7 @@ import {
} from '@/UserManagement/UserManagementHelper'; } from '@/UserManagement/UserManagementHelper';
import { getInstance as getMailerInstance } from '@/UserManagement/email'; import { getInstance as getMailerInstance } from '@/UserManagement/email';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { import type {
DatabaseType, DatabaseType,
ICredentialsDb, ICredentialsDb,
ICredentialsOverwrite, ICredentialsOverwrite,
@ -147,7 +149,8 @@ import { NodeTypes } from '@/NodeTypes';
import * as Push from '@/Push'; import * as Push from '@/Push';
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials'; import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
import * as ResponseHelper from '@/ResponseHelper'; import * as ResponseHelper from '@/ResponseHelper';
import { WaitTracker, WaitTrackerClass } from '@/WaitTracker'; import type { WaitTrackerClass } from '@/WaitTracker';
import { WaitTracker } from '@/WaitTracker';
import * as WebhookHelpers from '@/WebhookHelpers'; import * as WebhookHelpers from '@/WebhookHelpers';
import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData'; import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData';
import { toHttpNodeParameters } from '@/CurlConverterHelper'; import { toHttpNodeParameters } from '@/CurlConverterHelper';

View file

@ -1,11 +1,11 @@
/* eslint-disable consistent-return */ /* eslint-disable consistent-return */
/* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
import express from 'express'; import type express from 'express';
import { ActiveWebhooks } from 'n8n-core'; import { ActiveWebhooks } from 'n8n-core';
import { import type {
IWebhookData, IWebhookData,
IWorkflowExecuteAdditionalData, IWorkflowExecuteAdditionalData,
WebhookHttpMethod, WebhookHttpMethod,
@ -13,7 +13,7 @@ import {
WorkflowActivateMode, WorkflowActivateMode,
WorkflowExecuteMode, WorkflowExecuteMode,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { IResponseCallbackData, IWorkflowDb } from '@/Interfaces'; import type { IResponseCallbackData, IWorkflowDb } from '@/Interfaces';
import * as Push from '@/Push'; import * as Push from '@/Push';
import * as ResponseHelper from '@/ResponseHelper'; import * as ResponseHelper from '@/ResponseHelper';
import * as WebhookHelpers from '@/WebhookHelpers'; import * as WebhookHelpers from '@/WebhookHelpers';

View file

@ -1,6 +1,6 @@
import { join, dirname } from 'path'; import { join, dirname } from 'path';
import { readdir } from 'fs/promises'; import { readdir } from 'fs/promises';
import { Dirent } from 'fs'; import type { Dirent } from 'fs';
import { NODES_BASE_DIR } from '@/constants'; import { NODES_BASE_DIR } from '@/constants';
const ALLOWED_VERSIONED_DIRNAME_LENGTH = [2, 3]; // e.g. v1, v10 const ALLOWED_VERSIONED_DIRNAME_LENGTH = [2, 3]; // e.g. v1, v10

View file

@ -1,11 +1,11 @@
import type { INode, Workflow } from 'n8n-workflow';
import { import {
INode,
NodeOperationError, NodeOperationError,
SubworkflowOperationError, SubworkflowOperationError,
Workflow,
WorkflowOperationError, WorkflowOperationError,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { FindOptionsWhere, In } from 'typeorm'; import type { FindOptionsWhere } from 'typeorm';
import { In } from 'typeorm';
import * as Db from '@/Db'; import * as Db from '@/Db';
import config from '@/config'; import config from '@/config';
import type { SharedCredentials } from '@db/entities/SharedCredentials'; import type { SharedCredentials } from '@db/entities/SharedCredentials';

View file

@ -1,15 +1,16 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/no-non-null-assertion */
import { In } from 'typeorm'; import { In } from 'typeorm';
import express from 'express'; import type express from 'express';
import { compare, genSaltSync, hash } from 'bcryptjs'; import { compare, genSaltSync, hash } from 'bcryptjs';
import * as Db from '@/Db'; import * as Db from '@/Db';
import * as ResponseHelper from '@/ResponseHelper'; import * as ResponseHelper from '@/ResponseHelper';
import type { PublicUser, WhereClause } from '@/Interfaces'; import type { PublicUser, WhereClause } from '@/Interfaces';
import { MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH, User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import { Role } from '@db/entities/Role'; import { MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH } from '@db/entities/User';
import { AuthenticatedRequest } from '@/requests'; import type { Role } from '@db/entities/Role';
import type { AuthenticatedRequest } from '@/requests';
import config from '@/config'; import config from '@/config';
import { getWebhookBaseUrl } from '@/WebhookHelpers'; import { getWebhookBaseUrl } from '@/WebhookHelpers';
import { getLicense } from '@/License'; import { getLicense } from '@/License';

View file

@ -1,8 +1,9 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { createTransport, Transporter } from 'nodemailer'; import type { Transporter } from 'nodemailer';
import { createTransport } from 'nodemailer';
import { ErrorReporterProxy as ErrorReporter, LoggerProxy as Logger } from 'n8n-workflow'; import { ErrorReporterProxy as ErrorReporter, LoggerProxy as Logger } from 'n8n-workflow';
import config from '@/config'; import config from '@/config';
import { MailData, SendEmailResult, UserManagementMailerImplementation } from './Interfaces'; import type { MailData, SendEmailResult, UserManagementMailerImplementation } from './Interfaces';
export class NodeMailer implements UserManagementMailerImplementation { export class NodeMailer implements UserManagementMailerImplementation {
private transport?: Transporter; private transport?: Transporter;

View file

@ -4,7 +4,7 @@ import Handlebars from 'handlebars';
import { join as pathJoin } from 'path'; import { join as pathJoin } from 'path';
import * as GenericHelpers from '@/GenericHelpers'; import * as GenericHelpers from '@/GenericHelpers';
import config from '@/config'; import config from '@/config';
import { import type {
InviteEmailData, InviteEmailData,
PasswordResetData, PasswordResetData,
SendEmailResult, SendEmailResult,

View file

@ -10,14 +10,15 @@ import {
LoggerProxy as Logger, LoggerProxy as Logger,
WorkflowOperationError, WorkflowOperationError,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { FindManyOptions, LessThanOrEqual, ObjectLiteral } from 'typeorm'; import type { FindManyOptions, ObjectLiteral } from 'typeorm';
import { LessThanOrEqual } from 'typeorm';
import { DateUtils } from 'typeorm/util/DateUtils'; import { DateUtils } from 'typeorm/util/DateUtils';
import * as Db from '@/Db'; import * as Db from '@/Db';
import * as ResponseHelper from '@/ResponseHelper'; import * as ResponseHelper from '@/ResponseHelper';
import * as GenericHelpers from '@/GenericHelpers'; import * as GenericHelpers from '@/GenericHelpers';
import * as ActiveExecutions from '@/ActiveExecutions'; import * as ActiveExecutions from '@/ActiveExecutions';
import { import type {
DatabaseType, DatabaseType,
IExecutionFlattedDb, IExecutionFlattedDb,
IExecutionsStopData, IExecutionsStopData,

View file

@ -1,21 +1,16 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
import { import type { INode, WebhookHttpMethod } from 'n8n-workflow';
INode, import { NodeHelpers, Workflow, LoggerProxy as Logger } from 'n8n-workflow';
NodeHelpers,
WebhookHttpMethod,
Workflow,
LoggerProxy as Logger,
} from 'n8n-workflow';
import express from 'express'; import type express from 'express';
import * as Db from '@/Db'; import * as Db from '@/Db';
import * as ResponseHelper from '@/ResponseHelper'; import * as ResponseHelper from '@/ResponseHelper';
import * as WebhookHelpers from '@/WebhookHelpers'; import * as WebhookHelpers from '@/WebhookHelpers';
import { NodeTypes } from '@/NodeTypes'; import { NodeTypes } from '@/NodeTypes';
import { IExecutionResponse, IResponseCallbackData, IWorkflowDb } from '@/Interfaces'; import type { IExecutionResponse, IResponseCallbackData, IWorkflowDb } from '@/Interfaces';
import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData'; import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData';
import { getWorkflowOwner } from '@/UserManagement/UserManagementHelper'; import { getWorkflowOwner } from '@/UserManagement/UserManagementHelper';

View file

@ -13,13 +13,12 @@
/* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-destructuring */
import express from 'express'; import type express from 'express';
import get from 'lodash.get'; import get from 'lodash.get';
import { BINARY_ENCODING, BinaryDataManager, NodeExecuteFunctions, eventEmitter } from 'n8n-core'; import { BINARY_ENCODING, BinaryDataManager, NodeExecuteFunctions, eventEmitter } from 'n8n-core';
import { import type {
createDeferredPromise,
IBinaryKeyData, IBinaryKeyData,
IDataObject, IDataObject,
IDeferredPromise, IDeferredPromise,
@ -32,14 +31,17 @@ import {
IWebhookResponseData, IWebhookResponseData,
IWorkflowDataProxyAdditionalKeys, IWorkflowDataProxyAdditionalKeys,
IWorkflowExecuteAdditionalData, IWorkflowExecuteAdditionalData,
ErrorReporterProxy as ErrorReporter,
LoggerProxy as Logger,
NodeHelpers,
Workflow, Workflow,
WorkflowExecuteMode, WorkflowExecuteMode,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { import {
createDeferredPromise,
ErrorReporterProxy as ErrorReporter,
LoggerProxy as Logger,
NodeHelpers,
} from 'n8n-workflow';
import type {
IExecutionDb, IExecutionDb,
IResponseCallbackData, IResponseCallbackData,
IWorkflowDb, IWorkflowDb,
@ -51,8 +53,8 @@ import * as WorkflowHelpers from '@/WorkflowHelpers';
import { WorkflowRunner } from '@/WorkflowRunner'; import { WorkflowRunner } from '@/WorkflowRunner';
import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData'; import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData';
import * as ActiveExecutions from '@/ActiveExecutions'; import * as ActiveExecutions from '@/ActiveExecutions';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import { WorkflowEntity } from '@db/entities/WorkflowEntity'; import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
import { getWorkflowOwner } from '@/UserManagement/UserManagementHelper'; import { getWorkflowOwner } from '@/UserManagement/UserManagementHelper';
export const WEBHOOK_METHODS = ['DELETE', 'GET', 'HEAD', 'PATCH', 'POST', 'PUT']; export const WEBHOOK_METHODS = ['DELETE', 'GET', 'HEAD', 'PATCH', 'POST', 'PUT'];

View file

@ -1,5 +1,5 @@
/* eslint-disable no-prototype-builtins */ /* eslint-disable no-prototype-builtins */
import { INode, IWorkflowCredentials } from 'n8n-workflow'; import type { INode, IWorkflowCredentials } from 'n8n-workflow';
import * as Db from '@/Db'; import * as Db from '@/Db';
// eslint-disable-next-line @typescript-eslint/naming-convention // eslint-disable-next-line @typescript-eslint/naming-convention

View file

@ -17,7 +17,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { BinaryDataManager, eventEmitter, UserSettings, WorkflowExecute } from 'n8n-core'; import { BinaryDataManager, eventEmitter, UserSettings, WorkflowExecute } from 'n8n-core';
import { import type {
IDataObject, IDataObject,
IExecuteData, IExecuteData,
IExecuteWorkflowInfo, IExecuteWorkflowInfo,
@ -32,10 +32,12 @@ import {
IWorkflowExecuteHooks, IWorkflowExecuteHooks,
IWorkflowHooksOptionalParameters, IWorkflowHooksOptionalParameters,
IWorkflowSettings, IWorkflowSettings,
WorkflowExecuteMode,
} from 'n8n-workflow';
import {
ErrorReporterProxy as ErrorReporter, ErrorReporterProxy as ErrorReporter,
LoggerProxy as Logger, LoggerProxy as Logger,
Workflow, Workflow,
WorkflowExecuteMode,
WorkflowHooks, WorkflowHooks,
} from 'n8n-workflow'; } from 'n8n-workflow';
@ -46,7 +48,7 @@ import * as Db from '@/Db';
import * as ActiveExecutions from '@/ActiveExecutions'; import * as ActiveExecutions from '@/ActiveExecutions';
import { CredentialsHelper } from '@/CredentialsHelper'; import { CredentialsHelper } from '@/CredentialsHelper';
import { ExternalHooks } from '@/ExternalHooks'; import { ExternalHooks } from '@/ExternalHooks';
import { import type {
IExecutionDb, IExecutionDb,
IExecutionFlattedDb, IExecutionFlattedDb,
IExecutionResponse, IExecutionResponse,

View file

@ -1,5 +1,5 @@
import { In } from 'typeorm'; import { In } from 'typeorm';
import { import type {
IDataObject, IDataObject,
IExecuteData, IExecuteData,
INode, INode,
@ -7,22 +7,28 @@ import {
IRun, IRun,
IRunExecutionData, IRunExecutionData,
ITaskData, ITaskData,
NodeApiError,
WorkflowExecuteMode,
} from 'n8n-workflow';
import {
ErrorReporterProxy as ErrorReporter, ErrorReporterProxy as ErrorReporter,
LoggerProxy as Logger, LoggerProxy as Logger,
NodeApiError,
NodeOperationError, NodeOperationError,
Workflow, Workflow,
WorkflowExecuteMode,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { ICredentialsDb, IWorkflowErrorData, IWorkflowExecutionDataProcess } from '@/Interfaces'; import type {
ICredentialsDb,
IWorkflowErrorData,
IWorkflowExecutionDataProcess,
} from '@/Interfaces';
import { NodeTypes } from '@/NodeTypes'; import { NodeTypes } from '@/NodeTypes';
import { WorkflowRunner } from '@/WorkflowRunner'; import { WorkflowRunner } from '@/WorkflowRunner';
import config from '@/config'; import config from '@/config';
import { WorkflowEntity } from '@db/entities/WorkflowEntity'; import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import { getWorkflowOwner, whereClause } from '@/UserManagement/UserManagementHelper'; import { getWorkflowOwner, whereClause } from '@/UserManagement/UserManagementHelper';
import omit from 'lodash.omit'; import omit from 'lodash.omit';

View file

@ -11,18 +11,21 @@
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
import { BinaryDataManager, IProcessMessage, WorkflowExecute } from 'n8n-core'; import type { IProcessMessage } from 'n8n-core';
import { BinaryDataManager, WorkflowExecute } from 'n8n-core';
import { import type {
ErrorReporterProxy as ErrorReporter,
ExecutionError, ExecutionError,
IDeferredPromise, IDeferredPromise,
IExecuteResponsePromiseData, IExecuteResponsePromiseData,
IRun, IRun,
LoggerProxy as Logger,
Workflow,
WorkflowExecuteMode, WorkflowExecuteMode,
WorkflowHooks, WorkflowHooks,
} from 'n8n-workflow';
import {
ErrorReporterProxy as ErrorReporter,
LoggerProxy as Logger,
Workflow,
WorkflowOperationError, WorkflowOperationError,
} from 'n8n-workflow'; } from 'n8n-workflow';
@ -34,7 +37,7 @@ import * as ActiveExecutions from '@/ActiveExecutions';
import config from '@/config'; import config from '@/config';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { ExternalHooks } from '@/ExternalHooks'; import { ExternalHooks } from '@/ExternalHooks';
import { import type {
IExecutionFlattedDb, IExecutionFlattedDb,
IProcessMessageDataHook, IProcessMessageDataHook,
IWorkflowExecutionDataProcess, IWorkflowExecutionDataProcess,

View file

@ -7,10 +7,10 @@
/* eslint-disable @typescript-eslint/no-use-before-define */ /* eslint-disable @typescript-eslint/no-use-before-define */
/* eslint-disable @typescript-eslint/unbound-method */ /* eslint-disable @typescript-eslint/unbound-method */
import 'source-map-support/register'; import 'source-map-support/register';
import { BinaryDataManager, IProcessMessage, UserSettings, WorkflowExecute } from 'n8n-core'; import type { IProcessMessage } from 'n8n-core';
import { BinaryDataManager, UserSettings, WorkflowExecute } from 'n8n-core';
import { import type {
ErrorReporterProxy as ErrorReporter,
ExecutionError, ExecutionError,
IDataObject, IDataObject,
IExecuteResponsePromiseData, IExecuteResponsePromiseData,
@ -23,10 +23,13 @@ import {
IWorkflowExecuteAdditionalData, IWorkflowExecuteAdditionalData,
IWorkflowExecuteHooks, IWorkflowExecuteHooks,
IWorkflowSettings, IWorkflowSettings,
LoggerProxy,
NodeOperationError, NodeOperationError,
Workflow,
WorkflowExecuteMode, WorkflowExecuteMode,
} from 'n8n-workflow';
import {
ErrorReporterProxy as ErrorReporter,
LoggerProxy,
Workflow,
WorkflowHooks, WorkflowHooks,
WorkflowOperationError, WorkflowOperationError,
} from 'n8n-workflow'; } from 'n8n-workflow';
@ -34,7 +37,10 @@ import { CredentialTypes } from '@/CredentialTypes';
import { CredentialsOverwrites } from '@/CredentialsOverwrites'; import { CredentialsOverwrites } from '@/CredentialsOverwrites';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { ExternalHooks } from '@/ExternalHooks'; import { ExternalHooks } from '@/ExternalHooks';
import { IWorkflowExecuteProcess, IWorkflowExecutionDataProcessWithExecution } from '@/Interfaces'; import type {
IWorkflowExecuteProcess,
IWorkflowExecutionDataProcessWithExecution,
} from '@/Interfaces';
import { NodeTypes } from '@/NodeTypes'; import { NodeTypes } from '@/NodeTypes';
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials'; import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
import * as WebhookHelpers from '@/WebhookHelpers'; import * as WebhookHelpers from '@/WebhookHelpers';

View file

@ -9,7 +9,7 @@ import bodyParser from 'body-parser';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import config from '@/config'; import config from '@/config';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { Role } from '@db/entities/Role'; import type { Role } from '@db/entities/Role';
import { hashPassword } from '@/UserManagement/UserManagementHelper'; import { hashPassword } from '@/UserManagement/UserManagementHelper';
import { eventBus } from '@/eventbus/MessageEventBus/MessageEventBus'; import { eventBus } from '@/eventbus/MessageEventBus/MessageEventBus';

View file

@ -1,5 +1,5 @@
import express from 'express'; import express from 'express';
import { PublicInstalledPackage } from 'n8n-workflow'; import type { PublicInstalledPackage } from 'n8n-workflow';
import config from '@/config'; import config from '@/config';
import { InternalHooksManager } from '@/InternalHooksManager'; import { InternalHooksManager } from '@/InternalHooksManager';
@ -31,7 +31,7 @@ import {
} from '@/constants'; } from '@/constants';
import { isAuthenticatedRequest } from '@/UserManagement/UserManagementHelper'; import { isAuthenticatedRequest } from '@/UserManagement/UserManagementHelper';
import { InstalledPackages } from '@db/entities/InstalledPackages'; import type { InstalledPackages } from '@db/entities/InstalledPackages';
import type { CommunityPackages } from '@/Interfaces'; import type { CommunityPackages } from '@/Interfaces';
import type { NodeRequest } from '@/requests'; import type { NodeRequest } from '@/requests';

View file

@ -9,13 +9,13 @@ import express from 'express';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { ExternalHooks } from '@/ExternalHooks'; import { ExternalHooks } from '@/ExternalHooks';
import { IExternalHooksClass, ITagWithCountDb } from '@/Interfaces'; import type { IExternalHooksClass, ITagWithCountDb } from '@/Interfaces';
import * as ResponseHelper from '@/ResponseHelper'; import * as ResponseHelper from '@/ResponseHelper';
import config from '@/config'; import config from '@/config';
import * as TagHelpers from '@/TagHelpers'; import * as TagHelpers from '@/TagHelpers';
import { validateEntity } from '@/GenericHelpers'; import { validateEntity } from '@/GenericHelpers';
import { TagEntity } from '@db/entities/TagEntity'; import { TagEntity } from '@db/entities/TagEntity';
import { TagsRequest } from '@/requests'; import type { TagsRequest } from '@/requests';
export const externalHooks: IExternalHooksClass = ExternalHooks(); export const externalHooks: IExternalHooksClass = ExternalHooks();

View file

@ -1,4 +1,4 @@
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import { whereClause } from '@/UserManagement/UserManagementHelper'; import { whereClause } from '@/UserManagement/UserManagementHelper';
import express from 'express'; import express from 'express';
import { LoggerProxy } from 'n8n-workflow'; import { LoggerProxy } from 'n8n-workflow';
@ -11,7 +11,7 @@ import type {
} from '@/Interfaces'; } from '@/Interfaces';
import { StatisticsNames } from '../databases/entities/WorkflowStatistics'; import { StatisticsNames } from '../databases/entities/WorkflowStatistics';
import { getLogger } from '../Logger'; import { getLogger } from '../Logger';
import { ExecutionRequest } from '../requests'; import type { ExecutionRequest } from '../requests';
export const workflowStatsController = express.Router(); export const workflowStatsController = express.Router();

View file

@ -1,4 +1,5 @@
import { FindOperator, MoreThanOrEqual } from 'typeorm'; import type { FindOperator } from 'typeorm';
import { MoreThanOrEqual } from 'typeorm';
import { DateUtils } from 'typeorm/util/DateUtils'; import { DateUtils } from 'typeorm/util/DateUtils';
import * as Db from '@/Db'; import * as Db from '@/Db';
import config from '@/config'; import config from '@/config';

View file

@ -1,12 +1,12 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/no-non-null-assertion */
import jwt from 'jsonwebtoken'; import jwt from 'jsonwebtoken';
import { Response } from 'express'; import type { Response } from 'express';
import { createHash } from 'crypto'; import { createHash } from 'crypto';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { AUTH_COOKIE_NAME } from '@/constants'; import { AUTH_COOKIE_NAME } from '@/constants';
import { JwtPayload, JwtToken } from '@/Interfaces'; import type { JwtPayload, JwtToken } from '@/Interfaces';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import config from '@/config'; import config from '@/config';
import * as ResponseHelper from '@/ResponseHelper'; import * as ResponseHelper from '@/ResponseHelper';

View file

@ -1,6 +1,7 @@
import { Command } from '@oclif/core'; import { Command } from '@oclif/core';
import { LoggerProxy } from 'n8n-workflow'; import { LoggerProxy } from 'n8n-workflow';
import { getLogger, Logger } from '@/Logger'; import type { Logger } from '@/Logger';
import { getLogger } from '@/Logger';
import { User } from '@db/entities/User'; import { User } from '@db/entities/User';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { inTest } from '@/constants'; import { inTest } from '@/constants';

View file

@ -1,7 +1,8 @@
import Command, { flags } from '@oclif/command'; import Command, { flags } from '@oclif/command';
import { LoggerProxy } from 'n8n-workflow'; import { LoggerProxy } from 'n8n-workflow';
import { UserSettings } from 'n8n-core'; import { UserSettings } from 'n8n-core';
import { getLogger, Logger } from '@/Logger'; import type { Logger } from '@/Logger';
import { getLogger } from '@/Logger';
import { audit } from '@/audit'; import { audit } from '@/audit';
import { RISK_CATEGORIES } from '@/audit/constants'; import { RISK_CATEGORIES } from '@/audit/constants';
import { CredentialTypes } from '@/CredentialTypes'; import { CredentialTypes } from '@/CredentialTypes';

View file

@ -1,7 +1,8 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable no-console */ /* eslint-disable no-console */
import { Command, flags } from '@oclif/command'; import { Command, flags } from '@oclif/command';
import { DataSource as Connection, DataSourceOptions as ConnectionOptions } from 'typeorm'; import type { DataSourceOptions as ConnectionOptions } from 'typeorm';
import { DataSource as Connection } from 'typeorm';
import { LoggerProxy } from 'n8n-workflow'; import { LoggerProxy } from 'n8n-workflow';
import { getLogger } from '@/Logger'; import { getLogger } from '@/Logger';

View file

@ -4,7 +4,8 @@
import { promises as fs } from 'fs'; import { promises as fs } from 'fs';
import { Command, flags } from '@oclif/command'; import { Command, flags } from '@oclif/command';
import { BinaryDataManager, UserSettings, PLACEHOLDER_EMPTY_WORKFLOW_ID } from 'n8n-core'; import { BinaryDataManager, UserSettings, PLACEHOLDER_EMPTY_WORKFLOW_ID } from 'n8n-core';
import { LoggerProxy, IWorkflowBase } from 'n8n-workflow'; import type { IWorkflowBase } from 'n8n-workflow';
import { LoggerProxy } from 'n8n-workflow';
import * as ActiveExecutions from '@/ActiveExecutions'; import * as ActiveExecutions from '@/ActiveExecutions';
import { CredentialsOverwrites } from '@/CredentialsOverwrites'; import { CredentialsOverwrites } from '@/CredentialsOverwrites';
@ -16,7 +17,7 @@ import { NodeTypes } from '@/NodeTypes';
import { InternalHooksManager } from '@/InternalHooksManager'; import { InternalHooksManager } from '@/InternalHooksManager';
import * as WorkflowHelpers from '@/WorkflowHelpers'; import * as WorkflowHelpers from '@/WorkflowHelpers';
import { WorkflowRunner } from '@/WorkflowRunner'; import { WorkflowRunner } from '@/WorkflowRunner';
import { IWorkflowExecutionDataProcess } from '@/Interfaces'; import type { IWorkflowExecutionDataProcess } from '@/Interfaces';
import { getLogger } from '@/Logger'; import { getLogger } from '@/Logger';
import config from '@/config'; import config from '@/config';
import { getInstanceOwner } from '@/UserManagement/UserManagementHelper'; import { getInstanceOwner } from '@/UserManagement/UserManagementHelper';

View file

@ -11,7 +11,8 @@ import { Command, flags } from '@oclif/command';
import { BinaryDataManager, UserSettings } from 'n8n-core'; import { BinaryDataManager, UserSettings } from 'n8n-core';
import { ITaskData, LoggerProxy, sleep } from 'n8n-workflow'; import type { ITaskData } from 'n8n-workflow';
import { LoggerProxy, sleep } from 'n8n-workflow';
import { sep } from 'path'; import { sep } from 'path';
@ -29,9 +30,9 @@ import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
import { NodeTypes } from '@/NodeTypes'; import { NodeTypes } from '@/NodeTypes';
import { InternalHooksManager } from '@/InternalHooksManager'; import { InternalHooksManager } from '@/InternalHooksManager';
import { WorkflowRunner } from '@/WorkflowRunner'; import { WorkflowRunner } from '@/WorkflowRunner';
import { IWorkflowDb, IWorkflowExecutionDataProcess } from '@/Interfaces'; import type { IWorkflowDb, IWorkflowExecutionDataProcess } from '@/Interfaces';
import config from '@/config'; import config from '@/config';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import { getInstanceOwner } from '@/UserManagement/UserManagementHelper'; import { getInstanceOwner } from '@/UserManagement/UserManagementHelper';
import { findCliWorkflowStart } from '@/utils'; import { findCliWorkflowStart } from '@/utils';
import { initEvents } from '@/events'; import { initEvents } from '@/events';

View file

@ -6,7 +6,8 @@ import { Command, flags } from '@oclif/command';
import { Credentials, UserSettings } from 'n8n-core'; import { Credentials, UserSettings } from 'n8n-core';
import { IDataObject, LoggerProxy } from 'n8n-workflow'; import type { IDataObject } from 'n8n-workflow';
import { LoggerProxy } from 'n8n-workflow';
import fs from 'fs'; import fs from 'fs';
import path from 'path'; import path from 'path';

View file

@ -3,7 +3,8 @@
/* eslint-disable no-console */ /* eslint-disable no-console */
import { Command, flags } from '@oclif/command'; import { Command, flags } from '@oclif/command';
import { IDataObject, LoggerProxy } from 'n8n-workflow'; import type { IDataObject } from 'n8n-workflow';
import { LoggerProxy } from 'n8n-workflow';
import fs from 'fs'; import fs from 'fs';
import path from 'path'; import path from 'path';

View file

@ -15,9 +15,9 @@ import type { EntityManager } from 'typeorm';
import { getLogger } from '@/Logger'; import { getLogger } from '@/Logger';
import config from '@/config'; import config from '@/config';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import { SharedCredentials } from '@db/entities/SharedCredentials'; import { SharedCredentials } from '@db/entities/SharedCredentials';
import { Role } from '@db/entities/Role'; import type { Role } from '@db/entities/Role';
import { CredentialsEntity } from '@db/entities/CredentialsEntity'; import { CredentialsEntity } from '@db/entities/CredentialsEntity';
import { disableAutoGeneratedIds } from '@db/utils/commandHelpers'; import { disableAutoGeneratedIds } from '@db/utils/commandHelpers';

View file

@ -10,7 +10,8 @@
/* eslint-disable no-console */ /* eslint-disable no-console */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { Command, flags } from '@oclif/command'; import { Command, flags } from '@oclif/command';
import { INode, INodeCredentialsDetails, LoggerProxy } from 'n8n-workflow'; import type { INode, INodeCredentialsDetails } from 'n8n-workflow';
import { LoggerProxy } from 'n8n-workflow';
import fs from 'fs'; import fs from 'fs';
import glob from 'fast-glob'; import glob from 'fast-glob';
import { UserSettings } from 'n8n-core'; import { UserSettings } from 'n8n-core';
@ -21,8 +22,8 @@ import config from '@/config';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { SharedWorkflow } from '@db/entities/SharedWorkflow'; import { SharedWorkflow } from '@db/entities/SharedWorkflow';
import { WorkflowEntity } from '@db/entities/WorkflowEntity'; import { WorkflowEntity } from '@db/entities/WorkflowEntity';
import { Role } from '@db/entities/Role'; import type { Role } from '@db/entities/Role';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import { setTagsForImport } from '@/TagHelpers'; import { setTagsForImport } from '@/TagHelpers';
import type { ICredentialsDb, IWorkflowToImport } from '@/Interfaces'; import type { ICredentialsDb, IWorkflowToImport } from '@/Interfaces';
import { disableAutoGeneratedIds } from '@db/utils/commandHelpers'; import { disableAutoGeneratedIds } from '@db/utils/commandHelpers';

View file

@ -2,7 +2,7 @@
/* eslint-disable no-console */ /* eslint-disable no-console */
import { Command, flags } from '@oclif/command'; import { Command, flags } from '@oclif/command';
import { IDataObject } from 'n8n-workflow'; import type { IDataObject } from 'n8n-workflow';
import * as Db from '@/Db'; import * as Db from '@/Db';

View file

@ -28,7 +28,7 @@ import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
import { NodeTypes } from '@/NodeTypes'; import { NodeTypes } from '@/NodeTypes';
import { InternalHooksManager } from '@/InternalHooksManager'; import { InternalHooksManager } from '@/InternalHooksManager';
import * as Server from '@/Server'; import * as Server from '@/Server';
import { DatabaseType } from '@/Interfaces'; import type { DatabaseType } from '@/Interfaces';
import * as TestWebhooks from '@/TestWebhooks'; import * as TestWebhooks from '@/TestWebhooks';
import { WaitTracker } from '@/WaitTracker'; import { WaitTracker } from '@/WaitTracker';

View file

@ -3,7 +3,8 @@
/* eslint-disable no-console */ /* eslint-disable no-console */
import { Command, flags } from '@oclif/command'; import { Command, flags } from '@oclif/command';
import { IDataObject, LoggerProxy } from 'n8n-workflow'; import type { IDataObject } from 'n8n-workflow';
import { LoggerProxy } from 'n8n-workflow';
import * as Db from '@/Db'; import * as Db from '@/Db';

View file

@ -1,6 +1,6 @@
import { Not } from 'typeorm'; import { Not } from 'typeorm';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { CredentialsEntity } from '@db/entities/CredentialsEntity'; import type { CredentialsEntity } from '@db/entities/CredentialsEntity';
import { BaseCommand } from '../BaseCommand'; import { BaseCommand } from '../BaseCommand';
export class Reset extends BaseCommand { export class Reset extends BaseCommand {

View file

@ -5,20 +5,13 @@
/* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/restrict-template-expressions */
import express from 'express'; import express from 'express';
import http from 'http'; import http from 'http';
import PCancelable from 'p-cancelable'; import type PCancelable from 'p-cancelable';
import { Command, flags } from '@oclif/command'; import { Command, flags } from '@oclif/command';
import { BinaryDataManager, UserSettings, WorkflowExecute } from 'n8n-core'; import { BinaryDataManager, UserSettings, WorkflowExecute } from 'n8n-core';
import { import type { IExecuteResponsePromiseData, INodeTypes, IRun } from 'n8n-workflow';
IExecuteResponsePromiseData, import { Workflow, LoggerProxy, ErrorReporterProxy as ErrorReporter, sleep } from 'n8n-workflow';
INodeTypes,
IRun,
Workflow,
LoggerProxy,
ErrorReporterProxy as ErrorReporter,
sleep,
} from 'n8n-workflow';
import { CredentialsOverwrites } from '@/CredentialsOverwrites'; import { CredentialsOverwrites } from '@/CredentialsOverwrites';
import { CredentialTypes } from '@/CredentialTypes'; import { CredentialTypes } from '@/CredentialTypes';

View file

@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
import { IBinaryDataConfig } from 'n8n-core'; import type { IBinaryDataConfig } from 'n8n-core';
import { schema } from './schema'; import type { schema } from './schema';
// ----------------------------------- // -----------------------------------
// transformers // transformers

View file

@ -3,11 +3,8 @@
/* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/naming-convention */
import { readFileSync } from 'fs'; import { readFileSync } from 'fs';
import { resolve, join, dirname } from 'path'; import { resolve, join, dirname } from 'path';
import { import type { n8n } from 'n8n-core';
n8n, import { RESPONSE_ERROR_MESSAGES as CORE_RESPONSE_ERROR_MESSAGES, UserSettings } from 'n8n-core';
RESPONSE_ERROR_MESSAGES as CORE_RESPONSE_ERROR_MESSAGES,
UserSettings,
} from 'n8n-core';
import { jsonParse } from 'n8n-workflow'; import { jsonParse } from 'n8n-workflow';
const { NODE_ENV, E2E_TESTS } = process.env; const { NODE_ENV, E2E_TESTS } = process.env;

View file

@ -4,11 +4,12 @@ import { AuthError, BadRequestError, InternalServerError } from '@/ResponseHelpe
import { sanitizeUser } from '@/UserManagement/UserManagementHelper'; import { sanitizeUser } from '@/UserManagement/UserManagementHelper';
import { issueCookie, resolveJwt } from '@/auth/jwt'; import { issueCookie, resolveJwt } from '@/auth/jwt';
import { AUTH_COOKIE_NAME } from '@/constants'; import { AUTH_COOKIE_NAME } from '@/constants';
import type { Request, Response } from 'express'; import { Request, Response } from 'express';
import type { ILogger } from 'n8n-workflow'; import type { ILogger } from 'n8n-workflow';
import type { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import type { LoginRequest, UserRequest } from '@/requests'; import { LoginRequest, UserRequest } from '@/requests';
import { In, Repository } from 'typeorm'; import type { Repository } from 'typeorm';
import { In } from 'typeorm';
import type { Config } from '@/config'; import type { Config } from '@/config';
import type { PublicUser, IDatabaseCollections, IInternalHooksClass } from '@/Interfaces'; import type { PublicUser, IDatabaseCollections, IInternalHooksClass } from '@/Interfaces';
import { handleEmailLogin, handleLdapLogin } from '@/auth'; import { handleEmailLogin, handleLdapLogin } from '@/auth';

View file

@ -10,10 +10,10 @@ import { BadRequestError } from '@/ResponseHelper';
import { User } from '@db/entities/User'; import { User } from '@db/entities/User';
import { validateEntity } from '@/GenericHelpers'; import { validateEntity } from '@/GenericHelpers';
import { issueCookie } from '@/auth/jwt'; import { issueCookie } from '@/auth/jwt';
import type { Response } from 'express'; import { Response } from 'express';
import type { Repository } from 'typeorm'; import type { Repository } from 'typeorm';
import type { ILogger } from 'n8n-workflow'; import type { ILogger } from 'n8n-workflow';
import type { AuthenticatedRequest, MeRequest } from '@/requests'; import { AuthenticatedRequest, MeRequest } from '@/requests';
import type { import type {
PublicUser, PublicUser,
IDatabaseCollections, IDatabaseCollections,

View file

@ -8,11 +8,11 @@ import {
validatePassword, validatePassword,
} from '@/UserManagement/UserManagementHelper'; } from '@/UserManagement/UserManagementHelper';
import { issueCookie } from '@/auth/jwt'; import { issueCookie } from '@/auth/jwt';
import type { Response } from 'express'; import { Response } from 'express';
import type { Repository } from 'typeorm'; import type { Repository } from 'typeorm';
import type { ILogger } from 'n8n-workflow'; import type { ILogger } from 'n8n-workflow';
import type { Config } from '@/config'; import type { Config } from '@/config';
import type { OwnerRequest } from '@/requests'; import { OwnerRequest } from '@/requests';
import type { IDatabaseCollections, IInternalHooksClass } from '@/Interfaces'; import type { IDatabaseCollections, IInternalHooksClass } from '@/Interfaces';
import type { Settings } from '@db/entities/Settings'; import type { Settings } from '@db/entities/Settings';
import type { User } from '@db/entities/User'; import type { User } from '@db/entities/User';

View file

@ -1,4 +1,5 @@
import { IsNull, MoreThanOrEqual, Not, Repository } from 'typeorm'; import type { Repository } from 'typeorm';
import { IsNull, MoreThanOrEqual, Not } from 'typeorm';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import validator from 'validator'; import validator from 'validator';
import { Get, Post, RestController } from '@/decorators'; import { Get, Post, RestController } from '@/decorators';
@ -15,11 +16,11 @@ import {
} from '@/UserManagement/UserManagementHelper'; } from '@/UserManagement/UserManagementHelper';
import * as UserManagementMailer from '@/UserManagement/email'; import * as UserManagementMailer from '@/UserManagement/email';
import type { Response } from 'express'; import { Response } from 'express';
import type { ILogger } from 'n8n-workflow'; import type { ILogger } from 'n8n-workflow';
import type { Config } from '@/config'; import type { Config } from '@/config';
import type { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import type { PasswordResetRequest } from '@/requests'; import { PasswordResetRequest } from '@/requests';
import type { IDatabaseCollections, IExternalHooksClass, IInternalHooksClass } from '@/Interfaces'; import type { IDatabaseCollections, IExternalHooksClass, IInternalHooksClass } from '@/Interfaces';
import { issueCookie } from '@/auth/jwt'; import { issueCookie } from '@/auth/jwt';
import { isLdapEnabled } from '@/Ldap/helpers'; import { isLdapEnabled } from '@/Ldap/helpers';

View file

@ -1,6 +1,8 @@
import validator from 'validator'; import validator from 'validator';
import { In, Repository } from 'typeorm'; import type { Repository } from 'typeorm';
import { ErrorReporterProxy as ErrorReporter, ILogger } from 'n8n-workflow'; import { In } from 'typeorm';
import type { ILogger } from 'n8n-workflow';
import { ErrorReporterProxy as ErrorReporter } from 'n8n-workflow';
import { User } from '@db/entities/User'; import { User } from '@db/entities/User';
import { SharedCredentials } from '@db/entities/SharedCredentials'; import { SharedCredentials } from '@db/entities/SharedCredentials';
import { SharedWorkflow } from '@db/entities/SharedWorkflow'; import { SharedWorkflow } from '@db/entities/SharedWorkflow';
@ -17,9 +19,9 @@ import {
} from '@/UserManagement/UserManagementHelper'; } from '@/UserManagement/UserManagementHelper';
import { issueCookie } from '@/auth/jwt'; import { issueCookie } from '@/auth/jwt';
import { BadRequestError, InternalServerError, NotFoundError } from '@/ResponseHelper'; import { BadRequestError, InternalServerError, NotFoundError } from '@/ResponseHelper';
import type { Response } from 'express'; import { Response } from 'express';
import type { Config } from '@/config'; import type { Config } from '@/config';
import type { UserRequest } from '@/requests'; import { UserRequest } from '@/requests';
import type { UserManagementMailer } from '@/UserManagement/email'; import type { UserManagementMailer } from '@/UserManagement/email';
import type { Role } from '@db/entities/Role'; import type { Role } from '@db/entities/Role';
import type { import type {

View file

@ -1,5 +1,6 @@
import express from 'express'; import express from 'express';
import { deepCopy, INodeCredentialTestResult, LoggerProxy } from 'n8n-workflow'; import type { INodeCredentialTestResult } from 'n8n-workflow';
import { deepCopy, LoggerProxy } from 'n8n-workflow';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { InternalHooksManager } from '@/InternalHooksManager'; import { InternalHooksManager } from '@/InternalHooksManager';
import * as ResponseHelper from '@/ResponseHelper'; import * as ResponseHelper from '@/ResponseHelper';

View file

@ -1,7 +1,8 @@
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
import express from 'express'; import express from 'express';
import { deepCopy, INodeCredentialTestResult, LoggerProxy } from 'n8n-workflow'; import type { INodeCredentialTestResult } from 'n8n-workflow';
import { deepCopy, LoggerProxy } from 'n8n-workflow';
import * as GenericHelpers from '@/GenericHelpers'; import * as GenericHelpers from '@/GenericHelpers';
import { InternalHooksManager } from '@/InternalHooksManager'; import { InternalHooksManager } from '@/InternalHooksManager';

View file

@ -1,10 +1,11 @@
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
import { DeleteResult, EntityManager, FindOptionsWhere, In, Not } from 'typeorm'; import type { DeleteResult, EntityManager, FindOptionsWhere } from 'typeorm';
import { In, Not } from 'typeorm';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { RoleService } from '@/role/role.service'; import { RoleService } from '@/role/role.service';
import { CredentialsEntity } from '@db/entities/CredentialsEntity'; import { CredentialsEntity } from '@db/entities/CredentialsEntity';
import { SharedCredentials } from '@db/entities/SharedCredentials'; import { SharedCredentials } from '@db/entities/SharedCredentials';
import { User } from '@db/entities/User'; import type { User } from '@db/entities/User';
import { UserService } from '@/user/user.service'; import { UserService } from '@/user/user.service';
import { CredentialsService } from './credentials.service'; import { CredentialsService } from './credentials.service';
import type { CredentialWithSharings } from './credentials.types'; import type { CredentialWithSharings } from './credentials.types';

View file

@ -1,20 +1,19 @@
/* eslint-disable no-restricted-syntax */ /* eslint-disable no-restricted-syntax */
import { Credentials, UserSettings } from 'n8n-core'; import { Credentials, UserSettings } from 'n8n-core';
import { import type {
deepCopy,
ICredentialDataDecryptedObject, ICredentialDataDecryptedObject,
ICredentialsDecrypted, ICredentialsDecrypted,
ICredentialType, ICredentialType,
INodeCredentialTestResult, INodeCredentialTestResult,
INodeProperties, INodeProperties,
LoggerProxy,
NodeHelpers,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { FindManyOptions, FindOptionsWhere, In } from 'typeorm'; import { deepCopy, LoggerProxy, NodeHelpers } from 'n8n-workflow';
import type { FindManyOptions, FindOptionsWhere } from 'typeorm';
import { In } from 'typeorm';
import * as Db from '@/Db'; import * as Db from '@/Db';
import * as ResponseHelper from '@/ResponseHelper'; import * as ResponseHelper from '@/ResponseHelper';
import { ICredentialsDb } from '@/Interfaces'; import type { ICredentialsDb } from '@/Interfaces';
import { CredentialsHelper, createCredentialsFromCredentialsEntity } from '@/CredentialsHelper'; import { CredentialsHelper, createCredentialsFromCredentialsEntity } from '@/CredentialsHelper';
import { CREDENTIAL_BLANKING_VALUE, RESPONSE_ERROR_MESSAGES } from '@/constants'; import { CREDENTIAL_BLANKING_VALUE, RESPONSE_ERROR_MESSAGES } from '@/constants';
import { CredentialsEntity } from '@db/entities/CredentialsEntity'; import { CredentialsEntity } from '@db/entities/CredentialsEntity';

View file

@ -7,18 +7,18 @@ import set from 'lodash.set';
import split from 'lodash.split'; import split from 'lodash.split';
import unset from 'lodash.unset'; import unset from 'lodash.unset';
import { Credentials, UserSettings } from 'n8n-core'; import { Credentials, UserSettings } from 'n8n-core';
import { import type {
LoggerProxy,
WorkflowExecuteMode, WorkflowExecuteMode,
INodeCredentialsDetails, INodeCredentialsDetails,
ICredentialsEncrypted, ICredentialsEncrypted,
IDataObject, IDataObject,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { LoggerProxy } from 'n8n-workflow';
import { resolve as pathResolve } from 'path'; import { resolve as pathResolve } from 'path';
import * as Db from '@/Db'; import * as Db from '@/Db';
import * as ResponseHelper from '@/ResponseHelper'; import * as ResponseHelper from '@/ResponseHelper';
import { ICredentialsDb } from '@/Interfaces'; import type { ICredentialsDb } from '@/Interfaces';
import { RESPONSE_ERROR_MESSAGES, TEMPLATES_DIR } from '@/constants'; import { RESPONSE_ERROR_MESSAGES, TEMPLATES_DIR } from '@/constants';
import { import {
CredentialsHelper, CredentialsHelper,
@ -26,7 +26,7 @@ import {
getCredentialWithoutUser, getCredentialWithoutUser,
} from '@/CredentialsHelper'; } from '@/CredentialsHelper';
import { getLogger } from '@/Logger'; import { getLogger } from '@/Logger';
import { OAuthRequest } from '@/requests'; import type { OAuthRequest } from '@/requests';
import { ExternalHooks } from '@/ExternalHooks'; import { ExternalHooks } from '@/ExternalHooks';
import config from '@/config'; import config from '@/config';
import { getInstanceBaseUrl } from '@/UserManagement/UserManagementHelper'; import { getInstanceBaseUrl } from '@/UserManagement/UserManagementHelper';

View file

@ -1,7 +1,8 @@
import type { WorkflowExecuteMode } from 'n8n-workflow'; import { WorkflowExecuteMode } from 'n8n-workflow';
import { Column, Entity, Generated, Index, PrimaryColumn } from 'typeorm'; import { Column, Entity, Generated, Index, PrimaryColumn } from 'typeorm';
import { datetimeColumnType, jsonColumnType } from './AbstractEntity'; import { datetimeColumnType, jsonColumnType } from './AbstractEntity';
import type { IExecutionFlattedDb, IWorkflowDb } from '@/Interfaces'; import { IWorkflowDb } from '@/Interfaces';
import type { IExecutionFlattedDb } from '@/Interfaces';
import { idStringifier } from '../utils/transformers'; import { idStringifier } from '../utils/transformers';
@Entity() @Entity()

View file

@ -1,5 +1,5 @@
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from 'typeorm'; import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from 'typeorm';
import type { InstalledPackages } from './InstalledPackages'; import { InstalledPackages } from './InstalledPackages';
@Entity() @Entity()
export class InstalledNodes { export class InstalledNodes {

View file

@ -1,7 +1,7 @@
import { Column, Entity, ManyToOne, PrimaryColumn } from 'typeorm'; import { Column, Entity, ManyToOne, PrimaryColumn } from 'typeorm';
import type { CredentialsEntity } from './CredentialsEntity'; import { CredentialsEntity } from './CredentialsEntity';
import type { User } from './User'; import { User } from './User';
import type { Role } from './Role'; import { Role } from './Role';
import { AbstractEntity } from './AbstractEntity'; import { AbstractEntity } from './AbstractEntity';
import { idStringifier } from '../utils/transformers'; import { idStringifier } from '../utils/transformers';

View file

@ -1,7 +1,7 @@
import { Column, Entity, ManyToOne, PrimaryColumn } from 'typeorm'; import { Column, Entity, ManyToOne, PrimaryColumn } from 'typeorm';
import type { WorkflowEntity } from './WorkflowEntity'; import { WorkflowEntity } from './WorkflowEntity';
import type { User } from './User'; import { User } from './User';
import type { Role } from './Role'; import { Role } from './Role';
import { AbstractEntity } from './AbstractEntity'; import { AbstractEntity } from './AbstractEntity';
import { idStringifier } from '../utils/transformers'; import { idStringifier } from '../utils/transformers';

View file

@ -12,7 +12,7 @@ import {
} from 'typeorm'; } from 'typeorm';
import { IsEmail, IsString, Length } from 'class-validator'; import { IsEmail, IsString, Length } from 'class-validator';
import type { IUser } from 'n8n-workflow'; import type { IUser } from 'n8n-workflow';
import type { Role } from './Role'; import { Role } from './Role';
import type { SharedWorkflow } from './SharedWorkflow'; import type { SharedWorkflow } from './SharedWorkflow';
import type { SharedCredentials } from './SharedCredentials'; import type { SharedCredentials } from './SharedCredentials';
import { NoXss } from '../utils/customValidators'; import { NoXss } from '../utils/customValidators';

View file

@ -1,13 +1,7 @@
import { Length } from 'class-validator'; import { Length } from 'class-validator';
import type { import { IConnections, IDataObject, IWorkflowSettings } from 'n8n-workflow';
IBinaryKeyData, import type { IBinaryKeyData, INode, IPairedItemData } from 'n8n-workflow';
IConnections,
IDataObject,
INode,
IPairedItemData,
IWorkflowSettings,
} from 'n8n-workflow';
import { import {
Column, Column,

View file

@ -1,7 +1,7 @@
import { Column, Entity, ManyToOne, PrimaryColumn } from 'typeorm'; import { Column, Entity, ManyToOne, PrimaryColumn } from 'typeorm';
import { idStringifier } from '../utils/transformers'; import { idStringifier } from '../utils/transformers';
import { datetimeColumnType } from './AbstractEntity'; import { datetimeColumnType } from './AbstractEntity';
import type { WorkflowEntity } from './WorkflowEntity'; import { WorkflowEntity } from './WorkflowEntity';
export enum StatisticsNames { export enum StatisticsNames {
productionSuccess = 'production_success', productionSuccess = 'production_success',

View file

@ -1,5 +1,5 @@
import type { DateTime } from 'luxon'; import type { DateTime } from 'luxon';
import { EventMessageTypeNames } from 'n8n-workflow'; import type { EventMessageTypeNames } from 'n8n-workflow';
import type { AbstractEventPayload } from './AbstractEventPayload'; import type { AbstractEventPayload } from './AbstractEventPayload';
export interface AbstractEventMessageOptions { export interface AbstractEventMessageOptions {

View file

@ -1,7 +1,8 @@
import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage'; import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage';
import { EventMessageTypeNames, JsonObject, JsonValue } from 'n8n-workflow'; import type { JsonObject, JsonValue } from 'n8n-workflow';
import { AbstractEventPayload } from './AbstractEventPayload'; import { EventMessageTypeNames } from 'n8n-workflow';
import { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; import type { AbstractEventPayload } from './AbstractEventPayload';
import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions';
export const eventNamesAudit = [ export const eventNamesAudit = [
'n8n.audit.user.signedup', 'n8n.audit.user.signedup',

View file

@ -1,5 +1,6 @@
import { DateTime } from 'luxon'; import { DateTime } from 'luxon';
import { EventMessageTypeNames, JsonObject, JsonValue } from 'n8n-workflow'; import type { JsonObject, JsonValue } from 'n8n-workflow';
import { EventMessageTypeNames } from 'n8n-workflow';
export interface EventMessageConfirmSource extends JsonObject { export interface EventMessageConfirmSource extends JsonObject {
id: string; id: string;

View file

@ -1,4 +1,5 @@
import { EventMessageTypeNames, JsonObject } from 'n8n-workflow'; import type { JsonObject } from 'n8n-workflow';
import { EventMessageTypeNames } from 'n8n-workflow';
import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage'; import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage';
import type { AbstractEventPayload } from './AbstractEventPayload'; import type { AbstractEventPayload } from './AbstractEventPayload';
import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions';

View file

@ -1,5 +1,6 @@
import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage'; import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage';
import { EventMessageTypeNames, JsonObject } from 'n8n-workflow'; import type { JsonObject } from 'n8n-workflow';
import { EventMessageTypeNames } from 'n8n-workflow';
import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions';
import type { AbstractEventPayload } from './AbstractEventPayload'; import type { AbstractEventPayload } from './AbstractEventPayload';

View file

@ -1,8 +1,9 @@
import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage'; import { AbstractEventMessage, isEventMessageOptionsWithType } from './AbstractEventMessage';
import { EventMessageTypeNames, IWorkflowBase, JsonObject } from 'n8n-workflow'; import type { IWorkflowBase, JsonObject } from 'n8n-workflow';
import { EventMessageTypeNames } from 'n8n-workflow';
import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions';
import type { AbstractEventPayload } from './AbstractEventPayload'; import type { AbstractEventPayload } from './AbstractEventPayload';
import { IExecutionBase } from '@/Interfaces'; import type { IExecutionBase } from '@/Interfaces';
export const eventNamesWorkflow = [ export const eventNamesWorkflow = [
'n8n.workflow.started', 'n8n.workflow.started',

View file

@ -1,10 +1,14 @@
import type { EventMessageTypes } from '.'; import type { EventMessageTypes } from '.';
import { EventMessageGeneric, EventMessageGenericOptions } from './EventMessageGeneric'; import type { EventMessageGenericOptions } from './EventMessageGeneric';
import { EventMessageGeneric } from './EventMessageGeneric';
import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions'; import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions';
import { EventMessageWorkflow, EventMessageWorkflowOptions } from './EventMessageWorkflow'; import type { EventMessageWorkflowOptions } from './EventMessageWorkflow';
import { EventMessageWorkflow } from './EventMessageWorkflow';
import { EventMessageTypeNames } from 'n8n-workflow'; import { EventMessageTypeNames } from 'n8n-workflow';
import { EventMessageAudit, EventMessageAuditOptions } from './EventMessageAudit'; import type { EventMessageAuditOptions } from './EventMessageAudit';
import { EventMessageNode, EventMessageNodeOptions } from './EventMessageNode'; import { EventMessageAudit } from './EventMessageAudit';
import type { EventMessageNodeOptions } from './EventMessageNode';
import { EventMessageNode } from './EventMessageNode';
export const getEventMessageObjectByType = ( export const getEventMessageObjectByType = (
message: AbstractEventMessageOptions, message: AbstractEventMessageOptions,

View file

@ -1,11 +1,10 @@
import { EventMessageAudit, eventNamesAudit, EventNamesAuditType } from './EventMessageAudit'; import type { EventMessageAudit, EventNamesAuditType } from './EventMessageAudit';
import { EventMessageGeneric } from './EventMessageGeneric'; import { eventNamesAudit } from './EventMessageAudit';
import { EventMessageNode, eventNamesNode, EventNamesNodeType } from './EventMessageNode'; import type { EventMessageGeneric } from './EventMessageGeneric';
import { import type { EventMessageNode, EventNamesNodeType } from './EventMessageNode';
EventMessageWorkflow, import { eventNamesNode } from './EventMessageNode';
eventNamesWorkflow, import type { EventMessageWorkflow, EventNamesWorkflowType } from './EventMessageWorkflow';
EventNamesWorkflowType, import { eventNamesWorkflow } from './EventMessageWorkflow';
} from './EventMessageWorkflow';
export type EventNamesTypes = EventNamesAuditType | EventNamesWorkflowType | EventNamesNodeType; export type EventNamesTypes = EventNamesAuditType | EventNamesWorkflowType | EventNamesNodeType;
export const eventNamesAll = [...eventNamesAudit, ...eventNamesWorkflow, ...eventNamesNode]; export const eventNamesAll = [...eventNamesAudit, ...eventNamesWorkflow, ...eventNamesNode];

View file

@ -1,6 +1,7 @@
import { LoggerProxy, MessageEventBusDestinationOptions } from 'n8n-workflow'; import type { MessageEventBusDestinationOptions } from 'n8n-workflow';
import { LoggerProxy } from 'n8n-workflow';
import type { DeleteResult } from 'typeorm'; import type { DeleteResult } from 'typeorm';
import { EventMessageTypes } from '../EventMessageClasses/'; import type { EventMessageTypes } from '../EventMessageClasses/';
import type { MessageEventBusDestination } from '../MessageEventBusDestination/MessageEventBusDestination.ee'; import type { MessageEventBusDestination } from '../MessageEventBusDestination/MessageEventBusDestination.ee';
import { MessageEventBusLogWriter } from '../MessageEventBusWriter/MessageEventBusLogWriter'; import { MessageEventBusLogWriter } from '../MessageEventBusWriter/MessageEventBusLogWriter';
import EventEmitter from 'events'; import EventEmitter from 'events';
@ -11,17 +12,14 @@ import {
incrementPrometheusMetric, incrementPrometheusMetric,
} from '../MessageEventBusDestination/Helpers.ee'; } from '../MessageEventBusDestination/Helpers.ee';
import uniqby from 'lodash.uniqby'; import uniqby from 'lodash.uniqby';
import { EventMessageConfirmSource } from '../EventMessageClasses/EventMessageConfirm'; import type { EventMessageConfirmSource } from '../EventMessageClasses/EventMessageConfirm';
import { import type { EventMessageAuditOptions } from '../EventMessageClasses/EventMessageAudit';
EventMessageAuditOptions, import { EventMessageAudit } from '../EventMessageClasses/EventMessageAudit';
EventMessageAudit, import type { EventMessageWorkflowOptions } from '../EventMessageClasses/EventMessageWorkflow';
} from '../EventMessageClasses/EventMessageAudit'; import { EventMessageWorkflow } from '../EventMessageClasses/EventMessageWorkflow';
import {
EventMessageWorkflowOptions,
EventMessageWorkflow,
} from '../EventMessageClasses/EventMessageWorkflow';
import { isLogStreamingEnabled } from './MessageEventBusHelper'; import { isLogStreamingEnabled } from './MessageEventBusHelper';
import { EventMessageNode, EventMessageNodeOptions } from '../EventMessageClasses/EventMessageNode'; import type { EventMessageNodeOptions } from '../EventMessageClasses/EventMessageNode';
import { EventMessageNode } from '../EventMessageClasses/EventMessageNode';
import { import {
EventMessageGeneric, EventMessageGeneric,
eventMessageGenericDestinationTestEvent, eventMessageGenericDestinationTestEvent,

View file

@ -1,13 +1,9 @@
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import { import type { INodeCredentials, MessageEventBusDestinationOptions } from 'n8n-workflow';
INodeCredentials, import { LoggerProxy, MessageEventBusDestinationTypeNames } from 'n8n-workflow';
LoggerProxy,
MessageEventBusDestinationOptions,
MessageEventBusDestinationTypeNames,
} from 'n8n-workflow';
import * as Db from '@/Db'; import * as Db from '@/Db';
import { AbstractEventMessage } from '../EventMessageClasses/AbstractEventMessage'; import type { AbstractEventMessage } from '../EventMessageClasses/AbstractEventMessage';
import { EventMessageTypes } from '../EventMessageClasses'; import type { EventMessageTypes } from '../EventMessageClasses';
import { eventBus } from '..'; import { eventBus } from '..';
import type { DeleteResult, InsertResult } from 'typeorm'; import type { DeleteResult, InsertResult } from 'typeorm';

View file

@ -4,13 +4,13 @@
import { MessageEventBusDestination } from './MessageEventBusDestination.ee'; import { MessageEventBusDestination } from './MessageEventBusDestination.ee';
import * as Sentry from '@sentry/node'; import * as Sentry from '@sentry/node';
import { eventBus } from '../MessageEventBus/MessageEventBus'; import { eventBus } from '../MessageEventBus/MessageEventBus';
import { import type {
MessageEventBusDestinationOptions, MessageEventBusDestinationOptions,
MessageEventBusDestinationSentryOptions, MessageEventBusDestinationSentryOptions,
MessageEventBusDestinationTypeNames,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { MessageEventBusDestinationTypeNames } from 'n8n-workflow';
import { isLogStreamingEnabled } from '../MessageEventBus/MessageEventBusHelper'; import { isLogStreamingEnabled } from '../MessageEventBus/MessageEventBusHelper';
import { EventMessageTypes } from '../EventMessageClasses'; import type { EventMessageTypes } from '../EventMessageClasses';
import { eventMessageGenericDestinationTestEvent } from '../EventMessageClasses/EventMessageGeneric'; import { eventMessageGenericDestinationTestEvent } from '../EventMessageClasses/EventMessageGeneric';
import { N8N_VERSION } from '@/constants'; import { N8N_VERSION } from '@/constants';

View file

@ -3,15 +3,14 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
import syslog from 'syslog-client'; import syslog from 'syslog-client';
import { eventBus } from '../MessageEventBus/MessageEventBus'; import { eventBus } from '../MessageEventBus/MessageEventBus';
import { import type {
LoggerProxy,
MessageEventBusDestinationOptions, MessageEventBusDestinationOptions,
MessageEventBusDestinationSyslogOptions, MessageEventBusDestinationSyslogOptions,
MessageEventBusDestinationTypeNames,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { LoggerProxy, MessageEventBusDestinationTypeNames } from 'n8n-workflow';
import { MessageEventBusDestination } from './MessageEventBusDestination.ee'; import { MessageEventBusDestination } from './MessageEventBusDestination.ee';
import { isLogStreamingEnabled } from '../MessageEventBus/MessageEventBusHelper'; import { isLogStreamingEnabled } from '../MessageEventBus/MessageEventBusHelper';
import { EventMessageTypes } from '../EventMessageClasses'; import type { EventMessageTypes } from '../EventMessageClasses';
import { eventMessageGenericDestinationTestEvent } from '../EventMessageClasses/EventMessageGeneric'; import { eventMessageGenericDestinationTestEvent } from '../EventMessageClasses/EventMessageGeneric';
export const isMessageEventBusDestinationSyslogOptions = ( export const isMessageEventBusDestinationSyslogOptions = (

View file

@ -6,18 +6,17 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */ /* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
import { MessageEventBusDestination } from './MessageEventBusDestination.ee'; import { MessageEventBusDestination } from './MessageEventBusDestination.ee';
import axios, { AxiosRequestConfig, Method } from 'axios'; import type { AxiosRequestConfig, Method } from 'axios';
import axios from 'axios';
import { eventBus } from '../MessageEventBus/MessageEventBus'; import { eventBus } from '../MessageEventBus/MessageEventBus';
import { EventMessageTypes } from '../EventMessageClasses'; import type { EventMessageTypes } from '../EventMessageClasses';
import { import type {
jsonParse,
LoggerProxy,
MessageEventBusDestinationOptions, MessageEventBusDestinationOptions,
MessageEventBusDestinationTypeNames,
MessageEventBusDestinationWebhookOptions, MessageEventBusDestinationWebhookOptions,
MessageEventBusDestinationWebhookParameterItem, MessageEventBusDestinationWebhookParameterItem,
MessageEventBusDestinationWebhookParameterOptions, MessageEventBusDestinationWebhookParameterOptions,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { jsonParse, LoggerProxy, MessageEventBusDestinationTypeNames } from 'n8n-workflow';
import { CredentialsHelper } from '@/CredentialsHelper'; import { CredentialsHelper } from '@/CredentialsHelper';
import { UserSettings } from 'n8n-core'; import { UserSettings } from 'n8n-core';
import { Agent as HTTPSAgent } from 'https'; import { Agent as HTTPSAgent } from 'https';

View file

@ -12,9 +12,9 @@ import config from '@/config';
import { getEventMessageObjectByType } from '../EventMessageClasses/Helpers'; import { getEventMessageObjectByType } from '../EventMessageClasses/Helpers';
import type { EventMessageReturnMode } from '../MessageEventBus/MessageEventBus'; import type { EventMessageReturnMode } from '../MessageEventBus/MessageEventBus';
import type { EventMessageTypes } from '../EventMessageClasses'; import type { EventMessageTypes } from '../EventMessageClasses';
import type { EventMessageConfirmSource } from '../EventMessageClasses/EventMessageConfirm';
import { import {
EventMessageConfirm, EventMessageConfirm,
EventMessageConfirmSource,
isEventMessageConfirm, isEventMessageConfirm,
} from '../EventMessageClasses/EventMessageConfirm'; } from '../EventMessageClasses/EventMessageConfirm';
import { once as eventOnce } from 'events'; import { once as eventOnce } from 'events';

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