mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
build: Upgrade some of the backend dev-tooling (no-changelog) (#4589)
* upgrade ts-node * move tslint and typescript to a single place * source-map-support should be loaded in the `n8n` bin script, and not in core * upgrade jest * Support only node.js 14, 16, or 18
This commit is contained in:
parent
edebad1a89
commit
0148631d28
|
@ -1,14 +1,6 @@
|
||||||
const { compilerOptions } = require('./tsconfig.json');
|
const { compilerOptions } = require('./tsconfig.json');
|
||||||
|
|
||||||
/** @type {import('jest').Config} */
|
const tsJestOptions = {
|
||||||
module.exports = {
|
|
||||||
verbose: true,
|
|
||||||
preset: 'ts-jest',
|
|
||||||
testEnvironment: 'node',
|
|
||||||
testRegex: '\\.(test|spec)\\.(js|ts)$',
|
|
||||||
testPathIgnorePatterns: ['/dist/', '/node_modules/'],
|
|
||||||
globals: {
|
|
||||||
'ts-jest': {
|
|
||||||
isolatedModules: true,
|
isolatedModules: true,
|
||||||
tsconfig: {
|
tsconfig: {
|
||||||
...compilerOptions,
|
...compilerOptions,
|
||||||
|
@ -16,7 +8,16 @@ module.exports = {
|
||||||
sourceMap: false,
|
sourceMap: false,
|
||||||
skipLibCheck: true,
|
skipLibCheck: true,
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
|
|
||||||
|
/** @type {import('jest').Config} */
|
||||||
|
module.exports = {
|
||||||
|
verbose: true,
|
||||||
|
testEnvironment: 'node',
|
||||||
|
testRegex: '\\.(test|spec)\\.(js|ts)$',
|
||||||
|
testPathIgnorePatterns: ['/dist/', '/node_modules/'],
|
||||||
|
transform: {
|
||||||
|
'^.+\\.ts$': ['ts-jest', tsJestOptions],
|
||||||
},
|
},
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^@/(.*)$': '<rootDir>/src/$1',
|
'^@/(.*)$': '<rootDir>/src/$1',
|
||||||
|
|
11
package.json
11
package.json
|
@ -39,20 +39,19 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@n8n_io/eslint-config": "*",
|
"@n8n_io/eslint-config": "*",
|
||||||
"@ngneat/falso": "^6.1.0",
|
"@ngneat/falso": "^6.1.0",
|
||||||
"@types/jest": "^28.1.8",
|
"@types/jest": "^29.2.2",
|
||||||
"@types/node": "^16.11.22",
|
"@types/node": "^16.11.22",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"cypress": "^10.0.3",
|
"cypress": "^10.0.3",
|
||||||
"jest": "^28.1.3",
|
"jest": "^29.3.1",
|
||||||
"jest-environment-jsdom": "^28.1.3",
|
"jest-environment-jsdom": "^29.3.1",
|
||||||
"jest-mock": "^28.1.3",
|
"jest-mock": "^29.3.1",
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.3.2",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"run-script-os": "^1.0.7",
|
"run-script-os": "^1.0.7",
|
||||||
"start-server-and-test": "^1.14.0",
|
"start-server-and-test": "^1.14.0",
|
||||||
"supertest": "^6.2.2",
|
"supertest": "^6.2.2",
|
||||||
"ts-jest": "^28.0.8",
|
"ts-jest": "^29.0.3",
|
||||||
"ts-node": "^9.1.1",
|
|
||||||
"turbo": "1.5.5",
|
"turbo": "1.5.5",
|
||||||
"typescript": "^4.8.4"
|
"typescript": "^4.8.4"
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
"eslint-plugin-import": "~2.26",
|
"eslint-plugin-import": "~2.26",
|
||||||
"eslint-plugin-n8n-local-rules": "~1.0",
|
"eslint-plugin-n8n-local-rules": "~1.0",
|
||||||
"eslint-plugin-prettier": "~4.2",
|
"eslint-plugin-prettier": "~4.2",
|
||||||
"eslint-plugin-vue": "~7.17"
|
"eslint-plugin-vue": "~7.17",
|
||||||
|
"tslint": "^6.1.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rimraf .turbo",
|
"clean": "rimraf .turbo",
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
var path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
// Make sure that it also find the config folder when it
|
// Make sure that it also find the config folder when it
|
||||||
// did get started from another folder that the root one.
|
// did get started from another folder that the root one.
|
||||||
process.env.NODE_CONFIG_DIR = process.env.NODE_CONFIG_DIR || path.join(__dirname, 'config');
|
process.env.NODE_CONFIG_DIR = process.env.NODE_CONFIG_DIR || path.join(__dirname, 'config');
|
||||||
|
|
||||||
// Check if version should be displayed
|
// Check if version should be displayed
|
||||||
var versionFlags = [
|
const versionFlags = ['-v', '-V', '--version'];
|
||||||
'-v',
|
|
||||||
'-V',
|
|
||||||
'--version',
|
|
||||||
];
|
|
||||||
if (versionFlags.includes(process.argv.slice(-1)[0])) {
|
if (versionFlags.includes(process.argv.slice(-1)[0])) {
|
||||||
console.log(require('../package').version);
|
console.log(require('../package').version);
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
|
@ -22,13 +18,22 @@ if (process.argv.length === 2) {
|
||||||
process.argv.push('start');
|
process.argv.push('start');
|
||||||
}
|
}
|
||||||
|
|
||||||
var nodeVersion = process.versions.node.split('.');
|
const nodeVersion = process.versions.node;
|
||||||
|
const nodeVersionMajor = require('semver').major(nodeVersion);
|
||||||
|
|
||||||
if (parseInt(nodeVersion[0], 10) < 14) {
|
if (![14, 16, 18].includes(nodeVersionMajor)) {
|
||||||
console.log(`\nYour Node.js version (${process.versions.node}) is too old to run n8n.\nPlease update at least to Node.js v14 or to the recommended Node.js v16!\n`);
|
console.log(`
|
||||||
|
Your Node.js version (${nodeVersion}) is currently not supported by n8n.
|
||||||
|
Please use Node.js v14, v16 (recommended), or v18 instead!
|
||||||
|
`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
require('@oclif/command').run()
|
try {
|
||||||
|
require('source-map-support').install();
|
||||||
|
} catch {}
|
||||||
|
|
||||||
|
require('@oclif/command')
|
||||||
|
.run()
|
||||||
.then(require('@oclif/command/flush'))
|
.then(require('@oclif/command/flush'))
|
||||||
.catch(require('@oclif/errors/handle'));
|
.catch(require('@oclif/errors/handle'));
|
||||||
|
|
|
@ -96,11 +96,11 @@
|
||||||
"concurrently": "^5.1.0",
|
"concurrently": "^5.1.0",
|
||||||
"nodemon": "^2.0.2",
|
"nodemon": "^2.0.2",
|
||||||
"run-script-os": "^1.0.7",
|
"run-script-os": "^1.0.7",
|
||||||
|
"source-map-support": "^0.5.21",
|
||||||
"supertest": "^6.2.2",
|
"supertest": "^6.2.2",
|
||||||
"ts-node": "^8.9.1",
|
"ts-node": "^9.1.1",
|
||||||
"tsc-alias": "^1.7.0",
|
"tsc-alias": "^1.7.0",
|
||||||
"tsconfig-paths": "^3.14.1",
|
"tsconfig-paths": "^3.14.1"
|
||||||
"typescript": "~4.8.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@oclif/command": "^1.8.16",
|
"@oclif/command": "^1.8.16",
|
||||||
|
@ -164,6 +164,7 @@
|
||||||
"posthog-node": "^1.3.0",
|
"posthog-node": "^1.3.0",
|
||||||
"prom-client": "^13.1.0",
|
"prom-client": "^13.1.0",
|
||||||
"psl": "^1.8.0",
|
"psl": "^1.8.0",
|
||||||
|
"semver": "^7.3.8",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"sqlite3": "^5.1.2",
|
"sqlite3": "^5.1.2",
|
||||||
"sse-channel": "^3.1.1",
|
"sse-channel": "^3.1.1",
|
||||||
|
|
|
@ -35,8 +35,7 @@
|
||||||
"@types/lodash.get": "^4.4.6",
|
"@types/lodash.get": "^4.4.6",
|
||||||
"@types/mime-types": "^2.1.0",
|
"@types/mime-types": "^2.1.0",
|
||||||
"@types/request-promise-native": "~1.0.15",
|
"@types/request-promise-native": "~1.0.15",
|
||||||
"@types/uuid": "^8.3.2",
|
"@types/uuid": "^8.3.2"
|
||||||
"source-map-support": "^0.5.9"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
|
|
|
@ -32,7 +32,7 @@ export interface IProcessMessage {
|
||||||
|
|
||||||
export interface IExecuteFunctions extends IExecuteFunctionsBase {
|
export interface IExecuteFunctions extends IExecuteFunctionsBase {
|
||||||
helpers: {
|
helpers: {
|
||||||
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>; // tslint:disable-line:no-any
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
|
||||||
prepareBinaryData(
|
prepareBinaryData(
|
||||||
binaryData: Buffer,
|
binaryData: Buffer,
|
||||||
filePath?: string,
|
filePath?: string,
|
||||||
|
@ -40,7 +40,7 @@ export interface IExecuteFunctions extends IExecuteFunctionsBase {
|
||||||
): Promise<IBinaryData>;
|
): Promise<IBinaryData>;
|
||||||
getBinaryDataBuffer(itemIndex: number, propertyName: string): Promise<Buffer>;
|
getBinaryDataBuffer(itemIndex: number, propertyName: string): Promise<Buffer>;
|
||||||
setBinaryDataBuffer(data: IBinaryData, binaryData: Buffer): Promise<IBinaryData>;
|
setBinaryDataBuffer(data: IBinaryData, binaryData: Buffer): Promise<IBinaryData>;
|
||||||
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>; // tslint:disable-line:no-any
|
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
|
||||||
requestWithAuthentication(
|
requestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
|
@ -52,12 +52,12 @@ export interface IExecuteFunctions extends IExecuteFunctionsBase {
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
||||||
oAuth2Options?: IOAuth2Options,
|
oAuth2Options?: IOAuth2Options,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
requestOAuth1(
|
requestOAuth1(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
||||||
normalizeItems(items: INodeExecutionData | INodeExecutionData[]): INodeExecutionData[];
|
normalizeItems(items: INodeExecutionData | INodeExecutionData[]): INodeExecutionData[];
|
||||||
httpRequestWithAuthentication(
|
httpRequestWithAuthentication(
|
||||||
|
@ -76,13 +76,13 @@ export interface IExecuteSingleFunctions extends IExecuteSingleFunctionsBase {
|
||||||
helpers: {
|
helpers: {
|
||||||
getBinaryDataBuffer(propertyName: string, inputIndex?: number): Promise<Buffer>;
|
getBinaryDataBuffer(propertyName: string, inputIndex?: number): Promise<Buffer>;
|
||||||
setBinaryDataBuffer(data: IBinaryData, binaryData: Buffer): Promise<IBinaryData>;
|
setBinaryDataBuffer(data: IBinaryData, binaryData: Buffer): Promise<IBinaryData>;
|
||||||
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>; // tslint:disable-line:no-any
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
|
||||||
prepareBinaryData(
|
prepareBinaryData(
|
||||||
binaryData: Buffer,
|
binaryData: Buffer,
|
||||||
filePath?: string,
|
filePath?: string,
|
||||||
mimeType?: string,
|
mimeType?: string,
|
||||||
): Promise<IBinaryData>;
|
): Promise<IBinaryData>;
|
||||||
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>; // tslint:disable-line:no-any
|
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
|
||||||
requestWithAuthentication(
|
requestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
|
@ -94,12 +94,12 @@ export interface IExecuteSingleFunctions extends IExecuteSingleFunctionsBase {
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
||||||
oAuth2Options?: IOAuth2Options,
|
oAuth2Options?: IOAuth2Options,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
requestOAuth1(
|
requestOAuth1(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
httpRequestWithAuthentication(
|
httpRequestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
|
@ -110,13 +110,13 @@ export interface IExecuteSingleFunctions extends IExecuteSingleFunctionsBase {
|
||||||
|
|
||||||
export interface IPollFunctions extends IPollFunctionsBase {
|
export interface IPollFunctions extends IPollFunctionsBase {
|
||||||
helpers: {
|
helpers: {
|
||||||
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>; // tslint:disable-line:no-any
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
|
||||||
prepareBinaryData(
|
prepareBinaryData(
|
||||||
binaryData: Buffer,
|
binaryData: Buffer,
|
||||||
filePath?: string,
|
filePath?: string,
|
||||||
mimeType?: string,
|
mimeType?: string,
|
||||||
): Promise<IBinaryData>;
|
): Promise<IBinaryData>;
|
||||||
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>; // tslint:disable-line:no-any
|
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
|
||||||
requestWithAuthentication(
|
requestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
|
@ -128,12 +128,12 @@ export interface IPollFunctions extends IPollFunctionsBase {
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
||||||
oAuth2Options?: IOAuth2Options,
|
oAuth2Options?: IOAuth2Options,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
requestOAuth1(
|
requestOAuth1(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
||||||
httpRequestWithAuthentication(
|
httpRequestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
|
@ -149,13 +149,13 @@ export interface IResponseError extends Error {
|
||||||
|
|
||||||
export interface ITriggerFunctions extends ITriggerFunctionsBase {
|
export interface ITriggerFunctions extends ITriggerFunctionsBase {
|
||||||
helpers: {
|
helpers: {
|
||||||
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>; // tslint:disable-line:no-any
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
|
||||||
prepareBinaryData(
|
prepareBinaryData(
|
||||||
binaryData: Buffer,
|
binaryData: Buffer,
|
||||||
filePath?: string,
|
filePath?: string,
|
||||||
mimeType?: string,
|
mimeType?: string,
|
||||||
): Promise<IBinaryData>;
|
): Promise<IBinaryData>;
|
||||||
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>; // tslint:disable-line:no-any
|
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
|
||||||
requestWithAuthentication(
|
requestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
|
@ -167,12 +167,12 @@ export interface ITriggerFunctions extends ITriggerFunctionsBase {
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
||||||
oAuth2Options?: IOAuth2Options,
|
oAuth2Options?: IOAuth2Options,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
requestOAuth1(
|
requestOAuth1(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
||||||
httpRequestWithAuthentication(
|
httpRequestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
|
@ -190,8 +190,8 @@ export interface IUserSettings {
|
||||||
|
|
||||||
export interface ILoadOptionsFunctions extends ILoadOptionsFunctionsBase {
|
export interface ILoadOptionsFunctions extends ILoadOptionsFunctionsBase {
|
||||||
helpers: {
|
helpers: {
|
||||||
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>; // tslint:disable-line:no-any
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
|
||||||
request?: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>; // tslint:disable-line:no-any
|
request?: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
|
||||||
requestWithAuthentication(
|
requestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
|
@ -203,12 +203,12 @@ export interface ILoadOptionsFunctions extends ILoadOptionsFunctionsBase {
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
||||||
oAuth2Options?: IOAuth2Options,
|
oAuth2Options?: IOAuth2Options,
|
||||||
) => Promise<any>; // tslint:disable-line:no-any
|
) => Promise<any>;
|
||||||
requestOAuth1?(
|
requestOAuth1?(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
httpRequestWithAuthentication(
|
httpRequestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
|
@ -225,8 +225,8 @@ export interface ICredentialTestFunctions extends ICredentialTestFunctionsBase {
|
||||||
|
|
||||||
export interface IHookFunctions extends IHookFunctionsBase {
|
export interface IHookFunctions extends IHookFunctionsBase {
|
||||||
helpers: {
|
helpers: {
|
||||||
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>; // tslint:disable-line:no-any
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
|
||||||
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>; // tslint:disable-line:no-any
|
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
|
||||||
requestWithAuthentication(
|
requestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
|
@ -238,12 +238,12 @@ export interface IHookFunctions extends IHookFunctionsBase {
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
||||||
oAuth2Options?: IOAuth2Options,
|
oAuth2Options?: IOAuth2Options,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
requestOAuth1(
|
requestOAuth1(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
httpRequestWithAuthentication(
|
httpRequestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
|
@ -254,13 +254,13 @@ export interface IHookFunctions extends IHookFunctionsBase {
|
||||||
|
|
||||||
export interface IWebhookFunctions extends IWebhookFunctionsBase {
|
export interface IWebhookFunctions extends IWebhookFunctionsBase {
|
||||||
helpers: {
|
helpers: {
|
||||||
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>; // tslint:disable-line:no-any
|
httpRequest(requestOptions: IHttpRequestOptions): Promise<any>;
|
||||||
prepareBinaryData(
|
prepareBinaryData(
|
||||||
binaryData: Buffer,
|
binaryData: Buffer,
|
||||||
filePath?: string,
|
filePath?: string,
|
||||||
mimeType?: string,
|
mimeType?: string,
|
||||||
): Promise<IBinaryData>;
|
): Promise<IBinaryData>;
|
||||||
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>; // tslint:disable-line:no-any
|
request: (uriOrObject: string | IDataObject | any, options?: IDataObject) => Promise<any>;
|
||||||
requestWithAuthentication(
|
requestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
|
@ -272,12 +272,12 @@ export interface IWebhookFunctions extends IWebhookFunctionsBase {
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
requestOptions: OptionsWithUri | RequestPromiseOptions,
|
||||||
oAuth2Options?: IOAuth2Options,
|
oAuth2Options?: IOAuth2Options,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
requestOAuth1(
|
requestOAuth1(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
requestOptions: OptionsWithUrl | RequestPromiseOptions,
|
||||||
): Promise<any>; // tslint:disable-line:no-any
|
): Promise<any>;
|
||||||
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
||||||
httpRequestWithAuthentication(
|
httpRequestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
|
|
|
@ -559,7 +559,6 @@ function digestAuthAxiosConfig(
|
||||||
async function proxyRequestToAxios(
|
async function proxyRequestToAxios(
|
||||||
uriOrObject: string | IDataObject,
|
uriOrObject: string | IDataObject,
|
||||||
options?: IDataObject,
|
options?: IDataObject,
|
||||||
// tslint:disable-next-line:no-any
|
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
// Check if there's a better way of getting this config here
|
// Check if there's a better way of getting this config here
|
||||||
if (process.env.N8N_USE_DEPRECATED_REQUEST_LIB) {
|
if (process.env.N8N_USE_DEPRECATED_REQUEST_LIB) {
|
||||||
|
|
|
@ -292,7 +292,6 @@ export class WorkflowExecute {
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
async executeHook(hookName: string, parameters: any[]): Promise<void> {
|
async executeHook(hookName: string, parameters: any[]): Promise<void> {
|
||||||
// tslint:disable-line:no-any
|
|
||||||
if (this.additionalData.hooks === undefined) {
|
if (this.additionalData.hooks === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
import * as NodeExecuteFunctions from './NodeExecuteFunctions';
|
import * as NodeExecuteFunctions from './NodeExecuteFunctions';
|
||||||
import * as UserSettings from './UserSettings';
|
import * as UserSettings from './UserSettings';
|
||||||
|
|
||||||
try {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, import/no-extraneous-dependencies, global-require, @typescript-eslint/no-var-requires
|
|
||||||
require('source-map-support').install();
|
|
||||||
// eslint-disable-next-line no-empty
|
|
||||||
} catch (error) {}
|
|
||||||
|
|
||||||
export * from './ActiveWorkflows';
|
export * from './ActiveWorkflows';
|
||||||
export * from './ActiveWebhooks';
|
export * from './ActiveWebhooks';
|
||||||
export * from './BinaryDataManager';
|
export * from './BinaryDataManager';
|
||||||
|
|
|
@ -102,7 +102,6 @@
|
||||||
"sass": "^1.55.0",
|
"sass": "^1.55.0",
|
||||||
"sass-loader": "^10.1.1",
|
"sass-loader": "^10.1.1",
|
||||||
"string-template-parser": "^1.2.6",
|
"string-template-parser": "^1.2.6",
|
||||||
"tslint": "^6.1.2",
|
|
||||||
"vite": "2.9.5",
|
"vite": "2.9.5",
|
||||||
"vite-plugin-html": "^3.2.0",
|
"vite-plugin-html": "^3.2.0",
|
||||||
"vite-plugin-monaco-editor": "^1.0.10",
|
"vite-plugin-monaco-editor": "^1.0.10",
|
||||||
|
|
|
@ -750,9 +750,7 @@
|
||||||
"@types/xml2js": "^0.4.3",
|
"@types/xml2js": "^0.4.3",
|
||||||
"eslint-plugin-n8n-nodes-base": "^1.11.0",
|
"eslint-plugin-n8n-nodes-base": "^1.11.0",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.0",
|
||||||
"n8n-workflow": "~0.124.1",
|
"n8n-workflow": "~0.124.1"
|
||||||
"tslint": "^6.1.2",
|
|
||||||
"typescript": "~4.8.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@kafkajs/confluent-schema-registry": "1.0.6",
|
"@kafkajs/confluent-schema-registry": "1.0.6",
|
||||||
|
|
|
@ -583,8 +583,8 @@ export interface IExecuteFunctions {
|
||||||
outputIndex?: number,
|
outputIndex?: number,
|
||||||
): Promise<INodeExecutionData[][]>;
|
): Promise<INodeExecutionData[][]>;
|
||||||
putExecutionToWait(waitTill: Date): Promise<void>;
|
putExecutionToWait(waitTill: Date): Promise<void>;
|
||||||
sendMessageToUI(message: any): void; // tslint:disable-line:no-any
|
sendMessageToUI(message: any): void;
|
||||||
sendResponse(response: IExecuteResponsePromiseData): void; // tslint:disable-line:no-any
|
sendResponse(response: IExecuteResponsePromiseData): void;
|
||||||
helpers: {
|
helpers: {
|
||||||
httpRequest(
|
httpRequest(
|
||||||
requestOptions: IHttpRequestOptions,
|
requestOptions: IHttpRequestOptions,
|
||||||
|
@ -595,7 +595,7 @@ export interface IExecuteFunctions {
|
||||||
requestOptions: IHttpRequestOptions,
|
requestOptions: IHttpRequestOptions,
|
||||||
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
||||||
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
||||||
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
|
[key: string]: (...args: any[]) => any;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -629,7 +629,7 @@ export interface IExecuteSingleFunctions {
|
||||||
requestOptions: IHttpRequestOptions,
|
requestOptions: IHttpRequestOptions,
|
||||||
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
||||||
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
||||||
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
|
[key: string]: (...args: any[]) => any;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -679,7 +679,7 @@ export interface ILoadOptionsFunctions {
|
||||||
requestWithAuthentication(
|
requestWithAuthentication(
|
||||||
this: IAllExecuteFunctions,
|
this: IAllExecuteFunctions,
|
||||||
credentialsType: string,
|
credentialsType: string,
|
||||||
requestOptions: any, // tslint:disable-line:no-any
|
requestOptions: any,
|
||||||
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
||||||
): Promise<any>;
|
): Promise<any>;
|
||||||
httpRequestWithAuthentication(
|
httpRequestWithAuthentication(
|
||||||
|
@ -688,7 +688,7 @@ export interface ILoadOptionsFunctions {
|
||||||
requestOptions: IHttpRequestOptions,
|
requestOptions: IHttpRequestOptions,
|
||||||
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
||||||
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
||||||
[key: string]: ((...args: any[]) => any) | undefined; // tslint:disable-line:no-any
|
[key: string]: ((...args: any[]) => any) | undefined;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -718,7 +718,7 @@ export interface IHookFunctions {
|
||||||
requestOptions: IHttpRequestOptions,
|
requestOptions: IHttpRequestOptions,
|
||||||
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
||||||
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
||||||
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
|
[key: string]: (...args: any[]) => any;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -752,7 +752,7 @@ export interface IPollFunctions {
|
||||||
requestOptions: IHttpRequestOptions,
|
requestOptions: IHttpRequestOptions,
|
||||||
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
||||||
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
||||||
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
|
[key: string]: (...args: any[]) => any;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -786,7 +786,7 @@ export interface ITriggerFunctions {
|
||||||
requestOptions: IHttpRequestOptions,
|
requestOptions: IHttpRequestOptions,
|
||||||
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
||||||
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
||||||
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
|
[key: string]: (...args: any[]) => any;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -824,7 +824,7 @@ export interface IWebhookFunctions {
|
||||||
requestOptions: IHttpRequestOptions,
|
requestOptions: IHttpRequestOptions,
|
||||||
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
||||||
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
|
||||||
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
|
[key: string]: (...args: any[]) => any;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ export class WorkflowHooks {
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
||||||
async executeHookFunctions(hookName: string, parameters: any[]) {
|
async executeHookFunctions(hookName: string, parameters: any[]) {
|
||||||
// tslint:disable-line:no-any
|
|
||||||
if (this.hookFunctions[hookName] !== undefined && Array.isArray(this.hookFunctions[hookName])) {
|
if (this.hookFunctions[hookName] !== undefined && Array.isArray(this.hookFunctions[hookName])) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, no-restricted-syntax
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, no-restricted-syntax
|
||||||
for (const hookFunction of this.hookFunctions[hookName]!) {
|
for (const hookFunction of this.hookFunctions[hookName]!) {
|
||||||
|
|
843
pnpm-lock.yaml
843
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue