mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
chore: Enfore consistent file-name casing on all backend packages (#15755)
This commit is contained in:
committed by
GitHub
parent
66d339c0d8
commit
3a2a70f193
@@ -4,4 +4,7 @@ const sharedOptions = require('@n8n/eslint-config/shared');
|
||||
module.exports = {
|
||||
extends: ['@n8n/eslint-config/base'],
|
||||
...sharedOptions(__dirname),
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Z } from 'zod-class';
|
||||
|
||||
import { booleanFromString } from '../../schemas/booleanFromString';
|
||||
import { booleanFromString } from '../../schemas/boolean-from-string';
|
||||
|
||||
export class CredentialsGetManyRequestQuery extends Z.class({
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Z } from 'zod-class';
|
||||
|
||||
import { booleanFromString } from '../../schemas/booleanFromString';
|
||||
import { booleanFromString } from '../../schemas/boolean-from-string';
|
||||
|
||||
export class CredentialsGetOneRequestQuery extends Z.class({
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { INodeCredentials, INodeParameters, INodeTypeNameVersion } from 'n8
|
||||
import { z } from 'zod';
|
||||
import { Z } from 'zod-class';
|
||||
|
||||
import { nodeVersionSchema } from '../../schemas/nodeVersion.schema';
|
||||
import { nodeVersionSchema } from '../../schemas/node-version.schema';
|
||||
|
||||
export class BaseDynamicParametersRequestDto extends Z.class({
|
||||
path: z.string(),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { bannerNameSchema } from '../../../schemas/bannerName.schema';
|
||||
import { bannerNameSchema } from '../../../schemas/banner-name.schema';
|
||||
import { DismissBannerRequestDto } from '../dismiss-banner-request.dto';
|
||||
|
||||
describe('DismissBannerRequestDto', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Z } from 'zod-class';
|
||||
|
||||
import { bannerNameSchema } from '../../schemas/bannerName.schema';
|
||||
import { bannerNameSchema } from '../../schemas/banner-name.schema';
|
||||
|
||||
export class DismissBannerRequestDto extends Z.class({
|
||||
banner: bannerNameSchema.optional(),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { z } from 'zod';
|
||||
import { Z } from 'zod-class';
|
||||
|
||||
import { passwordResetTokenSchema } from '../../schemas/password-reset-token.schema';
|
||||
import { passwordSchema } from '../../schemas/password.schema';
|
||||
import { passwordResetTokenSchema } from '../../schemas/passwordResetToken.schema';
|
||||
|
||||
export class ChangePasswordRequestDto extends Z.class({
|
||||
token: passwordResetTokenSchema,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Z } from 'zod-class';
|
||||
|
||||
import { passwordResetTokenSchema } from '../../schemas/passwordResetToken.schema';
|
||||
import { passwordResetTokenSchema } from '../../schemas/password-reset-token.schema';
|
||||
|
||||
export class ResolvePasswordTokenQueryDto extends Z.class({
|
||||
token: passwordResetTokenSchema,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Z } from 'zod-class';
|
||||
|
||||
import { booleanFromString } from '../../schemas/booleanFromString';
|
||||
import { booleanFromString } from '../../schemas/boolean-from-string';
|
||||
|
||||
export class RetrieveTagQueryDto extends Z.class({
|
||||
withUsageCount: booleanFromString.optional().default('false'),
|
||||
|
||||
@@ -12,8 +12,8 @@ export type { HeartbeatMessage } from './push/heartbeat';
|
||||
export { createHeartbeatMessage, heartbeatMessageSchema } from './push/heartbeat';
|
||||
export type { SendWorkerStatusMessage } from './push/worker';
|
||||
|
||||
export type { BannerName } from './schemas/bannerName.schema';
|
||||
export { ViewableMimeTypes } from './schemas/binaryData.schema';
|
||||
export type { BannerName } from './schemas/banner-name.schema';
|
||||
export { ViewableMimeTypes } from './schemas/binary-data.schema';
|
||||
export { passwordSchema } from './schemas/password.schema';
|
||||
|
||||
export type {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { nodeVersionSchema } from '../nodeVersion.schema';
|
||||
import { nodeVersionSchema } from '../node-version.schema';
|
||||
|
||||
describe('nodeVersionSchema', () => {
|
||||
describe('valid versions', () => {
|
||||
@@ -4,4 +4,7 @@ const sharedOptions = require('@n8n/eslint-config/shared');
|
||||
module.exports = {
|
||||
extends: ['@n8n/eslint-config/base'],
|
||||
...sharedOptions(__dirname),
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -9,6 +9,7 @@ module.exports = {
|
||||
...sharedOptions(__dirname),
|
||||
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
'@typescript-eslint/consistent-type-imports': 'error',
|
||||
'n8n-local-rules/no-plain-errors': 'off',
|
||||
'n8n-local-rules/no-uncaught-json-parse': 'off',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as a from 'node:assert';
|
||||
|
||||
import type { ClientOAuth2, ClientOAuth2Options, ClientOAuth2RequestObject } from './ClientOAuth2';
|
||||
import type { ClientOAuth2, ClientOAuth2Options, ClientOAuth2RequestObject } from './client-oauth2';
|
||||
import { DEFAULT_HEADERS } from './constants';
|
||||
import { auth, expects, getRequestOptions } from './utils';
|
||||
|
||||
@@ -4,10 +4,10 @@ import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
||||
import { Agent } from 'https';
|
||||
import * as qs from 'querystring';
|
||||
|
||||
import type { ClientOAuth2TokenData } from './ClientOAuth2Token';
|
||||
import { ClientOAuth2Token } from './ClientOAuth2Token';
|
||||
import { CodeFlow } from './CodeFlow';
|
||||
import { CredentialsFlow } from './CredentialsFlow';
|
||||
import type { ClientOAuth2TokenData } from './client-oauth2-token';
|
||||
import { ClientOAuth2Token } from './client-oauth2-token';
|
||||
import { CodeFlow } from './code-flow';
|
||||
import { CredentialsFlow } from './credentials-flow';
|
||||
import type { Headers, OAuth2AccessTokenErrorResponse } from './types';
|
||||
import { getAuthError } from './utils';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as qs from 'querystring';
|
||||
|
||||
import type { ClientOAuth2, ClientOAuth2Options } from './ClientOAuth2';
|
||||
import type { ClientOAuth2Token } from './ClientOAuth2Token';
|
||||
import type { ClientOAuth2, ClientOAuth2Options } from './client-oauth2';
|
||||
import type { ClientOAuth2Token } from './client-oauth2-token';
|
||||
import { DEFAULT_HEADERS, DEFAULT_URL_BASE } from './constants';
|
||||
import { auth, expects, getAuthError, getRequestOptions } from './utils';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { ClientOAuth2 } from './ClientOAuth2';
|
||||
import type { ClientOAuth2Token } from './ClientOAuth2Token';
|
||||
import type { ClientOAuth2 } from './client-oauth2';
|
||||
import type { ClientOAuth2Token } from './client-oauth2-token';
|
||||
import { DEFAULT_HEADERS } from './constants';
|
||||
import type { Headers } from './types';
|
||||
import { auth, expects, getRequestOptions } from './utils';
|
||||
@@ -1,3 +1,3 @@
|
||||
export { ClientOAuth2, ClientOAuth2Options, ClientOAuth2RequestObject } from './ClientOAuth2';
|
||||
export { ClientOAuth2Token, ClientOAuth2TokenData } from './ClientOAuth2Token';
|
||||
export { ClientOAuth2, ClientOAuth2Options, ClientOAuth2RequestObject } from './client-oauth2';
|
||||
export { ClientOAuth2Token, ClientOAuth2TokenData } from './client-oauth2-token';
|
||||
export type * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import type { ClientOAuth2Options, ClientOAuth2RequestObject } from './ClientOAuth2';
|
||||
import type { ClientOAuth2Options, ClientOAuth2RequestObject } from './client-oauth2';
|
||||
import { ERROR_RESPONSES } from './constants';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import axios from 'axios';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ClientOAuth2, ResponseError } from '@/ClientOAuth2';
|
||||
import { ClientOAuth2, ResponseError } from '@/client-oauth2';
|
||||
import { ERROR_RESPONSES } from '@/constants';
|
||||
import { auth, AuthError } from '@/utils';
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import { ClientOAuth2 } from '@/client-oauth2';
|
||||
import { ClientOAuth2Token } from '@/client-oauth2-token';
|
||||
import { AuthError } from '@/utils';
|
||||
|
||||
import * as config from './config';
|
||||
import { ClientOAuth2, ClientOAuth2Token } from '../src';
|
||||
|
||||
describe('CodeFlow', () => {
|
||||
beforeAll(async () => {
|
||||
@@ -1,9 +1,10 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import { ClientOAuth2, type ClientOAuth2Options } from '@/client-oauth2';
|
||||
import { ClientOAuth2Token } from '@/client-oauth2-token';
|
||||
import type { Headers } from '@/types';
|
||||
|
||||
import * as config from './config';
|
||||
import type { ClientOAuth2Options } from '../src';
|
||||
import { ClientOAuth2, ClientOAuth2Token } from '../src';
|
||||
import type { Headers } from '../src/types';
|
||||
|
||||
describe('CredentialsFlow', () => {
|
||||
beforeAll(async () => {
|
||||
@@ -8,6 +8,10 @@ module.exports = {
|
||||
|
||||
...sharedOptions(__dirname),
|
||||
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
},
|
||||
|
||||
overrides: [
|
||||
{
|
||||
files: ['**/*.config.ts'],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
import { AiAssistantConfig } from './configs/aiAssistant.config';
|
||||
import { AiAssistantConfig } from './configs/ai-assistant.config';
|
||||
import { AuthConfig } from './configs/auth.config';
|
||||
import { CacheConfig } from './configs/cache.config';
|
||||
import { CredentialsConfig } from './configs/credentials.config';
|
||||
|
||||
@@ -4,4 +4,7 @@ const sharedOptions = require('@n8n/eslint-config/shared');
|
||||
module.exports = {
|
||||
extends: ['@n8n/eslint-config/base'],
|
||||
...sharedOptions(__dirname),
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -4,4 +4,15 @@ const sharedOptions = require('@n8n/eslint-config/shared');
|
||||
module.exports = {
|
||||
extends: ['@n8n/eslint-config/base'],
|
||||
...sharedOptions(__dirname),
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['./src/migrations/**/*.ts'],
|
||||
rules: {
|
||||
'unicorn/filename-case': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -4,4 +4,7 @@ const sharedOptions = require('@n8n/eslint-config/shared');
|
||||
module.exports = {
|
||||
extends: ['@n8n/eslint-config/base'],
|
||||
...sharedOptions(__dirname),
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -4,4 +4,7 @@ const sharedOptions = require('@n8n/eslint-config/shared');
|
||||
module.exports = {
|
||||
extends: ['@n8n/eslint-config/base'],
|
||||
...sharedOptions(__dirname),
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ServiceA } from './fixtures/ServiceA';
|
||||
import { ServiceB } from './fixtures/ServiceB';
|
||||
import { ServiceA } from './fixtures/service-a';
|
||||
import { ServiceB } from './fixtures/service-b';
|
||||
import { Container } from '../di';
|
||||
|
||||
describe('DI Container', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import { ServiceB } from './ServiceB';
|
||||
import { ServiceB } from './service-b';
|
||||
import { Service } from '../../di';
|
||||
|
||||
@Service()
|
||||
@@ -1,5 +1,5 @@
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import { ServiceA } from './ServiceA';
|
||||
import { ServiceA } from './service-a';
|
||||
import { Service } from '../../di';
|
||||
|
||||
@Service()
|
||||
@@ -9,6 +9,7 @@ module.exports = {
|
||||
...sharedOptions(__dirname),
|
||||
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
'@typescript-eslint/consistent-type-imports': 'error',
|
||||
'n8n-local-rules/no-plain-errors': 'off',
|
||||
},
|
||||
|
||||
@@ -3,8 +3,8 @@ import { EventEmitter } from 'events';
|
||||
import type Imap from 'imap';
|
||||
import { type ImapMessage } from 'imap';
|
||||
|
||||
import { getMessage } from './helpers/getMessage';
|
||||
import { PartData } from './PartData';
|
||||
import { getMessage } from './helpers/get-message';
|
||||
import { PartData } from './part-data';
|
||||
import type { Message, MessagePart } from './types';
|
||||
|
||||
const IMAP_EVENTS = ['alert', 'mail', 'expunge', 'uidvalidity', 'update', 'close', 'end'] as const;
|
||||
@@ -3,7 +3,7 @@
|
||||
import Imap from 'imap';
|
||||
|
||||
import { ConnectionClosedError, ConnectionEndedError, ConnectionTimeoutError } from './errors';
|
||||
import { ImapSimple } from './ImapSimple';
|
||||
import { ImapSimple } from './imap-simple';
|
||||
import type { ImapSimpleOptions, MessagePart } from './types';
|
||||
|
||||
/**
|
||||
@@ -95,6 +95,6 @@ export function getParts(
|
||||
return parts;
|
||||
}
|
||||
|
||||
export * from './ImapSimple';
|
||||
export * from './imap-simple';
|
||||
export * from './errors';
|
||||
export * from './types';
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
SevenBitPartData,
|
||||
BinaryPartData,
|
||||
UuencodedPartData,
|
||||
} from '../src/PartData';
|
||||
} from '../src/part-data';
|
||||
|
||||
describe('PartData', () => {
|
||||
describe('fromData', () => {
|
||||
@@ -1,10 +1,10 @@
|
||||
const sharedOptions = require('@n8n/eslint-config/shared');
|
||||
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
*/
|
||||
/** @type {import('@types/eslint').ESLint.ConfigData} */
|
||||
module.exports = {
|
||||
extends: ['@n8n/eslint-config/base'],
|
||||
|
||||
...sharedOptions(__dirname),
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -7,10 +7,10 @@ export * from './roles/all-roles';
|
||||
|
||||
export { projectRoleSchema } from './schemas.ee';
|
||||
|
||||
export { hasScope } from './utilities/hasScope.ee';
|
||||
export { hasGlobalScope } from './utilities/hasGlobalScope.ee';
|
||||
export { combineScopes } from './utilities/combineScopes.ee';
|
||||
export { rolesWithScope } from './utilities/rolesWithScope.ee';
|
||||
export { getGlobalScopes } from './utilities/getGlobalScopes.ee';
|
||||
export { getRoleScopes } from './utilities/getRoleScopes.ee';
|
||||
export { hasScope } from './utilities/has-scope.ee';
|
||||
export { hasGlobalScope } from './utilities/has-global-scope.ee';
|
||||
export { combineScopes } from './utilities/combine-scopes.ee';
|
||||
export { rolesWithScope } from './utilities/roles-with-scope.ee';
|
||||
export { getGlobalScopes } from './utilities/get-global-scopes.ee';
|
||||
export { getRoleScopes } from './utilities/get-role-scopes.ee';
|
||||
export * from './public-api-permissions.ee';
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
WORKFLOW_SHARING_SCOPE_MAP,
|
||||
} from './role-maps.ee';
|
||||
import type { AllRolesMap, AllRoleTypes, Scope } from '../types.ee';
|
||||
import { getRoleScopes } from '../utilities/getRoleScopes.ee';
|
||||
import { getRoleScopes } from '../utilities/get-role-scopes.ee';
|
||||
|
||||
const ROLE_NAMES: Record<AllRoleTypes, string> = {
|
||||
'global:owner': 'Owner',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Scope, ScopeLevels, MaskLevels } from '../../types.ee';
|
||||
import { combineScopes } from '../combineScopes.ee';
|
||||
import { combineScopes } from '../combine-scopes.ee';
|
||||
|
||||
describe('combineScopes', () => {
|
||||
describe('basic scope combining', () => {
|
||||
@@ -1,6 +1,6 @@
|
||||
import { GLOBAL_SCOPE_MAP } from '../../roles/role-maps.ee';
|
||||
import type { GlobalRole } from '../../types.ee';
|
||||
import { getGlobalScopes } from '../getGlobalScopes.ee';
|
||||
import { getGlobalScopes } from '../get-global-scopes.ee';
|
||||
|
||||
describe('getGlobalScopes', () => {
|
||||
test.each(['global:owner', 'global:admin', 'global:member'] as const)(
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AllRoleTypes, Resource } from '../../types.ee';
|
||||
import { getRoleScopes, COMBINED_ROLE_MAP } from '../getRoleScopes.ee';
|
||||
import { getRoleScopes, COMBINED_ROLE_MAP } from '../get-role-scopes.ee';
|
||||
|
||||
describe('getRoleScopes', () => {
|
||||
describe('role scope retrieval', () => {
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { GlobalRole, Scope } from '../../types.ee';
|
||||
import { hasGlobalScope } from '../hasGlobalScope.ee';
|
||||
import { hasGlobalScope } from '../has-global-scope.ee';
|
||||
|
||||
describe('hasGlobalScope', () => {
|
||||
describe('single scope checks', () => {
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Scope, ScopeLevels } from '../../types.ee';
|
||||
import { hasScope } from '../hasScope.ee';
|
||||
import { hasScope } from '../has-scope.ee';
|
||||
|
||||
describe('hasScope', () => {
|
||||
const userScopes: ScopeLevels = {
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { GlobalRole, Scope } from '../../types.ee';
|
||||
import { rolesWithScope } from '../rolesWithScope.ee';
|
||||
import { rolesWithScope } from '../roles-with-scope.ee';
|
||||
|
||||
describe('rolesWithScope', () => {
|
||||
describe('global roles', () => {
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getGlobalScopes } from './getGlobalScopes.ee';
|
||||
import { hasScope } from './hasScope.ee';
|
||||
import { getGlobalScopes } from './get-global-scopes.ee';
|
||||
import { hasScope } from './has-scope.ee';
|
||||
import type { AuthPrincipal, Scope, ScopeOptions } from '../types.ee';
|
||||
|
||||
/**
|
||||
@@ -1,4 +1,4 @@
|
||||
import { combineScopes } from './combineScopes.ee';
|
||||
import { combineScopes } from './combine-scopes.ee';
|
||||
import type { Scope, ScopeLevels, ScopeOptions, MaskLevels } from '../types.ee';
|
||||
|
||||
/**
|
||||
@@ -12,7 +12,7 @@ module.exports = {
|
||||
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
'@typescript-eslint/no-duplicate-imports': 'off',
|
||||
// '@typescript-eslint/no-duplicate-imports': 'off',
|
||||
|
||||
complexity: 'error',
|
||||
},
|
||||
|
||||
@@ -12,11 +12,7 @@ module.exports = {
|
||||
project: './tsconfig.json',
|
||||
},
|
||||
|
||||
ignorePatterns: [
|
||||
'jest.config.js',
|
||||
// TODO: Remove these
|
||||
'src/databases/ormconfig.ts',
|
||||
],
|
||||
ignorePatterns: ['jest.config.js'],
|
||||
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
@@ -39,12 +35,6 @@ module.exports = {
|
||||
},
|
||||
|
||||
overrides: [
|
||||
{
|
||||
files: ['./src/databases/migrations/**/*.ts'],
|
||||
rules: {
|
||||
'unicorn/filename-case': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'./src/databases/**/*.ts',
|
||||
|
||||
@@ -2,12 +2,11 @@ import { TaskRunnersConfig } from '@n8n/config';
|
||||
import { Container } from '@n8n/di';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
|
||||
import { DefaultTaskRunnerDisconnectAnalyzer } from '@/task-runners/default-task-runner-disconnect-analyzer';
|
||||
import { MissingAuthTokenError } from '@/task-runners/errors/missing-auth-token.error';
|
||||
import { TaskBrokerWsServer } from '@/task-runners/task-broker/task-broker-ws-server';
|
||||
import { TaskRunnerModule } from '@/task-runners/task-runner-module';
|
||||
|
||||
import { DefaultTaskRunnerDisconnectAnalyzer } from '../../../src/task-runners/default-task-runner-disconnect-analyzer';
|
||||
|
||||
describe('TaskRunnerModule in external mode', () => {
|
||||
const runnerConfig = Container.get(TaskRunnersConfig);
|
||||
runnerConfig.mode = 'external';
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { TaskRunnersConfig } from '@n8n/config';
|
||||
import { Container } from '@n8n/di';
|
||||
|
||||
import { InternalTaskRunnerDisconnectAnalyzer } from '@/task-runners/internal-task-runner-disconnect-analyzer';
|
||||
import { TaskBrokerWsServer } from '@/task-runners/task-broker/task-broker-ws-server';
|
||||
import { TaskRunnerModule } from '@/task-runners/task-runner-module';
|
||||
|
||||
import { InternalTaskRunnerDisconnectAnalyzer } from '../../../src/task-runners/internal-task-runner-disconnect-analyzer';
|
||||
|
||||
describe('TaskRunnerModule in internal mode', () => {
|
||||
const runnerConfig = Container.get(TaskRunnersConfig);
|
||||
runnerConfig.port = 0; // Random port
|
||||
|
||||
@@ -10,6 +10,7 @@ module.exports = {
|
||||
|
||||
rules: {
|
||||
complexity: 'error',
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
|
||||
// TODO: remove these
|
||||
'@typescript-eslint/no-base-to-string': 'warn',
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import { arrayMethods } from './Array.methods';
|
||||
import { booleanMethods } from './Boolean.methods';
|
||||
import { numberMethods } from './Number.methods';
|
||||
import { objectMethods } from './Object.Methods';
|
||||
import { stringMethods } from './String.methods';
|
||||
import type { NativeDoc } from '../Extensions/Extensions';
|
||||
|
||||
const NATIVE_METHODS: NativeDoc[] = [
|
||||
stringMethods,
|
||||
arrayMethods,
|
||||
numberMethods,
|
||||
objectMethods,
|
||||
booleanMethods,
|
||||
];
|
||||
|
||||
export { NATIVE_METHODS as NativeMethods };
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IDataObject } from './Interfaces';
|
||||
import type { IDataObject } from './interfaces';
|
||||
|
||||
const defaultPropertyDescriptor = Object.freeze({ enumerable: true, configurable: true });
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { CronExpression } from './Interfaces';
|
||||
import type { CronExpression } from './interfaces';
|
||||
import { randomInt } from './utils';
|
||||
|
||||
interface BaseTriggerTime<T extends string> {
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Functionality, IDataObject, JsonObject } from '../../Interfaces';
|
||||
import type { Functionality, IDataObject, JsonObject } from '../../interfaces';
|
||||
import { ApplicationError } from '../application.error';
|
||||
import type { ReportingOptions } from '../error.types';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ExecutionBaseError } from './execution-base.error';
|
||||
import type { IDataObject, INode, JsonObject } from '../../Interfaces';
|
||||
import type { IDataObject, INode, JsonObject } from '../../interfaces';
|
||||
import { isTraversableObject, jsonParse } from '../../utils';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ExecutionBaseError } from './abstract/execution-base.error';
|
||||
import type { IDataObject } from '../Interfaces';
|
||||
import type { IDataObject } from '../interfaces';
|
||||
|
||||
export interface ExpressionErrorOptions {
|
||||
cause?: Error;
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
UNKNOWN_ERROR_DESCRIPTION,
|
||||
UNKNOWN_ERROR_MESSAGE,
|
||||
UNKNOWN_ERROR_MESSAGE_CRED,
|
||||
} from '../Constants';
|
||||
} from '../constants';
|
||||
import type {
|
||||
INode,
|
||||
JsonObject,
|
||||
@@ -19,7 +19,7 @@ import type {
|
||||
IStatusCodeMessages,
|
||||
Functionality,
|
||||
RelatedExecution,
|
||||
} from '../Interfaces';
|
||||
} from '../interfaces';
|
||||
import { removeCircularRefs } from '../utils';
|
||||
|
||||
export interface NodeOperationErrorOptions {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NodeError } from './abstract/node.error';
|
||||
import { ApplicationError } from './application.error';
|
||||
import type { NodeOperationErrorOptions } from './node-api.error';
|
||||
import type { INode, JsonObject } from '../Interfaces';
|
||||
import type { INode, JsonObject } from '../interfaces';
|
||||
|
||||
/**
|
||||
* Class for instantiating an operational error, e.g. an invalid credentials error.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ApplicationError } from './application.error';
|
||||
import type { ErrorLevel } from './error.types';
|
||||
import type { INode } from '../Interfaces';
|
||||
import type { INode } from '../interfaces';
|
||||
|
||||
interface TriggerCloseErrorOptions extends ErrorOptions {
|
||||
level: ErrorLevel;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ExecutionBaseError } from './abstract/execution-base.error';
|
||||
import type { ApplicationError } from './application.error';
|
||||
import type { INode } from '../Interfaces';
|
||||
import type { INode } from '../interfaces';
|
||||
|
||||
interface WorkflowActivationErrorOptions {
|
||||
cause?: Error;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ExecutionBaseError } from './abstract/execution-base.error';
|
||||
import type { INode } from '../Interfaces';
|
||||
import type { INode } from '../interfaces';
|
||||
|
||||
/**
|
||||
* Class for instantiating an operational error, e.g. a timeout error.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Tournament } from '@n8n/tournament';
|
||||
|
||||
import { PrototypeSanitizer } from './ExpressionSandboxing';
|
||||
import { PrototypeSanitizer } from './expression-sandboxing';
|
||||
|
||||
type Evaluator = (expr: string, data: unknown) => string | null | (() => unknown);
|
||||
type ErrorHandler = (error: Error) => void;
|
||||
@@ -3,12 +3,12 @@ import { DateTime, Duration, Interval } from 'luxon';
|
||||
import { ApplicationError } from './errors/application.error';
|
||||
import { ExpressionExtensionError } from './errors/expression-extension.error';
|
||||
import { ExpressionError } from './errors/expression.error';
|
||||
import { evaluateExpression, setErrorHandler } from './ExpressionEvaluatorProxy';
|
||||
import { sanitizer, sanitizerName } from './ExpressionSandboxing';
|
||||
import { extend, extendOptional } from './Extensions';
|
||||
import { extendSyntax } from './Extensions/ExpressionExtension';
|
||||
import { extendedFunctions } from './Extensions/ExtendedFunctions';
|
||||
import { getGlobalState } from './GlobalState';
|
||||
import { evaluateExpression, setErrorHandler } from './expression-evaluator-proxy';
|
||||
import { sanitizer, sanitizerName } from './expression-sandboxing';
|
||||
import { extend, extendOptional } from './extensions';
|
||||
import { extendSyntax } from './extensions/expression-extension';
|
||||
import { extendedFunctions } from './extensions/extended-functions';
|
||||
import { getGlobalState } from './global-state';
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteData,
|
||||
@@ -22,9 +22,9 @@ import type {
|
||||
NodeParameterValue,
|
||||
NodeParameterValueType,
|
||||
WorkflowExecuteMode,
|
||||
} from './Interfaces';
|
||||
import type { Workflow } from './Workflow';
|
||||
import { WorkflowDataProxy } from './WorkflowDataProxy';
|
||||
} from './interfaces';
|
||||
import type { Workflow } from './workflow';
|
||||
import { WorkflowDataProxy } from './workflow-data-proxy';
|
||||
|
||||
const IS_FRONTEND_IN_DEV_MODE =
|
||||
typeof process === 'object' &&
|
||||
@@ -1,8 +1,8 @@
|
||||
import deepEqual from 'deep-equal';
|
||||
import uniqWith from 'lodash/uniqWith';
|
||||
|
||||
import type { Extension, ExtensionMap } from './Extensions';
|
||||
import { compact as oCompact } from './ObjectExtensions';
|
||||
import type { Extension, ExtensionMap } from './extensions';
|
||||
import { compact as oCompact } from './object-extensions';
|
||||
import { ExpressionExtensionError } from '../errors/expression-extension.error';
|
||||
import { ExpressionError } from '../errors/expression.error';
|
||||
import { randomInt } from '../utils';
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Extension, ExtensionMap } from './Extensions';
|
||||
import type { Extension, ExtensionMap } from './extensions';
|
||||
|
||||
export function toBoolean(value: boolean) {
|
||||
return value;
|
||||
@@ -7,8 +7,8 @@ import type {
|
||||
WeekdayNumbers,
|
||||
} from 'luxon';
|
||||
|
||||
import type { ExtensionMap } from './Extensions';
|
||||
import { toDateTime as stringToDateTime } from './StringExtensions';
|
||||
import type { ExtensionMap } from './extensions';
|
||||
import { toDateTime as stringToDateTime } from './string-extensions';
|
||||
import { convertToDateTime } from './utils';
|
||||
import { ExpressionExtensionError } from '../errors/expression-extension.error';
|
||||
|
||||
@@ -6,15 +6,15 @@ import { DateTime } from 'luxon';
|
||||
import { parse, visit, types, print } from 'recast';
|
||||
import { getOption } from 'recast/lib/util';
|
||||
|
||||
import { arrayExtensions } from './ArrayExtensions';
|
||||
import { booleanExtensions } from './BooleanExtensions';
|
||||
import { dateExtensions } from './DateExtensions';
|
||||
import { joinExpression, splitExpression } from './ExpressionParser';
|
||||
import type { ExpressionChunk, ExpressionCode } from './ExpressionParser';
|
||||
import type { ExtensionMap } from './Extensions';
|
||||
import { numberExtensions } from './NumberExtensions';
|
||||
import { objectExtensions } from './ObjectExtensions';
|
||||
import { stringExtensions } from './StringExtensions';
|
||||
import { arrayExtensions } from './array-extensions';
|
||||
import { booleanExtensions } from './boolean-extensions';
|
||||
import { dateExtensions } from './date-extensions';
|
||||
import { joinExpression, splitExpression } from './expression-parser';
|
||||
import type { ExpressionChunk, ExpressionCode } from './expression-parser';
|
||||
import type { ExtensionMap } from './extensions';
|
||||
import { numberExtensions } from './number-extensions';
|
||||
import { objectExtensions } from './object-extensions';
|
||||
import { stringExtensions } from './string-extensions';
|
||||
import { checkIfValueDefinedOrThrow } from './utils';
|
||||
import { ExpressionExtensionError } from '../errors/expression-extension.error';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { average as aAverage } from './ArrayExtensions';
|
||||
import { average as aAverage } from './array-extensions';
|
||||
import { ExpressionExtensionError } from '../errors/expression-extension.error';
|
||||
import { ExpressionError } from '../errors/expression.error';
|
||||
|
||||
@@ -5,7 +5,7 @@ export {
|
||||
hasNativeMethod,
|
||||
extendTransform,
|
||||
EXTENSION_OBJECTS as ExpressionExtensions,
|
||||
} from './ExpressionExtension';
|
||||
} from './expression-extension';
|
||||
|
||||
export type {
|
||||
DocMetadata,
|
||||
@@ -13,4 +13,4 @@ export type {
|
||||
Extension,
|
||||
DocMetadataArgument,
|
||||
DocMetadataExample,
|
||||
} from './Extensions';
|
||||
} from './extensions';
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
import type { ExtensionMap } from './Extensions';
|
||||
import type { ExtensionMap } from './extensions';
|
||||
import { ExpressionExtensionError } from '../errors/expression-extension.error';
|
||||
|
||||
function format(value: number, extraArgs: unknown[]): string {
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ExtensionMap } from './Extensions';
|
||||
import type { ExtensionMap } from './extensions';
|
||||
import { ExpressionExtensionError } from '../errors/expression-extension.error';
|
||||
|
||||
function isEmpty(value: object): boolean {
|
||||
@@ -5,10 +5,10 @@ import MD5 from 'md5';
|
||||
import { titleCase } from 'title-case';
|
||||
import { transliterate } from 'transliteration';
|
||||
|
||||
import type { Extension, ExtensionMap } from './Extensions';
|
||||
import { toDateTime as numberToDateTime } from './NumberExtensions';
|
||||
import type { Extension, ExtensionMap } from './extensions';
|
||||
import { toDateTime as numberToDateTime } from './number-extensions';
|
||||
import { ExpressionExtensionError } from '../errors/expression-extension.error';
|
||||
import { tryToParseDateTime } from '../TypeValidation';
|
||||
import { tryToParseDateTime } from '../type-validation';
|
||||
|
||||
export const SupportedHashAlgorithms = [
|
||||
'md5',
|
||||
@@ -1,25 +1,25 @@
|
||||
import * as LoggerProxy from './LoggerProxy';
|
||||
import * as NodeHelpers from './NodeHelpers';
|
||||
import * as ObservableObject from './ObservableObject';
|
||||
import * as TelemetryHelpers from './TelemetryHelpers';
|
||||
import * as LoggerProxy from './logger-proxy';
|
||||
import * as NodeHelpers from './node-helpers';
|
||||
import * as ObservableObject from './observable-object';
|
||||
import * as TelemetryHelpers from './telemetry-helpers';
|
||||
|
||||
export * from './errors';
|
||||
export * from './Constants';
|
||||
export * from './Cron';
|
||||
export * from './DeferredPromise';
|
||||
export * from './GlobalState';
|
||||
export * from './Interfaces';
|
||||
export * from './MessageEventBus';
|
||||
export * from './ExecutionStatus';
|
||||
export * from './Expression';
|
||||
export * from './FromAIParseUtils';
|
||||
export * from './NodeHelpers';
|
||||
export * from './MetadataUtils';
|
||||
export * from './Workflow';
|
||||
export * from './WorkflowDataProxy';
|
||||
export * from './WorkflowDataProxyEnvProvider';
|
||||
export * from './VersionedNodeType';
|
||||
export * from './TypeValidation';
|
||||
export * from './constants';
|
||||
export * from './cron';
|
||||
export * from './deferred-promise';
|
||||
export * from './global-state';
|
||||
export * from './interfaces';
|
||||
export * from './message-event-bus';
|
||||
export * from './execution-status';
|
||||
export * from './expression';
|
||||
export * from './from-ai-parse-utils';
|
||||
export * from './node-helpers';
|
||||
export * from './metadata-utils';
|
||||
export * from './workflow';
|
||||
export * from './workflow-data-proxy';
|
||||
export * from './workflow-data-proxy-env-provider';
|
||||
export * from './versioned-node-type';
|
||||
export * from './type-validation';
|
||||
export * from './result';
|
||||
export { LoggerProxy, NodeHelpers, ObservableObject, TelemetryHelpers };
|
||||
export {
|
||||
@@ -50,10 +50,10 @@ export {
|
||||
isFilterValue,
|
||||
} from './type-guards';
|
||||
|
||||
export { ExpressionExtensions } from './Extensions';
|
||||
export * as ExpressionParser from './Extensions/ExpressionParser';
|
||||
export { NativeMethods } from './NativeMethods';
|
||||
export * from './NodeParameters/FilterParameter';
|
||||
export { ExpressionExtensions } from './extensions';
|
||||
export * as ExpressionParser from './extensions/expression-parser';
|
||||
export { NativeMethods } from './native-methods';
|
||||
export * from './node-parameters/filter-parameter';
|
||||
|
||||
export type {
|
||||
DocMetadata,
|
||||
@@ -61,7 +61,7 @@ export type {
|
||||
DocMetadataArgument,
|
||||
DocMetadataExample,
|
||||
Extension,
|
||||
} from './Extensions';
|
||||
} from './extensions';
|
||||
|
||||
declare module 'http' {
|
||||
export interface IncomingMessage {
|
||||
|
||||
@@ -12,18 +12,18 @@ import type { Readable } from 'stream';
|
||||
import type { SecureContextOptions } from 'tls';
|
||||
import type { URLSearchParams } from 'url';
|
||||
|
||||
import type { CODE_EXECUTION_MODES, CODE_LANGUAGES, LOG_LEVELS } from './Constants';
|
||||
import type { IDeferredPromise } from './DeferredPromise';
|
||||
import type { CODE_EXECUTION_MODES, CODE_LANGUAGES, LOG_LEVELS } from './constants';
|
||||
import type { IDeferredPromise } from './deferred-promise';
|
||||
import type { ExecutionCancelledError } from './errors';
|
||||
import type { ExpressionError } from './errors/expression.error';
|
||||
import type { NodeApiError } from './errors/node-api.error';
|
||||
import type { NodeOperationError } from './errors/node-operation.error';
|
||||
import type { WorkflowActivationError } from './errors/workflow-activation.error';
|
||||
import type { WorkflowOperationError } from './errors/workflow-operation.error';
|
||||
import type { ExecutionStatus } from './ExecutionStatus';
|
||||
import type { ExecutionStatus } from './execution-status';
|
||||
import type { Result } from './result';
|
||||
import type { Workflow } from './Workflow';
|
||||
import type { EnvProviderState } from './WorkflowDataProxyEnvProvider';
|
||||
import type { Workflow } from './workflow';
|
||||
import type { EnvProviderState } from './workflow-data-proxy-env-provider';
|
||||
|
||||
export interface IAdditionalCredentialOptions {
|
||||
oauth2?: IOAuth2Options;
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Logger } from './Interfaces';
|
||||
import type { Logger } from './interfaces';
|
||||
|
||||
const noOp = () => {};
|
||||
export let error: Logger['error'] = noOp;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { DateTime } from 'luxon';
|
||||
|
||||
import type { INodeCredentials } from './Interfaces';
|
||||
import type { INodeCredentials } from './interfaces';
|
||||
|
||||
// ===============================
|
||||
// General Enums And Interfaces
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user