n8n-workflow 2.42.3 → 2.42.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/build.tsbuildinfo +1 -1
- package/dist/cjs/nodes-api-version.d.ts +9 -18
- package/dist/cjs/nodes-api-version.d.ts.map +1 -1
- package/dist/cjs/nodes-api-version.js +24 -19
- package/dist/cjs/nodes-api-version.js.map +1 -1
- package/dist/esm/nodes-api-version.d.ts +9 -18
- package/dist/esm/nodes-api-version.d.ts.map +1 -1
- package/dist/esm/nodes-api-version.js +22 -19
- package/dist/esm/nodes-api-version.js.map +1 -1
- package/dist/esm/typecheck.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1,33 +1,24 @@
|
|
|
1
1
|
import { N8N_NODES_API_VERSION } from '@n8n/constants';
|
|
2
|
-
|
|
2
|
+
import { formatNodesApiLevel, parseNodesApiLevel } from '@n8n/utils/nodes-api-level';
|
|
3
|
+
export { N8N_NODES_API_VERSION, formatNodesApiLevel, parseNodesApiLevel };
|
|
3
4
|
/** Minimal package.json shape needed to check node API compatibility. */
|
|
4
5
|
export interface NodesApiVersionPackageJson {
|
|
5
6
|
n8n?: {
|
|
6
|
-
/**
|
|
7
|
-
* Node-authoring API level the package requires. Absent in legacy
|
|
8
|
-
* packages, which are treated as requiring level 1.
|
|
9
|
-
*/
|
|
10
7
|
n8nNodesApiVersion?: unknown;
|
|
11
8
|
};
|
|
12
9
|
}
|
|
13
10
|
export type NodesApiVersionCheck = {
|
|
14
11
|
compatible: true;
|
|
15
|
-
/** Effective required API level; 1 for packages without metadata. */
|
|
16
|
-
version: number;
|
|
17
12
|
} | {
|
|
18
13
|
compatible: false;
|
|
19
|
-
reason: 'malformed'
|
|
20
|
-
/** The declared value, as read from package.json. */
|
|
14
|
+
reason: 'malformed';
|
|
21
15
|
declared: unknown;
|
|
16
|
+
} | {
|
|
17
|
+
compatible: false;
|
|
18
|
+
reason: 'unsupported';
|
|
19
|
+
declared: unknown;
|
|
20
|
+
/** As `<major>.<minor>`, for messages and metadata. */
|
|
21
|
+
required: string;
|
|
22
22
|
};
|
|
23
|
-
/**
|
|
24
|
-
* Read a community package's declared node-authoring API level and check it
|
|
25
|
-
* against the level this runtime supports (`required <= N8N_NODES_API_VERSION`).
|
|
26
|
-
*
|
|
27
|
-
* Missing `n8n.n8nNodesApiVersion` means a legacy package and resolves to
|
|
28
|
-
* level 1. Malformed values (non-integer, non-positive, non-number) are
|
|
29
|
-
* reported as incompatible — the runtime cannot distinguish an old package
|
|
30
|
-
* from a corrupt or hostile one if both fall back to legacy.
|
|
31
|
-
*/
|
|
32
23
|
export declare function checkNodesApiVersion(pkgJson: NodesApiVersionPackageJson): NodesApiVersionCheck;
|
|
33
24
|
//# sourceMappingURL=nodes-api-version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes-api-version.d.ts","sourceRoot":"","sources":["../../src/nodes-api-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"nodes-api-version.d.ts","sourceRoot":"","sources":["../../src/nodes-api-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;AAE1E,yEAAyE;AACzE,MAAM,WAAW,0BAA0B;IAC1C,GAAG,CAAC,EAAE;QACL,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;CACF;AAED,MAAM,MAAM,oBAAoB,GAC7B;IAAE,UAAU,EAAE,IAAI,CAAA;CAAE,GACpB;IACA,UAAU,EAAE,KAAK,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACjB,GACD;IACA,UAAU,EAAE,KAAK,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;CAChB,CAAC;AAWL,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,0BAA0B,GAAG,oBAAoB,CAgB9F"}
|
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.N8N_NODES_API_VERSION = void 0;
|
|
3
|
+
exports.parseNodesApiLevel = exports.formatNodesApiLevel = exports.N8N_NODES_API_VERSION = void 0;
|
|
4
4
|
exports.checkNodesApiVersion = checkNodesApiVersion;
|
|
5
5
|
const constants_1 = require("@n8n/constants");
|
|
6
6
|
Object.defineProperty(exports, "N8N_NODES_API_VERSION", { enumerable: true, get: function () { return constants_1.N8N_NODES_API_VERSION; } });
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
const nodes_api_level_1 = require("@n8n/utils/nodes-api-level");
|
|
8
|
+
Object.defineProperty(exports, "formatNodesApiLevel", { enumerable: true, get: function () { return nodes_api_level_1.formatNodesApiLevel; } });
|
|
9
|
+
Object.defineProperty(exports, "parseNodesApiLevel", { enumerable: true, get: function () { return nodes_api_level_1.parseNodesApiLevel; } });
|
|
10
|
+
function supportedLevel() {
|
|
11
|
+
const level = (0, nodes_api_level_1.parseNodesApiLevel)(constants_1.N8N_NODES_API_VERSION);
|
|
12
|
+
if (level === null)
|
|
13
|
+
throw new Error(`N8N_NODES_API_VERSION is not a level: ${constants_1.N8N_NODES_API_VERSION}`);
|
|
14
|
+
return level;
|
|
15
|
+
}
|
|
16
|
+
// A missing declaration is a legacy package at level 1. A malformed one is
|
|
17
|
+
// incompatible: the runtime cannot tell an old package from a corrupt one.
|
|
16
18
|
function checkNodesApiVersion(pkgJson) {
|
|
17
19
|
const declared = pkgJson?.n8n?.n8nNodesApiVersion;
|
|
18
|
-
if (declared === undefined)
|
|
19
|
-
return { compatible: true
|
|
20
|
-
|
|
21
|
-
if (
|
|
20
|
+
if (declared === undefined)
|
|
21
|
+
return { compatible: true };
|
|
22
|
+
const required = (0, nodes_api_level_1.parseNodesApiLevel)(declared);
|
|
23
|
+
if (required === null)
|
|
22
24
|
return { compatible: false, reason: 'malformed', declared };
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
if (required.compare(supportedLevel()) <= 0)
|
|
26
|
+
return { compatible: true };
|
|
27
|
+
return {
|
|
28
|
+
compatible: false,
|
|
29
|
+
reason: 'unsupported',
|
|
30
|
+
declared,
|
|
31
|
+
required: (0, nodes_api_level_1.formatNodesApiLevel)(required),
|
|
32
|
+
};
|
|
28
33
|
}
|
|
29
34
|
//# sourceMappingURL=nodes-api-version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes-api-version.js","sourceRoot":"","sources":["../../src/nodes-api-version.ts"],"names":[],"mappings":";;;;AAAA,8CAAuD;sGAA9C,iCAAqB;
|
|
1
|
+
{"version":3,"file":"nodes-api-version.js","sourceRoot":"","sources":["../../src/nodes-api-version.ts"],"names":[],"mappings":";;;;AAAA,8CAAuD;sGAA9C,iCAAqB;AAC9B,gEAAqF;oGAA5E,qCAAmB;mGAAE,oCAAkB;AA0BhD,SAAS,cAAc;IACtB,MAAM,KAAK,GAAG,IAAA,oCAAkB,EAAC,iCAAqB,CAAC,CAAC;IACxD,IAAI,KAAK,KAAK,IAAI;QACjB,MAAM,IAAI,KAAK,CAAC,yCAAyC,iCAAqB,EAAE,CAAC,CAAC;IACnF,OAAO,KAAK,CAAC;AACd,CAAC;AAED,2EAA2E;AAC3E,2EAA2E;AAC3E,8BAAqC,OAAmC;IACvE,MAAM,QAAQ,GAAG,OAAO,EAAE,GAAG,EAAE,kBAAkB,CAAC;IAElD,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IAExD,MAAM,QAAQ,GAAG,IAAA,oCAAkB,EAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;IAEnF,IAAI,QAAQ,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IAEzE,OAAO;QACN,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,aAAa;QACrB,QAAQ;QACR,QAAQ,EAAE,IAAA,qCAAmB,EAAC,QAAQ,CAAC;KACvC,CAAC;AACH,CAAC"}
|
|
@@ -1,33 +1,24 @@
|
|
|
1
1
|
import { N8N_NODES_API_VERSION } from '@n8n/constants';
|
|
2
|
-
|
|
2
|
+
import { formatNodesApiLevel, parseNodesApiLevel } from '@n8n/utils/nodes-api-level';
|
|
3
|
+
export { N8N_NODES_API_VERSION, formatNodesApiLevel, parseNodesApiLevel };
|
|
3
4
|
/** Minimal package.json shape needed to check node API compatibility. */
|
|
4
5
|
export interface NodesApiVersionPackageJson {
|
|
5
6
|
n8n?: {
|
|
6
|
-
/**
|
|
7
|
-
* Node-authoring API level the package requires. Absent in legacy
|
|
8
|
-
* packages, which are treated as requiring level 1.
|
|
9
|
-
*/
|
|
10
7
|
n8nNodesApiVersion?: unknown;
|
|
11
8
|
};
|
|
12
9
|
}
|
|
13
10
|
export type NodesApiVersionCheck = {
|
|
14
11
|
compatible: true;
|
|
15
|
-
/** Effective required API level; 1 for packages without metadata. */
|
|
16
|
-
version: number;
|
|
17
12
|
} | {
|
|
18
13
|
compatible: false;
|
|
19
|
-
reason: 'malformed'
|
|
20
|
-
/** The declared value, as read from package.json. */
|
|
14
|
+
reason: 'malformed';
|
|
21
15
|
declared: unknown;
|
|
16
|
+
} | {
|
|
17
|
+
compatible: false;
|
|
18
|
+
reason: 'unsupported';
|
|
19
|
+
declared: unknown;
|
|
20
|
+
/** As `<major>.<minor>`, for messages and metadata. */
|
|
21
|
+
required: string;
|
|
22
22
|
};
|
|
23
|
-
/**
|
|
24
|
-
* Read a community package's declared node-authoring API level and check it
|
|
25
|
-
* against the level this runtime supports (`required <= N8N_NODES_API_VERSION`).
|
|
26
|
-
*
|
|
27
|
-
* Missing `n8n.n8nNodesApiVersion` means a legacy package and resolves to
|
|
28
|
-
* level 1. Malformed values (non-integer, non-positive, non-number) are
|
|
29
|
-
* reported as incompatible — the runtime cannot distinguish an old package
|
|
30
|
-
* from a corrupt or hostile one if both fall back to legacy.
|
|
31
|
-
*/
|
|
32
23
|
export declare function checkNodesApiVersion(pkgJson: NodesApiVersionPackageJson): NodesApiVersionCheck;
|
|
33
24
|
//# sourceMappingURL=nodes-api-version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes-api-version.d.ts","sourceRoot":"","sources":["../../src/nodes-api-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"nodes-api-version.d.ts","sourceRoot":"","sources":["../../src/nodes-api-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;AAE1E,yEAAyE;AACzE,MAAM,WAAW,0BAA0B;IAC1C,GAAG,CAAC,EAAE;QACL,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;CACF;AAED,MAAM,MAAM,oBAAoB,GAC7B;IAAE,UAAU,EAAE,IAAI,CAAA;CAAE,GACpB;IACA,UAAU,EAAE,KAAK,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACjB,GACD;IACA,UAAU,EAAE,KAAK,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;CAChB,CAAC;AAWL,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,0BAA0B,GAAG,oBAAoB,CAgB9F"}
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import { N8N_NODES_API_VERSION } from '@n8n/constants';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { formatNodesApiLevel, parseNodesApiLevel } from '@n8n/utils/nodes-api-level';
|
|
3
|
+
export { N8N_NODES_API_VERSION, formatNodesApiLevel, parseNodesApiLevel };
|
|
4
|
+
function supportedLevel() {
|
|
5
|
+
const level = parseNodesApiLevel(N8N_NODES_API_VERSION);
|
|
6
|
+
if (level === null)
|
|
7
|
+
throw new Error(`N8N_NODES_API_VERSION is not a level: ${N8N_NODES_API_VERSION}`);
|
|
8
|
+
return level;
|
|
9
|
+
}
|
|
10
|
+
// A missing declaration is a legacy package at level 1. A malformed one is
|
|
11
|
+
// incompatible: the runtime cannot tell an old package from a corrupt one.
|
|
12
12
|
export function checkNodesApiVersion(pkgJson) {
|
|
13
13
|
const declared = pkgJson?.n8n?.n8nNodesApiVersion;
|
|
14
|
-
if (declared === undefined)
|
|
15
|
-
return { compatible: true
|
|
16
|
-
|
|
17
|
-
if (
|
|
14
|
+
if (declared === undefined)
|
|
15
|
+
return { compatible: true };
|
|
16
|
+
const required = parseNodesApiLevel(declared);
|
|
17
|
+
if (required === null)
|
|
18
18
|
return { compatible: false, reason: 'malformed', declared };
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
if (required.compare(supportedLevel()) <= 0)
|
|
20
|
+
return { compatible: true };
|
|
21
|
+
return {
|
|
22
|
+
compatible: false,
|
|
23
|
+
reason: 'unsupported',
|
|
24
|
+
declared,
|
|
25
|
+
required: formatNodesApiLevel(required),
|
|
26
|
+
};
|
|
24
27
|
}
|
|
25
28
|
//# sourceMappingURL=nodes-api-version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes-api-version.js","sourceRoot":"","sources":["../../src/nodes-api-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"nodes-api-version.js","sourceRoot":"","sources":["../../src/nodes-api-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;AAwB1E,SAAS,cAAc;IACtB,MAAM,KAAK,GAAG,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;IACxD,IAAI,KAAK,KAAK,IAAI;QACjB,MAAM,IAAI,KAAK,CAAC,yCAAyC,qBAAqB,EAAE,CAAC,CAAC;IACnF,OAAO,KAAK,CAAC;AACd,CAAC;AAED,2EAA2E;AAC3E,2EAA2E;AAC3E,MAAM,UAAU,oBAAoB,CAAC,OAAmC;IACvE,MAAM,QAAQ,GAAG,OAAO,EAAE,GAAG,EAAE,kBAAkB,CAAC;IAElD,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IAExD,MAAM,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;IAEnF,IAAI,QAAQ,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IAEzE,OAAO;QACN,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,aAAa;QACrB,QAAQ;QACR,QAAQ,EAAE,mBAAmB,CAAC,QAAQ,CAAC;KACvC,CAAC;AACH,CAAC"}
|