mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
ci: Add support for Node.js 18 (#5793)
* ci: Start supporting Node.js 18 Node.js 18 became the active LTS on 2022-10-25, and Node.js 16 went into maintenance mode. https://github.com/nodejs/Release#release-schedule We should also slowly deprecate node 16 support, [as support for it is ends much earlier now, due to support for openssl 1.1.1 ending](https://nodejs.org/en/blog/announcements/nodejs16-eol). * Remove hashing algorithms that are not available in newer node.js/openssl - RSA-MD4 - RSA-MDC2 - md4 - md4WithRSAEncryption - mdc2 - mdc2WithRSA * in e2e tests, resolve `localhost` to ipv4 instead of ipv6
This commit is contained in:
committed by
GitHub
parent
e8b51c8da9
commit
968b733fd6
@@ -2,9 +2,7 @@ import set from 'lodash.set';
|
||||
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
INodeExecutionData,
|
||||
INodePropertyOptions,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
JsonObject,
|
||||
@@ -20,6 +18,19 @@ import { v4 as uuid } from 'uuid';
|
||||
|
||||
const pipeline = promisify(stream.pipeline);
|
||||
|
||||
const unsupportedAlgorithms = [
|
||||
'RSA-MD4',
|
||||
'RSA-MDC2',
|
||||
'md4',
|
||||
'md4WithRSAEncryption',
|
||||
'mdc2',
|
||||
'mdc2WithRSA',
|
||||
];
|
||||
|
||||
const supportedAlgorithms = getHashes()
|
||||
.filter((algorithm) => !unsupportedAlgorithms.includes(algorithm))
|
||||
.map((algorithm) => ({ name: algorithm, value: algorithm }));
|
||||
|
||||
export class Crypto implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Crypto',
|
||||
@@ -329,9 +340,7 @@ export class Crypto implements INodeType {
|
||||
type: 'options',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getHashes',
|
||||
},
|
||||
options: supportedAlgorithms,
|
||||
default: '',
|
||||
required: true,
|
||||
},
|
||||
@@ -430,26 +439,6 @@ export class Crypto implements INodeType {
|
||||
],
|
||||
};
|
||||
|
||||
methods = {
|
||||
loadOptions: {
|
||||
// Get all the hashes to display them to user so that they can
|
||||
// select them easily
|
||||
async getHashes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const hashes = getHashes();
|
||||
for (const hash of hashes) {
|
||||
const hashName = hash;
|
||||
const hashId = hash;
|
||||
returnData.push({
|
||||
name: hashName,
|
||||
value: hashId,
|
||||
});
|
||||
}
|
||||
return returnData;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user