@n8n/task-runner 1.18.2 → 1.20.0
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.
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExecutionError = void 0;
|
|
4
4
|
const serializable_error_1 = require("./serializable-error");
|
|
5
|
-
const VM_WRAPPER_FN_NAME = 'VmCodeWrapper';
|
|
6
5
|
class ExecutionError extends serializable_error_1.SerializableError {
|
|
7
6
|
constructor(error, itemIndex) {
|
|
8
7
|
super(error.message);
|
|
@@ -27,8 +26,7 @@ class ExecutionError extends serializable_error_1.SerializableError {
|
|
|
27
26
|
return;
|
|
28
27
|
}
|
|
29
28
|
const messageRow = stackRows.find((line) => line.includes('Error:'));
|
|
30
|
-
const
|
|
31
|
-
const lineNumberDisplay = this.toLineNumberDisplay(lineNumberRow);
|
|
29
|
+
const lineNumberDisplay = this.toLineNumberDisplay(stackRows);
|
|
32
30
|
if (!messageRow) {
|
|
33
31
|
this.message = `Unknown error ${lineNumberDisplay}`;
|
|
34
32
|
return;
|
|
@@ -42,20 +40,28 @@ class ExecutionError extends serializable_error_1.SerializableError {
|
|
|
42
40
|
}
|
|
43
41
|
this.message = `${errorDetails} ${lineNumberDisplay}`;
|
|
44
42
|
}
|
|
45
|
-
toLineNumberDisplay(
|
|
46
|
-
if (!
|
|
43
|
+
toLineNumberDisplay(stackRows) {
|
|
44
|
+
if (!stackRows || stackRows.length === 0)
|
|
47
45
|
return '';
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
const userFnLine = stackRows.find((row) => row.match(/\(evalmachine\.<anonymous>:\d+:\d+\)/) && !row.includes('VmCodeWrapper'));
|
|
47
|
+
if (userFnLine) {
|
|
48
|
+
const match = userFnLine.match(/evalmachine\.<anonymous>:(\d+):/);
|
|
49
|
+
if (match)
|
|
50
|
+
this.lineNumber = Number(match[1]);
|
|
51
|
+
}
|
|
52
|
+
if (this.lineNumber === undefined) {
|
|
53
|
+
const topLevelLine = stackRows.find((row) => row.includes('VmCodeWrapper') && row.includes('evalmachine.<anonymous>'));
|
|
54
|
+
if (topLevelLine) {
|
|
55
|
+
const match = topLevelLine.match(/evalmachine\.<anonymous>:(\d+):/);
|
|
56
|
+
if (match)
|
|
57
|
+
this.lineNumber = Number(match[1]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (this.lineNumber === undefined)
|
|
54
61
|
return '';
|
|
55
|
-
this.lineNumber = Number(lineNumber);
|
|
56
62
|
return this.itemIndex === undefined
|
|
57
|
-
? `[line ${lineNumber}]`
|
|
58
|
-
: `[line ${lineNumber}, for item ${this.itemIndex}]`;
|
|
63
|
+
? `[line ${this.lineNumber}]`
|
|
64
|
+
: `[line ${this.lineNumber}, for item ${this.itemIndex}]`;
|
|
59
65
|
}
|
|
60
66
|
toErrorDetailsAndType(messageRow) {
|
|
61
67
|
if (!messageRow)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-error.js","sourceRoot":"","sources":["../../../src/js-task-runner/errors/execution-error.ts"],"names":[],"mappings":";;;AACA,6DAAyD;AAEzD,
|
|
1
|
+
{"version":3,"file":"execution-error.js","sourceRoot":"","sources":["../../../src/js-task-runner/errors/execution-error.ts"],"names":[],"mappings":";;;AACA,6DAAyD;AAEzD,MAAa,cAAe,SAAQ,sCAAiB;IASpD,YAAY,KAAgB,EAAE,SAAkB;QAC/C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QATtB,gBAAW,GAAkB,IAAI,CAAC;QAElC,cAAS,GAAuB,SAAS,CAAC;QAE1C,YAAO,GAAsC,SAAS,CAAC;QAEvD,eAAU,GAAuB,SAAS,CAAC;QAI1C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE,C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EAAE,IAAI,CAAC,CAAC;QAErC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG,UAAU;aAC1C,KAAK,CAAC,GAAG,CAAC;aACV,OAAO,EAAE;aACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAEvB,OAAO,CAAC,YAAY,EAAE,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACjE,CAAC;CACD;AAlGD,wCAkGC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n8n/task-runner",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"main": "dist/start.js",
|
|
5
5
|
"module": "src/start.ts",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,13 +29,14 @@
|
|
|
29
29
|
"luxon": "3.4.4",
|
|
30
30
|
"nanoid": "3.3.8",
|
|
31
31
|
"ws": "^8.18.0",
|
|
32
|
-
"@n8n/
|
|
33
|
-
"n8n
|
|
34
|
-
"n8n-
|
|
35
|
-
"
|
|
32
|
+
"@n8n/config": "1.32.0",
|
|
33
|
+
"@n8n/di": "0.4.0",
|
|
34
|
+
"n8n-core": "1.82.0",
|
|
35
|
+
"n8n-workflow": "1.81.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/lodash": "^4.14.195"
|
|
38
|
+
"@types/lodash": "^4.14.195",
|
|
39
|
+
"@n8n/typescript-config": "1.2.0"
|
|
39
40
|
},
|
|
40
41
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
41
42
|
"homepage": "https://n8n.io",
|