@n8n/task-runner 1.41.1 → 1.42.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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HealthCheckServer = void 0;
4
- const n8n_workflow_1 = require("n8n-workflow");
4
+ const errors_1 = require("@n8n/errors");
5
5
  const node_http_1 = require("node:http");
6
6
  class HealthCheckServer {
7
7
  constructor() {
@@ -14,7 +14,7 @@ class HealthCheckServer {
14
14
  return await new Promise((resolve, reject) => {
15
15
  const portInUseErrorHandler = (error) => {
16
16
  if (error.code === 'EADDRINUSE') {
17
- reject(new n8n_workflow_1.ApplicationError(`Port ${port} is already in use`));
17
+ reject(new errors_1.ApplicationError(`Port ${port} is already in use`));
18
18
  }
19
19
  else {
20
20
  reject(error);
@@ -1 +1 @@
1
- {"version":3,"file":"health-check-server.js","sourceRoot":"","sources":["../src/health-check-server.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAChD,yCAAyC;AAEzC,MAAa,iBAAiB;IAA9B;QACS,WAAM,GAAG,IAAA,wBAAY,EAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;YACxC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YACnB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACf,CAAC,CAAC,CAAC;IA8BJ,CAAC;IA5BA,KAAK,CAAC,KAAK,CAAC,IAAY,EAAE,IAAY;QACrC,OAAO,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAClD,MAAM,qBAAqB,GAAG,CAAC,KAA4B,EAAE,EAAE;gBAC9D,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;oBACjC,MAAM,CAAC,IAAI,+BAAgB,CAAC,QAAQ,IAAI,oBAAoB,CAAC,CAAC,CAAC;gBAChE,CAAC;qBAAM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MAAM,EAAE,EAAE;YAClD,MAAM,qBAAqB,GAAG,CAAC,KAA4B,EAAE,EAAE;gBAC9D,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;oBACjC,MAAM,CAAC,IAAI,yBAAgB,CAAC,QAAQ,IAAI,oBAAoB,CAAC,CAAC,CAAC;gBAChE,CAAC;qBAAM,CAAC;oBACP,MAAM,CAAC,KAAK,CAAC,CAAC;gBACf,CAAC;YACF,CAAC,CAAC;YAEF,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC;YAE/C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE;gBACnC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC;gBAC3D,OAAO,CAAC,GAAG,CAAC,oCAAoC,IAAI,UAAU,IAAI,EAAE,CAAC,CAAC;gBACtE,OAAO,EAAE,CAAC;YACX,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACT,OAAO,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAClD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBAC3B,IAAI,KAAK;oBAAE,MAAM,CAAC,KAAK,CAAC,CAAC;;oBACpB,OAAO,EAAE,CAAC;YAChB,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAlCD,8CAkCC"}
@@ -1,4 +1,4 @@
1
- import { ApplicationError } from 'n8n-workflow';
1
+ import { ApplicationError } from '@n8n/errors';
2
2
  export declare class TaskCancelledError extends ApplicationError {
3
3
  constructor(reason: string);
4
4
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TaskCancelledError = void 0;
4
- const n8n_workflow_1 = require("n8n-workflow");
5
- class TaskCancelledError extends n8n_workflow_1.ApplicationError {
4
+ const errors_1 = require("@n8n/errors");
5
+ class TaskCancelledError extends errors_1.ApplicationError {
6
6
  constructor(reason) {
7
7
  super(`Task cancelled: ${reason}`, { level: 'warning' });
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"task-cancelled-error.js","sourceRoot":"","sources":["../../../src/js-task-runner/errors/task-cancelled-error.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAEhD,MAAa,kBAAmB,SAAQ,+BAAgB;IACvD,YAAY,MAAc;QACzB,KAAK,CAAC,mBAAmB,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC1D,CAAC;CACD;AAJD,gDAIC"}
1
+ {"version":3,"file":"task-cancelled-error.js","sourceRoot":"","sources":["../../../src/js-task-runner/errors/task-cancelled-error.ts"],"names":[],"mappings":";;;AAAA,wCAA+C;AAE/C,MAAa,kBAAmB,SAAQ,yBAAgB;IACvD,YAAY,MAAc;QACzB,KAAK,CAAC,mBAAmB,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC1D,CAAC;CACD;AAJD,gDAIC"}
@@ -1,4 +1,4 @@
1
- import { ApplicationError } from 'n8n-workflow';
1
+ import { ApplicationError } from '@n8n/errors';
2
2
  export declare class TimeoutError extends ApplicationError {
3
3
  description: string;
4
4
  constructor(taskTimeout: number);
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimeoutError = void 0;
4
- const n8n_workflow_1 = require("n8n-workflow");
5
- class TimeoutError extends n8n_workflow_1.ApplicationError {
4
+ const errors_1 = require("@n8n/errors");
5
+ class TimeoutError extends errors_1.ApplicationError {
6
6
  constructor(taskTimeout) {
7
7
  super(`Task execution timed out after ${taskTimeout} ${taskTimeout === 1 ? 'second' : 'seconds'}`);
8
8
  const subtitle = 'The task runner was taking too long on this task, so the task was aborted.';
@@ -1 +1 @@
1
- {"version":3,"file":"timeout-error.js","sourceRoot":"","sources":["../../../src/js-task-runner/errors/timeout-error.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAEhD,MAAa,YAAa,SAAQ,+BAAgB;IAGjD,YAAY,WAAmB;QAC9B,KAAK,CACJ,kCAAkC,WAAW,IAAI,WAAW,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAC3F,CAAC;QAEF,MAAM,QAAQ,GAAG,4EAA4E,CAAC;QAE9F,MAAM,KAAK,GAAG;YACb,cAAc,EACb,iGAAiG;YAClG,iBAAiB,EAChB,qFAAqF;SACtF,CAAC;QAEF,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAEpE,MAAM,eAAe,GAAG,WAAW;aACjC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,UAAU,EAAE,CAAC;aACzD,IAAI,CAAC,OAAO,CAAC,CAAC;QAEhB,MAAM,WAAW,GAAG,GAAG,QAAQ,wCAAwC,eAAe,EAAE,CAAC;QAEzF,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAChC,CAAC;CACD;AA3BD,oCA2BC"}
1
+ {"version":3,"file":"timeout-error.js","sourceRoot":"","sources":["../../../src/js-task-runner/errors/timeout-error.ts"],"names":[],"mappings":";;;AAAA,wCAA+C;AAE/C,MAAa,YAAa,SAAQ,yBAAgB;IAGjD,YAAY,WAAmB;QAC9B,KAAK,CACJ,kCAAkC,WAAW,IAAI,WAAW,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAC3F,CAAC;QAEF,MAAM,QAAQ,GAAG,4EAA4E,CAAC;QAE9F,MAAM,KAAK,GAAG;YACb,cAAc,EACb,iGAAiG;YAClG,iBAAiB,EAChB,qFAAqF;SACtF,CAAC;QAEF,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAEpE,MAAM,eAAe,GAAG,WAAW;aACjC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,UAAU,EAAE,CAAC;aACzD,IAAI,CAAC,OAAO,CAAC,CAAC;QAEhB,MAAM,WAAW,GAAG,GAAG,QAAQ,wCAAwC,eAAe,EAAE,CAAC;QAEzF,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAChC,CAAC;CACD;AA3BD,oCA2BC"}
@@ -1,4 +1,4 @@
1
- import { ApplicationError } from 'n8n-workflow';
1
+ import { ApplicationError } from '@n8n/errors';
2
2
  export declare class UnsupportedFunctionError extends ApplicationError {
3
3
  constructor(functionName: string);
4
4
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UnsupportedFunctionError = void 0;
4
- const n8n_workflow_1 = require("n8n-workflow");
5
- class UnsupportedFunctionError extends n8n_workflow_1.ApplicationError {
4
+ const errors_1 = require("@n8n/errors");
5
+ class UnsupportedFunctionError extends errors_1.ApplicationError {
6
6
  constructor(functionName) {
7
7
  super(`The function "${functionName}" is not supported in the Code Node`, {
8
8
  level: 'info',
@@ -1 +1 @@
1
- {"version":3,"file":"unsupported-function.error.js","sourceRoot":"","sources":["../../../src/js-task-runner/errors/unsupported-function.error.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAMhD,MAAa,wBAAyB,SAAQ,+BAAgB;IAC7D,YAAY,YAAoB;QAC/B,KAAK,CAAC,iBAAiB,YAAY,qCAAqC,EAAE;YACzE,KAAK,EAAE,MAAM;SACb,CAAC,CAAC;IACJ,CAAC;CACD;AAND,4DAMC"}
1
+ {"version":3,"file":"unsupported-function.error.js","sourceRoot":"","sources":["../../../src/js-task-runner/errors/unsupported-function.error.ts"],"names":[],"mappings":";;;AAAA,wCAA+C;AAM/C,MAAa,wBAAyB,SAAQ,yBAAgB;IAC7D,YAAY,YAAoB;QAC/B,KAAK,CAAC,iBAAiB,YAAY,qCAAqC,EAAE;YACzE,KAAK,EAAE,MAAM;SACb,CAAC,CAAC;IACJ,CAAC;CACD;AAND,4DAMC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createRequireResolver = createRequireResolver;
4
- const n8n_workflow_1 = require("n8n-workflow");
4
+ const errors_1 = require("@n8n/errors");
5
5
  const node_module_1 = require("node:module");
6
6
  const execution_error_1 = require("./errors/execution-error");
7
7
  function createRequireResolver({ allowedBuiltInModules, allowedExternalModules, }) {
@@ -13,7 +13,7 @@ function createRequireResolver({ allowedBuiltInModules, allowedExternalModules,
13
13
  ? checkIsAllowed(allowedBuiltInModules, request)
14
14
  : checkIsAllowed(allowedExternalModules, request);
15
15
  if (!isAllowed) {
16
- const error = new n8n_workflow_1.ApplicationError(`Cannot find module '${request}'`);
16
+ const error = new errors_1.ApplicationError(`Cannot find module '${request}'`);
17
17
  throw new execution_error_1.ExecutionError(error);
18
18
  }
19
19
  return require(request);
@@ -1 +1 @@
1
- {"version":3,"file":"require-resolver.js","sourceRoot":"","sources":["../../src/js-task-runner/require-resolver.ts"],"names":[],"mappings":";;AAqBA,sDAoBC;AAzCD,+CAAgD;AAChD,6CAAwC;AAExC,8DAA0D;AAkB1D,SAAgB,qBAAqB,CAAC,EACrC,qBAAqB,EACrB,sBAAsB,GACD;IACrB,OAAO,CAAC,OAAe,EAAE,EAAE;QAC1B,MAAM,cAAc,GAAG,CAAC,SAA4B,EAAE,UAAkB,EAAE,EAAE;YAC3E,OAAO,SAAS,KAAK,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACvD,CAAC,CAAC;QAEF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ACH,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ErrorEvent } from '@sentry/types';
1
+ import type { ErrorEvent } from '@sentry/core';
2
2
  import { ErrorReporter } from 'n8n-core';
3
3
  import { SentryConfig } from './config/sentry-config';
4
4
  export declare class TaskRunnerSentry {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n8n/task-runner",
3
- "version": "1.41.1",
3
+ "version": "1.42.0",
4
4
  "main": "dist/start.js",
5
5
  "module": "src/start.ts",
6
6
  "types": "dist/index.d.ts",
@@ -22,17 +22,18 @@
22
22
  }
23
23
  },
24
24
  "dependencies": {
25
- "@sentry/node": "8.52.1",
25
+ "@sentry/node": "^9.42.1",
26
26
  "acorn": "8.14.0",
27
27
  "acorn-walk": "8.3.4",
28
28
  "lodash": "4.17.21",
29
29
  "luxon": "3.4.4",
30
30
  "nanoid": "3.3.8",
31
31
  "ws": "^8.18.0",
32
- "@n8n/config": "1.48.0",
32
+ "@n8n/config": "1.49.0",
33
+ "@n8n/errors": "^0.4.0",
34
+ "n8n-core": "1.105.0",
33
35
  "@n8n/di": "0.9.0",
34
- "n8n-core": "1.104.1",
35
- "n8n-workflow": "1.102.1"
36
+ "n8n-workflow": "1.103.0"
36
37
  },
37
38
  "devDependencies": {
38
39
  "@types/lodash": "4.17.17",