first commit

This commit is contained in:
2025-10-26 23:10:15 +08:00
commit 8f0345b7be
14961 changed files with 2356381 additions and 0 deletions

88
node_modules/n8n-workflow/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,88 @@
# License
Portions of this software are licensed as follows:
- Content of branches other than the main branch (i.e. "master") are not licensed.
- Source code files that contain ".ee." in their filename or ".ee" in their dirname are NOT licensed under
the Sustainable Use License.
To use source code files that contain ".ee." in their filename or ".ee" in their dirname you must hold a
valid n8n Enterprise License specifically allowing you access to such source code files and as defined
in "LICENSE_EE.md".
- All third party components incorporated into the n8n Software are licensed under the original license
provided by the owner of the applicable component.
- Content outside of the above mentioned files or restrictions is available under the "Sustainable Use
License" as defined below.
## Sustainable Use License
Version 1.0
### Acceptance
By using the software, you agree to all of the terms and conditions below.
### Copyright License
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license
to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject
to the limitations below.
### Limitations
You may use or modify the software only for your own internal business purposes or for non-commercial or
personal use. You may distribute the software or provide it to others only if you do so free of charge for
non-commercial purposes. You may not alter, remove, or obscure any licensing, copyright, or other notices of
the licensor in the software. Any use of the licensors trademarks is subject to applicable law.
### Patents
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to
license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case
subject to the limitations and conditions in this license. This license does not cover any patent claims that
you cause to be infringed by modifications or additions to the software. If you or your company make any
written claim that the software infringes or contributes to infringement of any patent, your patent license
for the software granted under these terms ends immediately. If your company makes such a claim, your patent
license ends immediately for work on behalf of your company.
### Notices
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these
terms. If you modify the software, you must include in any modified copies of the software a prominent notice
stating that you have modified the software.
### No Other Rights
These terms do not imply any licenses other than those expressly granted in these terms.
### Termination
If you use the software in violation of these terms, such use is not licensed, and your license will
automatically terminate. If the licensor provides you with a notice of your violation, and you cease all
violation of this license no later than 30 days after you receive that notice, your license will be reinstated
retroactively. However, if you violate these terms after such reinstatement, any additional violation of these
terms will cause your license to terminate automatically and permanently.
### No Liability
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will
not be liable to you for any damages arising out of these terms or the use or nature of the software, under
any kind of legal claim.
### Definitions
The “licensor” is the entity offering these terms.
The “software” is the software the licensor makes available under these terms, including any portion of it.
“You” refers to the individual or entity agreeing to these terms.
“Your company” is any legal entity, sole proprietorship, or other kind of organization that you work for, plus
all organizations that have control over, are under the control of, or are under common control with that
organization. Control means ownership of substantially all the assets of an entity, or the power to direct its
management and policies by vote, contract, or otherwise. Control can be direct or indirect.
“Your license” is the license granted to you for the software under these terms.
“Use” means anything you do with the software requiring your license.
“Trademark” means trademarks, service marks, and similar rights.

27
node_modules/n8n-workflow/LICENSE_EE.md generated vendored Normal file
View File

@@ -0,0 +1,27 @@
# The n8n Enterprise License (the “Enterprise License”)
Copyright (c) 2022-present n8n GmbH.
With regard to the n8n Software:
This software and associated documentation files (the "Software") may only be used in production, if
you (and any entity that you represent) hold a valid n8n Enterprise license corresponding to your
usage. Subject to the foregoing sentence, you are free to modify this Software and publish patches
to the Software. You agree that n8n and/or its licensors (as applicable) retain all right, title and
interest in and to all such modifications and/or patches, and all such modifications and/or patches
may only be used, copied, modified, displayed, distributed, or otherwise exploited with a valid n8n
Enterprise license for the corresponding usage. Notwithstanding the foregoing, you may copy and
modify the Software for development and testing purposes, without requiring a subscription. You
agree that n8n and/or its licensors (as applicable) retain all right, title and interest in and to
all such modifications. You are not granted any other rights beyond what is expressly stated herein.
Subject to the foregoing, it is forbidden to copy, merge, publish, distribute, sublicense, and/or
sell the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For all third party components incorporated into the n8n Software, those components are licensed
under the original license provided by the owner of the applicable component.

13
node_modules/n8n-workflow/README.md generated vendored Normal file
View File

@@ -0,0 +1,13 @@
![n8n.io - Workflow Automation](https://user-images.githubusercontent.com/65276001/173571060-9f2f6d7b-bac0-43b6-bdb2-001da9694058.png)
# n8n-workflow
Workflow base code for n8n
```
npm install n8n-workflow
```
## License
You can find the license information [here](https://github.com/n8n-io/n8n/blob/master/README.md#license)

View File

@@ -0,0 +1,3 @@
export declare function augmentArray<T>(data: T[]): T[];
export declare function augmentObject<T extends object>(data: T): T;
//# sourceMappingURL=augment-object.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"augment-object.d.ts","sourceRoot":"","sources":["../../src/augment-object.ts"],"names":[],"mappings":"AAmBA,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAuD9C;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAmF1D"}

157
node_modules/n8n-workflow/dist/cjs/augment-object.js generated vendored Normal file
View File

@@ -0,0 +1,157 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.augmentArray = augmentArray;
exports.augmentObject = augmentObject;
const defaultPropertyDescriptor = Object.freeze({ enumerable: true, configurable: true });
// eslint-disable-next-line @typescript-eslint/unbound-method
const { hasOwnProperty } = Object.prototype;
const augmentedObjects = new WeakSet();
function augment(value) {
if (typeof value !== 'object' || value === null || value instanceof RegExp)
return value;
if (value instanceof Date)
return new Date(value.valueOf());
if (value instanceof Uint8Array)
return value.slice();
if (Array.isArray(value))
return augmentArray(value);
return augmentObject(value);
}
function augmentArray(data) {
if (augmentedObjects.has(data))
return data;
let newData = undefined;
function getData() {
if (newData === undefined) {
newData = [...data];
}
return newData;
}
const proxy = new Proxy(data, {
deleteProperty(_target, key) {
return Reflect.deleteProperty(getData(), key);
},
get(target, key, receiver) {
if (key === 'constructor')
return Array;
const value = Reflect.get(newData ?? target, key, receiver);
const newValue = augment(value);
if (newValue !== value) {
newData = getData();
Reflect.set(newData, key, newValue);
return newValue;
}
return value;
},
getOwnPropertyDescriptor(target, key) {
if (newData === undefined) {
return Reflect.getOwnPropertyDescriptor(target, key);
}
if (key === 'length') {
return Reflect.getOwnPropertyDescriptor(newData, key);
}
return Object.getOwnPropertyDescriptor(data, key) ?? defaultPropertyDescriptor;
},
has(target, key) {
return Reflect.has(newData ?? target, key);
},
ownKeys(target) {
return Reflect.ownKeys(newData ?? target);
},
set(_target, key, newValue) {
// Always proxy all objects. Like that we can check in get simply if it
// is a proxy and it does then not matter if it was already there from the
// beginning and it got proxied at some point or set later and so theoretically
// does not have to get proxied
return Reflect.set(getData(), key, augment(newValue));
},
});
augmentedObjects.add(proxy);
return proxy;
}
function augmentObject(data) {
if (augmentedObjects.has(data))
return data;
const newData = {};
const deletedProperties = new Set();
const proxy = new Proxy(data, {
get(target, key, receiver) {
if (key === 'constructor')
return Object;
if (deletedProperties.has(key)) {
return undefined;
}
if (hasOwnProperty.call(newData, key)) {
return newData[key];
}
const value = Reflect.get(target, key, receiver);
if (typeof value !== 'object' || value === null)
return value;
if (value instanceof RegExp)
return value.toString();
if ('toJSON' in value && typeof value.toJSON === 'function')
return value.toJSON();
const newValue = augment(value);
if (newValue !== value) {
Object.assign(newData, { [key]: newValue });
return newValue;
}
return value;
},
deleteProperty(_target, key) {
if (hasOwnProperty.call(newData, key)) {
delete newData[key];
}
if (hasOwnProperty.call(data, key)) {
deletedProperties.add(key);
}
return true;
},
set(target, key, newValue) {
if (newValue === undefined) {
if (key in newData) {
delete newData[key];
}
if (key in target) {
deletedProperties.add(key);
}
return true;
}
newData[key] = newValue;
if (deletedProperties.has(key)) {
deletedProperties.delete(key);
}
return true;
},
has(_target, key) {
if (deletedProperties.has(key))
return false;
const target = hasOwnProperty.call(newData, key) ? newData : data;
return Reflect.has(target, key);
},
ownKeys(target) {
const originalKeys = Reflect.ownKeys(target);
const newKeys = Object.keys(newData);
return [...new Set([...originalKeys, ...newKeys])].filter((key) => !deletedProperties.has(key));
},
getOwnPropertyDescriptor(_target, key) {
if (deletedProperties.has(key))
return undefined;
const target = hasOwnProperty.call(newData, key) ? newData : data;
return Object.getOwnPropertyDescriptor(target, key);
},
});
augmentedObjects.add(proxy);
return proxy;
}
});
//# sourceMappingURL=augment-object.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
import type { IConnections, NodeConnectionType } from '../interfaces';
export declare function getChildNodes(connectionsBySourceNode: IConnections, nodeName: string, type?: NodeConnectionType | 'ALL' | 'ALL_NON_MAIN', depth?: number): string[];
//# sourceMappingURL=get-child-nodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-child-nodes.d.ts","sourceRoot":"","sources":["../../../src/common/get-child-nodes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEtE,wBAAgB,aAAa,CAC5B,uBAAuB,EAAE,YAAY,EACrC,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,kBAAkB,GAAG,KAAK,GAAG,cAAyC,EAC5E,KAAK,SAAK,GACR,MAAM,EAAE,CAEV"}

View File

@@ -0,0 +1,19 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./get-connected-nodes", "../interfaces"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getChildNodes = getChildNodes;
const get_connected_nodes_1 = require("./get-connected-nodes");
const interfaces_1 = require("../interfaces");
function getChildNodes(connectionsBySourceNode, nodeName, type = interfaces_1.NodeConnectionTypes.Main, depth = -1) {
return (0, get_connected_nodes_1.getConnectedNodes)(connectionsBySourceNode, nodeName, type, depth);
}
});
//# sourceMappingURL=get-child-nodes.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-child-nodes.js","sourceRoot":"","sources":["../../../src/common/get-child-nodes.ts"],"names":[],"mappings":";;;;;;;;;;;IAIA,sCAOC;IAXD,+DAA0D;IAC1D,8CAAoD;IAGpD,SAAgB,aAAa,CAC5B,uBAAqC,EACrC,QAAgB,EAChB,OAAoD,gCAAmB,CAAC,IAAI,EAC5E,KAAK,GAAG,CAAC,CAAC;QAEV,OAAO,IAAA,uCAAiB,EAAC,uBAAuB,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC"}

View File

@@ -0,0 +1,10 @@
import type { IConnections, NodeConnectionType } from '../interfaces';
/**
* Gets all the nodes which are connected nodes starting from
* the given one
*
* @param {NodeConnectionType} [type='main']
* @param {*} [depth=-1]
*/
export declare function getConnectedNodes(connections: IConnections, nodeName: string, connectionType?: NodeConnectionType | 'ALL' | 'ALL_NON_MAIN', depth?: number, checkedNodesIncoming?: string[]): string[];
//# sourceMappingURL=get-connected-nodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-connected-nodes.d.ts","sourceRoot":"","sources":["../../../src/common/get-connected-nodes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEtE;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAChC,WAAW,EAAE,YAAY,EACzB,QAAQ,EAAE,MAAM,EAChB,cAAc,GAAE,kBAAkB,GAAG,KAAK,GAAG,cAAyC,EACtF,KAAK,SAAK,EACV,oBAAoB,CAAC,EAAE,MAAM,EAAE,GAC7B,MAAM,EAAE,CAiFV"}

View File

@@ -0,0 +1,84 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "../interfaces"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getConnectedNodes = getConnectedNodes;
const interfaces_1 = require("../interfaces");
/**
* Gets all the nodes which are connected nodes starting from
* the given one
*
* @param {NodeConnectionType} [type='main']
* @param {*} [depth=-1]
*/
function getConnectedNodes(connections, nodeName, connectionType = interfaces_1.NodeConnectionTypes.Main, depth = -1, checkedNodesIncoming) {
const newDepth = depth === -1 ? depth : depth - 1;
if (depth === 0) {
// Reached max depth
return [];
}
if (!connections.hasOwnProperty(nodeName)) {
// Node does not have incoming connections
return [];
}
let types;
if (connectionType === 'ALL') {
types = Object.keys(connections[nodeName]);
}
else if (connectionType === 'ALL_NON_MAIN') {
types = Object.keys(connections[nodeName]).filter((type) => type !== 'main');
}
else {
types = [connectionType];
}
let addNodes;
let nodeIndex;
let i;
let parentNodeName;
const returnNodes = [];
types.forEach((type) => {
if (!connections[nodeName].hasOwnProperty(type)) {
// Node does not have incoming connections of given type
return;
}
const checkedNodes = checkedNodesIncoming ? [...checkedNodesIncoming] : [];
if (checkedNodes.includes(nodeName)) {
// Node got checked already before
return;
}
checkedNodes.push(nodeName);
connections[nodeName][type].forEach((connectionsByIndex) => {
connectionsByIndex?.forEach((connection) => {
if (checkedNodes.includes(connection.node)) {
// Node got checked already before
return;
}
returnNodes.unshift(connection.node);
addNodes = getConnectedNodes(connections, connection.node, connectionType, newDepth, checkedNodes);
for (i = addNodes.length; i--; i > 0) {
// Because nodes can have multiple parents it is possible that
// parts of the tree is parent of both and to not add nodes
// twice check first if they already got added before.
parentNodeName = addNodes[i];
nodeIndex = returnNodes.indexOf(parentNodeName);
if (nodeIndex !== -1) {
// Node got found before so remove it from current location
// that node-order stays correct
returnNodes.splice(nodeIndex, 1);
}
returnNodes.unshift(parentNodeName);
}
});
});
});
return returnNodes;
}
});
//# sourceMappingURL=get-connected-nodes.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-connected-nodes.js","sourceRoot":"","sources":["../../../src/common/get-connected-nodes.ts"],"names":[],"mappings":";;;;;;;;;;;IAUA,8CAuFC;IAjGD,8CAAoD;IAGpD;;;;;;OAMG;IACH,SAAgB,iBAAiB,CAChC,WAAyB,EACzB,QAAgB,EAChB,iBAA8D,gCAAmB,CAAC,IAAI,EACtF,KAAK,GAAG,CAAC,CAAC,EACV,oBAA+B;QAE/B,MAAM,QAAQ,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;QAClD,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YACjB,oBAAoB;YACpB,OAAO,EAAE,CAAC;QACX,CAAC;QAED,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3C,0CAA0C;YAC1C,OAAO,EAAE,CAAC;QACX,CAAC;QAED,IAAI,KAA2B,CAAC;QAChC,IAAI,cAAc,KAAK,KAAK,EAAE,CAAC;YAC9B,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAyB,CAAC;QACpE,CAAC;aAAM,IAAI,cAAc,KAAK,cAAc,EAAE,CAAC;YAC9C,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAChD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,CACD,CAAC;QAC3B,CAAC;aAAM,CAAC;YACP,KAAK,GAAG,CAAC,cAAc,CAAC,CAAC;QAC1B,CAAC;QAED,IAAI,QAAkB,CAAC;QACv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AAc,CAAC,CAAC;wBAEhD,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,CAAC;4BACtB,2DAA2D;4BAC3D,gCAAgC;4BAChC,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;wBAClC,CAAC;wBAED,WAAW,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;oBACrC,CAAC;gBACF,CAAC,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,WAAW,CAAC;IACpB,CAAC"}

View File

@@ -0,0 +1,9 @@
import type { INode, INodes } from '../interfaces';
/**
* Returns the node with the given name if it exists else null
*
* @param {INodes} nodes Nodes to search in
* @param {string} name Name of the node to return
*/
export declare function getNodeByName(nodes: INodes | INode[], name: string): INode | null;
//# sourceMappingURL=get-node-by-name.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-node-by-name.d.ts","sourceRoot":"","sources":["../../../src/common/get-node-by-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,gBAUlE"}

View File

@@ -0,0 +1,29 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNodeByName = getNodeByName;
/**
* Returns the node with the given name if it exists else null
*
* @param {INodes} nodes Nodes to search in
* @param {string} name Name of the node to return
*/
function getNodeByName(nodes, name) {
if (Array.isArray(nodes)) {
return nodes.find((node) => node.name === name) || null;
}
if (nodes.hasOwnProperty(name)) {
return nodes[name];
}
return null;
}
});
//# sourceMappingURL=get-node-by-name.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-node-by-name.js","sourceRoot":"","sources":["../../../src/common/get-node-by-name.ts"],"names":[],"mappings":";;;;;;;;;;;IAQA,sCAUC;IAhBD;;;;;OAKG;IACH,SAAgB,aAAa,CAAC,KAAuB,EAAE,IAAY;QAClE,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,IAAI,CAAC;QACzD,CAAC;QAED,IAAI,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;QAED,OAAO,IAAI,CAAC;IACb,CAAC"}

View File

@@ -0,0 +1,9 @@
import type { IConnections, NodeConnectionType } from '../interfaces';
/**
* Returns all the nodes before the given one
*
* @param {NodeConnectionType} [type='main']
* @param {*} [depth=-1]
*/
export declare function getParentNodes(connectionsByDestinationNode: IConnections, nodeName: string, type?: NodeConnectionType | 'ALL' | 'ALL_NON_MAIN', depth?: number): string[];
//# sourceMappingURL=get-parent-nodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-parent-nodes.d.ts","sourceRoot":"","sources":["../../../src/common/get-parent-nodes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEtE;;;;;GAKG;AACH,wBAAgB,cAAc,CAC7B,4BAA4B,EAAE,YAAY,EAC1C,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,kBAAkB,GAAG,KAAK,GAAG,cAAyC,EAC5E,KAAK,SAAK,GACR,MAAM,EAAE,CAEV"}

View File

@@ -0,0 +1,25 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./get-connected-nodes", "../interfaces"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getParentNodes = getParentNodes;
const get_connected_nodes_1 = require("./get-connected-nodes");
const interfaces_1 = require("../interfaces");
/**
* Returns all the nodes before the given one
*
* @param {NodeConnectionType} [type='main']
* @param {*} [depth=-1]
*/
function getParentNodes(connectionsByDestinationNode, nodeName, type = interfaces_1.NodeConnectionTypes.Main, depth = -1) {
return (0, get_connected_nodes_1.getConnectedNodes)(connectionsByDestinationNode, nodeName, type, depth);
}
});
//# sourceMappingURL=get-parent-nodes.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-parent-nodes.js","sourceRoot":"","sources":["../../../src/common/get-parent-nodes.ts"],"names":[],"mappings":";;;;;;;;;;;IAUA,wCAOC;IAjBD,+DAA0D;IAC1D,8CAAoD;IAGpD;;;;;OAKG;IACH,SAAgB,cAAc,CAC7B,4BAA0C,EAC1C,QAAgB,EAChB,OAAoD,gCAAmB,CAAC,IAAI,EAC5E,KAAK,GAAG,CAAC,CAAC;QAEV,OAAO,IAAA,uCAAiB,EAAC,4BAA4B,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/E,CAAC"}

6
node_modules/n8n-workflow/dist/cjs/common/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
export * from './get-child-nodes';
export * from './get-connected-nodes';
export * from './get-node-by-name';
export * from './get-parent-nodes';
export * from './map-connections-by-destination';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC"}

32
node_modules/n8n-workflow/dist/cjs/common/index.js generated vendored Normal file
View File

@@ -0,0 +1,32 @@
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./get-child-nodes", "./get-connected-nodes", "./get-node-by-name", "./get-parent-nodes", "./map-connections-by-destination"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./get-child-nodes"), exports);
__exportStar(require("./get-connected-nodes"), exports);
__exportStar(require("./get-node-by-name"), exports);
__exportStar(require("./get-parent-nodes"), exports);
__exportStar(require("./map-connections-by-destination"), exports);
});
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAAA,oDAAkC;IAClC,wDAAsC;IACtC,qDAAmC;IACnC,qDAAmC;IACnC,mEAAiD"}

View File

@@ -0,0 +1,3 @@
import type { IConnections } from '../interfaces';
export declare function mapConnectionsByDestination(connections: IConnections): IConnections;
//# sourceMappingURL=map-connections-by-destination.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"map-connections-by-destination.d.ts","sourceRoot":"","sources":["../../../src/common/map-connections-by-destination.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,eAAe,CAAC;AAEtE,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,YAAY,gBA4CpE"}

View File

@@ -0,0 +1,53 @@
/* eslint-disable @typescript-eslint/no-for-in-array */
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mapConnectionsByDestination = mapConnectionsByDestination;
function mapConnectionsByDestination(connections) {
const returnConnection = {};
let connectionInfo;
let maxIndex;
for (const sourceNode in connections) {
if (!connections.hasOwnProperty(sourceNode)) {
continue;
}
for (const type of Object.keys(connections[sourceNode])) {
if (!connections[sourceNode].hasOwnProperty(type)) {
continue;
}
for (const inputIndex in connections[sourceNode][type]) {
if (!connections[sourceNode][type].hasOwnProperty(inputIndex)) {
continue;
}
for (connectionInfo of connections[sourceNode][type][inputIndex] ?? []) {
if (!returnConnection.hasOwnProperty(connectionInfo.node)) {
returnConnection[connectionInfo.node] = {};
}
if (!returnConnection[connectionInfo.node].hasOwnProperty(connectionInfo.type)) {
returnConnection[connectionInfo.node][connectionInfo.type] = [];
}
maxIndex = returnConnection[connectionInfo.node][connectionInfo.type].length - 1;
for (let j = maxIndex; j < connectionInfo.index; j++) {
returnConnection[connectionInfo.node][connectionInfo.type].push([]);
}
returnConnection[connectionInfo.node][connectionInfo.type][connectionInfo.index]?.push({
node: sourceNode,
type,
index: parseInt(inputIndex, 10),
});
}
}
}
}
return returnConnection;
}
});
//# sourceMappingURL=map-connections-by-destination.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"map-connections-by-destination.js","sourceRoot":"","sources":["../../../src/common/map-connections-by-destination.ts"],"names":[],"mappings":"AAAA,uDAAuD;;;;;;;;;;;;IAIvD,kEA4CC;IA5CD,SAAgB,2BAA2B,CAAC,WAAyB;QACpE,MAAM,gBAAgB,GAAiB,EAAE,CA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,IAAI,CAAC,GAAG,QAAQ,EAAE,CAAC,GAAG,cAAc,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;4BACtD,gBAAgB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;wBACrE,CAAC;wBAED,gBAAgB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC;4BACtF,IAAI,EAAE,UAAU;4BAChB,IAAI;4BACJ,KAAK,EAAE,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC;yBAC/B,CAAC,CAAC;oBACJ,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;QAED,OAAO,gBAAgB,CAAC;IACzB,CAAC"}

76
node_modules/n8n-workflow/dist/cjs/constants.d.ts generated vendored Normal file
View File

@@ -0,0 +1,76 @@
export declare const DIGITS = "0123456789";
export declare const UPPERCASE_LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
export declare const LOWERCASE_LETTERS: string;
export declare const ALPHABET: string;
export declare const BINARY_ENCODING = "base64";
export declare const WAIT_INDEFINITELY: Date;
export declare const LOG_LEVELS: readonly ["silent", "error", "warn", "info", "debug"];
export declare const CODE_LANGUAGES: readonly ["javaScript", "python", "json", "html"];
export declare const CODE_EXECUTION_MODES: readonly ["runOnceForAllItems", "runOnceForEachItem"];
export declare const CREDENTIAL_EMPTY_VALUE = "__n8n_EMPTY_VALUE_7b1af746-3729-4c60-9b9b-e08eb29e58da";
export declare const FORM_TRIGGER_PATH_IDENTIFIER = "n8n-form";
export declare const UNKNOWN_ERROR_MESSAGE = "There was an unknown issue while executing the node";
export declare const UNKNOWN_ERROR_DESCRIPTION = "Double-check the node configuration and the service it connects to. Check the error details below and refer to the <a href=\"https://docs.n8n.io\" target=\"_blank\">n8n documentation</a> to troubleshoot the issue.";
export declare const UNKNOWN_ERROR_MESSAGE_CRED = "UNKNOWN ERROR";
export declare const STICKY_NODE_TYPE = "n8n-nodes-base.stickyNote";
export declare const NO_OP_NODE_TYPE = "n8n-nodes-base.noOp";
export declare const HTTP_REQUEST_NODE_TYPE = "n8n-nodes-base.httpRequest";
export declare const WEBHOOK_NODE_TYPE = "n8n-nodes-base.webhook";
export declare const MANUAL_TRIGGER_NODE_TYPE = "n8n-nodes-base.manualTrigger";
export declare const EVALUATION_TRIGGER_NODE_TYPE = "n8n-nodes-base.evaluationTrigger";
export declare const EVALUATION_NODE_TYPE = "n8n-nodes-base.evaluation";
export declare const ERROR_TRIGGER_NODE_TYPE = "n8n-nodes-base.errorTrigger";
export declare const START_NODE_TYPE = "n8n-nodes-base.start";
export declare const EXECUTE_WORKFLOW_NODE_TYPE = "n8n-nodes-base.executeWorkflow";
export declare const EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE = "n8n-nodes-base.executeWorkflowTrigger";
export declare const CODE_NODE_TYPE = "n8n-nodes-base.code";
export declare const FUNCTION_NODE_TYPE = "n8n-nodes-base.function";
export declare const FUNCTION_ITEM_NODE_TYPE = "n8n-nodes-base.functionItem";
export declare const MERGE_NODE_TYPE = "n8n-nodes-base.merge";
export declare const AI_TRANSFORM_NODE_TYPE = "n8n-nodes-base.aiTransform";
export declare const FORM_NODE_TYPE = "n8n-nodes-base.form";
export declare const FORM_TRIGGER_NODE_TYPE = "n8n-nodes-base.formTrigger";
export declare const CHAT_TRIGGER_NODE_TYPE = "@n8n/n8n-nodes-langchain.chatTrigger";
export declare const WAIT_NODE_TYPE = "n8n-nodes-base.wait";
export declare const RESPOND_TO_WEBHOOK_NODE_TYPE = "n8n-nodes-base.respondToWebhook";
export declare const HTML_NODE_TYPE = "n8n-nodes-base.html";
export declare const MAILGUN_NODE_TYPE = "n8n-nodes-base.mailgun";
export declare const POSTGRES_NODE_TYPE = "n8n-nodes-base.postgres";
export declare const MYSQL_NODE_TYPE = "n8n-nodes-base.mySql";
export declare const STARTING_NODE_TYPES: string[];
export declare const SCRIPTING_NODE_TYPES: string[];
export declare const ADD_FORM_NOTICE = "addFormPage";
/**
* Nodes whose parameter values may refer to other nodes without expressions.
* Their content may need to be updated when the referenced node is renamed.
*/
export declare const NODES_WITH_RENAMABLE_CONTENT: Set<string>;
export declare const NODES_WITH_RENAMABLE_FORM_HTML_CONTENT: Set<string>;
export declare const NODES_WITH_RENAMEABLE_TOPLEVEL_HTML_CONTENT: Set<string>;
export declare const MANUAL_CHAT_TRIGGER_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.manualChatTrigger";
export declare const AGENT_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.agent";
export declare const CHAIN_LLM_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.chainLlm";
export declare const OPENAI_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.openAi";
export declare const CHAIN_SUMMARIZATION_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.chainSummarization";
export declare const AGENT_TOOL_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.agentTool";
export declare const CODE_TOOL_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.toolCode";
export declare const WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.toolWorkflow";
export declare const HTTP_REQUEST_TOOL_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.toolHttpRequest";
export declare const LANGCHAIN_CUSTOM_TOOLS: string[];
export declare const SEND_AND_WAIT_OPERATION = "sendAndWait";
export declare const AI_TRANSFORM_CODE_GENERATED_FOR_PROMPT = "codeGeneratedForPrompt";
export declare const AI_TRANSFORM_JS_CODE = "jsCode";
/**
* Key for an item standing in for a manual execution data item too large to be
* sent live via pubsub. See {@link TRIMMED_TASK_DATA_CONNECTIONS} in constants
* in `cli` package.
*/
export declare const TRIMMED_TASK_DATA_CONNECTIONS_KEY = "__isTrimmedManualExecutionDataItem";
export declare const OPEN_AI_API_CREDENTIAL_TYPE = "openAiApi";
export declare const FREE_AI_CREDITS_ERROR_TYPE = "free_ai_credits_request_error";
export declare const FREE_AI_CREDITS_USED_ALL_CREDITS_ERROR_CODE = 400;
export declare const FROM_AI_AUTO_GENERATED_MARKER = "/*n8n-auto-generated-fromAI-override*/";
export declare const PROJECT_ROOT = "0";
export declare const WAITING_FORMS_EXECUTION_STATUS = "n8n-execution-status";
export declare const CHAT_WAIT_USER_REPLY = "waitUserReply";
//# sourceMappingURL=constants.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,eAAe,CAAC;AACnC,eAAO,MAAM,iBAAiB,+BAA+B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,QAAkC,CAAC;AACjE,eAAO,MAAM,QAAQ,QAA0D,CAAC;AAEhF,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,eAAO,MAAM,iBAAiB,MAAuC,CAAC;AAEtE,eAAO,MAAM,UAAU,uDAAwD,CAAC;AAEhF,eAAO,MAAM,cAAc,mDAAoD,CAAC;AAChF,eAAO,MAAM,oBAAoB,uDAAwD,CAAC;AAG1F,eAAO,MAAM,sBAAsB,2DAA2D,CAAC;AAE/F,eAAO,MAAM,4BAA4B,aAAa,CAAC;AAEvD,eAAO,MAAM,qBAAqB,wDAAwD,CAAC;AAC3F,eAAO,MAAM,yBAAyB,0NAC8K,CAAC;AACrN,eAAO,MAAM,0BAA0B,kBAAkB,CAAC;AAG1D,eAAO,MAAM,gBAAgB,8BAA8B,CAAC;AAC5D,eAAO,MAAM,eAAe,wBAAwB,CAAC;AACrD,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,iBAAiB,2BAA2B,CAAC;AAC1D,eAAO,MAAM,wBAAwB,iCAAiC,CAAC;AACvE,eAAO,MAA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CAAuC,gDACN,CAAC;AAC/C,eAAO,MAAM,8BAA8B,uCAAuC,CAAC;AACnF,eAAO,MAAM,6BAA6B,sCAAsC,CAAC;AACjF,eAAO,MAAM,iCAAiC,0CAA0C,CAAC;AACzF,eAAO,MAAM,qCAAqC,6CAA6C,CAAC;AAEhG,eAAO,MAAM,sBAAsB,UAIlC,CAAC;AAEF,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AACrD,eAAO,MAAM,sCAAsC,2BAA2B,CAAC;AAC/E,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,uCAAuC,CAAC;AAEtF,eAAO,MAAM,2BAA2B,cAAc,CAAC;AACvD,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAC1E,eAAO,MAAM,2CAA2C,MAAM,CAAC;AAE/D,eAAO,MAAM,6BAA6B,2CAA2C,CAAC;AAEtF,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,eAAO,MAAM,8BAA8B,yBAAyB,CAAC;AAErE,eAAO,MAAM,oBAAoB,kBAAkB,CAAC"}

115
node_modules/n8n-workflow/dist/cjs/constants.js generated vendored Normal file
View File

@@ -0,0 +1,115 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CHAT_WAIT_USER_REPLY = exports.WAITING_FORMS_EXECUTION_STATUS = exports.PROJECT_ROOT = exports.FROM_AI_AUTO_GENERATED_MARKER = exports.FREE_AI_CREDITS_USED_ALL_CREDITS_ERROR_CODE = exports.FREE_AI_CREDITS_ERROR_TYPE = exports.OPEN_AI_API_CREDENTIAL_TYPE = exports.TRIMMED_TASK_DATA_CONNECTIONS_KEY = exports.AI_TRANSFORM_JS_CODE = exports.AI_TRANSFORM_CODE_GENERATED_FOR_PROMPT = exports.SEND_AND_WAIT_OPERATION = exports.LANGCHAIN_CUSTOM_TOOLS = exports.HTTP_REQUEST_TOOL_LANGCHAIN_NODE_TYPE = exports.WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE = exports.CODE_TOOL_LANGCHAIN_NODE_TYPE = exports.AGENT_TOOL_LANGCHAIN_NODE_TYPE = exports.CHAIN_SUMMARIZATION_LANGCHAIN_NODE_TYPE = exports.OPENAI_LANGCHAIN_NODE_TYPE = exports.CHAIN_LLM_LANGCHAIN_NODE_TYPE = exports.AGENT_LANGCHAIN_NODE_TYPE = exports.MANUAL_CHAT_TRIGGER_LANGCHAIN_NODE_TYPE = exports.NODES_WITH_RENAMEABLE_TOPLEVEL_HTML_CONTENT = exports.NODES_WITH_RENAMABLE_FORM_HTML_CONTENT = exports.NODES_WITH_RENAMABLE_CONTENT = exports.ADD_FORM_NOTICE = exports.SCRIPTING_NODE_TYPES = exports.STARTING_NODE_TYPES = exports.MYSQL_NODE_TYPE = exports.POSTGRES_NODE_TYPE = exports.MAILGUN_NODE_TYPE = exports.HTML_NODE_TYPE = exports.RESPOND_TO_WEBHOOK_NODE_TYPE = exports.WAIT_NODE_TYPE = exports.CHAT_TRIGGER_NODE_TYPE = exports.FORM_TRIGGER_NODE_TYPE = exports.FORM_NODE_TYPE = exports.AI_TRANSFORM_NODE_TYPE = exports.MERGE_NODE_TYPE = exports.FUNCTION_ITEM_NODE_TYPE = exports.FUNCTION_NODE_TYPE = exports.CODE_NODE_TYPE = exports.EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE = exports.EXECUTE_WORKFLOW_NODE_TYPE = exports.START_NODE_TYPE = exports.ERROR_TRIGGER_NODE_TYPE = exports.EVALUATION_NODE_TYPE = exports.EVALUATION_TRIGGER_NODE_TYPE = exports.MANUAL_TRIGGER_NODE_TYPE = exports.WEBHOOK_NODE_TYPE = exports.HTTP_REQUEST_NODE_TYPE = exports.NO_OP_NODE_TYPE = exports.STICKY_NODE_TYPE = exports.UNKNOWN_ERROR_MESSAGE_CRED = exports.UNKNOWN_ERROR_DESCRIPTION = exports.UNKNOWN_ERROR_MESSAGE = exports.FORM_TRIGGER_PATH_IDENTIFIER = exports.CREDENTIAL_EMPTY_VALUE = exports.CODE_EXECUTION_MODES = exports.CODE_LANGUAGES = exports.LOG_LEVELS = exports.WAIT_INDEFINITELY = exports.BINARY_ENCODING = exports.ALPHABET = exports.LOWERCASE_LETTERS = exports.UPPERCASE_LETTERS = exports.DIGITS = void 0;
exports.DIGITS = '0123456789';
exports.UPPERCASE_LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
exports.LOWERCASE_LETTERS = exports.UPPERCASE_LETTERS.toLowerCase();
exports.ALPHABET = [exports.DIGITS, exports.UPPERCASE_LETTERS, exports.LOWERCASE_LETTERS].join('');
exports.BINARY_ENCODING = 'base64';
exports.WAIT_INDEFINITELY = new Date('3000-01-01T00:00:00.000Z');
exports.LOG_LEVELS = ['silent', 'error', 'warn', 'info', 'debug'];
exports.CODE_LANGUAGES = ['javaScript', 'python', 'json', 'html'];
exports.CODE_EXECUTION_MODES = ['runOnceForAllItems', 'runOnceForEachItem'];
// Arbitrary value to represent an empty credential value
exports.CREDENTIAL_EMPTY_VALUE = '__n8n_EMPTY_VALUE_7b1af746-3729-4c60-9b9b-e08eb29e58da';
exports.FORM_TRIGGER_PATH_IDENTIFIER = 'n8n-form';
exports.UNKNOWN_ERROR_MESSAGE = 'There was an unknown issue while executing the node';
exports.UNKNOWN_ERROR_DESCRIPTION = 'Double-check the node configuration and the service it connects to. Check the error details below and refer to the <a href="https://docs.n8n.io" target="_blank">n8n documentation</a> to troubleshoot the issue.';
exports.UNKNOWN_ERROR_MESSAGE_CRED = 'UNKNOWN ERROR';
//n8n-nodes-base
exports.STICKY_NODE_TYPE = 'n8n-nodes-base.stickyNote';
exports.NO_OP_NODE_TYPE = 'n8n-nodes-base.noOp';
exports.HTTP_REQUEST_NODE_TYPE = 'n8n-nodes-base.httpRequest';
exports.WEBHOOK_NODE_TYPE = 'n8n-nodes-base.webhook';
exports.MANUAL_TRIGGER_NODE_TYPE = 'n8n-nodes-base.manualTrigger';
exports.EVALUATION_TRIGGER_NODE_TYPE = 'n8n-nodes-base.evaluationTrigger';
exports.EVALUATION_NODE_TYPE = 'n8n-nodes-base.evaluation';
exports.ERROR_TRIGGER_NODE_TYPE = 'n8n-nodes-base.errorTrigger';
exports.START_NODE_TYPE = 'n8n-nodes-base.start';
exports.EXECUTE_WORKFLOW_NODE_TYPE = 'n8n-nodes-base.executeWorkflow';
exports.EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE = 'n8n-nodes-base.executeWorkflowTrigger';
exports.CODE_NODE_TYPE = 'n8n-nodes-base.code';
exports.FUNCTION_NODE_TYPE = 'n8n-nodes-base.function';
exports.FUNCTION_ITEM_NODE_TYPE = 'n8n-nodes-base.functionItem';
exports.MERGE_NODE_TYPE = 'n8n-nodes-base.merge';
exports.AI_TRANSFORM_NODE_TYPE = 'n8n-nodes-base.aiTransform';
exports.FORM_NODE_TYPE = 'n8n-nodes-base.form';
exports.FORM_TRIGGER_NODE_TYPE = 'n8n-nodes-base.formTrigger';
exports.CHAT_TRIGGER_NODE_TYPE = '@n8n/n8n-nodes-langchain.chatTrigger';
exports.WAIT_NODE_TYPE = 'n8n-nodes-base.wait';
exports.RESPOND_TO_WEBHOOK_NODE_TYPE = 'n8n-nodes-base.respondToWebhook';
exports.HTML_NODE_TYPE = 'n8n-nodes-base.html';
exports.MAILGUN_NODE_TYPE = 'n8n-nodes-base.mailgun';
exports.POSTGRES_NODE_TYPE = 'n8n-nodes-base.postgres';
exports.MYSQL_NODE_TYPE = 'n8n-nodes-base.mySql';
exports.STARTING_NODE_TYPES = [
exports.MANUAL_TRIGGER_NODE_TYPE,
exports.EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE,
exports.ERROR_TRIGGER_NODE_TYPE,
exports.START_NODE_TYPE,
exports.EVALUATION_TRIGGER_NODE_TYPE,
];
exports.SCRIPTING_NODE_TYPES = [
exports.FUNCTION_NODE_TYPE,
exports.FUNCTION_ITEM_NODE_TYPE,
exports.CODE_NODE_TYPE,
exports.AI_TRANSFORM_NODE_TYPE,
];
exports.ADD_FORM_NOTICE = 'addFormPage';
/**
* Nodes whose parameter values may refer to other nodes without expressions.
* Their content may need to be updated when the referenced node is renamed.
*/
exports.NODES_WITH_RENAMABLE_CONTENT = new Set([
exports.CODE_NODE_TYPE,
exports.FUNCTION_NODE_TYPE,
exports.FUNCTION_ITEM_NODE_TYPE,
exports.AI_TRANSFORM_NODE_TYPE,
]);
exports.NODES_WITH_RENAMABLE_FORM_HTML_CONTENT = new Set([exports.FORM_NODE_TYPE]);
exports.NODES_WITH_RENAMEABLE_TOPLEVEL_HTML_CONTENT = new Set([
exports.MAILGUN_NODE_TYPE,
exports.HTML_NODE_TYPE,
]);
//@n8n/n8n-nodes-langchain
exports.MANUAL_CHAT_TRIGGER_LANGCHAIN_NODE_TYPE = '@n8n/n8n-nodes-langchain.manualChatTrigger';
exports.AGENT_LANGCHAIN_NODE_TYPE = '@n8n/n8n-nodes-langchain.agent';
exports.CHAIN_LLM_LANGCHAIN_NODE_TYPE = '@n8n/n8n-nodes-langchain.chainLlm';
exports.OPENAI_LANGCHAIN_NODE_TYPE = '@n8n/n8n-nodes-langchain.openAi';
exports.CHAIN_SUMMARIZATION_LANGCHAIN_NODE_TYPE = '@n8n/n8n-nodes-langchain.chainSummarization';
exports.AGENT_TOOL_LANGCHAIN_NODE_TYPE = '@n8n/n8n-nodes-langchain.agentTool';
exports.CODE_TOOL_LANGCHAIN_NODE_TYPE = '@n8n/n8n-nodes-langchain.toolCode';
exports.WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE = '@n8n/n8n-nodes-langchain.toolWorkflow';
exports.HTTP_REQUEST_TOOL_LANGCHAIN_NODE_TYPE = '@n8n/n8n-nodes-langchain.toolHttpRequest';
exports.LANGCHAIN_CUSTOM_TOOLS = [
exports.CODE_TOOL_LANGCHAIN_NODE_TYPE,
exports.WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE,
exports.HTTP_REQUEST_TOOL_LANGCHAIN_NODE_TYPE,
];
exports.SEND_AND_WAIT_OPERATION = 'sendAndWait';
exports.AI_TRANSFORM_CODE_GENERATED_FOR_PROMPT = 'codeGeneratedForPrompt';
exports.AI_TRANSFORM_JS_CODE = 'jsCode';
/**
* Key for an item standing in for a manual execution data item too large to be
* sent live via pubsub. See {@link TRIMMED_TASK_DATA_CONNECTIONS} in constants
* in `cli` package.
*/
exports.TRIMMED_TASK_DATA_CONNECTIONS_KEY = '__isTrimmedManualExecutionDataItem';
exports.OPEN_AI_API_CREDENTIAL_TYPE = 'openAiApi';
exports.FREE_AI_CREDITS_ERROR_TYPE = 'free_ai_credits_request_error';
exports.FREE_AI_CREDITS_USED_ALL_CREDITS_ERROR_CODE = 400;
exports.FROM_AI_AUTO_GENERATED_MARKER = '/*n8n-auto-generated-fromAI-override*/';
exports.PROJECT_ROOT = '0';
exports.WAITING_FORMS_EXECUTION_STATUS = 'n8n-execution-status';
exports.CHAT_WAIT_USER_REPLY = 'waitUserReply';
});
//# sourceMappingURL=constants.js.map

1
node_modules/n8n-workflow/dist/cjs/constants.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAa,QAAA,MAAM,GAAG,YAAY,CAAC;IACtB,QAAA,iBAAiB,GAAG,4BAA4B,CAAC;IACjD,QAAA,iBAAiB,GAAG,yBAAiB,CAAC,WAAW,EAAE,CAAC;IACpD,QAAA,QAAQ,GAAG,CAAC,cAAM,EAAE,yBAAiB,EAAE,yBAAiB,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEnE,QAAA,eAAe,GAAG,QAAQ,CAAC;IAC3B,QAAA,iBAAiB,GAAG,IAAI,IAAI,CAAC,0BAA0B,CAAC,CAAC;IAEzD,QAAA,U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QACjC,6CAAqC;KACrC,CAAC;IAEW,QAAA,uBAAuB,GAAG,aAAa,CAAC;IACxC,QAAA,sCAAsC,GAAG,wBAAwB,CAAC;IAClE,QAAA,oBAAoB,GAAG,QAAQ,CAAC;IAE7C;;;;OAIG;IACU,QAAA,iCAAiC,GAAG,oCAAoC,CAAC;IAEzE,QAAA,2BAA2B,GAAG,WAAW,CAAC;IAC1C,QAAA,0BAA0B,GAAG,+BAA+B,CAAC;IAC7D,QAAA,2CAA2C,GAAG,GAAG,CAAC;IAElD,QAAA,6BAA6B,GAAG,wCAAwC,CAAC;IAEzE,QAAA,YAAY,GAAG,GAAG,CAAC;IAEnB,QAAA,8BAA8B,GAAG,sBAAsB,CAAC;IAExD,QAAA,oBAAoB,GAAG,eAAe,CAAC"}

35
node_modules/n8n-workflow/dist/cjs/cron.d.ts generated vendored Normal file
View File

@@ -0,0 +1,35 @@
import type { CronExpression } from './interfaces';
interface BaseTriggerTime<T extends string> {
mode: T;
}
interface CustomTrigger extends BaseTriggerTime<'custom'> {
cronExpression: CronExpression;
}
interface EveryX<U extends string> extends BaseTriggerTime<'everyX'> {
unit: U;
value: number;
}
type EveryMinute = BaseTriggerTime<'everyMinute'>;
type EveryXMinutes = EveryX<'minutes'>;
interface EveryHour extends BaseTriggerTime<'everyHour'> {
minute: number;
}
type EveryXHours = EveryX<'hours'>;
interface EveryDay extends BaseTriggerTime<'everyDay'> {
hour: number;
minute: number;
}
interface EveryWeek extends BaseTriggerTime<'everyWeek'> {
hour: number;
minute: number;
weekday: number;
}
interface EveryMonth extends BaseTriggerTime<'everyMonth'> {
hour: number;
minute: number;
dayOfMonth: number;
}
export type TriggerTime = CustomTrigger | EveryMinute | EveryXMinutes | EveryHour | EveryXHours | EveryDay | EveryWeek | EveryMonth;
export declare const toCronExpression: (item: TriggerTime) => CronExpression;
export {};
//# sourceMappingURL=cron.d.ts.map

1
node_modules/n8n-workflow/dist/cjs/cron.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 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AW,KAAG,cAoBpD,CAAC"}

37
node_modules/n8n-workflow/dist/cjs/cron.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./utils"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toCronExpression = void 0;
const utils_1 = require("./utils");
const toCronExpression = (item) => {
const randomSecond = (0, utils_1.randomInt)(60);
if (item.mode === 'everyMinute')
return `${randomSecond} * * * * *`;
if (item.mode === 'everyHour')
return `${randomSecond} ${item.minute} * * * *`;
if (item.mode === 'everyX') {
if (item.unit === 'minutes')
return `${randomSecond} */${item.value} * * * *`;
const randomMinute = (0, utils_1.randomInt)(60);
if (item.unit === 'hours')
return `${randomSecond} ${randomMinute} */${item.value} * * *`;
}
if (item.mode === 'everyDay')
return `${randomSecond} ${item.minute} ${item.hour} * * *`;
if (item.mode === 'everyWeek')
return `${randomSecond} ${item.minute} ${item.hour} * * ${item.weekday}`;
if (item.mode === 'everyMonth')
return `${randomSecond} ${item.minute} ${item.hour} ${item.dayOfMonth} * *`;
return item.cronExpression.trim();
};
exports.toCronExpression = toCronExpression;
});
//# sourceMappingURL=cron.js.map

1
node_modules/n8n-workflow/dist/cjs/cron.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"cron.js","sourceRoot":"","sources":["../../src/cron.ts"],"names":[],"mappings":";;;;;;;;;;;;IACA,mCAAoC;IAkD7B,MAAM,gBAAgB,GAAG,CAAC,IAAiB,EAAkB,EAAE;QACrE,MAAM,YAAY,GAAG,IAAA,iBAAS,EAAC,EAAE,CAAC,CAAC;QAEnC,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa;YAAE,OAAO,GAAG,YAAY,YAAY,CAAC;QACpE,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW;YAAE,OAAO,GAAG,YAAY,IAAI,IAAI,CAAC,MAAM,UAAU,CAAC;QAE/E,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC5B,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;gBAAE,OAAO,GAAG,YAAY,MAAM,IAAI,CAAC,KAAK,UAAU,CAAC;YAE9E,MAAM,YAAY,GAAG,IAAA,iBAAS,EAAC,EAAE,CAAC,CAAC;YACnC,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;gBAAE,OAAO,GAAG,YAAY,IAAI,YAAY,MAAM,IAAI,CAAC,KAAK,QAAQ,CAAC;QAC3F,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU;YAAE,OAAO,GAAG,YAAY,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,QAAQ,CAAC;QACzF,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW;YAC5B,OAAO,GAAG,YAAY,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;QAE1E,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;YAC7B,OAAO,GAAG,YAAY,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,MAAM,CAAC;QAE7E,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,EAAoB,CAAC;IACrD,CAAC,CAAC;IApBW,QAAA,gBAAgB,oBAoB3B"}

View File

@@ -0,0 +1,139 @@
export type DataTableColumnType = 'string' | 'number' | 'boolean' | 'date';
export type DataTableColumn = {
id: string;
name: string;
type: DataTableColumnType;
index: number;
dataTableId: string;
};
export type DataTable = {
id: string;
name: string;
columns: DataTableColumn[];
createdAt: Date;
updatedAt: Date;
projectId: string;
};
export type CreateDataTableColumnOptions = Pick<DataTableColumn, 'name' | 'type'> & Partial<Pick<DataTableColumn, 'index'>>;
export type CreateDataTableOptions = Pick<DataTable, 'name'> & {
columns: CreateDataTableColumnOptions[];
};
export type UpdateDataTableOptions = {
name: string;
};
export type ListDataTableOptions = {
filter?: Record<string, string | string[]>;
sortBy?: 'name:asc' | 'name:desc' | 'createdAt:asc' | 'createdAt:desc' | 'updatedAt:asc' | 'updatedAt:desc' | 'sizeBytes:asc' | 'sizeBytes:desc';
take?: number;
skip?: number;
};
export type DataTableFilter = {
type: 'and' | 'or';
filters: Array<{
columnName: string;
condition: 'eq' | 'neq' | 'like' | 'ilike' | 'gt' | 'gte' | 'lt' | 'lte';
value: DataTableColumnJsType;
}>;
};
export type ListDataTableRowsOptions = {
filter?: DataTableFilter;
sortBy?: [string, 'ASC' | 'DESC'];
take?: number;
skip?: number;
};
export type UpdateDataTableRowOptions = {
filter: DataTableFilter;
data: DataTableRow;
dryRun?: boolean;
};
export type UpsertDataTableRowOptions = {
filter: DataTableFilter;
data: DataTableRow;
dryRun?: boolean;
};
export type DeleteDataTableRowsOptions = {
filter: DataTableFilter;
dryRun?: boolean;
};
export type MoveDataTableColumnOptions = {
targetIndex: number;
};
export type AddDataTableColumnOptions = Pick<DataTableColumn, 'name' | 'type'> & Partial<Pick<DataTableColumn, 'index'>>;
export type DataTableColumnJsType = string | number | boolean | Date | null;
export declare const DATA_TABLE_SYSTEM_COLUMN_TYPE_MAP: Record<string, DataTableColumnType>;
export declare const DATA_TABLE_SYSTEM_COLUMNS: string[];
export declare const DATA_TABLE_SYSTEM_TESTING_COLUMN = "dryRunState";
export type DataTableRawRowReturnBase = {
id: number;
createdAt: string | number | Date;
updatedAt: string | number | Date;
};
export type DataTableRowReturnBase = {
id: number;
createdAt: Date;
updatedAt: Date;
};
export type DataTableRow = Record<string, DataTableColumnJsType>;
export type DataTableRows = DataTableRow[];
export type DataTableRawRowReturn = DataTableRow & DataTableRawRowReturnBase;
export type DataTableRawRowsReturn = DataTableRawRowReturn[];
export type DataTableRowReturn = DataTableRow & DataTableRowReturnBase;
export type DataTableRowsReturn = DataTableRowReturn[];
export type DataTableRowReturnWithState = DataTableRow & {
id: number | null;
createdAt: Date | null;
updatedAt: Date | null;
dryRunState: 'before' | 'after';
};
export type DataTableRowUpdatePair = {
before: DataTableRowReturn;
after: DataTableRowReturn;
};
export type DataTableInsertRowsReturnType = 'all' | 'id' | 'count';
export type DataTableInsertRowsBulkResult = {
success: true;
insertedRows: number;
};
export type DataTableInsertRowsResult<T extends DataTableInsertRowsReturnType = DataTableInsertRowsReturnType> = T extends 'all' ? DataTableRowReturn[] : T extends 'id' ? Array<Pick<DataTableRowReturn, 'id'>> : DataTableInsertRowsBulkResult;
export type DataTableSizeStatus = 'ok' | 'warn' | 'error';
export type DataTableInfo = {
id: string;
name: string;
projectId: string;
projectName: string;
sizeBytes: number;
};
export type DataTableInfoById = Record<string, DataTableInfo>;
export type DataTablesSizeData = {
totalBytes: number;
dataTables: DataTableInfoById;
};
export type DataTablesSizeResult = DataTablesSizeData & {
quotaStatus: DataTableSizeStatus;
};
export interface IDataTableProjectAggregateService {
getProjectId(): string;
createDataTable(options: CreateDataTableOptions): Promise<DataTable>;
getManyAndCount(options: ListDataTableOptions): Promise<{
count: number;
data: DataTable[];
}>;
deleteDataTableAll(): Promise<boolean>;
}
export interface IDataTableProjectService {
updateDataTable(options: UpdateDataTableOptions): Promise<boolean>;
deleteDataTable(): Promise<boolean>;
getColumns(): Promise<DataTableColumn[]>;
addColumn(options: AddDataTableColumnOptions): Promise<DataTableColumn>;
moveColumn(columnId: string, options: MoveDataTableColumnOptions): Promise<boolean>;
deleteColumn(columnId: string): Promise<boolean>;
getManyRowsAndCount(dto: Partial<ListDataTableRowsOptions>): Promise<{
count: number;
data: DataTableRowsReturn;
}>;
insertRows<T extends DataTableInsertRowsReturnType>(rows: DataTableRows, returnType: T): Promise<DataTableInsertRowsResult<T>>;
updateRows(options: UpdateDataTableRowOptions): Promise<DataTableRowReturn[] | DataTableRowReturnWithState[]>;
upsertRow(options: UpsertDataTableRowOptions): Promise<DataTableRowReturn[] | DataTableRowReturnWithState[]>;
deleteRows(options: DeleteDataTableRowsOptions): Promise<DataTableRowReturn[]>;
}
//# sourceMappingURL=data-table.types.d.ts.map

File diff suppressed because one or more lines are too long

21
node_modules/n8n-workflow/dist/cjs/data-table.types.js generated vendored Normal file
View File

@@ -0,0 +1,21 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DATA_TABLE_SYSTEM_TESTING_COLUMN = exports.DATA_TABLE_SYSTEM_COLUMNS = exports.DATA_TABLE_SYSTEM_COLUMN_TYPE_MAP = void 0;
exports.DATA_TABLE_SYSTEM_COLUMN_TYPE_MAP = {
id: 'number',
createdAt: 'date',
updatedAt: 'date',
};
exports.DATA_TABLE_SYSTEM_COLUMNS = Object.keys(exports.DATA_TABLE_SYSTEM_COLUMN_TYPE_MAP);
exports.DATA_TABLE_SYSTEM_TESTING_COLUMN = 'dryRunState';
});
//# sourceMappingURL=data-table.types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"data-table.types.js","sourceRoot":"","sources":["../../src/data-table.types.ts"],"names":[],"mappings":";;;;;;;;;;;;IAqFa,QAAA,iCAAiC,GAAwC;QACrF,EAAE,EAAE,QAAQ;QACZ,SAAS,EAAE,MAAM;QACjB,SAAS,EAAE,MAAM;KACjB,CAAC;IAEW,QAAA,yBAAyB,GAAG,MAAM,CAAC,IAAI,CAAC,yCAAiC,CAAC,CAAC;IAC3E,QAAA,gCAAgC,GAAG,aAAa,CAAC"}

View File

@@ -0,0 +1,10 @@
type ResolveFn<T> = (result: T | PromiseLike<T>) => void;
type RejectFn = (error: Error) => void;
export interface IDeferredPromise<T> {
promise: Promise<T>;
resolve: ResolveFn<T>;
reject: RejectFn;
}
export declare function createDeferredPromise<T = void>(): IDeferredPromise<T>;
export {};
//# sourceMappingURL=deferred-promise.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"deferred-promise.d.ts","sourceRoot":"","sources":["../../src/deferred-promise.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACzD,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAEvC,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACtB,MAAM,EAAE,QAAQ,CAAC;CACjB;AAED,wBAAgB,qBAAqB,CAAC,CAAC,GAAG,IAAI,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAOrE"}

22
node_modules/n8n-workflow/dist/cjs/deferred-promise.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDeferredPromise = createDeferredPromise;
function createDeferredPromise() {
const deferred = {};
deferred.promise = new Promise((resolve, reject) => {
deferred.resolve = resolve;
deferred.reject = reject;
});
return deferred;
}
});
//# sourceMappingURL=deferred-promise.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"deferred-promise.js","sourceRoot":"","sources":["../../src/deferred-promise.ts"],"names":[],"mappings":";;;;;;;;;;;IASA,sDAOC;IAPD,SAAgB,qBAAqB;QACpC,MAAM,QAAQ,GAAiC,EAAE,CAAC;QAClD,QAAQ,CAAC,OAAO,GAAG,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrD,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;YAC3B,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;QAC1B,CAAC,CAAC,CAAC;QACH,OAAO,QAA+B,CAAC;IACxC,CAAC"}

View File

@@ -0,0 +1,27 @@
import { ApplicationError, type ReportingOptions } from '@n8n/errors';
import type { Functionality, IDataObject, JsonObject } from '../../interfaces';
interface ExecutionBaseErrorOptions extends ReportingOptions {
cause?: Error;
errorResponse?: JsonObject;
}
export declare abstract class ExecutionBaseError extends ApplicationError {
description: string | null | undefined;
cause?: Error;
errorResponse?: JsonObject;
timestamp: number;
context: IDataObject;
lineNumber: number | undefined;
functionality: Functionality;
constructor(message: string, options?: ExecutionBaseErrorOptions);
toJSON?(): {
message: string;
lineNumber: number | undefined;
timestamp: number;
name: string;
description: string | null | undefined;
context: IDataObject;
cause: Error | undefined;
};
}
export {};
//# sourceMappingURL=execution-base.error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"execution-base.error.d.ts","sourceRoot":"","sources":["../../../../src/errors/abstract/execution-base.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEtE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE/E,UAAU,yBAA0B,SAAQ,gBAAgB;IAC3D,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,aAAa,CAAC,EAAE,UAAU,CAAC;CAC3B;AAED,8BAAsB,kBAAmB,SAAQ,gBAAgB;IAChE,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAE9B,KAAK,CAAC,EAAE,KAAK,CAAC;IAEvB,aAAa,CAAC,EAAE,UAAU,CAAC;IAE3B,SAAS,EAAE,MAAM,CAAC;IAElB,OAAO,EAAE,WAAW,CAAM;IAE1B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B,aAAa,EAAE,aAAa,CAAa;gBAE7B,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,yBAA8B;IAgBpE,MAAM,CAAC;;;;;;;;;CAWP"}

View File

@@ -0,0 +1,50 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@n8n/errors"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecutionBaseError = void 0;
const errors_1 = require("@n8n/errors");
class ExecutionBaseError extends errors_1.ApplicationError {
description;
cause;
errorResponse;
timestamp;
context = {};
lineNumber;
functionality = 'regular';
constructor(message, options = {}) {
super(message, options);
this.name = this.constructor.name;
this.timestamp = Date.now();
const { cause, errorResponse } = options;
if (cause instanceof ExecutionBaseError) {
this.context = cause.context;
}
else if (cause && !(cause instanceof Error)) {
this.cause = cause;
}
if (errorResponse)
this.errorResponse = errorResponse;
}
toJSON() {
return {
message: this.message,
lineNumber: this.lineNumber,
timestamp: this.timestamp,
name: this.name,
description: this.description,
context: this.context,
cause: this.cause,
};
}
}
exports.ExecutionBaseError = ExecutionBaseError;
});
//# sourceMappingURL=execution-base.error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"execution-base.error.js","sourceRoot":"","sources":["../../../../src/errors/abstract/execution-base.error.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,wCAAsE;IAStE,MAAsB,kBAAmB,SAAQ,yBAAgB;QAChE,WAAW,CAA4B;QAE9B,KAAK,CAAS;QAEvB,aAAa,CAAc;QAE3B,SAAS,CAAS;QAElB,OAAO,GAAgB,EAAE,CAAC;QAE1B,UAAU,CAAqB;QAE/B,aAAa,GAAkB,SAAS,CAAC;QAEzC,YAAY,OAAe,EAAE,UAAqC,EAAE;YACnE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAExB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;YAClC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YAE5B,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;YACzC,IAAI,KAAK,YAAY,kBAAkB,EAAE,CAAC;gBACzC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;YAC9B,CAAC;iBAAM,IAAI,KAAK,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,EAAE,CAAC;gBAC/C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACpB,CAAC;YAED,IAAI,aAAa;gBAAE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACvD,CAAC;QAED,MAAM;YACL,OAAO;gBACN,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,KAAK,EAAE,IAAI,CAAC,KAAK;aACjB,CAAC;QACH,CAAC;KACD;IA1CD,gDA0CC"}

View File

@@ -0,0 +1,48 @@
import { ExecutionBaseError } from './execution-base.error';
import type { INode, JsonObject } from '../../interfaces';
/**
* Base class for specific NodeError-types, with functionality for finding
* a value recursively inside an error object.
*/
export declare abstract class NodeError extends ExecutionBaseError {
readonly node: INode;
messages: string[];
constructor(node: INode, error: Error | JsonObject);
/**
* Finds property through exploration based on potential keys and traversal keys.
* Depth-first approach.
*
* This method iterates over `potentialKeys` and, if the value at the key is a
* truthy value, the type of the value is checked:
* (1) if a string or number, the value is returned as a string; or
* (2) if an array,
* its string or number elements are collected as a long string,
* its object elements are traversed recursively (restart this function
* with each object as a starting point), or
* (3) if it is an object, it traverses the object and nested ones recursively
* based on the `potentialKeys` and returns a string if found.
*
* If nothing found via `potentialKeys` this method iterates over `traversalKeys` and
* if the value at the key is a traversable object, it restarts with the object as the
* new starting point (recursion).
* If nothing found for any of the `traversalKeys`, exploration continues with remaining
* `traversalKeys`.
*
* Otherwise, if all the paths have been exhausted and no value is eligible, `null` is
* returned.
*
*/
protected findProperty(jsonError: JsonObject, potentialKeys: string[], traversalKeys?: string[]): string | null;
/**
* Preserve the original error message before setting the new one
*/
protected addToMessages(message: string): void;
/**
* Set descriptive error message if code is provided or if message contains any of the common errors,
* update description to include original message plus the description
*/
protected setDescriptiveErrorMessage(message: string, messages: string[], code?: string | null, messageMapping?: {
[key: string]: string;
}): [string, string[]];
}
//# sourceMappingURL=node.error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"node.error.d.ts","sourceRoot":"","sources":["../../../../src/errors/abstract/node.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAe,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA+BvE;;;GAGG;AACH,8BAAsB,SAAU,SAAQ,kBAAkB;IAIxD,QAAQ,CAAC,IAAI,EAAE,KAAK;IAHrB,QAAQ,EAAE,MAAM,EAAE,CAAM;gBAGd,IAAI,EAAE,KAAK,EACpB,KAAK,EAAE,KAAK,GAAG,UAAU;IAY1B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,SAAS,CAAC,YAAY,CACrB,SAAS,EAAE,UAAU,EACrB,aAAa,EAAE,MAAM,EAAE,EACvB,aAAa,GAAE,MAAM,EAAO,GAC1B,MAAM,GAAG,IAAI;IAqDhB;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAM9C;;;OAGG;IACH,SAAS,CAAC,0BAA0B,CACnC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAAE,EAClB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,EACpB,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GACxC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;CAkCrB"}

View File

@@ -0,0 +1,177 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./execution-base.error", "../../utils"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NodeError = void 0;
const execution_base_error_1 = require("./execution-base.error");
const utils_1 = require("../../utils");
/**
* Descriptive messages for common errors.
*/
const COMMON_ERRORS = {
// nodeJS errors
ECONNREFUSED: 'The service refused the connection - perhaps it is offline',
ECONNRESET: 'The connection to the server was closed unexpectedly, perhaps it is offline. You can retry the request immediately or wait and retry later.',
ENOTFOUND: 'The connection cannot be established, this usually occurs due to an incorrect host (domain) value',
ETIMEDOUT: "The connection timed out, consider setting the 'Retry on Fail' option in the node settings",
ERRADDRINUSE: 'The port is already occupied by some other application, if possible change the port or kill the application that is using it',
EADDRNOTAVAIL: 'The address is not available, ensure that you have the right IP address',
ECONNABORTED: 'The connection was aborted, perhaps the server is offline',
EHOSTUNREACH: 'The host is unreachable, perhaps the server is offline',
EAI_AGAIN: 'The DNS server returned an error, perhaps the server is offline',
ENOENT: 'The file or directory does not exist',
EISDIR: 'The file path was expected but the given path is a directory',
ENOTDIR: 'The directory path was expected but the given path is a file',
EACCES: 'Forbidden by access permissions, make sure you have the right permissions',
EEXIST: 'The file or directory already exists',
EPERM: 'Operation not permitted, make sure you have the right permissions',
// other errors
GETADDRINFO: 'The server closed the connection unexpectedly',
};
/**
* Base class for specific NodeError-types, with functionality for finding
* a value recursively inside an error object.
*/
class NodeError extends execution_base_error_1.ExecutionBaseError {
node;
messages = [];
constructor(node, error) {
const isError = error instanceof Error;
const message = isError ? error.message : '';
const options = isError ? { cause: error } : { errorResponse: error };
super(message, options);
this.node = node;
if (error instanceof NodeError) {
this.tags.reWrapped = true;
}
}
/**
* Finds property through exploration based on potential keys and traversal keys.
* Depth-first approach.
*
* This method iterates over `potentialKeys` and, if the value at the key is a
* truthy value, the type of the value is checked:
* (1) if a string or number, the value is returned as a string; or
* (2) if an array,
* its string or number elements are collected as a long string,
* its object elements are traversed recursively (restart this function
* with each object as a starting point), or
* (3) if it is an object, it traverses the object and nested ones recursively
* based on the `potentialKeys` and returns a string if found.
*
* If nothing found via `potentialKeys` this method iterates over `traversalKeys` and
* if the value at the key is a traversable object, it restarts with the object as the
* new starting point (recursion).
* If nothing found for any of the `traversalKeys`, exploration continues with remaining
* `traversalKeys`.
*
* Otherwise, if all the paths have been exhausted and no value is eligible, `null` is
* returned.
*
*/
findProperty(jsonError, potentialKeys, traversalKeys = []) {
for (const key of potentialKeys) {
let value = jsonError[key];
if (value) {
if (typeof value === 'string') {
try {
value = (0, utils_1.jsonParse)(value);
}
catch (error) {
return value;
}
if (typeof value === 'string')
return value;
}
if (typeof value === 'number')
return value.toString();
if (Array.isArray(value)) {
const resolvedErrors = value
.map((jsonError) => {
if (typeof jsonError === 'string')
return jsonError;
if (typeof jsonError === 'number')
return jsonError.toString();
if ((0, utils_1.isTraversableObject)(jsonError)) {
return this.findProperty(jsonError, potentialKeys);
}
return null;
})
.filter((errorValue) => errorValue !== null);
if (resolvedErrors.length === 0) {
return null;
}
return resolvedErrors.join(' | ');
}
if ((0, utils_1.isTraversableObject)(value)) {
const property = this.findProperty(value, potentialKeys);
if (property) {
return property;
}
}
}
}
for (const key of traversalKeys) {
const value = jsonError[key];
if ((0, utils_1.isTraversableObject)(value)) {
const property = this.findProperty(value, potentialKeys, traversalKeys);
if (property) {
return property;
}
}
}
return null;
}
/**
* Preserve the original error message before setting the new one
*/
addToMessages(message) {
if (message && !this.messages.includes(message)) {
this.messages.push(message);
}
}
/**
* Set descriptive error message if code is provided or if message contains any of the common errors,
* update description to include original message plus the description
*/
setDescriptiveErrorMessage(message, messages, code, messageMapping) {
let newMessage = message;
if (messageMapping) {
for (const [mapKey, mapMessage] of Object.entries(messageMapping)) {
if ((message || '').toUpperCase().includes(mapKey.toUpperCase())) {
newMessage = mapMessage;
messages.push(message);
break;
}
}
if (newMessage !== message) {
return [newMessage, messages];
}
}
// if code is provided and it is in the list of common errors set the message and return early
if (code && typeof code === 'string' && COMMON_ERRORS[code.toUpperCase()]) {
newMessage = COMMON_ERRORS[code];
messages.push(message);
return [newMessage, messages];
}
// check if message contains any of the common errors and set the message and description
for (const [errorCode, errorDescriptiveMessage] of Object.entries(COMMON_ERRORS)) {
if ((message || '').toUpperCase().includes(errorCode.toUpperCase())) {
newMessage = errorDescriptiveMessage;
messages.push(message);
break;
}
}
return [newMessage, messages];
}
}
exports.NodeError = NodeError;
});
//# sourceMappingURL=node.error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"node.error.js","sourceRoot":"","sources":["../../../../src/errors/abstract/node.error.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,iEAA4D;IAE5D,uCAA6D;IAE7D;;OAEG;IACH,MAAM,aAAa,GAAgB;QAClC,gBAAgB;QAChB,YAAY,EAAE,4DAA4D;QAC1E,UAAU,EACT,6IAA6I;QAC9I,SAAS,EACR,mGAAmG;QACpG,SAAS,EACR,4FAA4F;QAC7F,YAAY,EACX,8HAA8H;QAC/H,aAAa,EAAE,yEAAyE;QACxF,YAAY,EAAE,2DAA2D;QACzE,YAAY,EAAE,wDAAwD;QACtE,SAAS,EAAE,iEAAiE;QAC5E,MAAM,EAAE,sCAAsC;QAC9C,MAAM,EAAE,8DAA8D;QACtE,OAAO,EAAE,8DAA8D;QACvE,MAAM,EAAE,2EAA2E;QACnF,MAAM,EAAE,sCAAsC;QAC9C,KAAK,EAAE,mEAAmE;QAC1E,eAAe;QACf,WAAW,EAAE,+CAA+C;KAC5D,CAAC;IAEF;;;OAGG;IACH,MAAsB,SAAU,SAAQ,yCAAkB;QAI/C;QAHV,QAAQ,GAAa,EAAE,CAAC;QAExB,YACU,IAAW,EACpB,KAA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AC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;oBACrE,UAAU,GAAG,uBAAiC,CAAC;oBAC/C,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACvB,MAAM;gBACP,CAAC;YACF,CAAC;YAED,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC/B,CAAC;KACD;IAtJD,8BAsJC"}

View File

@@ -0,0 +1,26 @@
import type { Event } from '@sentry/node';
import type { ErrorTags, ErrorLevel, ReportingOptions } from '@n8n/errors';
export type BaseErrorOptions = {
description?: string | undefined | null;
} & ErrorOptions & ReportingOptions;
/**
* Base class for all errors
*/
export declare abstract class BaseError extends Error {
/**
* Error level. Defines which level the error should be logged/reported
* @default 'error'
*/
level: ErrorLevel;
/**
* Whether the error should be reported to Sentry.
* @default true
*/
readonly shouldReport: boolean;
readonly description: string | null | undefined;
readonly tags: ErrorTags;
readonly extra?: Event['extra'];
readonly packageName?: string;
constructor(message: string, { level, description, shouldReport, tags, extra, ...rest }?: BaseErrorOptions);
}
//# sourceMappingURL=base.error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"base.error.d.ts","sourceRoot":"","sources":["../../../../src/errors/base/base.error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE3E,MAAM,MAAM,gBAAgB,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAA;CAAE,GAAG,YAAY,GACxF,gBAAgB,CAAC;AAClB;;GAEG;AACH,8BAAsB,SAAU,SAAQ,KAAK;IAC5C;;;OAGG;IACH,KAAK,EAAE,UAAU,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAE/B,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEhD,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAEzB,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAEhC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;gBAG7B,OAAO,EAAE,MAAM,EACf,EACC,KAAe,EACf,WAAW,EACX,YAAY,EACZ,IAAS,EACT,KAAK,EACL,GAAG,IAAI,EACP,GAAE,gBAAqB;CAiBzB"}

View File

@@ -0,0 +1,53 @@
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "callsites"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseError = void 0;
const callsites_1 = __importDefault(require("callsites"));
/**
* Base class for all errors
*/
class BaseError extends Error {
/**
* Error level. Defines which level the error should be logged/reported
* @default 'error'
*/
level;
/**
* Whether the error should be reported to Sentry.
* @default true
*/
shouldReport;
description;
tags;
extra;
packageName;
constructor(message, { level = 'error', description, shouldReport, tags = {}, extra, ...rest } = {}) {
super(message, rest);
this.level = level;
this.shouldReport = shouldReport ?? (level === 'error' || level === 'fatal');
this.description = description;
this.tags = tags;
this.extra = extra;
try {
const filePath = (0, callsites_1.default)()[2].getFileName() ?? '';
const match = /packages\/([^\/]+)\//.exec(filePath)?.[1];
if (match)
this.tags.packageName = match;
}
catch { }
}
}
exports.BaseError = BaseError;
});
//# sourceMappingURL=base.error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"base.error.js","sourceRoot":"","sources":["../../../../src/errors/base/base.error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;IACA,0DAAkC;IAMlC;;OAEG;IACH,MAAsB,SAAU,SAAQ,KAAK;QAC5C;;;WAGG;QACH,KAAK,CAAa;QAElB;;;WAGG;QACM,YAAY,CAAU;QAEtB,WAAW,CAA4B;QAEvC,IAAI,CAAY;QAEhB,KAAK,CAAkB;QAEvB,WAAW,CAAU;QAE9B,YACC,OAAe,EACf,EACC,KAAK,GAAG,OAAO,EACf,WAAW,EACX,YAAY,EACZ,IAAI,GAAG,EAAE,EACT,KAAK,EACL,GAAG,IAAI,KACc,EAAE;YAExB,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAErB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,CAAC,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC;YAC7E,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YAEnB,IAAI,CAAC;gBACJ,MAAM,QAAQ,GAAG,IAAA,mBAAS,GAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;gBACpD,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;gBAEzD,IAAI,KAAK;oBAAE,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;YAC1C,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;QACX,CAAC;KACD;IA/CD,8BA+CC"}

View File

@@ -0,0 +1,16 @@
import type { BaseErrorOptions } from './base.error';
import { BaseError } from './base.error';
export type OperationalErrorOptions = Omit<BaseErrorOptions, 'level'> & {
level?: 'info' | 'warning' | 'error';
};
/**
* Error that indicates a transient issue, like a network request failing,
* a database query timing out, etc. These are expected to happen, are
* transient by nature and should be handled gracefully.
*
* Default level: warning
*/
export declare class OperationalError extends BaseError {
constructor(message: string, opts?: OperationalErrorOptions);
}
//# sourceMappingURL=operational.error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"operational.error.d.ts","sourceRoot":"","sources":["../../../../src/errors/base/operational.error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,GAAG;IACvE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;CACrC,CAAC;AAEF;;;;;;GAMG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;gBAClC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,uBAA4B;CAK/D"}

View File

@@ -0,0 +1,29 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./base.error"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OperationalError = void 0;
const base_error_1 = require("./base.error");
/**
* Error that indicates a transient issue, like a network request failing,
* a database query timing out, etc. These are expected to happen, are
* transient by nature and should be handled gracefully.
*
* Default level: warning
*/
class OperationalError extends base_error_1.BaseError {
constructor(message, opts = {}) {
opts.level = opts.level ?? 'warning';
super(message, opts);
}
}
exports.OperationalError = OperationalError;
});
//# sourceMappingURL=operational.error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"operational.error.js","sourceRoot":"","sources":["../../../../src/errors/base/operational.error.ts"],"names":[],"mappings":";;;;;;;;;;;;IACA,6CAAyC;IAMzC;;;;;;OAMG;IACH,MAAa,gBAAiB,SAAQ,sBAAS;QAC9C,YAAY,OAAe,EAAE,OAAgC,EAAE;YAC9D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC;YAErC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACtB,CAAC;KACD;IAND,4CAMC"}

View File

@@ -0,0 +1,16 @@
import type { BaseErrorOptions } from './base.error';
import { BaseError } from './base.error';
export type UnexpectedErrorOptions = Omit<BaseErrorOptions, 'level'> & {
level?: 'error' | 'fatal';
};
/**
* Error that indicates something is wrong in the code: logic mistakes,
* unhandled cases, assertions that fail. These are not recoverable and
* should be brought to developers' attention.
*
* Default level: error
*/
export declare class UnexpectedError extends BaseError {
constructor(message: string, opts?: UnexpectedErrorOptions);
}
//# sourceMappingURL=unexpected.error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"unexpected.error.d.ts","sourceRoot":"","sources":["../../../../src/errors/base/unexpected.error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,GAAG;IACtE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CAC1B,CAAC;AAEF;;;;;;GAMG;AACH,qBAAa,eAAgB,SAAQ,SAAS;gBACjC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,sBAA2B;CAK9D"}

View File

@@ -0,0 +1,29 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./base.error"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnexpectedError = void 0;
const base_error_1 = require("./base.error");
/**
* Error that indicates something is wrong in the code: logic mistakes,
* unhandled cases, assertions that fail. These are not recoverable and
* should be brought to developers' attention.
*
* Default level: error
*/
class UnexpectedError extends base_error_1.BaseError {
constructor(message, opts = {}) {
opts.level = opts.level ?? 'error';
super(message, opts);
}
}
exports.UnexpectedError = UnexpectedError;
});
//# sourceMappingURL=unexpected.error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"unexpected.error.js","sourceRoot":"","sources":["../../../../src/errors/base/unexpected.error.ts"],"names":[],"mappings":";;;;;;;;;;;;IACA,6CAAyC;IAMzC;;;;;;OAMG;IACH,MAAa,eAAgB,SAAQ,sBAAS;QAC7C,YAAY,OAAe,EAAE,OAA+B,EAAE;YAC7D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC;YAEnC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACtB,CAAC;KACD;IAND,0CAMC"}

View File

@@ -0,0 +1,18 @@
import type { BaseErrorOptions } from './base.error';
import { BaseError } from './base.error';
export type UserErrorOptions = Omit<BaseErrorOptions, 'level'> & {
level?: 'info' | 'warning';
description?: string | null | undefined;
};
/**
* Error that indicates the user performed an action that caused an error.
* E.g. provided invalid input, tried to access a resource theyre not
* authorized to, or violates a business rule.
*
* Default level: info
*/
export declare class UserError extends BaseError {
readonly description: string | null | undefined;
constructor(message: string, opts?: UserErrorOptions);
}
//# sourceMappingURL=user.error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"user.error.d.ts","sourceRoot":"","sources":["../../../../src/errors/base/user.error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,GAAG;IAChE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF;;;;;;GAMG;AACH,qBAAa,SAAU,SAAQ,SAAS;IACvC,SAAiB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;gBAE5C,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,gBAAqB;CAKxD"}

View File

@@ -0,0 +1,29 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./base.error"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserError = void 0;
const base_error_1 = require("./base.error");
/**
* Error that indicates the user performed an action that caused an error.
* E.g. provided invalid input, tried to access a resource theyre not
* authorized to, or violates a business rule.
*
* Default level: info
*/
class UserError extends base_error_1.BaseError {
constructor(message, opts = {}) {
opts.level = opts.level ?? 'info';
super(message, opts);
}
}
exports.UserError = UserError;
});
//# sourceMappingURL=user.error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"user.error.js","sourceRoot":"","sources":["../../../../src/errors/base/user.error.ts"],"names":[],"mappings":";;;;;;;;;;;;IACA,6CAAyC;IAOzC;;;;;;OAMG;IACH,MAAa,SAAU,SAAQ,sBAAS;QAGvC,YAAY,OAAe,EAAE,OAAyB,EAAE;YACvD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC;YAElC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACtB,CAAC;KACD;IARD,8BAQC"}

View File

@@ -0,0 +1,4 @@
import { SubworkflowOperationError } from './subworkflow-operation.error';
export declare class CliWorkflowOperationError extends SubworkflowOperationError {
}
//# sourceMappingURL=cli-subworkflow-operation.error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"cli-subworkflow-operation.error.d.ts","sourceRoot":"","sources":["../../../src/errors/cli-subworkflow-operation.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,qBAAa,yBAA0B,SAAQ,yBAAyB;CAAG"}

View File

@@ -0,0 +1,18 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./subworkflow-operation.error"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CliWorkflowOperationError = void 0;
const subworkflow_operation_error_1 = require("./subworkflow-operation.error");
class CliWorkflowOperationError extends subworkflow_operation_error_1.SubworkflowOperationError {
}
exports.CliWorkflowOperationError = CliWorkflowOperationError;
});
//# sourceMappingURL=cli-subworkflow-operation.error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"cli-subworkflow-operation.error.js","sourceRoot":"","sources":["../../../src/errors/cli-subworkflow-operation.error.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,+EAA0E;IAE1E,MAAa,yBAA0B,SAAQ,uDAAyB;KAAG;IAA3E,8DAA2E"}

View File

@@ -0,0 +1,9 @@
import { ApplicationError } from '@n8n/errors';
export type DbConnectionTimeoutErrorOpts = {
configuredTimeoutInMs: number;
cause: Error;
};
export declare class DbConnectionTimeoutError extends ApplicationError {
constructor(opts: DbConnectionTimeoutErrorOpts);
}
//# sourceMappingURL=db-connection-timeout-error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"db-connection-timeout-error.d.ts","sourceRoot":"","sources":["../../../src/errors/db-connection-timeout-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,MAAM,4BAA4B,GAAG;IAC1C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,KAAK,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,qBAAa,wBAAyB,SAAQ,gBAAgB;gBACjD,IAAI,EAAE,4BAA4B;CAK9C"}

View File

@@ -0,0 +1,23 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@n8n/errors"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DbConnectionTimeoutError = void 0;
const errors_1 = require("@n8n/errors");
class DbConnectionTimeoutError extends errors_1.ApplicationError {
constructor(opts) {
const numberFormat = Intl.NumberFormat();
const errorMessage = `Could not establish database connection within the configured timeout of ${numberFormat.format(opts.configuredTimeoutInMs)} ms. Please ensure the database is configured correctly and the server is reachable. You can increase the timeout by setting the 'DB_POSTGRESDB_CONNECTION_TIMEOUT' environment variable.`;
super(errorMessage, { cause: opts.cause });
}
}
exports.DbConnectionTimeoutError = DbConnectionTimeoutError;
});
//# sourceMappingURL=db-connection-timeout-error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"db-connection-timeout-error.js","sourceRoot":"","sources":["../../../src/errors/db-connection-timeout-error.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,wCAA+C;IAO/C,MAAa,wBAAyB,SAAQ,yBAAgB;QAC7D,YAAY,IAAkC;YAC7C,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YACzC,MAAM,YAAY,GAAG,4EAA4E,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,2LAA2L,CAAC;YAC5U,KAAK,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAC5C,CAAC;KACD;IAND,4DAMC"}

View File

@@ -0,0 +1,3 @@
/** Ensures `error` is an `Error */
export declare function ensureError(error: unknown): Error;
//# sourceMappingURL=ensure-error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ensure-error.d.ts","sourceRoot":"","sources":["../../../src/errors/ensure-error.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAOjD"}

View File

@@ -0,0 +1,23 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ensureError = ensureError;
/** Ensures `error` is an `Error */
function ensureError(error) {
return error instanceof Error
? error
: new Error('Error that was not an instance of Error was thrown', {
// We should never throw anything except something that derives from Error
cause: error,
});
}
});
//# sourceMappingURL=ensure-error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ensure-error.js","sourceRoot":"","sources":["../../../src/errors/ensure-error.ts"],"names":[],"mappings":";;;;;;;;;;;IACA,kCAOC;IARD,mCAAmC;IACnC,SAAgB,WAAW,CAAC,KAAc;QACzC,OAAO,KAAK,YAAY,KAAK;YAC5B,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,IAAI,KAAK,CAAC,oDAAoD,EAAE;gBAChE,0EAA0E;gBAC1E,KAAK,EAAE,KAAK;aACZ,CAAC,CAAC;IACN,CAAC"}

View File

@@ -0,0 +1,14 @@
import { ExecutionBaseError } from './abstract/execution-base.error';
export declare abstract class ExecutionCancelledError extends ExecutionBaseError {
constructor(executionId: string);
}
export declare class ManualExecutionCancelledError extends ExecutionCancelledError {
constructor(executionId: string);
}
export declare class TimeoutExecutionCancelledError extends ExecutionCancelledError {
constructor(executionId: string);
}
export declare class SystemShutdownExecutionCancelledError extends ExecutionCancelledError {
constructor(executionId: string);
}
//# sourceMappingURL=execution-cancelled.error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"execution-cancelled.error.d.ts","sourceRoot":"","sources":["../../../src/errors/execution-cancelled.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,8BAAsB,uBAAwB,SAAQ,kBAAkB;gBAE3D,WAAW,EAAE,MAAM;CAM/B;AAED,qBAAa,6BAA8B,SAAQ,uBAAuB;gBAC7D,WAAW,EAAE,MAAM;CAI/B;AAED,qBAAa,8BAA+B,SAAQ,uBAAuB;gBAC9D,WAAW,EAAE,MAAM;CAI/B;AAED,qBAAa,qCAAsC,SAAQ,uBAAuB;gBACrE,WAAW,EAAE,MAAM;CAI/B"}

View File

@@ -0,0 +1,46 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./abstract/execution-base.error"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SystemShutdownExecutionCancelledError = exports.TimeoutExecutionCancelledError = exports.ManualExecutionCancelledError = exports.ExecutionCancelledError = void 0;
const execution_base_error_1 = require("./abstract/execution-base.error");
class ExecutionCancelledError extends execution_base_error_1.ExecutionBaseError {
// NOTE: prefer one of the more specific
constructor(executionId) {
super('The execution was cancelled', {
level: 'warning',
extra: { executionId },
});
}
}
exports.ExecutionCancelledError = ExecutionCancelledError;
class ManualExecutionCancelledError extends ExecutionCancelledError {
constructor(executionId) {
super(executionId);
this.message = 'The execution was cancelled manually';
}
}
exports.ManualExecutionCancelledError = ManualExecutionCancelledError;
class TimeoutExecutionCancelledError extends ExecutionCancelledError {
constructor(executionId) {
super(executionId);
this.message = 'The execution was cancelled because it timed out';
}
}
exports.TimeoutExecutionCancelledError = TimeoutExecutionCancelledError;
class SystemShutdownExecutionCancelledError extends ExecutionCancelledError {
constructor(executionId) {
super(executionId);
this.message = 'The execution was cancelled because the system is shutting down';
}
}
exports.SystemShutdownExecutionCancelledError = SystemShutdownExecutionCancelledError;
});
//# sourceMappingURL=execution-cancelled.error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"execution-cancelled.error.js","sourceRoot":"","sources":["../../../src/errors/execution-cancelled.error.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,0EAAqE;IAErE,MAAsB,uBAAwB,SAAQ,yCAAkB;QACvE,wCAAwC;QACxC,YAAY,WAAmB;YAC9B,KAAK,CAAC,6BAA6B,EAAE;gBACpC,KAAK,EAAE,SAAS;gBAChB,KAAK,EAAE,EAAE,WAAW,EAAE;aACtB,CAAC,CAAC;QACJ,CAAC;KACD;IARD,0DAQC;IAED,MAAa,6BAA8B,SAAQ,uBAAuB;QACzE,YAAY,WAAmB;YAC9B,KAAK,CAAC,WAAW,CAAC,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,sCAAsC,CAAC;QACvD,CAAC;KACD;IALD,sEAKC;IAED,MAAa,8BAA+B,SAAQ,uBAAuB;QAC1E,YAAY,WAAmB;YAC9B,KAAK,CAAC,WAAW,CAAC,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,kDAAkD,CAAC;QACnE,CAAC;KACD;IALD,wEAKC;IAED,MAAa,qCAAsC,SAAQ,uBAAuB;QACjF,YAAY,WAAmB;YAC9B,KAAK,CAAC,WAAW,CAAC,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,iEAAiE,CAAC;QAClF,CAAC;KACD;IALD,sFAKC"}

View File

@@ -0,0 +1,4 @@
import { ExpressionError } from './expression.error';
export declare class ExpressionExtensionError extends ExpressionError {
}
//# sourceMappingURL=expression-extension.error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"expression-extension.error.d.ts","sourceRoot":"","sources":["../../../src/errors/expression-extension.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,wBAAyB,SAAQ,eAAe;CAAG"}

View File

@@ -0,0 +1,18 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./expression.error"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExpressionExtensionError = void 0;
const expression_error_1 = require("./expression.error");
class ExpressionExtensionError extends expression_error_1.ExpressionError {
}
exports.ExpressionExtensionError = ExpressionExtensionError;
});
//# sourceMappingURL=expression-extension.error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"expression-extension.error.js","sourceRoot":"","sources":["../../../src/errors/expression-extension.error.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,yDAAqD;IAErD,MAAa,wBAAyB,SAAQ,kCAAe;KAAG;IAAhE,4DAAgE"}

View File

@@ -0,0 +1,22 @@
import { ExecutionBaseError } from './abstract/execution-base.error';
export interface ExpressionErrorOptions {
cause?: Error;
causeDetailed?: string;
description?: string;
descriptionKey?: string;
descriptionTemplate?: string;
functionality?: 'pairedItem';
itemIndex?: number;
messageTemplate?: string;
nodeCause?: string;
parameter?: string;
runIndex?: number;
type?: 'no_execution_data' | 'no_node_execution_data' | 'no_input_connection' | 'internal' | 'paired_item_invalid_info' | 'paired_item_no_info' | 'paired_item_multiple_matches' | 'paired_item_no_connection' | 'paired_item_intermediate_nodes';
}
/**
* Class for instantiating an expression error
*/
export declare class ExpressionError extends ExecutionBaseError {
constructor(message: string, options?: ExpressionErrorOptions);
}
//# sourceMappingURL=expression.error.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"expression.error.d.ts","sourceRoot":"","sources":["../../../src/errors/expression.error.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,WAAW,sBAAsB;IACtC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EACF,mBAAmB,GACnB,wBAAwB,GACxB,qBAAqB,GACrB,UAAU,GACV,0BAA0B,GAC1B,qBAAqB,GACrB,8BAA8B,GAC9B,2BAA2B,GAC3B,gCAAgC,CAAC;CACpC;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,kBAAkB;gBAC1C,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB;CA+B7D"}

View File

@@ -0,0 +1,48 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./abstract/execution-base.error"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExpressionError = void 0;
const execution_base_error_1 = require("./abstract/execution-base.error");
/**
* Class for instantiating an expression error
*/
class ExpressionError extends execution_base_error_1.ExecutionBaseError {
constructor(message, options) {
super(message, { cause: options?.cause, level: 'warning' });
if (options?.description !== undefined) {
this.description = options.description;
}
const allowedKeys = [
'causeDetailed',
'descriptionTemplate',
'descriptionKey',
'itemIndex',
'messageTemplate',
'nodeCause',
'parameter',
'runIndex',
'type',
];
if (options !== undefined) {
if (options.functionality !== undefined) {
this.functionality = options.functionality;
}
Object.keys(options).forEach((key) => {
if (allowedKeys.includes(key)) {
this.context[key] = options[key];
}
});
}
}
}
exports.ExpressionError = ExpressionError;
});
//# sourceMappingURL=expression.error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"expression.error.js","sourceRoot":"","sources":["../../../src/errors/expression.error.ts"],"names":[],"mappings":";;;;;;;;;;;;IACA,0EAAqE;IA0BrE;;OAEG;IACH,MAAa,eAAgB,SAAQ,yCAAkB;QACtD,YAAY,OAAe,EAAE,OAAgC;YAC5D,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YAE5D,IAAI,OAAO,EAAE,WAAW,KAAK,SAAS,EAAE,CAAC;gBACxC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;YACxC,CAAC;YAED,MAAM,WAAW,GAAG;gBACnB,eAAe;gBACf,qBAAqB;gBACrB,gBAAgB;gBAChB,WAAW;gBACX,iBAAiB;gBACjB,WAAW;gBACX,WAAW;gBACX,UAAU;gBACV,MAAM;aACN,CAAC;YAEF,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC3B,IAAI,OAAO,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;oBACzC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;gBAC5C,CAAC;gBAED,MAAM,CAAC,IAAI,CAAC,OAAsB,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;oBACnD,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;wBAC/B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAI,OAAuB,CAAC,GAAG,CAAC,CAAC;oBACnD,CAAC;gBACF,CAAC,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;KACD;IAhCD,0CAgCC"}

24
node_modules/n8n-workflow/dist/cjs/errors/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,24 @@
export { BaseError, type BaseErrorOptions } from './base/base.error';
export { OperationalError, type OperationalErrorOptions } from './base/operational.error';
export { UnexpectedError, type UnexpectedErrorOptions } from './base/unexpected.error';
export { UserError, type UserErrorOptions } from './base/user.error';
export { ApplicationError } from '@n8n/errors';
export { ExpressionError } from './expression.error';
export { ExecutionCancelledError, ManualExecutionCancelledError, SystemShutdownExecutionCancelledError, TimeoutExecutionCancelledError, } from './execution-cancelled.error';
export { NodeApiError } from './node-api.error';
export { NodeOperationError } from './node-operation.error';
export { WorkflowConfigurationError } from './workflow-configuration.error';
export { NodeSslError } from './node-ssl.error';
export { WebhookPathTakenError } from './webhook-taken.error';
export { WorkflowActivationError } from './workflow-activation.error';
export { WorkflowDeactivationError } from './workflow-deactivation.error';
export { WorkflowOperationError } from './workflow-operation.error';
export { SubworkflowOperationError } from './subworkflow-operation.error';
export { CliWorkflowOperationError } from './cli-subworkflow-operation.error';
export { TriggerCloseError } from './trigger-close.error';
export { NodeError } from './abstract/node.error';
export { ExecutionBaseError } from './abstract/execution-base.error';
export { ExpressionExtensionError } from './expression-extension.error';
export { DbConnectionTimeoutError } from './db-connection-timeout-error';
export { ensureError } from './ensure-error';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACN,uBAAuB,EACvB,6BAA6B,EAC7B,qCAAqC,EACrC,8BAA8B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}

63
node_modules/n8n-workflow/dist/cjs/errors/index.js generated vendored Normal file
View File

@@ -0,0 +1,63 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./base/base.error", "./base/operational.error", "./base/unexpected.error", "./base/user.error", "@n8n/errors", "./expression.error", "./execution-cancelled.error", "./node-api.error", "./node-operation.error", "./workflow-configuration.error", "./node-ssl.error", "./webhook-taken.error", "./workflow-activation.error", "./workflow-deactivation.error", "./workflow-operation.error", "./subworkflow-operation.error", "./cli-subworkflow-operation.error", "./trigger-close.error", "./abstract/node.error", "./abstract/execution-base.error", "./expression-extension.error", "./db-connection-timeout-error", "./ensure-error"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ensureError = exports.DbConnectionTimeoutError = exports.ExpressionExtensionError = exports.ExecutionBaseError = exports.NodeError = exports.TriggerCloseError = exports.CliWorkflowOperationError = exports.SubworkflowOperationError = exports.WorkflowOperationError = exports.WorkflowDeactivationError = exports.WorkflowActivationError = exports.WebhookPathTakenError = exports.NodeSslError = exports.WorkflowConfigurationError = exports.NodeOperationError = exports.NodeApiError = exports.TimeoutExecutionCancelledError = exports.SystemShutdownExecutionCancelledError = exports.ManualExecutionCancelledError = exports.ExecutionCancelledError = exports.ExpressionError = exports.ApplicationError = exports.UserError = exports.UnexpectedError = exports.OperationalError = exports.BaseError = void 0;
var base_error_1 = require("./base/base.error");
Object.defineProperty(exports, "BaseError", { enumerable: true, get: function () { return base_error_1.BaseError; } });
var operational_error_1 = require("./base/operational.error");
Object.defineProperty(exports, "OperationalError", { enumerable: true, get: function () { return operational_error_1.OperationalError; } });
var unexpected_error_1 = require("./base/unexpected.error");
Object.defineProperty(exports, "UnexpectedError", { enumerable: true, get: function () { return unexpected_error_1.UnexpectedError; } });
var user_error_1 = require("./base/user.error");
Object.defineProperty(exports, "UserError", { enumerable: true, get: function () { return user_error_1.UserError; } });
var errors_1 = require("@n8n/errors");
Object.defineProperty(exports, "ApplicationError", { enumerable: true, get: function () { return errors_1.ApplicationError; } });
var expression_error_1 = require("./expression.error");
Object.defineProperty(exports, "ExpressionError", { enumerable: true, get: function () { return expression_error_1.ExpressionError; } });
var execution_cancelled_error_1 = require("./execution-cancelled.error");
Object.defineProperty(exports, "ExecutionCancelledError", { enumerable: true, get: function () { return execution_cancelled_error_1.ExecutionCancelledError; } });
Object.defineProperty(exports, "ManualExecutionCancelledError", { enumerable: true, get: function () { return execution_cancelled_error_1.ManualExecutionCancelledError; } });
Object.defineProperty(exports, "SystemShutdownExecutionCancelledError", { enumerable: true, get: function () { return execution_cancelled_error_1.SystemShutdownExecutionCancelledError; } });
Object.defineProperty(exports, "TimeoutExecutionCancelledError", { enumerable: true, get: function () { return execution_cancelled_error_1.TimeoutExecutionCancelledError; } });
var node_api_error_1 = require("./node-api.error");
Object.defineProperty(exports, "NodeApiError", { enumerable: true, get: function () { return node_api_error_1.NodeApiError; } });
var node_operation_error_1 = require("./node-operation.error");
Object.defineProperty(exports, "NodeOperationError", { enumerable: true, get: function () { return node_operation_error_1.NodeOperationError; } });
var workflow_configuration_error_1 = require("./workflow-configuration.error");
Object.defineProperty(exports, "WorkflowConfigurationError", { enumerable: true, get: function () { return workflow_configuration_error_1.WorkflowConfigurationError; } });
var node_ssl_error_1 = require("./node-ssl.error");
Object.defineProperty(exports, "NodeSslError", { enumerable: true, get: function () { return node_ssl_error_1.NodeSslError; } });
var webhook_taken_error_1 = require("./webhook-taken.error");
Object.defineProperty(exports, "WebhookPathTakenError", { enumerable: true, get: function () { return webhook_taken_error_1.WebhookPathTakenError; } });
var workflow_activation_error_1 = require("./workflow-activation.error");
Object.defineProperty(exports, "WorkflowActivationError", { enumerable: true, get: function () { return workflow_activation_error_1.WorkflowActivationError; } });
var workflow_deactivation_error_1 = require("./workflow-deactivation.error");
Object.defineProperty(exports, "WorkflowDeactivationError", { enumerable: true, get: function () { return workflow_deactivation_error_1.WorkflowDeactivationError; } });
var workflow_operation_error_1 = require("./workflow-operation.error");
Object.defineProperty(exports, "WorkflowOperationError", { enumerable: true, get: function () { return workflow_operation_error_1.WorkflowOperationError; } });
var subworkflow_operation_error_1 = require("./subworkflow-operation.error");
Object.defineProperty(exports, "SubworkflowOperationError", { enumerable: true, get: function () { return subworkflow_operation_error_1.SubworkflowOperationError; } });
var cli_subworkflow_operation_error_1 = require("./cli-subworkflow-operation.error");
Object.defineProperty(exports, "CliWorkflowOperationError", { enumerable: true, get: function () { return cli_subworkflow_operation_error_1.CliWorkflowOperationError; } });
var trigger_close_error_1 = require("./trigger-close.error");
Object.defineProperty(exports, "TriggerCloseError", { enumerable: true, get: function () { return trigger_close_error_1.TriggerCloseError; } });
var node_error_1 = require("./abstract/node.error");
Object.defineProperty(exports, "NodeError", { enumerable: true, get: function () { return node_error_1.NodeError; } });
var execution_base_error_1 = require("./abstract/execution-base.error");
Object.defineProperty(exports, "ExecutionBaseError", { enumerable: true, get: function () { return execution_base_error_1.ExecutionBaseError; } });
var expression_extension_error_1 = require("./expression-extension.error");
Object.defineProperty(exports, "ExpressionExtensionError", { enumerable: true, get: function () { return expression_extension_error_1.ExpressionExtensionError; } });
var db_connection_timeout_error_1 = require("./db-connection-timeout-error");
Object.defineProperty(exports, "DbConnectionTimeoutError", { enumerable: true, get: function () { return db_connection_timeout_error_1.DbConnectionTimeoutError; } });
var ensure_error_1 = require("./ensure-error");
Object.defineProperty(exports, "ensureError", { enumerable: true, get: function () { return ensure_error_1.ensureError; } });
});
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,gDAAqE;IAA5D,uGAAA,SAAS,OAAA;IAClB,8DAA0F;IAAjF,qHAAA,gBAAgB,OAAA;IACzB,4DAAuF;IAA9E,mHAAA,eAAe,OAAA;IACxB,gDAAqE;IAA5D,uGAAA,SAAS,OAAA;IAClB,sCAA+C;IAAtC,0GAAA,gBAAgB,OAAA;IACzB,uDAAqD;IAA5C,mHAAA,eAAe,OAAA;IACxB,yEAKqC;IAJpC,oIAAA,uBAAuB,OAAA;IACvB,0IAAA,6BAA6B,OAAA;IAC7B,kJAAA,qCAAqC,OAAA;IACrC,2IAAA,8BAA8B,OAAA;IAE/B,mDAAgD;IAAvC,8GAAA,YAAY,OAAA;IACrB,+DAA4D;IAAnD,0HAAA,kBAAkB,OAAA;IAC3B,+EAA4E;IAAnE,0IAAA,0BAA0B,OAAA;IACnC,mDAAgD;IAAvC,8GAAA,YAAY,OAAA;IACrB,6DAA8D;IAArD,4HAAA,qBAAqB,OAAA;IAC9B,yEAAsE;IAA7D,oIAAA,uBAAuB,OAAA;IAChC,6EAA0E;IAAjE,wIAAA,yBAAyB,OAAA;IAClC,uEAAoE;IAA3D,kIAAA,sBAAsB,OAAA;IAC/B,6EAA0E;IAAjE,wIAAA,yBAAyB,OAAA;IAClC,qFAA8E;IAArE,4IAAA,yBAAyB,OAAA;IAClC,6DAA0D;IAAjD,wHAAA,iBAAiB,OAAA;IAE1B,oDAAkD;IAAzC,uGAAA,SAAS,OAAA;IAClB,wEAAqE;IAA5D,0HAAA,kBAAkB,OAAA;IAC3B,2EAAwE;IAA/D,sIAAA,wBAAwB,OAAA;IACjC,6EAAyE;IAAhE,uIAAA,wBAAwB,OAAA;IACjC,+CAA6C;IAApC,2GAAA,WAAW,OAAA"}

View File

@@ -0,0 +1,39 @@
import { NodeError } from './abstract/node.error';
import type { ErrorLevel } from '@n8n/errors';
import type { INode, JsonObject, Functionality, RelatedExecution } from '../interfaces';
export interface NodeOperationErrorOptions {
message?: string;
description?: string;
runIndex?: number;
itemIndex?: number;
level?: ErrorLevel;
messageMapping?: {
[key: string]: string;
};
functionality?: Functionality;
type?: string;
metadata?: {
subExecution?: RelatedExecution;
parentExecution?: RelatedExecution;
};
}
interface NodeApiErrorOptions extends NodeOperationErrorOptions {
message?: string;
httpCode?: string;
parseXml?: boolean;
}
/**
* Class for instantiating an error in an API response, e.g. a 404 Not Found response,
* with an HTTP error code, an error message and a description.
*/
export declare class NodeApiError extends NodeError {
httpCode: string | null;
constructor(node: INode, errorResponse: JsonObject, { message, description, httpCode, parseXml, runIndex, itemIndex, level, functionality, messageMapping, }?: NodeApiErrorOptions);
private setDescriptionFromXml;
/**
* Set the error's message based on the HTTP status code.
*/
private setDefaultStatusCodeMessage;
}
export {};
//# sourceMappingURL=node-api.error.d.ts.map

Some files were not shown because too many files have changed in this diff Show More