mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
⬆️ Update types/node package in all packages (#1659)
* ⬆️ Update types/node package in all packages, fix type in crypto node * ⚡ Fix build issue and some formatting Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
parent
ca4c3fa980
commit
b54aae8c31
|
@ -32,7 +32,7 @@
|
||||||
"@types/jest": "^26.0.13",
|
"@types/jest": "^26.0.13",
|
||||||
"@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/node": "14.0.27",
|
"@types/node": "^14.14.40",
|
||||||
"@types/request-promise-native": "~1.0.15",
|
"@types/request-promise-native": "~1.0.15",
|
||||||
"jest": "^26.4.2",
|
"jest": "^26.4.2",
|
||||||
"source-map-support": "^0.5.9",
|
"source-map-support": "^0.5.9",
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
"@types/jest": "^26.0.13",
|
"@types/jest": "^26.0.13",
|
||||||
"@types/lodash.get": "^4.4.6",
|
"@types/lodash.get": "^4.4.6",
|
||||||
"@types/lodash.set": "^4.3.6",
|
"@types/lodash.set": "^4.3.6",
|
||||||
"@types/node": "14.0.27",
|
"@types/node": "^14.14.40",
|
||||||
"@types/quill": "^2.0.1",
|
"@types/quill": "^2.0.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.13.0",
|
"@typescript-eslint/eslint-plugin": "^2.13.0",
|
||||||
"@typescript-eslint/parser": "^2.13.0",
|
"@typescript-eslint/parser": "^2.13.0",
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
"@oclif/command": "^1.5.18",
|
"@oclif/command": "^1.5.18",
|
||||||
"@oclif/errors": "^1.2.2",
|
"@oclif/errors": "^1.2.2",
|
||||||
"@types/express": "^4.17.6",
|
"@types/express": "^4.17.6",
|
||||||
"@types/node": "14.0.27",
|
"@types/node": "^14.14.40",
|
||||||
"change-case": "^4.1.1",
|
"change-case": "^4.1.1",
|
||||||
"copyfiles": "^2.1.1",
|
"copyfiles": "^2.1.1",
|
||||||
"inquirer": "^7.0.1",
|
"inquirer": "^7.0.1",
|
||||||
|
|
|
@ -9,11 +9,11 @@ import {
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
BinaryToTextEncoding,
|
||||||
createHash,
|
createHash,
|
||||||
createHmac,
|
createHmac,
|
||||||
createSign,
|
createSign,
|
||||||
getHashes,
|
getHashes,
|
||||||
HexBase64Latin1Encoding,
|
|
||||||
} from 'crypto';
|
} from 'crypto';
|
||||||
|
|
||||||
export class Crypto implements INodeType {
|
export class Crypto implements INodeType {
|
||||||
|
@ -371,18 +371,18 @@ export class Crypto implements INodeType {
|
||||||
|
|
||||||
if (action === 'hash') {
|
if (action === 'hash') {
|
||||||
const type = this.getNodeParameter('type', i) as string;
|
const type = this.getNodeParameter('type', i) as string;
|
||||||
const encoding = this.getNodeParameter('encoding', i) as HexBase64Latin1Encoding;
|
const encoding = this.getNodeParameter('encoding', i) as BinaryToTextEncoding;
|
||||||
newValue = createHash(type).update(value).digest(encoding);
|
newValue = createHash(type).update(value).digest(encoding);
|
||||||
}
|
}
|
||||||
if (action === 'hmac') {
|
if (action === 'hmac') {
|
||||||
const type = this.getNodeParameter('type', i) as string;
|
const type = this.getNodeParameter('type', i) as string;
|
||||||
const secret = this.getNodeParameter('secret', i) as string;
|
const secret = this.getNodeParameter('secret', i) as string;
|
||||||
const encoding = this.getNodeParameter('encoding', i) as HexBase64Latin1Encoding;
|
const encoding = this.getNodeParameter('encoding', i) as BinaryToTextEncoding;
|
||||||
newValue = createHmac(type, secret).update(value).digest(encoding);
|
newValue = createHmac(type, secret).update(value).digest(encoding);
|
||||||
}
|
}
|
||||||
if (action === 'sign') {
|
if (action === 'sign') {
|
||||||
const algorithm = this.getNodeParameter('algorithm', i) as string;
|
const algorithm = this.getNodeParameter('algorithm', i) as string;
|
||||||
const encoding = this.getNodeParameter('encoding', i) as HexBase64Latin1Encoding;
|
const encoding = this.getNodeParameter('encoding', i) as BinaryToTextEncoding;
|
||||||
const privateKey = this.getNodeParameter('privateKey', i) as string;
|
const privateKey = this.getNodeParameter('privateKey', i) as string;
|
||||||
const sign = createSign(algorithm);
|
const sign = createSign(algorithm);
|
||||||
sign.write(value as string);
|
sign.write(value as string);
|
||||||
|
|
|
@ -566,7 +566,7 @@
|
||||||
"@types/mongodb": "^3.5.4",
|
"@types/mongodb": "^3.5.4",
|
||||||
"@types/mqtt": "^2.5.0",
|
"@types/mqtt": "^2.5.0",
|
||||||
"@types/mssql": "^6.0.2",
|
"@types/mssql": "^6.0.2",
|
||||||
"@types/node": "14.0.27",
|
"@types/node": "^14.14.40",
|
||||||
"@types/nodemailer": "^6.4.0",
|
"@types/nodemailer": "^6.4.0",
|
||||||
"@types/redis": "^2.8.11",
|
"@types/redis": "^2.8.11",
|
||||||
"@types/request-promise-native": "~1.0.15",
|
"@types/request-promise-native": "~1.0.15",
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
"@types/express": "^4.17.6",
|
"@types/express": "^4.17.6",
|
||||||
"@types/jest": "^26.0.13",
|
"@types/jest": "^26.0.13",
|
||||||
"@types/lodash.get": "^4.4.6",
|
"@types/lodash.get": "^4.4.6",
|
||||||
"@types/node": "14.0.27",
|
"@types/node": "^14.14.40",
|
||||||
"jest": "^26.4.2",
|
"jest": "^26.4.2",
|
||||||
"ts-jest": "^26.3.0",
|
"ts-jest": "^26.3.0",
|
||||||
"tslint": "^6.1.2",
|
"tslint": "^6.1.2",
|
||||||
|
|
Loading…
Reference in a new issue