mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Move isObjectLiteral to @n8n/backend-common (#15414)
This commit is contained in:
@@ -6,3 +6,5 @@ const { NODE_ENV } = process.env;
|
||||
export const inTest = NODE_ENV === 'test';
|
||||
export const inProduction = NODE_ENV === 'production';
|
||||
export const inDevelopment = !NODE_ENV || NODE_ENV === 'development';
|
||||
|
||||
export { isObjectLiteral } from './utils/is-object-literal';
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"dist/**/*"
|
||||
],
|
||||
"dependencies": {
|
||||
"@n8n/backend-common": "workspace:^",
|
||||
"@n8n/config": "workspace:^",
|
||||
"@n8n/constants": "workspace:^",
|
||||
"@n8n/di": "workspace:^",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isObjectLiteral } from 'n8n-core';
|
||||
import { isObjectLiteral } from '@n8n/backend-common';
|
||||
import type { IDataObject, INodeExecutionData } from 'n8n-workflow';
|
||||
|
||||
import type { MigrationContext, IrreversibleMigration } from '../migration-types';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { isObjectLiteral } from '@n8n/backend-common';
|
||||
import { plainToInstance, instanceToPlain } from 'class-transformer';
|
||||
import { validate } from 'class-validator';
|
||||
import { isObjectLiteral } from 'n8n-core';
|
||||
import { jsonParse, UnexpectedError } from 'n8n-workflow';
|
||||
|
||||
export class BaseFilter {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { isObjectLiteral } from '@n8n/backend-common';
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { ExecutionRepository } from '@n8n/db';
|
||||
import { OnLeaderStepdown, OnLeaderTakeover, OnShutdown } from '@n8n/decorators';
|
||||
import { Container, Service } from '@n8n/di';
|
||||
import { ErrorReporter, InstanceSettings, isObjectLiteral, Logger } from 'n8n-core';
|
||||
import { ErrorReporter, InstanceSettings, Logger } from 'n8n-core';
|
||||
import {
|
||||
BINARY_ENCODING,
|
||||
sleep,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
import { isObjectLiteral } from '@n8n/backend-common';
|
||||
import type { User } from '@n8n/db';
|
||||
import { Service } from '@n8n/di';
|
||||
import get from 'lodash/get';
|
||||
@@ -12,7 +13,6 @@ import {
|
||||
ExecuteContext,
|
||||
Logger,
|
||||
RoutingNode,
|
||||
isObjectLiteral,
|
||||
} from 'n8n-core';
|
||||
import type {
|
||||
ICredentialsDecrypted,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isObjectLiteral } from 'n8n-core';
|
||||
import { isObjectLiteral } from '@n8n/backend-common';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
import type { Workflow } from 'n8n-workflow';
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { isObjectLiteral } from '@n8n/backend-common';
|
||||
import { Container } from '@n8n/di';
|
||||
import type { ICredentialDataDecryptedObject, ICredentialsEncrypted } from 'n8n-workflow';
|
||||
import { ApplicationError, ICredentials, jsonParse } from 'n8n-workflow';
|
||||
@@ -5,7 +6,6 @@ import * as a from 'node:assert';
|
||||
|
||||
import { CREDENTIAL_ERRORS } from '@/constants';
|
||||
import { Cipher } from '@/encryption/cipher';
|
||||
import { isObjectLiteral } from '@/utils';
|
||||
|
||||
export class CredentialDataError extends ApplicationError {
|
||||
constructor({ name, type, id }: Credentials<object>, message: string, cause?: unknown) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { inDevelopment, inProduction } from '@n8n/backend-common';
|
||||
import { inDevelopment, inProduction, isObjectLiteral } from '@n8n/backend-common';
|
||||
import type { LogScope } from '@n8n/config';
|
||||
import { GlobalConfig, InstanceSettingsConfig } from '@n8n/config';
|
||||
import { Service } from '@n8n/di';
|
||||
@@ -15,8 +15,6 @@ import path, { basename } from 'node:path';
|
||||
import pc from 'picocolors';
|
||||
import winston from 'winston';
|
||||
|
||||
import { isObjectLiteral } from '@/utils/is-object-literal';
|
||||
|
||||
const noOp = () => {};
|
||||
|
||||
@Service()
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
export * from './serialized-buffer';
|
||||
export { isObjectLiteral } from './is-object-literal';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isObjectLiteral } from './is-object-literal';
|
||||
import { isObjectLiteral } from '@n8n/backend-common';
|
||||
|
||||
/** A nodejs Buffer gone through JSON.stringify */
|
||||
export type SerializedBuffer = {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"references": [
|
||||
{ "path": "../workflow/tsconfig.build.json" },
|
||||
{ "path": "../@n8n/decorators/tsconfig.build.json" },
|
||||
{ "path": "../@n8n/backend-common/tsconfig.build.json" },
|
||||
{ "path": "../@n8n/config/tsconfig.build.json" },
|
||||
{ "path": "../@n8n/di/tsconfig.build.json" },
|
||||
{ "path": "../@n8n/client-oauth2/tsconfig.build.json" }
|
||||
|
||||
27
pnpm-lock.yaml
generated
27
pnpm-lock.yaml
generated
@@ -484,6 +484,9 @@ importers:
|
||||
|
||||
packages/@n8n/db:
|
||||
dependencies:
|
||||
'@n8n/backend-common':
|
||||
specifier: workspace:^
|
||||
version: link:../backend-common
|
||||
'@n8n/config':
|
||||
specifier: workspace:^
|
||||
version: link:../config
|
||||
@@ -726,7 +729,7 @@ importers:
|
||||
version: 4.3.0
|
||||
'@getzep/zep-cloud':
|
||||
specifier: 1.0.12
|
||||
version: 1.0.12(@langchain/core@0.3.30(openai@4.78.1(encoding@0.1.13)(zod@3.24.1)))(encoding@0.1.13)(langchain@0.3.11(b4eb53fe8b825d6e8edd96cc3d942586))
|
||||
version: 1.0.12(@langchain/core@0.3.30(openai@4.78.1(encoding@0.1.13)(zod@3.24.1)))(encoding@0.1.13)(langchain@0.3.11(7f2a4b9c5436679ca8b0df05212b4905))
|
||||
'@getzep/zep-js':
|
||||
specifier: 0.9.0
|
||||
version: 0.9.0
|
||||
@@ -753,7 +756,7 @@ importers:
|
||||
version: 0.3.2(@langchain/core@0.3.30(openai@4.78.1(encoding@0.1.13)(zod@3.24.1)))(encoding@0.1.13)
|
||||
'@langchain/community':
|
||||
specifier: 'catalog:'
|
||||
version: 0.3.24(67fb36bad0bcdd2b0df3579415b33a93)
|
||||
version: 0.3.24(0b620065402de60ffbc4ade3af2d8197)
|
||||
'@langchain/core':
|
||||
specifier: 'catalog:'
|
||||
version: 0.3.30(openai@4.78.1(encoding@0.1.13)(zod@3.24.1))
|
||||
@@ -855,7 +858,7 @@ importers:
|
||||
version: 23.0.1
|
||||
langchain:
|
||||
specifier: 0.3.11
|
||||
version: 0.3.11(b4eb53fe8b825d6e8edd96cc3d942586)
|
||||
version: 0.3.11(7f2a4b9c5436679ca8b0df05212b4905)
|
||||
lodash:
|
||||
specifier: 'catalog:'
|
||||
version: 4.17.21
|
||||
@@ -16468,7 +16471,7 @@ snapshots:
|
||||
'@gar/promisify@1.1.3':
|
||||
optional: true
|
||||
|
||||
'@getzep/zep-cloud@1.0.12(@langchain/core@0.3.30(openai@4.78.1(encoding@0.1.13)(zod@3.24.1)))(encoding@0.1.13)(langchain@0.3.11(b4eb53fe8b825d6e8edd96cc3d942586))':
|
||||
'@getzep/zep-cloud@1.0.12(@langchain/core@0.3.30(openai@4.78.1(encoding@0.1.13)(zod@3.24.1)))(encoding@0.1.13)(langchain@0.3.11(7f2a4b9c5436679ca8b0df05212b4905))':
|
||||
dependencies:
|
||||
form-data: 4.0.0
|
||||
node-fetch: 2.7.0(encoding@0.1.13)
|
||||
@@ -16477,7 +16480,7 @@ snapshots:
|
||||
zod: 3.24.1
|
||||
optionalDependencies:
|
||||
'@langchain/core': 0.3.30(openai@4.78.1(encoding@0.1.13)(zod@3.24.1))
|
||||
langchain: 0.3.11(b4eb53fe8b825d6e8edd96cc3d942586)
|
||||
langchain: 0.3.11(7f2a4b9c5436679ca8b0df05212b4905)
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
|
||||
@@ -16989,7 +16992,7 @@ snapshots:
|
||||
- aws-crt
|
||||
- encoding
|
||||
|
||||
'@langchain/community@0.3.24(67fb36bad0bcdd2b0df3579415b33a93)':
|
||||
'@langchain/community@0.3.24(0b620065402de60ffbc4ade3af2d8197)':
|
||||
dependencies:
|
||||
'@browserbasehq/stagehand': 1.9.0(@playwright/test@1.49.1)(deepmerge@4.3.1)(dotenv@16.4.5)(encoding@0.1.13)(openai@4.78.1(encoding@0.1.13)(zod@3.24.1))(zod@3.24.1)
|
||||
'@ibm-cloud/watsonx-ai': 1.1.2
|
||||
@@ -17000,7 +17003,7 @@ snapshots:
|
||||
flat: 5.0.2
|
||||
ibm-cloud-sdk-core: 5.3.2
|
||||
js-yaml: 4.1.0
|
||||
langchain: 0.3.11(b4eb53fe8b825d6e8edd96cc3d942586)
|
||||
langchain: 0.3.11(7f2a4b9c5436679ca8b0df05212b4905)
|
||||
langsmith: 0.2.15(openai@4.78.1(encoding@0.1.13)(zod@3.24.1))
|
||||
openai: 4.78.1(encoding@0.1.13)(zod@3.24.1)
|
||||
uuid: 10.0.0
|
||||
@@ -17015,7 +17018,7 @@ snapshots:
|
||||
'@aws-sdk/credential-provider-node': 3.808.0
|
||||
'@azure/storage-blob': 12.26.0
|
||||
'@browserbasehq/sdk': 2.0.0(encoding@0.1.13)
|
||||
'@getzep/zep-cloud': 1.0.12(@langchain/core@0.3.30(openai@4.78.1(encoding@0.1.13)(zod@3.24.1)))(encoding@0.1.13)(langchain@0.3.11(b4eb53fe8b825d6e8edd96cc3d942586))
|
||||
'@getzep/zep-cloud': 1.0.12(@langchain/core@0.3.30(openai@4.78.1(encoding@0.1.13)(zod@3.24.1)))(encoding@0.1.13)(langchain@0.3.11(7f2a4b9c5436679ca8b0df05212b4905))
|
||||
'@getzep/zep-js': 0.9.0
|
||||
'@google-ai/generativelanguage': 2.6.0(encoding@0.1.13)
|
||||
'@google-cloud/storage': 7.12.1(encoding@0.1.13)
|
||||
@@ -23202,7 +23205,7 @@ snapshots:
|
||||
'@types/debug': 4.1.12
|
||||
'@types/node': 18.16.16
|
||||
'@types/tough-cookie': 4.0.2
|
||||
axios: 1.8.3(debug@4.4.0)
|
||||
axios: 1.8.3
|
||||
camelcase: 6.3.0
|
||||
debug: 4.4.0(supports-color@8.1.1)
|
||||
dotenv: 16.4.5
|
||||
@@ -23212,7 +23215,7 @@ snapshots:
|
||||
isstream: 0.1.2
|
||||
jsonwebtoken: 9.0.2
|
||||
mime-types: 2.1.35
|
||||
retry-axios: 2.6.0(axios@1.8.3)
|
||||
retry-axios: 2.6.0(axios@1.8.3(debug@4.4.0))
|
||||
tough-cookie: 4.1.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -24206,7 +24209,7 @@ snapshots:
|
||||
|
||||
kuler@2.0.0: {}
|
||||
|
||||
langchain@0.3.11(b4eb53fe8b825d6e8edd96cc3d942586):
|
||||
langchain@0.3.11(7f2a4b9c5436679ca8b0df05212b4905):
|
||||
dependencies:
|
||||
'@langchain/core': 0.3.30(openai@4.78.1(encoding@0.1.13)(zod@3.24.1))
|
||||
'@langchain/openai': 0.3.17(@langchain/core@0.3.30(openai@4.78.1(encoding@0.1.13)(zod@3.24.1)))(encoding@0.1.13)
|
||||
@@ -26583,7 +26586,7 @@ snapshots:
|
||||
onetime: 5.1.2
|
||||
signal-exit: 3.0.7
|
||||
|
||||
retry-axios@2.6.0(axios@1.8.3):
|
||||
retry-axios@2.6.0(axios@1.8.3(debug@4.4.0)):
|
||||
dependencies:
|
||||
axios: 1.8.3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user