@abyss-project/console 1.0.39 → 1.0.41
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/dist/types/constants/index.d.ts +1 -0
- package/dist/types/constants/index.js +1 -0
- package/dist/types/constants/workflow.constants.d.ts +8 -0
- package/dist/types/constants/workflow.constants.js +11 -0
- package/dist/types/interface/models/workflow-trigger.model.d.ts +1 -4
- package/dist/utils/webhook-trigger.utils.js +0 -4
- package/dist/workflow-expressions/functions/string.js +1 -1
- package/dist/workflow-expressions/functions/utility.js +2 -2
- package/dist/workflow-expressions/pipes/string-pipes.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const WORKFLOW_EXECUTION_TIMEOUT: number;
|
|
2
|
+
export declare const WORKFLOW_STEP_TIMEOUT: number;
|
|
3
|
+
export declare const SLEEP_DURATION_MIN = 0;
|
|
4
|
+
export declare const SLEEP_DURATION_MAX = 900;
|
|
5
|
+
export declare const SLEEP_DURATION_DEFAULT = 1;
|
|
6
|
+
export declare const EXPRESSION_TIMEOUT_DEFAULT = 5000;
|
|
7
|
+
export declare const EXPRESSION_TIMEOUT_MAX = 30000;
|
|
8
|
+
export declare const EXPRESSION_MEMORY_LIMIT = 128;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXPRESSION_MEMORY_LIMIT = exports.EXPRESSION_TIMEOUT_MAX = exports.EXPRESSION_TIMEOUT_DEFAULT = exports.SLEEP_DURATION_DEFAULT = exports.SLEEP_DURATION_MAX = exports.SLEEP_DURATION_MIN = exports.WORKFLOW_STEP_TIMEOUT = exports.WORKFLOW_EXECUTION_TIMEOUT = void 0;
|
|
4
|
+
exports.WORKFLOW_EXECUTION_TIMEOUT = 60 * 60 * 1000;
|
|
5
|
+
exports.WORKFLOW_STEP_TIMEOUT = 15 * 60 * 1000;
|
|
6
|
+
exports.SLEEP_DURATION_MIN = 0;
|
|
7
|
+
exports.SLEEP_DURATION_MAX = 900;
|
|
8
|
+
exports.SLEEP_DURATION_DEFAULT = 1;
|
|
9
|
+
exports.EXPRESSION_TIMEOUT_DEFAULT = 5000;
|
|
10
|
+
exports.EXPRESSION_TIMEOUT_MAX = 30000;
|
|
11
|
+
exports.EXPRESSION_MEMORY_LIMIT = 128;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { WorkflowTriggerType
|
|
1
|
+
import { WorkflowTriggerType } from '../../enum/workflow.enum';
|
|
2
2
|
import { IWorkflow } from './workflow.model';
|
|
3
3
|
export interface ITriggerFilter {
|
|
4
4
|
expression?: string;
|
|
5
|
-
field?: string;
|
|
6
|
-
operator?: FilterOperator;
|
|
7
|
-
value?: any;
|
|
8
5
|
}
|
|
9
6
|
export interface ITriggerExecutionStats {
|
|
10
7
|
total: number;
|
|
@@ -36,10 +36,6 @@ const matchesTriggerFilters = (trigger, triggerData) => {
|
|
|
36
36
|
return false;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
if (filter.field && filter.operator) {
|
|
40
|
-
const value = (0, exports.getNestedValue)(triggerData, filter.field);
|
|
41
|
-
return (0, exports.evaluateFilter)(value, filter.operator, filter.value);
|
|
42
|
-
}
|
|
43
39
|
return true;
|
|
44
40
|
});
|
|
45
41
|
};
|
|
@@ -27,7 +27,7 @@ exports.utilityFunctions = {
|
|
|
27
27
|
},
|
|
28
28
|
],
|
|
29
29
|
returnType: 'any',
|
|
30
|
-
examples: ['{{fn.coalesce(trigger.
|
|
30
|
+
examples: ['{{fn.coalesce(trigger.body.username, "Anonymous")}}'],
|
|
31
31
|
execute: (...args) => {
|
|
32
32
|
for (const arg of args) {
|
|
33
33
|
if (arg !== null && arg !== undefined) {
|
|
@@ -124,7 +124,7 @@ exports.utilityFunctions = {
|
|
|
124
124
|
},
|
|
125
125
|
],
|
|
126
126
|
returnType: 'any',
|
|
127
|
-
examples: ['{{fn.default(trigger.
|
|
127
|
+
examples: ['{{fn.default(trigger.body.username, "Unknown")}}'],
|
|
128
128
|
execute: (value, defaultValue) => {
|
|
129
129
|
if (value === null || value === undefined)
|
|
130
130
|
return defaultValue;
|
|
@@ -7,7 +7,7 @@ exports.stringPipes = {
|
|
|
7
7
|
description: 'Converts to uppercase',
|
|
8
8
|
category: 'string',
|
|
9
9
|
signature: 'upper',
|
|
10
|
-
examples: ['{{trigger.
|
|
10
|
+
examples: ['{{trigger.body.username | upper}}'],
|
|
11
11
|
execute: (value) => String(value).toUpperCase(),
|
|
12
12
|
},
|
|
13
13
|
lower: {
|
|
@@ -23,7 +23,7 @@ exports.stringPipes = {
|
|
|
23
23
|
description: 'Capitalizes the first letter',
|
|
24
24
|
category: 'string',
|
|
25
25
|
signature: 'capitalize',
|
|
26
|
-
examples: ['{{trigger.
|
|
26
|
+
examples: ['{{trigger.body.username | capitalize}}'],
|
|
27
27
|
execute: (value) => {
|
|
28
28
|
const str = String(value);
|
|
29
29
|
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|