mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Move Logger to core (no-changelog) (#12310)
This commit is contained in:
committed by
GitHub
parent
b4c77f27b6
commit
471d7b9420
@@ -31,6 +31,7 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@langchain/core": "catalog:",
|
||||
"@n8n/config": "workspace:*",
|
||||
"@types/deep-equal": "^1.0.1",
|
||||
"@types/express": "catalog:",
|
||||
"@types/jmespath": "^0.15.0",
|
||||
@@ -44,7 +45,7 @@
|
||||
"@n8n_io/riot-tmpl": "4.0.0",
|
||||
"ast-types": "0.15.2",
|
||||
"axios": "catalog:",
|
||||
"callsites": "3.1.0",
|
||||
"callsites": "catalog:",
|
||||
"deep-equal": "2.2.0",
|
||||
"esprima-next": "5.8.4",
|
||||
"form-data": "catalog:",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
|
||||
import type { CallbackManager as CallbackManagerLC } from '@langchain/core/callbacks/manager';
|
||||
import type { LogScope } from '@n8n/config';
|
||||
import type { AxiosProxyConfig, GenericAbortSignal } from 'axios';
|
||||
import type * as express from 'express';
|
||||
import type FormData from 'form-data';
|
||||
@@ -675,6 +675,7 @@ export type ICredentialTestFunction = (
|
||||
) => Promise<INodeCredentialTestResult>;
|
||||
|
||||
export interface ICredentialTestFunctions {
|
||||
logger: Logger;
|
||||
helpers: SSHTunnelFunctions & {
|
||||
request: (uriOrObject: string | object, options?: object) => Promise<any>;
|
||||
};
|
||||
@@ -2447,7 +2448,17 @@ export interface WorkflowTestData {
|
||||
}
|
||||
|
||||
export type LogLevel = (typeof LOG_LEVELS)[number];
|
||||
export type Logger = Record<Exclude<LogLevel, 'silent'>, (message: string, meta?: object) => void>;
|
||||
export type LogMetadata = {
|
||||
[key: string]: unknown;
|
||||
scopes?: LogScope[];
|
||||
file?: string;
|
||||
function?: string;
|
||||
};
|
||||
export type Logger = Record<
|
||||
Exclude<LogLevel, 'silent'>,
|
||||
(message: string, metadata?: LogMetadata) => void
|
||||
>;
|
||||
export type LogLocationMetadata = Pick<LogMetadata, 'file' | 'function'>;
|
||||
|
||||
export interface IStatusCodeMessages {
|
||||
[key: string]: string;
|
||||
|
||||
Reference in New Issue
Block a user