n8n-workflow
Advanced tools
Comparing version 1.29.1 to 1.30.0
import type { Functionality, IDataObject, JsonObject } from '../../Interfaces'; | ||
import { ApplicationError } from '../application.error'; | ||
interface ExecutionBaseErrorOptions { | ||
import { ApplicationError, type ReportingOptions } from '../application.error'; | ||
interface ExecutionBaseErrorOptions extends ReportingOptions { | ||
cause?: Error; | ||
@@ -15,5 +15,5 @@ errorResponse?: JsonObject; | ||
functionality: Functionality; | ||
constructor(message: string, { cause, errorResponse }?: ExecutionBaseErrorOptions); | ||
constructor(message: string, options?: ExecutionBaseErrorOptions); | ||
toJSON?(): any; | ||
} | ||
export {}; |
@@ -6,4 +6,3 @@ "use strict"; | ||
class ExecutionBaseError extends application_error_1.ApplicationError { | ||
constructor(message, { cause, errorResponse } = {}) { | ||
const options = cause instanceof Error ? { cause } : {}; | ||
constructor(message, options = {}) { | ||
super(message, options); | ||
@@ -14,2 +13,3 @@ this.context = {}; | ||
this.timestamp = Date.now(); | ||
const { cause, errorResponse } = options; | ||
if (cause instanceof ExecutionBaseError) { | ||
@@ -16,0 +16,0 @@ this.context = cause.context; |
export { ApplicationError } from './application.error'; | ||
export { ExpressionError } from './expression.error'; | ||
export { CredentialAccessError } from './credential-access-error'; | ||
export { NodeApiError } from './node-api.error'; | ||
@@ -4,0 +5,0 @@ export { NodeOperationError } from './node-operation.error'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExpressionExtensionError = exports.ExecutionBaseError = exports.NodeError = exports.CliWorkflowOperationError = exports.SubworkflowOperationError = exports.WorkflowOperationError = exports.WorkflowDeactivationError = exports.WorkflowActivationError = exports.WebhookPathTakenError = exports.NodeSslError = exports.NodeOperationError = exports.NodeApiError = exports.ExpressionError = exports.ApplicationError = void 0; | ||
exports.ExpressionExtensionError = exports.ExecutionBaseError = exports.NodeError = exports.CliWorkflowOperationError = exports.SubworkflowOperationError = exports.WorkflowOperationError = exports.WorkflowDeactivationError = exports.WorkflowActivationError = exports.WebhookPathTakenError = exports.NodeSslError = exports.NodeOperationError = exports.NodeApiError = exports.CredentialAccessError = exports.ExpressionError = exports.ApplicationError = void 0; | ||
var application_error_1 = require("./application.error"); | ||
@@ -8,2 +8,4 @@ Object.defineProperty(exports, "ApplicationError", { enumerable: true, get: function () { return application_error_1.ApplicationError; } }); | ||
Object.defineProperty(exports, "ExpressionError", { enumerable: true, get: function () { return expression_error_1.ExpressionError; } }); | ||
var credential_access_error_1 = require("./credential-access-error"); | ||
Object.defineProperty(exports, "CredentialAccessError", { enumerable: true, get: function () { return credential_access_error_1.CredentialAccessError; } }); | ||
var node_api_error_1 = require("./node-api.error"); | ||
@@ -10,0 +12,0 @@ Object.defineProperty(exports, "NodeApiError", { enumerable: true, get: function () { return node_api_error_1.NodeApiError; } }); |
@@ -656,3 +656,2 @@ "use strict"; | ||
$: (nodeName) => { | ||
var _a, _b; | ||
if (!nodeName) { | ||
@@ -665,5 +664,2 @@ throw createExpressionError('When calling $(), please specify a node'); | ||
} | ||
if (!((_b = (_a = that === null || that === void 0 ? void 0 : that.runExecutionData) === null || _a === void 0 ? void 0 : _a.resultData) === null || _b === void 0 ? void 0 : _b.runData.hasOwnProperty(nodeName))) { | ||
throw createExpressionError(`no data, execute "${nodeName}" node first`); | ||
} | ||
return new Proxy({}, { | ||
@@ -674,2 +670,3 @@ has: () => true, | ||
'pairedItem', | ||
'isExecuted', | ||
'itemMatching', | ||
@@ -685,5 +682,12 @@ 'item', | ||
get(target, property, receiver) { | ||
var _a; | ||
var _a, _b, _c; | ||
if (property === 'isProxy') | ||
return true; | ||
if (!((_b = (_a = that === null || that === void 0 ? void 0 : that.runExecutionData) === null || _a === void 0 ? void 0 : _a.resultData) === null || _b === void 0 ? void 0 : _b.runData.hasOwnProperty(nodeName))) { | ||
if (property === 'isExecuted') | ||
return false; | ||
throw createExpressionError(`no data, execute "${nodeName}" node first`); | ||
} | ||
if (property === 'isExecuted') | ||
return true; | ||
if (['pairedItem', 'itemMatching', 'item'].includes(property)) { | ||
@@ -780,3 +784,3 @@ const pairedItemMethod = (itemIndex) => { | ||
if (property === 'params') { | ||
return (_a = that.workflow.getNode(nodeName)) === null || _a === void 0 ? void 0 : _a.parameters; | ||
return (_c = that.workflow.getNode(nodeName)) === null || _c === void 0 ? void 0 : _c.parameters; | ||
} | ||
@@ -783,0 +787,0 @@ return Reflect.get(target, property, receiver); |
{ | ||
"name": "n8n-workflow", | ||
"version": "1.29.1", | ||
"version": "1.30.0", | ||
"description": "Workflow base code of n8n", | ||
@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE.md", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
836543
178
10849