mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
refactor(core): Move Logger to core (no-changelog) (#12310)
This commit is contained in:
committed by
GitHub
parent
b4c77f27b6
commit
471d7b9420
@@ -56,7 +56,7 @@ void (async function start() {
|
||||
|
||||
if (config.sentryConfig.sentryDsn) {
|
||||
const { ErrorReporter } = await import('n8n-core');
|
||||
errorReporter = new ErrorReporter();
|
||||
errorReporter = Container.get(ErrorReporter);
|
||||
await errorReporter.init('task_runner', config.sentryConfig.sentryDsn);
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,6 @@
|
||||
"bcryptjs": "2.4.3",
|
||||
"bull": "4.12.1",
|
||||
"cache-manager": "5.2.3",
|
||||
"callsites": "3.1.0",
|
||||
"change-case": "4.1.2",
|
||||
"class-transformer": "0.5.1",
|
||||
"class-validator": "0.14.0",
|
||||
@@ -149,7 +148,7 @@
|
||||
"p-cancelable": "2.1.1",
|
||||
"p-lazy": "3.1.0",
|
||||
"pg": "8.12.0",
|
||||
"picocolors": "1.0.1",
|
||||
"picocolors": "catalog:",
|
||||
"pkce-challenge": "3.0.0",
|
||||
"posthog-node": "3.2.1",
|
||||
"prom-client": "13.2.0",
|
||||
@@ -169,7 +168,6 @@
|
||||
"typedi": "catalog:",
|
||||
"uuid": "catalog:",
|
||||
"validator": "13.7.0",
|
||||
"winston": "3.14.2",
|
||||
"ws": "8.17.1",
|
||||
"xml2js": "catalog:",
|
||||
"xmllint-wasm": "3.0.1",
|
||||
|
||||
@@ -5,6 +5,7 @@ import { engine as expressHandlebars } from 'express-handlebars';
|
||||
import { readFile } from 'fs/promises';
|
||||
import type { Server } from 'http';
|
||||
import isbot from 'isbot';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { Container, Service } from 'typedi';
|
||||
|
||||
import config from '@/config';
|
||||
@@ -12,7 +13,6 @@ import { N8N_VERSION, TEMPLATES_DIR, inDevelopment, inTest } from '@/constants';
|
||||
import * as Db from '@/db';
|
||||
import { OnShutdown } from '@/decorators/on-shutdown';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { rawBodyReader, bodyParser, corsMiddleware } from '@/middlewares';
|
||||
import { send, sendErrorResponse } from '@/response-helper';
|
||||
import { LiveWebhooks } from '@/webhooks/live-webhooks';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Logger } from 'n8n-core';
|
||||
import type {
|
||||
IDeferredPromise,
|
||||
IExecuteResponsePromiseData,
|
||||
@@ -18,7 +19,6 @@ import type {
|
||||
IExecutionDb,
|
||||
IExecutionsCurrentSummary,
|
||||
} from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { isWorkflowIdValid } from '@/utils';
|
||||
|
||||
import { ConcurrencyControlService } from './concurrency/concurrency-control.service';
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
ActiveWorkflows,
|
||||
ErrorReporter,
|
||||
InstanceSettings,
|
||||
Logger,
|
||||
PollContext,
|
||||
TriggerContext,
|
||||
} from 'n8n-core';
|
||||
@@ -42,7 +43,6 @@ import { OnShutdown } from '@/decorators/on-shutdown';
|
||||
import { ExecutionService } from '@/executions/execution.service';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import type { IWorkflowDb } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import { Publisher } from '@/scaling/pubsub/publisher.service';
|
||||
import { ActiveWorkflowsService } from '@/services/active-workflows.service';
|
||||
|
||||
@@ -2,6 +2,7 @@ import { GlobalConfig } from '@n8n/config';
|
||||
import { createHash } from 'crypto';
|
||||
import type { NextFunction, Response } from 'express';
|
||||
import { JsonWebTokenError, TokenExpiredError } from 'jsonwebtoken';
|
||||
import { Logger } from 'n8n-core';
|
||||
import Container, { Service } from 'typedi';
|
||||
|
||||
import config from '@/config';
|
||||
@@ -12,7 +13,6 @@ import { UserRepository } from '@/databases/repositories/user.repository';
|
||||
import { AuthError } from '@/errors/response-errors/auth.error';
|
||||
import { ForbiddenError } from '@/errors/response-errors/forbidden.error';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import type { AuthenticatedRequest } from '@/requests';
|
||||
import { JwtService } from '@/services/jwt.service';
|
||||
import { UrlService } from '@/services/url.service';
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Command, Errors } from '@oclif/core';
|
||||
import {
|
||||
BinaryDataService,
|
||||
InstanceSettings,
|
||||
Logger,
|
||||
ObjectStoreService,
|
||||
DataDeduplicationService,
|
||||
ErrorReporter,
|
||||
@@ -25,7 +26,6 @@ import { ExternalHooks } from '@/external-hooks';
|
||||
import { ExternalSecretsManager } from '@/external-secrets/external-secrets-manager.ee';
|
||||
import { License } from '@/license';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import { PostHogClient } from '@/posthog';
|
||||
import { ShutdownService } from '@/shutdown/shutdown.service';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { Migration, MigrationExecutor } from '@n8n/typeorm';
|
||||
import { type DataSource } from '@n8n/typeorm';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import { Logger } from 'n8n-core';
|
||||
|
||||
import { main } from '@/commands/db/revert';
|
||||
import type { IrreversibleMigration, ReversibleMigration } from '@/databases/types';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { mockInstance } from '@test/mocking';
|
||||
|
||||
const logger = mockInstance(Logger);
|
||||
|
||||
@@ -3,12 +3,12 @@ import type { DataSourceOptions as ConnectionOptions } from '@n8n/typeorm';
|
||||
// eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import
|
||||
import { MigrationExecutor, DataSource as Connection } from '@n8n/typeorm';
|
||||
import { Command, Flags } from '@oclif/core';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import { getConnectionOptions } from '@/databases/config';
|
||||
import type { Migration } from '@/databases/types';
|
||||
import { wrapMigration } from '@/databases/utils/migration-helpers';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
// This function is extracted to make it easier to unit test it.
|
||||
// Mocking turned into a mess due to this command using typeorm and the db
|
||||
|
||||
@@ -7,7 +7,6 @@ import { WorkerMissingEncryptionKey } from '@/errors/worker-missing-encryption-k
|
||||
import { EventMessageGeneric } from '@/eventbus/event-message-classes/event-message-generic';
|
||||
import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus';
|
||||
import { LogStreamingEventRelay } from '@/events/relays/log-streaming.event-relay';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { PubSubHandler } from '@/scaling/pubsub/pubsub-handler';
|
||||
import { Subscriber } from '@/scaling/pubsub/subscriber.service';
|
||||
import type { ScalingService } from '@/scaling/scaling.service';
|
||||
@@ -67,7 +66,7 @@ export class Worker extends BaseCommand {
|
||||
|
||||
super(argv, cmdConfig);
|
||||
|
||||
this.logger = Container.get(Logger).scoped('scaling');
|
||||
this.logger = this.logger.scoped('scaling');
|
||||
}
|
||||
|
||||
async init() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Logger } from 'n8n-core';
|
||||
import type { WorkflowExecuteMode as ExecutionMode } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
@@ -7,7 +8,6 @@ import { InvalidConcurrencyLimitError } from '@/errors/invalid-concurrency-limit
|
||||
import { UnknownExecutionModeError } from '@/errors/unknown-execution-mode.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import type { IExecutingWorkflowData } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { Telemetry } from '@/telemetry';
|
||||
|
||||
import { ConcurrencyQueue } from './concurrency-queue';
|
||||
|
||||
@@ -3,7 +3,9 @@ import convict from 'convict';
|
||||
import { flatten } from 'flat';
|
||||
import { readFileSync } from 'fs';
|
||||
import merge from 'lodash/merge';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ApplicationError, setGlobalState } from 'n8n-workflow';
|
||||
import assert from 'node:assert';
|
||||
import colors from 'picocolors';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
@@ -31,13 +33,15 @@ const config = convict(schema, { args: [] });
|
||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
||||
config.getEnv = config.get;
|
||||
|
||||
const logger = Container.get(Logger);
|
||||
const globalConfig = Container.get(GlobalConfig);
|
||||
|
||||
// Load overwrites when not in tests
|
||||
if (!inE2ETests && !inTest) {
|
||||
// Overwrite default configuration with settings which got defined in
|
||||
// optional configuration files
|
||||
const { N8N_CONFIG_FILES } = process.env;
|
||||
if (N8N_CONFIG_FILES !== undefined) {
|
||||
const globalConfig = Container.get(GlobalConfig);
|
||||
const configFiles = N8N_CONFIG_FILES.split(',');
|
||||
for (const configFile of configFiles) {
|
||||
if (!configFile) continue;
|
||||
@@ -58,9 +62,10 @@ if (!inE2ETests && !inTest) {
|
||||
}
|
||||
}
|
||||
}
|
||||
console.debug('Loaded config overwrites from', configFile);
|
||||
logger.debug(`Loaded config overwrites from ${configFile}`);
|
||||
} catch (error) {
|
||||
console.error('Error loading config file', configFile, error);
|
||||
assert(error instanceof Error);
|
||||
logger.error(`Error loading config file ${configFile}`, { error });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,7 +101,7 @@ config.validate({
|
||||
const userManagement = config.get('userManagement');
|
||||
if (userManagement.jwtRefreshTimeoutHours >= userManagement.jwtSessionDurationHours) {
|
||||
if (!inTest)
|
||||
console.warn(
|
||||
logger.warn(
|
||||
'N8N_USER_MANAGEMENT_JWT_REFRESH_TIMEOUT_HOURS needs to smaller than N8N_USER_MANAGEMENT_JWT_DURATION_HOURS. Setting N8N_USER_MANAGEMENT_JWT_REFRESH_TIMEOUT_HOURS to 0 for now.',
|
||||
);
|
||||
|
||||
@@ -105,16 +110,16 @@ if (userManagement.jwtRefreshTimeoutHours >= userManagement.jwtSessionDurationHo
|
||||
|
||||
const executionProcess = config.getEnv('executions.process');
|
||||
if (executionProcess) {
|
||||
console.error(
|
||||
colors.yellow('Please unset the deprecated env variable'),
|
||||
logger.error(
|
||||
colors.yellow('Please unset the deprecated env variable') +
|
||||
colors.bold(colors.yellow('EXECUTIONS_PROCESS')),
|
||||
);
|
||||
}
|
||||
if (executionProcess === 'own') {
|
||||
console.error(
|
||||
logger.error(
|
||||
colors.bold(colors.red('Application failed to start because "Own" mode has been removed.')),
|
||||
);
|
||||
console.error(
|
||||
logger.error(
|
||||
colors.red(
|
||||
'If you need the isolation and performance gains, please consider using queue mode instead.\n\n',
|
||||
),
|
||||
@@ -123,7 +128,7 @@ if (executionProcess === 'own') {
|
||||
}
|
||||
|
||||
setGlobalState({
|
||||
defaultTimezone: Container.get(GlobalConfig).generic.timezone,
|
||||
defaultTimezone: globalConfig.generic.timezone,
|
||||
});
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Response } from 'express';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
import validator from 'validator';
|
||||
|
||||
@@ -14,7 +15,6 @@ import { ForbiddenError } from '@/errors/response-errors/forbidden.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import type { PublicUser } from '@/interfaces';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { MfaService } from '@/mfa/mfa.service';
|
||||
import { PostHogClient } from '@/posthog';
|
||||
import { AuthenticatedRequest, LoginRequest, UserRequest } from '@/requests';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { PushMessage } from '@n8n/api-types';
|
||||
import { Request } from 'express';
|
||||
import { Logger } from 'n8n-core';
|
||||
import Container from 'typedi';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
@@ -14,7 +15,6 @@ import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'
|
||||
import type { BooleanLicenseFeature, NumericLicenseFeature } from '@/interfaces';
|
||||
import type { FeatureReturnType } from '@/license';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { MfaService } from '@/mfa/mfa.service';
|
||||
import { Push } from '@/push';
|
||||
import type { UserSetupPayload } from '@/requests';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Response } from 'express';
|
||||
import { Logger } from 'n8n-core';
|
||||
import validator from 'validator';
|
||||
|
||||
import { AuthService } from '@/auth/auth.service';
|
||||
@@ -12,7 +13,6 @@ import { ForbiddenError } from '@/errors/response-errors/forbidden.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { PostHogClient } from '@/posthog';
|
||||
import { UserRequest } from '@/requests';
|
||||
import { PasswordUtility } from '@/services/password.utility';
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
} from '@n8n/api-types';
|
||||
import { plainToInstance } from 'class-transformer';
|
||||
import { Response } from 'express';
|
||||
import { Logger } from 'n8n-core';
|
||||
|
||||
import { AuthService } from '@/auth/auth.service';
|
||||
import type { User } from '@/databases/entities/user';
|
||||
@@ -16,7 +17,6 @@ import { EventService } from '@/events/event.service';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { validateEntity } from '@/generic-helpers';
|
||||
import type { PublicUser } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { MfaService } from '@/mfa/mfa.service';
|
||||
import { AuthenticatedRequest, MeRequest } from '@/requests';
|
||||
import { PasswordUtility } from '@/services/password.utility';
|
||||
|
||||
@@ -2,6 +2,7 @@ import Csrf from 'csrf';
|
||||
import type { Response } from 'express';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import { Cipher } from 'n8n-core';
|
||||
import { Logger } from 'n8n-core';
|
||||
import nock from 'nock';
|
||||
import Container from 'typedi';
|
||||
|
||||
@@ -16,7 +17,6 @@ import { VariablesService } from '@/environments/variables/variables.service.ee'
|
||||
import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { NotFoundError } from '@/errors/response-errors/not-found.error';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import type { OAuthRequest } from '@/requests';
|
||||
import { SecretsHelper } from '@/secrets-helpers';
|
||||
import { mockInstance } from '@test/mocking';
|
||||
|
||||
@@ -2,6 +2,7 @@ import Csrf from 'csrf';
|
||||
import { type Response } from 'express';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import { Cipher } from 'n8n-core';
|
||||
import { Logger } from 'n8n-core';
|
||||
import nock from 'nock';
|
||||
import Container from 'typedi';
|
||||
|
||||
@@ -16,7 +17,6 @@ import { VariablesService } from '@/environments/variables/variables.service.ee'
|
||||
import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { NotFoundError } from '@/errors/response-errors/not-found.error';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import type { OAuthRequest } from '@/requests';
|
||||
import { SecretsHelper } from '@/secrets-helpers';
|
||||
import { mockInstance } from '@test/mocking';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import Csrf from 'csrf';
|
||||
import type { Response } from 'express';
|
||||
import { Credentials } from 'n8n-core';
|
||||
import { Credentials, Logger } from 'n8n-core';
|
||||
import type { ICredentialDataDecryptedObject, IWorkflowExecuteAdditionalData } from 'n8n-workflow';
|
||||
import { jsonParse, ApplicationError } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
@@ -16,7 +16,6 @@ import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { NotFoundError } from '@/errors/response-errors/not-found.error';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import type { ICredentialsDb } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import type { AuthenticatedRequest, OAuthRequest } from '@/requests';
|
||||
import { UrlService } from '@/services/url.service';
|
||||
import * as WorkflowExecuteAdditionalData from '@/workflow-execute-additional-data';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Response } from 'express';
|
||||
import { Logger } from 'n8n-core';
|
||||
import validator from 'validator';
|
||||
|
||||
import { AuthService } from '@/auth/auth.service';
|
||||
@@ -9,7 +10,6 @@ import { GlobalScope, Post, RestController } from '@/decorators';
|
||||
import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { validateEntity } from '@/generic-helpers';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { PostHogClient } from '@/posthog';
|
||||
import { OwnerRequest } from '@/requests';
|
||||
import { PasswordUtility } from '@/services/password.utility';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Response } from 'express';
|
||||
import { Logger } from 'n8n-core';
|
||||
import validator from 'validator';
|
||||
|
||||
import { AuthService } from '@/auth/auth.service';
|
||||
@@ -13,7 +14,6 @@ import { UnprocessableRequestError } from '@/errors/response-errors/unprocessabl
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { MfaService } from '@/mfa/mfa.service';
|
||||
import { PasswordResetRequest } from '@/requests';
|
||||
import { PasswordUtility } from '@/services/password.utility';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { RoleChangeRequestDto, SettingsUpdateRequestDto } from '@n8n/api-types';
|
||||
import { Response } from 'express';
|
||||
import { Logger } from 'n8n-core';
|
||||
|
||||
import { AuthService } from '@/auth/auth.service';
|
||||
import { CredentialsService } from '@/credentials/credentials.service';
|
||||
@@ -18,7 +19,6 @@ import { NotFoundError } from '@/errors/response-errors/not-found.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import type { PublicUser } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { listQueryMiddleware } from '@/middlewares';
|
||||
import { AuthenticatedRequest, ListQuery, UserRequest } from '@/requests';
|
||||
import { ProjectService } from '@/services/project.service';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Response, NextFunction } from 'express';
|
||||
import { Logger } from 'n8n-core';
|
||||
|
||||
import type { WorkflowStatistics } from '@/databases/entities/workflow-statistics';
|
||||
import { StatisticsNames } from '@/databases/entities/workflow-statistics';
|
||||
@@ -7,7 +8,6 @@ import { WorkflowStatisticsRepository } from '@/databases/repositories/workflow-
|
||||
import { Get, Middleware, RestController } from '@/decorators';
|
||||
import { NotFoundError } from '@/errors/response-errors/not-found.error';
|
||||
import type { IWorkflowStatisticsDataLoaded } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import { StatisticsRequest } from './workflow-statistics.types';
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { existsSync } from 'fs';
|
||||
import { mkdir, utimes, open, rm } from 'fs/promises';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import { sleep } from 'n8n-workflow';
|
||||
import { join, dirname } from 'path';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import { inProduction } from '@/constants';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
export const touchFile = async (filePath: string): Promise<void> => {
|
||||
await mkdir(dirname(filePath), { recursive: true });
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { Logger } from 'n8n-core';
|
||||
import type { ICredentialDataDecryptedObject } from 'n8n-workflow';
|
||||
import { deepCopy, jsonParse } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { CredentialTypes } from '@/credential-types';
|
||||
import type { ICredentialsOverwrite } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
@Service()
|
||||
export class CredentialsOverwrites {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
// eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import
|
||||
import { In } from '@n8n/typeorm';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { deepCopy } from 'n8n-workflow';
|
||||
import { z } from 'zod';
|
||||
|
||||
@@ -23,7 +24,6 @@ import { ForbiddenError } from '@/errors/response-errors/forbidden.error';
|
||||
import { NotFoundError } from '@/errors/response-errors/not-found.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { listQueryMiddleware } from '@/middlewares';
|
||||
import { CredentialRequest } from '@/requests';
|
||||
import { NamingService } from '@/services/naming.service';
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
type FindOptionsRelations,
|
||||
type FindOptionsWhere,
|
||||
} from '@n8n/typeorm';
|
||||
import { Credentials } from 'n8n-core';
|
||||
import { Credentials, Logger } from 'n8n-core';
|
||||
import type {
|
||||
ICredentialDataDecryptedObject,
|
||||
ICredentialsDecrypted,
|
||||
@@ -33,7 +33,6 @@ import { NotFoundError } from '@/errors/response-errors/not-found.error';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { validateEntity } from '@/generic-helpers';
|
||||
import type { ICredentialsDb } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { userHasScopes } from '@/permissions/check-access';
|
||||
import type { CredentialRequest, ListQuery } from '@/requests';
|
||||
import { CredentialsTester } from '@/services/credentials-tester.service';
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
import { DateUtils } from '@n8n/typeorm/util/DateUtils';
|
||||
import { parse, stringify } from 'flatted';
|
||||
import pick from 'lodash/pick';
|
||||
import { BinaryDataService, ErrorReporter } from 'n8n-core';
|
||||
import { BinaryDataService, ErrorReporter, Logger } from 'n8n-core';
|
||||
import { ExecutionCancelledError, ApplicationError } from 'n8n-workflow';
|
||||
import type {
|
||||
AnnotationVote,
|
||||
@@ -42,7 +42,6 @@ import type {
|
||||
IExecutionFlattedDb,
|
||||
IExecutionResponse,
|
||||
} from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { separate } from '@/utils';
|
||||
|
||||
import { ExecutionDataRepository } from './execution-data.repository';
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import type { EntitySubscriberInterface, UpdateEvent } from '@n8n/typeorm';
|
||||
import { EventSubscriber } from '@n8n/typeorm';
|
||||
import { ErrorReporter } from 'n8n-core';
|
||||
import { ErrorReporter, Logger } from 'n8n-core';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import { Project } from '../entities/project';
|
||||
import { User } from '../entities/user';
|
||||
import { UserRepository } from '../repositories/user.repository';
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import type { QueryRunner, ObjectLiteral } from '@n8n/typeorm';
|
||||
import type { Logger } from 'n8n-core';
|
||||
import type { INodeTypes } from 'n8n-workflow';
|
||||
|
||||
import type { Logger } from '@/logging/logger.service';
|
||||
|
||||
import type { createSchemaBuilder } from './dsl';
|
||||
|
||||
export type DatabaseType = 'mariadb' | 'postgresdb' | 'mysqldb' | 'sqlite';
|
||||
|
||||
@@ -2,14 +2,13 @@ import { GlobalConfig } from '@n8n/config';
|
||||
import type { ObjectLiteral } from '@n8n/typeorm';
|
||||
import type { QueryRunner } from '@n8n/typeorm/query-runner/QueryRunner';
|
||||
import { readFileSync, rmSync } from 'fs';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import { ApplicationError, jsonParse } from 'n8n-workflow';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import { inTest } from '@/constants';
|
||||
import { createSchemaBuilder } from '@/databases/dsl';
|
||||
import type { BaseMigration, Migration, MigrationContext, MigrationFn } from '@/databases/types';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
|
||||
const PERSONALIZATION_SURVEY_FILENAME = 'personalizationSurvey.json';
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
type EnvVarName = string;
|
||||
|
||||
type Deprecation = {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import { SourceControlPreferencesService } from '@/environments/source-control/source-control-preferences.service.ee';
|
||||
import { SourceControlService } from '@/environments/source-control/source-control.service.ee';
|
||||
|
||||
describe('SourceControlService', () => {
|
||||
const preferencesService = new SourceControlPreferencesService(
|
||||
new InstanceSettings(mock()),
|
||||
Container.get(InstanceSettings),
|
||||
mock(),
|
||||
mock(),
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { rmSync } from 'fs';
|
||||
import { Credentials, InstanceSettings } from 'n8n-core';
|
||||
import { Credentials, InstanceSettings, Logger } from 'n8n-core';
|
||||
import { ApplicationError, type ICredentialDataDecryptedObject } from 'n8n-workflow';
|
||||
import { writeFile as fsWriteFile, rm as fsRm } from 'node:fs/promises';
|
||||
import path from 'path';
|
||||
@@ -11,7 +11,6 @@ import { SharedWorkflowRepository } from '@/databases/repositories/shared-workfl
|
||||
import { TagRepository } from '@/databases/repositories/tag.repository';
|
||||
import { WorkflowTagMappingRepository } from '@/databases/repositories/workflow-tag-mapping.repository';
|
||||
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import {
|
||||
SOURCE_CONTROL_CREDENTIAL_EXPORT_FOLDER,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { execSync } from 'child_process';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
import path from 'path';
|
||||
import type {
|
||||
@@ -14,7 +15,6 @@ import type {
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import type { User } from '@/databases/entities/user';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { OwnershipService } from '@/services/ownership.service';
|
||||
|
||||
import {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { generateKeyPairSync } from 'crypto';
|
||||
import { constants as fsConstants, mkdirSync, accessSync } from 'fs';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
import { ok } from 'node:assert/strict';
|
||||
import path from 'path';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { isContainedWithin } from '@/utils/path-util';
|
||||
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import
|
||||
import { In } from '@n8n/typeorm';
|
||||
import glob from 'fast-glob';
|
||||
import { Credentials, ErrorReporter, InstanceSettings } from 'n8n-core';
|
||||
import { Credentials, ErrorReporter, InstanceSettings, Logger } from 'n8n-core';
|
||||
import { ApplicationError, jsonParse, ensureError } from 'n8n-workflow';
|
||||
import { readFile as fsReadFile } from 'node:fs/promises';
|
||||
import path from 'path';
|
||||
@@ -23,7 +23,6 @@ import { VariablesRepository } from '@/databases/repositories/variables.reposito
|
||||
import { WorkflowTagMappingRepository } from '@/databases/repositories/workflow-tag-mapping.repository';
|
||||
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
|
||||
import type { IWorkflowToImport } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { isUniqueConstraintError } from '@/response-helper';
|
||||
import { assertNever } from '@/utils';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ValidationError } from 'class-validator';
|
||||
import { validate } from 'class-validator';
|
||||
import { rm as fsRm } from 'fs/promises';
|
||||
import { Cipher, InstanceSettings } from 'n8n-core';
|
||||
import { Cipher, InstanceSettings, Logger } from 'n8n-core';
|
||||
import { ApplicationError, jsonParse } from 'n8n-workflow';
|
||||
import { writeFile, chmod, readFile } from 'node:fs/promises';
|
||||
import path from 'path';
|
||||
@@ -9,7 +9,6 @@ import Container, { Service } from 'typedi';
|
||||
|
||||
import config from '@/config';
|
||||
import { SettingsRepository } from '@/databases/repositories/settings.repository';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import {
|
||||
SOURCE_CONTROL_SSH_FOLDER,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { writeFileSync } from 'fs';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
import path from 'path';
|
||||
import type { PushResult } from 'simple-git';
|
||||
@@ -10,7 +11,6 @@ import type { Variables } from '@/databases/entities/variables';
|
||||
import { TagRepository } from '@/databases/repositories/tag.repository';
|
||||
import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import {
|
||||
SOURCE_CONTROL_DEFAULT_EMAIL,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Logger } from 'n8n-core';
|
||||
import { MessageEventBusDestinationTypeNames } from 'n8n-workflow';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import type { EventDestinations } from '@/databases/entities/event-destinations';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import { MessageEventBusDestinationSentry } from './message-event-bus-destination-sentry.ee';
|
||||
import { MessageEventBusDestinationSyslog } from './message-event-bus-destination-syslog.ee';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
import { Logger } from 'n8n-core';
|
||||
import type {
|
||||
MessageEventBusDestinationOptions,
|
||||
MessageEventBusDestinationSyslogOptions,
|
||||
@@ -7,8 +8,6 @@ import { MessageEventBusDestinationTypeNames } from 'n8n-workflow';
|
||||
import syslog from 'syslog-client';
|
||||
import Container from 'typedi';
|
||||
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import { MessageEventBusDestination } from './message-event-bus-destination.ee';
|
||||
import { eventMessageGenericDestinationTestEvent } from '../event-message-classes/event-message-generic';
|
||||
import type { MessageEventBus, MessageWithCallback } from '../message-event-bus/message-event-bus';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Logger } from 'n8n-core';
|
||||
import type { INodeCredentials, MessageEventBusDestinationOptions } from 'n8n-workflow';
|
||||
import { MessageEventBusDestinationTypeNames } from 'n8n-workflow';
|
||||
import { Container } from 'typedi';
|
||||
@@ -5,7 +6,6 @@ import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { EventDestinationsRepository } from '@/databases/repositories/event-destinations.repository';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import type { EventMessageTypes } from '../event-message-classes';
|
||||
import type { AbstractEventMessage } from '../event-message-classes/abstract-event-message';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { GlobalConfig } from '@n8n/config';
|
||||
import { once as eventOnce } from 'events';
|
||||
import { createReadStream, existsSync, rmSync } from 'fs';
|
||||
import remove from 'lodash/remove';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import { EventMessageTypeNames, jsonParse } from 'n8n-workflow';
|
||||
import path, { parse } from 'path';
|
||||
import readline from 'readline';
|
||||
@@ -12,7 +12,6 @@ import Container from 'typedi';
|
||||
import { Worker } from 'worker_threads';
|
||||
|
||||
import { inTest } from '@/constants';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import type { EventMessageTypes } from '../event-message-classes';
|
||||
import { isEventMessageOptions } from '../event-message-classes/abstract-event-message';
|
||||
|
||||
@@ -5,6 +5,7 @@ import type { DeleteResult } from '@n8n/typeorm';
|
||||
import { In } from '@n8n/typeorm';
|
||||
import EventEmitter from 'events';
|
||||
import uniqby from 'lodash/uniqBy';
|
||||
import { Logger } from 'n8n-core';
|
||||
import type { MessageEventBusDestinationOptions } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
@@ -13,7 +14,6 @@ import { EventDestinationsRepository } from '@/databases/repositories/event-dest
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { Publisher } from '@/scaling/pubsub/publisher.service';
|
||||
|
||||
import { ExecutionRecoveryService } from '../../executions/execution-recovery.service';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { ErrorReporter } from 'n8n-core';
|
||||
import { Logger } from 'n8n-core';
|
||||
import type { IRunExecutionData, ITaskData, IWorkflowBase } from 'n8n-workflow';
|
||||
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { saveExecutionProgress } from '@/execution-lifecycle-hooks/save-execution-progress';
|
||||
import * as fnModule from '@/execution-lifecycle-hooks/to-save-settings';
|
||||
import type { IExecutionResponse } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { mockInstance } from '@test/mocking';
|
||||
|
||||
mockInstance(Logger);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { BinaryDataService } from 'n8n-core';
|
||||
import type { BinaryData } from 'n8n-core';
|
||||
import { BinaryDataService, Logger } from 'n8n-core';
|
||||
import type { IRun, WorkflowExecuteMode } from 'n8n-workflow';
|
||||
import Container from 'typedi';
|
||||
|
||||
import config from '@/config';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
/**
|
||||
* Whenever the execution ID is not available to the binary data service at the
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { ErrorReporter } from 'n8n-core';
|
||||
import { ErrorReporter, Logger } from 'n8n-core';
|
||||
import type { IRunExecutionData, ITaskData, IWorkflowBase } from 'n8n-workflow';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { toSaveSettings } from '@/execution-lifecycle-hooks/to-save-settings';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
export async function saveExecutionProgress(
|
||||
workflowData: IWorkflowBase,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import pick from 'lodash/pick';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ensureError, type ExecutionStatus, type IRun, type IWorkflowBase } from 'n8n-workflow';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import type { IExecutionDb, UpdateExecutionPayload } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { ExecutionMetadataService } from '@/services/execution-metadata.service';
|
||||
import { isWorkflowIdValid } from '@/utils';
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import { setupMessages } from './utils';
|
||||
|
||||
describe('ExecutionRecoveryService', () => {
|
||||
const push = mockInstance(Push);
|
||||
const instanceSettings = new InstanceSettings(mock());
|
||||
const instanceSettings = Container.get(InstanceSettings);
|
||||
|
||||
let executionRecoveryService: ExecutionRecoveryService;
|
||||
let executionRepository: ExecutionRepository;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { DateTime } from 'luxon';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import { sleep } from 'n8n-workflow';
|
||||
import type { IRun, ITaskData } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
@@ -10,7 +10,6 @@ import { NodeCrashedError } from '@/errors/node-crashed.error';
|
||||
import { WorkflowCrashedError } from '@/errors/workflow-crashed.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import type { IExecutionResponse } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { Push } from '@/push';
|
||||
import { getWorkflowHooksMain } from '@/workflow-execute-additional-data'; // @TODO: Dependency cycle
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { validate as jsonSchemaValidate } from 'jsonschema';
|
||||
import { Logger } from 'n8n-core';
|
||||
import type {
|
||||
ExecutionError,
|
||||
ExecutionStatus,
|
||||
@@ -38,7 +39,6 @@ import type {
|
||||
IWorkflowDb,
|
||||
} from '@/interfaces';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import { WaitTracker } from '@/wait-tracker';
|
||||
import { WorkflowRunner } from '@/workflow-runner';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Cipher } from 'n8n-core';
|
||||
import { Cipher, Logger } from 'n8n-core';
|
||||
import { jsonParse, type IDataObject, ApplicationError, ensureError } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
@@ -10,7 +10,6 @@ import type {
|
||||
SecretsProviderSettings,
|
||||
} from '@/interfaces';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { Publisher } from '@/scaling/pubsub/publisher.service';
|
||||
|
||||
import { EXTERNAL_SECRETS_INITIAL_BACKOFF, EXTERNAL_SECRETS_MAX_BACKOFF } from './constants';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Logger } from 'n8n-core';
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import Container from 'typedi';
|
||||
|
||||
import { UnknownAuthTypeError } from '@/errors/unknown-auth-type.error';
|
||||
import { DOCS_HELP_NOTICE, EXTERNAL_SECRETS_NAME_REGEX } from '@/external-secrets/constants';
|
||||
import type { SecretsProvider, SecretsProviderState } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import { AwsSecretsClient } from './aws-secrets-client';
|
||||
import type { AwsSecretsManagerContext } from './types';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { SecretClient } from '@azure/keyvault-secrets';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ensureError } from 'n8n-workflow';
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import Container from 'typedi';
|
||||
|
||||
import { DOCS_HELP_NOTICE, EXTERNAL_SECRETS_NAME_REGEX } from '@/external-secrets/constants';
|
||||
import type { SecretsProvider, SecretsProviderState } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import type { AzureKeyVaultContext } from './types';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { SecretManagerServiceClient as GcpClient } from '@google-cloud/secret-manager';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ensureError, jsonParse, type INodeProperties } from 'n8n-workflow';
|
||||
import Container from 'typedi';
|
||||
|
||||
import { DOCS_HELP_NOTICE, EXTERNAL_SECRETS_NAME_REGEX } from '@/external-secrets/constants';
|
||||
import type { SecretsProvider, SecretsProviderState } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import type {
|
||||
GcpSecretsManagerContext,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { AxiosInstance, AxiosResponse } from 'axios';
|
||||
import axios from 'axios';
|
||||
import { Logger } from 'n8n-core';
|
||||
import type { IDataObject, INodeProperties } from 'n8n-workflow';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import type { SecretsProviderSettings, SecretsProviderState } from '@/interfaces';
|
||||
import { SecretsProvider } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import { DOCS_HELP_NOTICE, EXTERNAL_SECRETS_NAME_REGEX } from '../constants';
|
||||
import { preferGet } from '../external-secrets-helper.ee';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Help } from '@oclif/core';
|
||||
import Container from 'typedi';
|
||||
import { Logger } from 'winston';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
// oclif expects a default export
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { QueryFailedError } from '@n8n/typeorm';
|
||||
import type { Entry as LdapUser, ClientOptions } from 'ldapts';
|
||||
import { Client } from 'ldapts';
|
||||
import { Cipher } from 'n8n-core';
|
||||
import { Cipher, Logger } from 'n8n-core';
|
||||
import { ApplicationError, jsonParse } from 'n8n-workflow';
|
||||
import type { ConnectionOptions } from 'tls';
|
||||
import { Service } from 'typedi';
|
||||
@@ -14,7 +14,6 @@ import { SettingsRepository } from '@/databases/repositories/settings.repository
|
||||
import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { InternalServerError } from '@/errors/response-errors/internal-server.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import {
|
||||
getCurrentAuthenticationMethod,
|
||||
isEmailCurrentAuthenticationMethod,
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import type { TEntitlement, TFeatures, TLicenseBlock } from '@n8n_io/license-sdk';
|
||||
import { LicenseManager } from '@n8n_io/license-sdk';
|
||||
import { InstanceSettings, ObjectStoreService } from 'n8n-core';
|
||||
import { InstanceSettings, ObjectStoreService, Logger } from 'n8n-core';
|
||||
import Container, { Service } from 'typedi';
|
||||
|
||||
import config from '@/config';
|
||||
import { SettingsRepository } from '@/databases/repositories/settings.repository';
|
||||
import { OnShutdown } from '@/decorators/on-shutdown';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { LicenseMetricsService } from '@/metrics/license-metrics.service';
|
||||
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import axios, { AxiosError } from 'axios';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ensureError } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
@@ -7,7 +8,6 @@ import { WorkflowRepository } from '@/databases/repositories/workflow.repository
|
||||
import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { UrlService } from '@/services/url.service';
|
||||
|
||||
type LicenseError = Error & { errorId?: keyof typeof LicenseErrors };
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
LazyPackageDirectoryLoader,
|
||||
UnrecognizedCredentialTypeError,
|
||||
UnrecognizedNodeTypeError,
|
||||
Logger,
|
||||
} from 'n8n-core';
|
||||
import type {
|
||||
KnownNodesAndCredentials,
|
||||
@@ -36,7 +37,6 @@ import {
|
||||
CLI_DIR,
|
||||
inE2ETests,
|
||||
} from '@/constants';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { isContainedWithin } from '@/utils/path-util';
|
||||
|
||||
interface LoadedNodesAndCredentials {
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
export const noOp = () => {};
|
||||
|
||||
export const LOG_LEVELS = ['error', 'warn', 'info', 'debug', 'silent'] as const;
|
||||
@@ -1,14 +0,0 @@
|
||||
import type { LogScope } from '@n8n/config';
|
||||
|
||||
import type { LOG_LEVELS } from './constants';
|
||||
|
||||
export type LogLevel = (typeof LOG_LEVELS)[number];
|
||||
|
||||
export type LogMetadata = {
|
||||
[key: string]: unknown;
|
||||
scopes?: LogScope[];
|
||||
file?: string;
|
||||
function?: string;
|
||||
};
|
||||
|
||||
export type LogLocationMetadata = Pick<LogMetadata, 'file' | 'function'>;
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
filterDisabledNodes,
|
||||
recreateNodeExecutionStack,
|
||||
WorkflowExecute,
|
||||
Logger,
|
||||
} from 'n8n-core';
|
||||
import type {
|
||||
IPinData,
|
||||
@@ -16,8 +17,6 @@ import type {
|
||||
import type PCancelable from 'p-cancelable';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
@Service()
|
||||
export class ManualExecutionService {
|
||||
constructor(private readonly logger: Logger) {}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { PushMessage } from '@n8n/api-types';
|
||||
import { EventEmitter } from 'events';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { Container } from 'typedi';
|
||||
import type WebSocket from 'ws';
|
||||
|
||||
import type { User } from '@/databases/entities/user';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { WebSocketPush } from '@/push/websocket.push';
|
||||
import { mockInstance } from '@test/mocking';
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import type { PushMessage } from '@n8n/api-types';
|
||||
import { ErrorReporter } from 'n8n-core';
|
||||
import { ErrorReporter, Logger } from 'n8n-core';
|
||||
import { assert, jsonStringify } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import type { User } from '@/databases/entities/user';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import type { OnPushMessage } from '@/push/types';
|
||||
import { TypedEmitter } from '@/typed-emitter';
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
import type { Request, Response } from 'express';
|
||||
import { ErrorReporter } from 'n8n-core';
|
||||
import { ErrorReporter, Logger } from 'n8n-core';
|
||||
import { FORM_TRIGGER_PATH_IDENTIFIER, NodeApiError } from 'n8n-workflow';
|
||||
import { Readable } from 'node:stream';
|
||||
import picocolors from 'picocolors';
|
||||
import Container from 'typedi';
|
||||
|
||||
import { inDevelopment } from '@/constants';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import { ResponseError } from './errors/response-errors/abstract/response.error';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { TaskRunnersConfig } from '@n8n/config';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import type { Logger } from 'n8n-core';
|
||||
|
||||
import type { Logger } from '@/logging/logger.service';
|
||||
import type { TaskRunnerAuthService } from '@/runners/auth/task-runner-auth.service';
|
||||
import { TaskRunnerRestartLoopError } from '@/runners/errors/task-runner-restart-loop-error';
|
||||
import { RunnerLifecycleEvents } from '@/runners/runner-lifecycle-events';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { TaskRunnersConfig } from '@n8n/config';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import { Logger } from 'n8n-core';
|
||||
import type { ChildProcess, SpawnOptions } from 'node:child_process';
|
||||
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import type { TaskRunnerAuthService } from '@/runners/auth/task-runner-auth.service';
|
||||
import { TaskRunnerProcess } from '@/runners/task-runner-process';
|
||||
import { mockInstance } from '@test/mocking';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { TaskRunnersConfig } from '@n8n/config';
|
||||
import type { BrokerMessage, RunnerMessage } from '@n8n/task-runner';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ApplicationError, jsonStringify } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
import type WebSocket from 'ws';
|
||||
|
||||
import { Time, WsStatusCodes } from '@/constants';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import { DefaultTaskRunnerDisconnectAnalyzer } from './default-task-runner-disconnect-analyzer';
|
||||
import { RunnerLifecycleEvents } from './runner-lifecycle-events';
|
||||
|
||||
@@ -5,13 +5,13 @@ import type {
|
||||
RunnerMessage,
|
||||
TaskResultData,
|
||||
} from '@n8n/task-runner';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import config from '@/config';
|
||||
import { Time } from '@/constants';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import { TaskDeferredError, TaskRejectError } from './errors';
|
||||
import { TaskRunnerTimeoutError } from './errors/task-runner-timeout.error';
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { TaskRunnersConfig } from '@n8n/config';
|
||||
import { ErrorReporter } from 'n8n-core';
|
||||
import { ErrorReporter, Logger } from 'n8n-core';
|
||||
import { sleep } from 'n8n-workflow';
|
||||
import * as a from 'node:assert/strict';
|
||||
import Container, { Service } from 'typedi';
|
||||
|
||||
import { OnShutdown } from '@/decorators/on-shutdown';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import type { TaskRunnerRestartLoopError } from '@/runners/errors/task-runner-restart-loop-error';
|
||||
import type { TaskRunnerProcess } from '@/runners/task-runner-process';
|
||||
import { TaskRunnerProcessRestartLoopDetector } from '@/runners/task-runner-process-restart-loop-detector';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { TaskRunnersConfig } from '@n8n/config';
|
||||
import { Logger } from 'n8n-core';
|
||||
import * as a from 'node:assert/strict';
|
||||
import { spawn } from 'node:child_process';
|
||||
import * as process from 'node:process';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { OnShutdown } from '@/decorators/on-shutdown';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import { TaskRunnerAuthService } from './auth/task-runner-auth.service';
|
||||
import { forwardToLogger } from './forward-to-logger';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import compression from 'compression';
|
||||
import express from 'express';
|
||||
import { Logger } from 'n8n-core';
|
||||
import * as a from 'node:assert/strict';
|
||||
import { randomBytes } from 'node:crypto';
|
||||
import { ServerResponse, type Server, createServer as createHttpServer } from 'node:http';
|
||||
@@ -10,7 +11,6 @@ import { Service } from 'typedi';
|
||||
import { Server as WSServer } from 'ws';
|
||||
|
||||
import { inTest } from '@/constants';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { bodyParser, rawBodyReader } from '@/middlewares';
|
||||
import { send } from '@/response-helper';
|
||||
import { TaskRunnerAuthController } from '@/runners/auth/task-runner-auth.controller';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RunningJobSummary } from '@n8n/api-types';
|
||||
import { ErrorReporter, InstanceSettings, WorkflowExecute } from 'n8n-core';
|
||||
import { ErrorReporter, InstanceSettings, WorkflowExecute, Logger } from 'n8n-core';
|
||||
import type { ExecutionStatus, IExecuteResponsePromiseData, IRun } from 'n8n-workflow';
|
||||
import { BINARY_ENCODING, ApplicationError, Workflow } from 'n8n-workflow';
|
||||
import type PCancelable from 'p-cancelable';
|
||||
@@ -8,7 +8,6 @@ import { Service } from 'typedi';
|
||||
import config from '@/config';
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import * as WorkflowExecuteAdditionalData from '@/workflow-execute-additional-data';
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import config from '@/config';
|
||||
import { Time } from '@/constants';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { Publisher } from '@/scaling/pubsub/publisher.service';
|
||||
import { RedisClientService } from '@/services/redis-client.service';
|
||||
import { TypedEmitter } from '@/typed-emitter';
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import type { Redis as SingleNodeClient, Cluster as MultiNodeClient } from 'ioredis';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import type { LogMetadata } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import config from '@/config';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import type { LogMetadata } from '@/logging/types';
|
||||
import { RedisClientService } from '@/services/redis-client.service';
|
||||
|
||||
import type { PubSub } from './pubsub.types';
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import type { Redis as SingleNodeClient, Cluster as MultiNodeClient } from 'ioredis';
|
||||
import debounce from 'lodash/debounce';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import { jsonParse } from 'n8n-workflow';
|
||||
import type { LogMetadata } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import config from '@/config';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import type { LogMetadata } from '@/logging/types';
|
||||
import { RedisClientService } from '@/services/redis-client.service';
|
||||
|
||||
import type { PubSub } from './pubsub.types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { ErrorReporter, InstanceSettings } from 'n8n-core';
|
||||
import { ErrorReporter, InstanceSettings, Logger } from 'n8n-core';
|
||||
import { ApplicationError, BINARY_ENCODING, sleep, jsonStringify, ensureError } from 'n8n-workflow';
|
||||
import type { IExecuteResponsePromiseData } from 'n8n-workflow';
|
||||
import { strict } from 'node:assert';
|
||||
@@ -12,7 +12,6 @@ import { ExecutionRepository } from '@/databases/repositories/execution.reposito
|
||||
import { OnShutdown } from '@/decorators/on-shutdown';
|
||||
import { MaxStalledCountError } from '@/errors/max-stalled-count.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { OrchestrationService } from '@/services/orchestration.service';
|
||||
import { assertNever } from '@/utils';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import type { Application } from 'express';
|
||||
import express from 'express';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import http from 'node:http';
|
||||
import type { Server } from 'node:http';
|
||||
@@ -13,7 +13,6 @@ import { CredentialsOverwritesAlreadySetError } from '@/errors/credentials-overw
|
||||
import { NonJsonBodyError } from '@/errors/non-json-body.error';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import type { ICredentialsOverwrite } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { PrometheusMetricsService } from '@/metrics/prometheus-metrics.service';
|
||||
import { rawBodyReader, bodyParser } from '@/middlewares';
|
||||
import * as ResponseHelper from '@/response-helper';
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import axios from 'axios';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import config from '@/config';
|
||||
import { getN8nPackageJson, inDevelopment } from '@/constants';
|
||||
import type { WorkflowEntity } from '@/databases/entities/workflow-entity';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { isApiEnabled } from '@/public-api';
|
||||
import {
|
||||
ENV_VARS_DOCS_URL,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Logger } from 'n8n-core';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { ActivationErrorsService } from '@/activation-errors.service';
|
||||
@@ -5,7 +6,6 @@ import type { User } from '@/databases/entities/user';
|
||||
import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository';
|
||||
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
|
||||
import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
@Service()
|
||||
export class ActiveWorkflowsService {
|
||||
|
||||
@@ -2,8 +2,8 @@ import { GlobalConfig } from '@n8n/config';
|
||||
import axios from 'axios';
|
||||
import { exec } from 'child_process';
|
||||
import { access as fsAccess, mkdir as fsMkdir } from 'fs/promises';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import type { PackageDirectoryLoader } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import { ApplicationError, type PublicInstalledPackage } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
import { promisify } from 'util';
|
||||
@@ -22,7 +22,6 @@ import { FeatureNotLicensedError } from '@/errors/feature-not-licensed.error';
|
||||
import type { CommunityPackages } from '@/interfaces';
|
||||
import { License } from '@/license';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { Publisher } from '@/scaling/pubsub/publisher.service';
|
||||
import { toError } from '@/utils';
|
||||
|
||||
|
||||
@@ -4,7 +4,13 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
import get from 'lodash/get';
|
||||
import { ErrorReporter, NodeExecuteFunctions, RoutingNode, isObjectLiteral } from 'n8n-core';
|
||||
import {
|
||||
ErrorReporter,
|
||||
Logger,
|
||||
NodeExecuteFunctions,
|
||||
RoutingNode,
|
||||
isObjectLiteral,
|
||||
} from 'n8n-core';
|
||||
import type {
|
||||
ICredentialsDecrypted,
|
||||
ICredentialTestFunction,
|
||||
@@ -28,7 +34,6 @@ import { Service } from 'typedi';
|
||||
|
||||
import { CredentialTypes } from '@/credential-types';
|
||||
import type { User } from '@/databases/entities/user';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import * as WorkflowExecuteAdditionalData from '@/workflow-execute-additional-data';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { GlobalConfig, FrontendConfig, SecurityConfig } from '@n8n/config';
|
||||
import { createWriteStream } from 'fs';
|
||||
import { mkdir } from 'fs/promises';
|
||||
import uniq from 'lodash/uniq';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import type { ICredentialType, INodeTypeBaseDescription } from 'n8n-workflow';
|
||||
import path from 'path';
|
||||
import { Container, Service } from 'typedi';
|
||||
@@ -16,7 +16,6 @@ import { getVariablesLimit } from '@/environments/variables/environment-helpers'
|
||||
import { getLdapLoginLabel } from '@/ldap/helpers.ee';
|
||||
import { License } from '@/license';
|
||||
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { isApiEnabled } from '@/public-api';
|
||||
import type { CommunityPackagesService } from '@/services/community-packages.service';
|
||||
import { getSamlLoginLabel } from '@/sso/saml/saml-helpers';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Logger } from 'n8n-core';
|
||||
import { type INode, type INodeCredentialsDetails } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
@@ -11,7 +12,6 @@ import { CredentialsRepository } from '@/databases/repositories/credentials.repo
|
||||
import { TagRepository } from '@/databases/repositories/tag.repository';
|
||||
import * as Db from '@/db';
|
||||
import type { ICredentialsDb } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { replaceInvalidCredentials } from '@/workflow-helpers';
|
||||
|
||||
@Service()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ExecutionsConfig } from '@n8n/config';
|
||||
import { BinaryDataService, InstanceSettings } from 'n8n-core';
|
||||
import { BinaryDataService, InstanceSettings, Logger } from 'n8n-core';
|
||||
import { ensureError } from 'n8n-workflow';
|
||||
import { strict } from 'node:assert';
|
||||
import { Service } from 'typedi';
|
||||
@@ -8,7 +8,6 @@ import { Time } from '@/constants';
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { connectionState as dbConnectionState } from '@/db';
|
||||
import { OnShutdown } from '@/decorators/on-shutdown';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import { OrchestrationService } from '../orchestration.service';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import ioRedis from 'ioredis';
|
||||
import type { Cluster, RedisOptions } from 'ioredis';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { Debounce } from '@/decorators/debounce';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { TypedEmitter } from '@/typed-emitter';
|
||||
|
||||
import type { RedisClientType } from '../scaling/redis/redis.types';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Logger } from 'n8n-core';
|
||||
import type { IUserSettings } from 'n8n-workflow';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
@@ -7,7 +8,6 @@ import { UserRepository } from '@/databases/repositories/user.repository';
|
||||
import { InternalServerError } from '@/errors/response-errors/internal-server.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import type { Invitation, PublicUser } from '@/interfaces';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import type { PostHogClient } from '@/posthog';
|
||||
import type { UserRequest } from '@/requests';
|
||||
import { UrlService } from '@/services/url.service';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Logger } from 'n8n-core';
|
||||
import type { INode, IRun, IWorkflowBase } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { StatisticsNames } from '@/databases/entities/workflow-statistics';
|
||||
import { WorkflowStatisticsRepository } from '@/databases/repositories/workflow-statistics.repository';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { UserService } from '@/services/user.service';
|
||||
import { TypedEmitter } from '@/typed-emitter';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { type Class, ErrorReporter } from 'n8n-core';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ApplicationError, assert } from 'n8n-workflow';
|
||||
import { Container, Service } from 'typedi';
|
||||
|
||||
import { LOWEST_SHUTDOWN_PRIORITY, HIGHEST_SHUTDOWN_PRIORITY } from '@/constants';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
type HandlerFn = () => Promise<void> | void;
|
||||
export type ServiceClass = Class<Record<string, HandlerFn>>;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { Logger } from 'n8n-core';
|
||||
|
||||
import { mockInstance } from '@test/mocking';
|
||||
|
||||
import { validateMetadata, validateResponse } from '../saml-validator';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type express from 'express';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import { Logger } from 'n8n-core';
|
||||
import type { IdentityProviderInstance, ServiceProviderInstance } from 'samlify';
|
||||
|
||||
import { SettingsRepository } from '@/databases/repositories/settings.repository';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { UrlService } from '@/services/url.service';
|
||||
import * as samlHelpers from '@/sso/saml/saml-helpers';
|
||||
import { SamlService } from '@/sso/saml/saml.service.ee';
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { Logger } from 'n8n-core';
|
||||
import { Container } from 'typedi';
|
||||
import type { XMLFileInfo } from 'xmllint-wasm';
|
||||
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
let xmlMetadata: XMLFileInfo;
|
||||
let xmlProtocol: XMLFileInfo;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import axios from 'axios';
|
||||
import type express from 'express';
|
||||
import https from 'https';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { ApplicationError, jsonParse } from 'n8n-workflow';
|
||||
import type { IdentityProviderInstance, ServiceProviderInstance } from 'samlify';
|
||||
import type { BindingContext, PostBindingContext } from 'samlify/types/src/entity';
|
||||
@@ -12,7 +13,6 @@ import { SettingsRepository } from '@/databases/repositories/settings.repository
|
||||
import { UserRepository } from '@/databases/repositories/user.repository';
|
||||
import { AuthError } from '@/errors/response-errors/auth.error';
|
||||
import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { UrlService } from '@/services/url.service';
|
||||
|
||||
import { SAML_PREFERENCES_DB_KEY } from './constants';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { type Workflow, type INode, type WorkflowSettings } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import type { Project } from '@/databases/entities/project';
|
||||
import { SubworkflowPolicyDenialError } from '@/errors/subworkflow-policy-denial.error';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { AccessService } from '@/services/access.service';
|
||||
import { OwnershipService } from '@/services/ownership.service';
|
||||
import { UrlService } from '@/services/url.service';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import type RudderStack from '@rudderstack/rudder-sdk-node';
|
||||
import axios from 'axios';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import type { ITelemetryTrackProperties } from 'n8n-workflow';
|
||||
import { Container, Service } from 'typedi';
|
||||
|
||||
@@ -13,7 +13,6 @@ import { WorkflowRepository } from '@/databases/repositories/workflow.repository
|
||||
import { OnShutdown } from '@/decorators/on-shutdown';
|
||||
import type { IExecutionTrackProperties } from '@/interfaces';
|
||||
import { License } from '@/license';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { PostHogClient } from '@/posthog';
|
||||
|
||||
import { SourceControlPreferencesService } from '../environments/source-control/source-control-preferences.service.ee';
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { pick } from 'lodash';
|
||||
import { ErrorReporter } from 'n8n-core';
|
||||
import { ErrorReporter, Logger } from 'n8n-core';
|
||||
import path from 'node:path';
|
||||
import type { Transporter } from 'nodemailer';
|
||||
import { createTransport } from 'nodemailer';
|
||||
import type SMTPConnection from 'nodemailer/lib/smtp-connection';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
|
||||
import type { MailData, SendEmailResult } from './interfaces';
|
||||
|
||||
@Service()
|
||||
|
||||
@@ -2,6 +2,7 @@ import { GlobalConfig } from '@n8n/config';
|
||||
import { existsSync } from 'fs';
|
||||
import { readFile } from 'fs/promises';
|
||||
import Handlebars from 'handlebars';
|
||||
import { Logger } from 'n8n-core';
|
||||
import { join as pathJoin } from 'path';
|
||||
import { Container, Service } from 'typedi';
|
||||
|
||||
@@ -11,7 +12,6 @@ import type { WorkflowEntity } from '@/databases/entities/workflow-entity';
|
||||
import { UserRepository } from '@/databases/repositories/user.repository';
|
||||
import { InternalServerError } from '@/errors/response-errors/internal-server.error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { UrlService } from '@/services/url.service';
|
||||
import { toError } from '@/utils';
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { InstanceSettings, Logger } from 'n8n-core';
|
||||
import { ApplicationError, type IWorkflowExecutionDataProcess } from 'n8n-workflow';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { ActiveExecutions } from '@/active-executions';
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { Logger } from '@/logging/logger.service';
|
||||
import { OrchestrationService } from '@/services/orchestration.service';
|
||||
import { OwnershipService } from '@/services/ownership.service';
|
||||
import { WorkflowRunner } from '@/workflow-runner';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user