mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47: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/lodash.get": "^4.4.6",
|
||||
"@types/mime-types": "^2.1.0",
|
||||
"@types/node": "14.0.27",
|
||||
"@types/node": "^14.14.40",
|
||||
"@types/request-promise-native": "~1.0.15",
|
||||
"jest": "^26.4.2",
|
||||
"source-map-support": "^0.5.9",
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"@types/jest": "^26.0.13",
|
||||
"@types/lodash.get": "^4.4.6",
|
||||
"@types/lodash.set": "^4.3.6",
|
||||
"@types/node": "14.0.27",
|
||||
"@types/node": "^14.14.40",
|
||||
"@types/quill": "^2.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^2.13.0",
|
||||
"@typescript-eslint/parser": "^2.13.0",
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
"@oclif/command": "^1.5.18",
|
||||
"@oclif/errors": "^1.2.2",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/node": "14.0.27",
|
||||
"@types/node": "^14.14.40",
|
||||
"change-case": "^4.1.1",
|
||||
"copyfiles": "^2.1.1",
|
||||
"inquirer": "^7.0.1",
|
||||
|
|
|
@ -9,12 +9,12 @@ import {
|
|||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
BinaryToTextEncoding,
|
||||
createHash,
|
||||
createHmac,
|
||||
createSign,
|
||||
getHashes,
|
||||
HexBase64Latin1Encoding,
|
||||
} from 'crypto';
|
||||
} from 'crypto';
|
||||
|
||||
export class Crypto implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
@ -60,7 +60,7 @@ export class Crypto implements INodeType {
|
|||
name: 'type',
|
||||
displayOptions: {
|
||||
show: {
|
||||
action:[
|
||||
action: [
|
||||
'hash',
|
||||
],
|
||||
},
|
||||
|
@ -93,7 +93,7 @@ export class Crypto implements INodeType {
|
|||
name: 'value',
|
||||
displayOptions: {
|
||||
show: {
|
||||
action:[
|
||||
action: [
|
||||
'hash',
|
||||
],
|
||||
},
|
||||
|
@ -123,7 +123,7 @@ export class Crypto implements INodeType {
|
|||
name: 'encoding',
|
||||
displayOptions: {
|
||||
show: {
|
||||
action:[
|
||||
action: [
|
||||
'hash',
|
||||
],
|
||||
},
|
||||
|
@ -147,7 +147,7 @@ export class Crypto implements INodeType {
|
|||
name: 'type',
|
||||
displayOptions: {
|
||||
show: {
|
||||
action:[
|
||||
action: [
|
||||
'hmac',
|
||||
],
|
||||
},
|
||||
|
@ -180,7 +180,7 @@ export class Crypto implements INodeType {
|
|||
name: 'value',
|
||||
displayOptions: {
|
||||
show: {
|
||||
action:[
|
||||
action: [
|
||||
'hmac',
|
||||
],
|
||||
},
|
||||
|
@ -210,7 +210,7 @@ export class Crypto implements INodeType {
|
|||
name: 'secret',
|
||||
displayOptions: {
|
||||
show: {
|
||||
action:[
|
||||
action: [
|
||||
'hmac',
|
||||
],
|
||||
},
|
||||
|
@ -224,7 +224,7 @@ export class Crypto implements INodeType {
|
|||
name: 'encoding',
|
||||
displayOptions: {
|
||||
show: {
|
||||
action:[
|
||||
action: [
|
||||
'hmac',
|
||||
],
|
||||
},
|
||||
|
@ -248,7 +248,7 @@ export class Crypto implements INodeType {
|
|||
name: 'value',
|
||||
displayOptions: {
|
||||
show: {
|
||||
action:[
|
||||
action: [
|
||||
'sign',
|
||||
],
|
||||
},
|
||||
|
@ -278,7 +278,7 @@ export class Crypto implements INodeType {
|
|||
name: 'algorithm',
|
||||
displayOptions: {
|
||||
show: {
|
||||
action:[
|
||||
action: [
|
||||
'sign',
|
||||
],
|
||||
},
|
||||
|
@ -295,7 +295,7 @@ export class Crypto implements INodeType {
|
|||
name: 'encoding',
|
||||
displayOptions: {
|
||||
show: {
|
||||
action:[
|
||||
action: [
|
||||
'sign',
|
||||
],
|
||||
},
|
||||
|
@ -319,7 +319,7 @@ export class Crypto implements INodeType {
|
|||
name: 'privateKey',
|
||||
displayOptions: {
|
||||
show: {
|
||||
action:[
|
||||
action: [
|
||||
'sign',
|
||||
],
|
||||
},
|
||||
|
@ -371,18 +371,18 @@ export class Crypto implements INodeType {
|
|||
|
||||
if (action === 'hash') {
|
||||
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);
|
||||
}
|
||||
if (action === 'hmac') {
|
||||
const type = this.getNodeParameter('type', 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);
|
||||
}
|
||||
if (action === 'sign') {
|
||||
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 sign = createSign(algorithm);
|
||||
sign.write(value as string);
|
||||
|
|
|
@ -566,7 +566,7 @@
|
|||
"@types/mongodb": "^3.5.4",
|
||||
"@types/mqtt": "^2.5.0",
|
||||
"@types/mssql": "^6.0.2",
|
||||
"@types/node": "14.0.27",
|
||||
"@types/node": "^14.14.40",
|
||||
"@types/nodemailer": "^6.4.0",
|
||||
"@types/redis": "^2.8.11",
|
||||
"@types/request-promise-native": "~1.0.15",
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
"@types/express": "^4.17.6",
|
||||
"@types/jest": "^26.0.13",
|
||||
"@types/lodash.get": "^4.4.6",
|
||||
"@types/node": "14.0.27",
|
||||
"@types/node": "^14.14.40",
|
||||
"jest": "^26.4.2",
|
||||
"ts-jest": "^26.3.0",
|
||||
"tslint": "^6.1.2",
|
||||
|
|
Loading…
Reference in a new issue