@fsai-flow/workflow 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -2
- package/package.json +1 -4
- package/src/lib/Interfaces.ts +33 -0
- package/src/lib/Workflow.ts +4 -0
- package/src/lib/utils.ts +123 -89
- package/dist/README.md +0 -11
- package/dist/package.json +0 -42
- package/dist/src/index.d.ts +0 -21
- package/dist/src/index.js +0 -33
- package/dist/src/index.js.map +0 -1
- package/dist/src/lib/Constants.d.ts +0 -68
- package/dist/src/lib/Constants.js +0 -106
- package/dist/src/lib/Constants.js.map +0 -1
- package/dist/src/lib/DeferredPromise.d.ts +0 -6
- package/dist/src/lib/DeferredPromise.js +0 -11
- package/dist/src/lib/DeferredPromise.js.map +0 -1
- package/dist/src/lib/Expression.d.ts +0 -65
- package/dist/src/lib/Expression.js +0 -215
- package/dist/src/lib/Expression.js.map +0 -1
- package/dist/src/lib/Interfaces.d.ts +0 -1569
- package/dist/src/lib/Interfaces.js +0 -44
- package/dist/src/lib/Interfaces.js.map +0 -1
- package/dist/src/lib/LoggerProxy.d.ts +0 -9
- package/dist/src/lib/LoggerProxy.js +0 -40
- package/dist/src/lib/LoggerProxy.js.map +0 -1
- package/dist/src/lib/MetadataUtils.d.ts +0 -4
- package/dist/src/lib/MetadataUtils.js +0 -27
- package/dist/src/lib/MetadataUtils.js.map +0 -1
- package/dist/src/lib/NodeErrors.d.ts +0 -82
- package/dist/src/lib/NodeErrors.js +0 -289
- package/dist/src/lib/NodeErrors.js.map +0 -1
- package/dist/src/lib/NodeHelpers.d.ts +0 -198
- package/dist/src/lib/NodeHelpers.js +0 -1348
- package/dist/src/lib/NodeHelpers.js.map +0 -1
- package/dist/src/lib/ObservableObject.d.ts +0 -5
- package/dist/src/lib/ObservableObject.js +0 -61
- package/dist/src/lib/ObservableObject.js.map +0 -1
- package/dist/src/lib/RoutingNode.d.ts +0 -18
- package/dist/src/lib/RoutingNode.js +0 -508
- package/dist/src/lib/RoutingNode.js.map +0 -1
- package/dist/src/lib/TelemetryHelpers.d.ts +0 -3
- package/dist/src/lib/TelemetryHelpers.js +0 -69
- package/dist/src/lib/TelemetryHelpers.js.map +0 -1
- package/dist/src/lib/TypeValidation.d.ts +0 -21
- package/dist/src/lib/TypeValidation.js +0 -385
- package/dist/src/lib/TypeValidation.js.map +0 -1
- package/dist/src/lib/VersionedNodeType.d.ts +0 -9
- package/dist/src/lib/VersionedNodeType.js +0 -26
- package/dist/src/lib/VersionedNodeType.js.map +0 -1
- package/dist/src/lib/Workflow.d.ts +0 -248
- package/dist/src/lib/Workflow.js +0 -901
- package/dist/src/lib/Workflow.js.map +0 -1
- package/dist/src/lib/WorkflowDataProxy.d.ts +0 -87
- package/dist/src/lib/WorkflowDataProxy.js +0 -556
- package/dist/src/lib/WorkflowDataProxy.js.map +0 -1
- package/dist/src/lib/WorkflowErrors.d.ts +0 -9
- package/dist/src/lib/WorkflowErrors.js +0 -18
- package/dist/src/lib/WorkflowErrors.js.map +0 -1
- package/dist/src/lib/WorkflowHooks.d.ts +0 -11
- package/dist/src/lib/WorkflowHooks.js +0 -34
- package/dist/src/lib/WorkflowHooks.js.map +0 -1
- package/dist/src/lib/errors/base/base.error.d.ts +0 -30
- package/dist/src/lib/errors/base/base.error.js +0 -45
- package/dist/src/lib/errors/base/base.error.js.map +0 -1
- package/dist/src/lib/errors/base/operational.error.d.ts +0 -15
- package/dist/src/lib/errors/base/operational.error.js +0 -19
- package/dist/src/lib/errors/base/operational.error.js.map +0 -1
- package/dist/src/lib/errors/error.types.d.ts +0 -11
- package/dist/src/lib/errors/error.types.js +0 -3
- package/dist/src/lib/errors/error.types.js.map +0 -1
- package/dist/src/lib/errors/index.d.ts +0 -1
- package/dist/src/lib/errors/index.js +0 -6
- package/dist/src/lib/errors/index.js.map +0 -1
- package/dist/src/lib/result.d.ts +0 -19
- package/dist/src/lib/result.js +0 -36
- package/dist/src/lib/result.js.map +0 -1
- package/dist/src/lib/utils.d.ts +0 -50
- package/dist/src/lib/utils.js +0 -110
- package/dist/src/lib/utils.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
# workflow
|
|
1
|
+
# @fsai-flow/workflow
|
|
2
2
|
|
|
3
|
-
This library
|
|
3
|
+
This library is a dependency for [FSAI-Flow](https://github.com/your-org/flowx) that contains workflow-related base classes and types used throughout the application.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
This project is published to the npm registry. To use it in your project:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @fsai-flow/workflow
|
|
11
|
+
```
|
|
4
12
|
|
|
5
13
|
## Building
|
|
6
14
|
|
|
@@ -9,3 +17,15 @@ Run `nx build workflow` to build the library.
|
|
|
9
17
|
## Running unit tests
|
|
10
18
|
|
|
11
19
|
Run `nx test workflow` to execute the unit tests via [Jest](https://jestjs.io).
|
|
20
|
+
|
|
21
|
+
## Contributing
|
|
22
|
+
|
|
23
|
+
To contribute to this project:
|
|
24
|
+
|
|
25
|
+
1. Clone this repository
|
|
26
|
+
2. Make your changes
|
|
27
|
+
3. Open a Pull Request
|
|
28
|
+
|
|
29
|
+
## Publishing
|
|
30
|
+
|
|
31
|
+
Maintainers can publish a new version to the npm package registry.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fsai-flow/workflow",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "PolyForm Noncommercial License 1.0.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"form-data": "^4.0.1",
|
|
@@ -16,9 +16,6 @@
|
|
|
16
16
|
"callsites": "^3.1.0",
|
|
17
17
|
"xml2js": "^0.6.2"
|
|
18
18
|
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"release": "npm build && npm publish --access public"
|
|
21
|
-
},
|
|
22
19
|
"devDependencies": {
|
|
23
20
|
"@types/express": "^5.0.0",
|
|
24
21
|
"@types/jmespath": "^0.15.2",
|
package/src/lib/Interfaces.ts
CHANGED
|
@@ -1041,6 +1041,7 @@ export interface IWebhookFunctions {
|
|
|
1041
1041
|
node?: INode,
|
|
1042
1042
|
): { outputExecutionData: IRunExecutionData };
|
|
1043
1043
|
logAiEvent(event: AiEvent, data?: string): void;
|
|
1044
|
+
|
|
1044
1045
|
}
|
|
1045
1046
|
|
|
1046
1047
|
export interface INodeCredentialsDetails {
|
|
@@ -2227,3 +2228,35 @@ export type AiEvent =
|
|
|
2227
2228
|
| 'ai-llm-errored'
|
|
2228
2229
|
| 'ai-vector-store-populated'
|
|
2229
2230
|
| 'ai-vector-store-updated';
|
|
2231
|
+
|
|
2232
|
+
export type SetNodeOptions = {
|
|
2233
|
+
dotNotation?: boolean;
|
|
2234
|
+
ignoreConversionErrors?: boolean;
|
|
2235
|
+
include?: IncludeMods;
|
|
2236
|
+
includeBinary?: boolean;
|
|
2237
|
+
};
|
|
2238
|
+
|
|
2239
|
+
export type SetField = {
|
|
2240
|
+
name: string;
|
|
2241
|
+
type: 'stringValue' | 'numberValue' | 'booleanValue' | 'arrayValue' | 'objectValue';
|
|
2242
|
+
stringValue?: string;
|
|
2243
|
+
numberValue?: number;
|
|
2244
|
+
booleanValue?: boolean;
|
|
2245
|
+
arrayValue?: string[] | string | IDataObject | IDataObject[];
|
|
2246
|
+
objectValue?: string | IDataObject;
|
|
2247
|
+
};
|
|
2248
|
+
|
|
2249
|
+
export type AssignmentSetField = {
|
|
2250
|
+
name: string;
|
|
2251
|
+
value: unknown;
|
|
2252
|
+
type: string;
|
|
2253
|
+
};
|
|
2254
|
+
|
|
2255
|
+
export const INCLUDE = {
|
|
2256
|
+
ALL: 'all',
|
|
2257
|
+
NONE: 'none',
|
|
2258
|
+
SELECTED: 'selected',
|
|
2259
|
+
EXCEPT: 'except',
|
|
2260
|
+
} as const;
|
|
2261
|
+
|
|
2262
|
+
export type IncludeMods = (typeof INCLUDE)[keyof typeof INCLUDE];
|
package/src/lib/Workflow.ts
CHANGED
|
@@ -155,6 +155,10 @@ export class Workflow {
|
|
|
155
155
|
continue;
|
|
156
156
|
}
|
|
157
157
|
for (connectionInfo of connections[sourceNode][type][inputIndex]) {
|
|
158
|
+
if (connectionInfo.node === '__proto__' || connectionInfo.node === 'constructor' || connectionInfo.node === 'prototype') {
|
|
159
|
+
throw new Error('Prototype-polluting assignment detected');
|
|
160
|
+
}
|
|
161
|
+
|
|
158
162
|
if (!returnConnection.hasOwnProperty(connectionInfo.node)) {
|
|
159
163
|
returnConnection[connectionInfo.node] = {};
|
|
160
164
|
}
|
package/src/lib/utils.ts
CHANGED
|
@@ -1,112 +1,141 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from
|
|
7
|
-
import type { IDisplayOptions, INodeProperties } from
|
|
8
|
-
import { merge } from
|
|
2
|
+
parse as esprimaParse,
|
|
3
|
+
Syntax,
|
|
4
|
+
type Node as SyntaxNode,
|
|
5
|
+
type ExpressionStatement,
|
|
6
|
+
} from "esprima-next";
|
|
7
|
+
import type { IDisplayOptions, INodeProperties } from "./Interfaces";
|
|
8
|
+
import { merge } from "lodash";
|
|
9
9
|
|
|
10
10
|
export function updateDisplayOptions(
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
displayOptions: IDisplayOptions,
|
|
12
|
+
properties: INodeProperties[]
|
|
13
13
|
) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
return properties.map((nodeProperty) => {
|
|
15
|
+
return {
|
|
16
|
+
...nodeProperty,
|
|
17
|
+
displayOptions: merge({}, nodeProperty.displayOptions, displayOptions),
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
20
|
}
|
|
21
21
|
export function randomInt(max: number): number;
|
|
22
22
|
export function randomInt(min: number, max: number): number;
|
|
23
23
|
/**
|
|
24
|
-
* Generates a random integer within a specified range.
|
|
24
|
+
* Generates a cryptographically secure random integer within a specified range.
|
|
25
25
|
*
|
|
26
|
-
* @param {number} min - The
|
|
27
|
-
* @param {number} [max] - The upper bound
|
|
28
|
-
* @returns {number} A random integer within
|
|
26
|
+
* @param {number} min - The inclusive lower bound.
|
|
27
|
+
* @param {number} [max] - The exclusive upper bound. If not provided, min is treated as max and lower bound is 0.
|
|
28
|
+
* @returns {number} A random integer within [min, max).
|
|
29
29
|
*/
|
|
30
30
|
export function randomInt(min: number, max?: number): number {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
if (max === undefined) {
|
|
32
|
+
max = min;
|
|
33
|
+
min = 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (max <= min) {
|
|
37
|
+
throw new Error("max must be greater than min");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const range = max - min;
|
|
41
|
+
const maxUnbiased = Math.floor(0xffffffff / range) * range;
|
|
42
|
+
|
|
43
|
+
let rand: number;
|
|
44
|
+
do {
|
|
45
|
+
rand = crypto.getRandomValues(new Uint32Array(1))[0];
|
|
46
|
+
} while (rand >= maxUnbiased);
|
|
47
|
+
|
|
48
|
+
return min + (rand % range);
|
|
36
49
|
}
|
|
37
50
|
type MutuallyExclusive<T, U> =
|
|
38
|
-
|
|
39
|
-
|
|
51
|
+
| (T & { [k in Exclude<keyof U, keyof T>]?: never })
|
|
52
|
+
| (U & { [k in Exclude<keyof T, keyof U>]?: never });
|
|
40
53
|
|
|
41
54
|
type JSONParseOptions<T> = { acceptJSObject?: boolean } & MutuallyExclusive<
|
|
42
|
-
|
|
43
|
-
|
|
55
|
+
{ errorMessage?: string },
|
|
56
|
+
{ fallbackValue?: T }
|
|
44
57
|
>;
|
|
45
58
|
|
|
46
|
-
export const jsonParse = <T>(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
export const jsonParse = <T>(
|
|
60
|
+
jsonString: string,
|
|
61
|
+
options?: JSONParseOptions<T>
|
|
62
|
+
): T => {
|
|
63
|
+
try {
|
|
64
|
+
return JSON.parse(jsonString) as T;
|
|
65
|
+
} catch (error) {
|
|
66
|
+
if (options?.acceptJSObject) {
|
|
67
|
+
try {
|
|
68
|
+
const jsonStringCleaned = parseJSObject(jsonString);
|
|
69
|
+
return jsonStringCleaned as T;
|
|
70
|
+
} catch (e) {
|
|
71
|
+
// Ignore this error and return the original error or the fallback value
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (options?.fallbackValue !== undefined) {
|
|
75
|
+
if (options.fallbackValue instanceof Function) {
|
|
76
|
+
return options.fallbackValue();
|
|
77
|
+
}
|
|
78
|
+
return options.fallbackValue;
|
|
79
|
+
} else if (options?.errorMessage) {
|
|
80
|
+
// TODO REFACTOR: Use ApplicationError from offical @fsai-flow/workflow repo
|
|
81
|
+
throw new Error(options.errorMessage);
|
|
82
|
+
}
|
|
67
83
|
|
|
68
|
-
|
|
69
|
-
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
70
86
|
};
|
|
71
87
|
|
|
72
88
|
type JSONStringifyOptions = {
|
|
73
|
-
|
|
89
|
+
replaceCircularRefs?: boolean;
|
|
74
90
|
};
|
|
75
91
|
|
|
76
|
-
export const replaceCircularReferences = <T>(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
92
|
+
export const replaceCircularReferences = <T>(
|
|
93
|
+
value: T,
|
|
94
|
+
knownObjects = new WeakSet()
|
|
95
|
+
): T => {
|
|
96
|
+
if (typeof value !== "object" || value === null || value instanceof RegExp)
|
|
97
|
+
return value;
|
|
98
|
+
if ("toJSON" in value && typeof value.toJSON === "function")
|
|
99
|
+
return value.toJSON() as T;
|
|
100
|
+
if (knownObjects.has(value)) return "[Circular Reference]" as T;
|
|
101
|
+
knownObjects.add(value);
|
|
102
|
+
const copy = (Array.isArray(value) ? [] : {}) as T;
|
|
103
|
+
for (const key in value) {
|
|
104
|
+
copy[key] = replaceCircularReferences(value[key], knownObjects);
|
|
105
|
+
}
|
|
106
|
+
knownObjects.delete(value);
|
|
107
|
+
return copy;
|
|
87
108
|
};
|
|
88
109
|
|
|
89
|
-
export const jsonStringify = (
|
|
90
|
-
|
|
110
|
+
export const jsonStringify = (
|
|
111
|
+
obj: unknown,
|
|
112
|
+
options: JSONStringifyOptions = {}
|
|
113
|
+
): string => {
|
|
114
|
+
return JSON.stringify(
|
|
115
|
+
options?.replaceCircularRefs ? replaceCircularReferences(obj) : obj
|
|
116
|
+
);
|
|
91
117
|
};
|
|
92
118
|
|
|
93
119
|
function syntaxNodeToValue(expression?: SyntaxNode | null): unknown {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
120
|
+
switch (expression?.type) {
|
|
121
|
+
case Syntax.ObjectExpression:
|
|
122
|
+
return Object.fromEntries(
|
|
123
|
+
expression.properties
|
|
124
|
+
.filter((prop) => prop.type === Syntax.Property)
|
|
125
|
+
.map(({ key, value }) => [
|
|
126
|
+
syntaxNodeToValue(key),
|
|
127
|
+
syntaxNodeToValue(value),
|
|
128
|
+
])
|
|
129
|
+
);
|
|
130
|
+
case Syntax.Identifier:
|
|
131
|
+
return expression.name;
|
|
132
|
+
case Syntax.Literal:
|
|
133
|
+
return expression.value;
|
|
134
|
+
case Syntax.ArrayExpression:
|
|
135
|
+
return expression.elements.map((exp) => syntaxNodeToValue(exp));
|
|
136
|
+
default:
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
110
139
|
}
|
|
111
140
|
|
|
112
141
|
/**
|
|
@@ -115,18 +144,23 @@ function syntaxNodeToValue(expression?: SyntaxNode | null): unknown {
|
|
|
115
144
|
* - unquoted keys
|
|
116
145
|
*/
|
|
117
146
|
function parseJSObject(objectAsString: string): object {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
147
|
+
const jsExpression = esprimaParse(`(${objectAsString})`).body.find(
|
|
148
|
+
(node): node is ExpressionStatement =>
|
|
149
|
+
node.type === Syntax.ExpressionStatement &&
|
|
150
|
+
node.expression.type === Syntax.ObjectExpression
|
|
151
|
+
);
|
|
122
152
|
|
|
123
|
-
|
|
153
|
+
return syntaxNodeToValue(jsExpression?.expression) as object;
|
|
124
154
|
}
|
|
125
155
|
|
|
126
156
|
/**
|
|
127
157
|
* Checks if a value is an object with a specific key and provides a type guard for the key.
|
|
128
158
|
*/
|
|
129
|
-
export function hasKey<T extends PropertyKey>(
|
|
130
|
-
|
|
159
|
+
export function hasKey<T extends PropertyKey>(
|
|
160
|
+
value: unknown,
|
|
161
|
+
key: T
|
|
162
|
+
): value is Record<T, unknown> {
|
|
163
|
+
return (
|
|
164
|
+
value !== null && typeof value === "object" && value.hasOwnProperty(key)
|
|
165
|
+
);
|
|
131
166
|
}
|
|
132
|
-
|
package/dist/README.md
DELETED
package/dist/package.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fsai-flow/workflow",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"license": "PolyForm Noncommercial License 1.0.0",
|
|
5
|
-
"dependencies": {
|
|
6
|
-
"form-data": "^4.0.1",
|
|
7
|
-
"jmespath": "^0.16.0",
|
|
8
|
-
"esprima-next": "5.8.4",
|
|
9
|
-
"lodash.get": "^4.4.2",
|
|
10
|
-
"lodash.isequal": "^4.5.0",
|
|
11
|
-
"lodash.merge": "^4.6.2",
|
|
12
|
-
"luxon": "^3.5.0",
|
|
13
|
-
"riot-tmpl": "^3.0.8",
|
|
14
|
-
"tslib": "^2.3.0",
|
|
15
|
-
"@sentry/node": "^9.15.0",
|
|
16
|
-
"callsites": "^3.1.0",
|
|
17
|
-
"xml2js": "^0.6.2"
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"release": "npm build && npm publish --access public"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"@types/express": "^5.0.0",
|
|
24
|
-
"@types/jmespath": "^0.15.2",
|
|
25
|
-
"@types/lodash": "^4.17.13",
|
|
26
|
-
"@types/lodash.get": "^4.4.9",
|
|
27
|
-
"@types/lodash.isequal": "^4.5.8",
|
|
28
|
-
"@types/lodash.merge": "^4.6.9",
|
|
29
|
-
"@types/luxon": "^3.4.2",
|
|
30
|
-
"@types/xml2js": "^0.4.14",
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "^8.18.0",
|
|
32
|
-
"@typescript-eslint/parser": "^8.18.0",
|
|
33
|
-
"eslint": "^9.15.0",
|
|
34
|
-
"eslint-friendly-formatter": "^4.0.1",
|
|
35
|
-
"jsonc-eslint-parser": "^2.4.0"
|
|
36
|
-
},
|
|
37
|
-
"type": "commonjs",
|
|
38
|
-
"main": "./dist/src/index.js",
|
|
39
|
-
"typings": "./dist/src/index.d.ts",
|
|
40
|
-
"private": true,
|
|
41
|
-
"types": "./src/index.d.ts"
|
|
42
|
-
}
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as LoggerProxy from './lib/LoggerProxy';
|
|
2
|
-
import * as NodeHelpers from './lib/NodeHelpers';
|
|
3
|
-
import * as ObservableObject from './lib/ObservableObject';
|
|
4
|
-
export * from './lib/MetadataUtils';
|
|
5
|
-
export * from './lib/errors';
|
|
6
|
-
export * from './lib/DeferredPromise';
|
|
7
|
-
export * from './lib/Interfaces';
|
|
8
|
-
export * from './lib/Expression';
|
|
9
|
-
export * from './lib/NodeErrors';
|
|
10
|
-
export * from './lib/Constants';
|
|
11
|
-
export * from './lib/NodeHelpers';
|
|
12
|
-
export * as TelemetryHelpers from './lib/TelemetryHelpers';
|
|
13
|
-
export * from './lib/RoutingNode';
|
|
14
|
-
export * from './lib/Workflow';
|
|
15
|
-
export * from './lib/TypeValidation';
|
|
16
|
-
export * from './lib/WorkflowDataProxy';
|
|
17
|
-
export * from './lib/WorkflowErrors';
|
|
18
|
-
export * from './lib/WorkflowHooks';
|
|
19
|
-
export * from './lib/result';
|
|
20
|
-
export { LoggerProxy, NodeHelpers, ObservableObject };
|
|
21
|
-
export { updateDisplayOptions, randomInt, jsonParse, jsonStringify, replaceCircularReferences, } from './lib/utils';
|
package/dist/src/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceCircularReferences = exports.jsonStringify = exports.jsonParse = exports.randomInt = exports.updateDisplayOptions = exports.ObservableObject = exports.NodeHelpers = exports.LoggerProxy = exports.TelemetryHelpers = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const LoggerProxy = tslib_1.__importStar(require("./lib/LoggerProxy"));
|
|
6
|
-
exports.LoggerProxy = LoggerProxy;
|
|
7
|
-
const NodeHelpers = tslib_1.__importStar(require("./lib/NodeHelpers"));
|
|
8
|
-
exports.NodeHelpers = NodeHelpers;
|
|
9
|
-
const ObservableObject = tslib_1.__importStar(require("./lib/ObservableObject"));
|
|
10
|
-
exports.ObservableObject = ObservableObject;
|
|
11
|
-
tslib_1.__exportStar(require("./lib/MetadataUtils"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./lib/errors"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./lib/DeferredPromise"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./lib/Interfaces"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./lib/Expression"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./lib/NodeErrors"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./lib/Constants"), exports);
|
|
18
|
-
tslib_1.__exportStar(require("./lib/NodeHelpers"), exports);
|
|
19
|
-
exports.TelemetryHelpers = tslib_1.__importStar(require("./lib/TelemetryHelpers"));
|
|
20
|
-
tslib_1.__exportStar(require("./lib/RoutingNode"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("./lib/Workflow"), exports);
|
|
22
|
-
tslib_1.__exportStar(require("./lib/TypeValidation"), exports);
|
|
23
|
-
tslib_1.__exportStar(require("./lib/WorkflowDataProxy"), exports);
|
|
24
|
-
tslib_1.__exportStar(require("./lib/WorkflowErrors"), exports);
|
|
25
|
-
tslib_1.__exportStar(require("./lib/WorkflowHooks"), exports);
|
|
26
|
-
tslib_1.__exportStar(require("./lib/result"), exports);
|
|
27
|
-
var utils_1 = require("./lib/utils");
|
|
28
|
-
Object.defineProperty(exports, "updateDisplayOptions", { enumerable: true, get: function () { return utils_1.updateDisplayOptions; } });
|
|
29
|
-
Object.defineProperty(exports, "randomInt", { enumerable: true, get: function () { return utils_1.randomInt; } });
|
|
30
|
-
Object.defineProperty(exports, "jsonParse", { enumerable: true, get: function () { return utils_1.jsonParse; } });
|
|
31
|
-
Object.defineProperty(exports, "jsonStringify", { enumerable: true, get: function () { return utils_1.jsonStringify; } });
|
|
32
|
-
Object.defineProperty(exports, "replaceCircularReferences", { enumerable: true, get: function () { return utils_1.replaceCircularReferences; } });
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,uEAAiD;AAsB7C,kCAAW;AArBf,uEAAiD;AAsB7C,kCAAW;AArBf,iFAA2D;AAsBvD,4CAAgB;AApBpB,8DAAoC;AAEpC,uDAA4B;AAC5B,gEAAsC;AACtC,2DAAiC;AACjC,2DAAiC;AACjC,2DAAiC;AACjC,0DAAgC;AAChC,4DAAkC;AAClC,mFAA2D;AAC3D,4DAAkC;AAClC,yDAA+B;AAC/B,+DAAqC;AACrC,kEAAwC;AACxC,+DAAqC;AACrC,8DAAoC;AACpC,uDAA6B;AAM7B,qCAMqB;AALjB,6GAAA,oBAAoB,OAAA;AACpB,kGAAA,SAAS,OAAA;AACT,kGAAA,SAAS,OAAA;AACT,sGAAA,aAAa,OAAA;AACb,kHAAA,yBAAyB,OAAA"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { NodeConnectionType } from "./Interfaces";
|
|
2
|
-
export declare const DIGITS = "0123456789";
|
|
3
|
-
export declare const UPPERCASE_LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
4
|
-
export declare const LOWERCASE_LETTERS: string;
|
|
5
|
-
export declare const ALPHABET: string;
|
|
6
|
-
export declare const BINARY_ENCODING = "base64";
|
|
7
|
-
export declare const WAIT_INDEFINITELY: Date;
|
|
8
|
-
export declare const LOG_LEVELS: readonly ["silent", "error", "warn", "info", "debug"];
|
|
9
|
-
export declare const CODE_LANGUAGES: readonly ["javaScript", "python"];
|
|
10
|
-
export declare const CODE_EXECUTION_MODES: readonly ["runOnceForAllItems", "runOnceForEachItem"];
|
|
11
|
-
export declare const CREDENTIAL_EMPTY_VALUE = "__n8n_EMPTY_VALUE_7b1af746-3729-4c60-9b9b-e08eb29e58da";
|
|
12
|
-
export declare const FORM_TRIGGER_PATH_IDENTIFIER = "n8n-form";
|
|
13
|
-
export declare const UNKNOWN_ERROR_MESSAGE = "There was an unknown issue while executing the node";
|
|
14
|
-
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.";
|
|
15
|
-
export declare const UNKNOWN_ERROR_MESSAGE_CRED = "UNKNOWN ERROR";
|
|
16
|
-
export declare const STICKY_NODE_TYPE = "n8n-nodes-base.stickyNote";
|
|
17
|
-
export declare const NO_OP_NODE_TYPE = "n8n-nodes-base.noOp";
|
|
18
|
-
export declare const HTTP_REQUEST_NODE_TYPE = "n8n-nodes-base.httpRequest";
|
|
19
|
-
export declare const WEBHOOK_NODE_TYPE = "n8n-nodes-base.webhook";
|
|
20
|
-
export declare const MANUAL_TRIGGER_NODE_TYPE = "n8n-nodes-base.manualTrigger";
|
|
21
|
-
export declare const ERROR_TRIGGER_NODE_TYPE = "n8n-nodes-base.errorTrigger";
|
|
22
|
-
export declare const START_NODE_TYPE = "n8n-nodes-base.start";
|
|
23
|
-
export declare const EXECUTE_WORKFLOW_NODE_TYPE = "n8n-nodes-base.executeWorkflow";
|
|
24
|
-
export declare const EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE = "n8n-nodes-base.executeWorkflowTrigger";
|
|
25
|
-
export declare const CODE_NODE_TYPE = "n8n-nodes-base.code";
|
|
26
|
-
export declare const FUNCTION_NODE_TYPE = "n8n-nodes-base.function";
|
|
27
|
-
export declare const FUNCTION_ITEM_NODE_TYPE = "n8n-nodes-base.functionItem";
|
|
28
|
-
export declare const MERGE_NODE_TYPE = "n8n-nodes-base.merge";
|
|
29
|
-
export declare const AI_TRANSFORM_NODE_TYPE = "n8n-nodes-base.aiTransform";
|
|
30
|
-
export declare const FORM_NODE_TYPE = "n8n-nodes-base.form";
|
|
31
|
-
export declare const FORM_TRIGGER_NODE_TYPE = "n8n-nodes-base.formTrigger";
|
|
32
|
-
export declare const CHAT_TRIGGER_NODE_TYPE = "@n8n/n8n-nodes-langchain.chatTrigger";
|
|
33
|
-
export declare const WAIT_NODE_TYPE = "n8n-nodes-base.wait";
|
|
34
|
-
export declare const ConnectionTypeDisplayNames: {
|
|
35
|
-
[key in NodeConnectionType]: string;
|
|
36
|
-
};
|
|
37
|
-
export declare const STARTING_NODE_TYPES: string[];
|
|
38
|
-
export declare const SCRIPTING_NODE_TYPES: string[];
|
|
39
|
-
export declare const ADD_FORM_NOTICE = "addFormPage";
|
|
40
|
-
/**
|
|
41
|
-
* Nodes whose parameter values may refer to other nodes without expressions.
|
|
42
|
-
* Their content may need to be updated when the referenced node is renamed.
|
|
43
|
-
*/
|
|
44
|
-
export declare const NODES_WITH_RENAMABLE_CONTENT: Set<string>;
|
|
45
|
-
export declare const MANUAL_CHAT_TRIGGER_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.manualChatTrigger";
|
|
46
|
-
export declare const AGENT_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.agent";
|
|
47
|
-
export declare const CHAIN_LLM_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.chainLlm";
|
|
48
|
-
export declare const OPENAI_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.openAi";
|
|
49
|
-
export declare const CHAIN_SUMMARIZATION_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.chainSummarization";
|
|
50
|
-
export declare const CODE_TOOL_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.toolCode";
|
|
51
|
-
export declare const WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.toolWorkflow";
|
|
52
|
-
export declare const HTTP_REQUEST_TOOL_LANGCHAIN_NODE_TYPE = "@n8n/n8n-nodes-langchain.toolHttpRequest";
|
|
53
|
-
export declare const LANGCHAIN_CUSTOM_TOOLS: string[];
|
|
54
|
-
export declare const SEND_AND_WAIT_OPERATION = "sendAndWait";
|
|
55
|
-
export declare const AI_TRANSFORM_CODE_GENERATED_FOR_PROMPT = "codeGeneratedForPrompt";
|
|
56
|
-
export declare const AI_TRANSFORM_JS_CODE = "jsCode";
|
|
57
|
-
/**
|
|
58
|
-
* Key for an item standing in for a manual execution data item too large to be
|
|
59
|
-
* sent live via pubsub. See {@link TRIMMED_TASK_DATA_CONNECTIONS} in constants
|
|
60
|
-
* in `cli` package.
|
|
61
|
-
*/
|
|
62
|
-
export declare const TRIMMED_TASK_DATA_CONNECTIONS_KEY = "__isTrimmedManualExecutionDataItem";
|
|
63
|
-
export declare const OPEN_AI_API_CREDENTIAL_TYPE = "openAiApi";
|
|
64
|
-
export declare const FREE_AI_CREDITS_ERROR_TYPE = "free_ai_credits_request_error";
|
|
65
|
-
export declare const FREE_AI_CREDITS_USED_ALL_CREDITS_ERROR_CODE = 400;
|
|
66
|
-
export declare const FROM_AI_AUTO_GENERATED_MARKER = "/*n8n-auto-generated-fromAI-override*/";
|
|
67
|
-
export declare const PROJECT_ROOT = "0";
|
|
68
|
-
export declare const WAITING_FORMS_EXECUTION_STATUS = "n8n-execution-status";
|