@tachybase/module-workflow 0.23.48 → 1.0.6
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/client/NodeContext.d.ts +3 -0
- package/dist/client/features/dynamic-calculation/DynamicCalculation.d.ts +12 -0
- package/dist/client/features/loop/LoopInstruction.d.ts +12 -0
- package/dist/client/features/parallel/ParallelInstruction.d.ts +12 -0
- package/dist/client/features/request/RequestInstruction.d.ts +1 -2
- package/dist/client/features/sql/SQLInstruction.d.ts +12 -0
- package/dist/client/features/variables/VariablesInstruction.d.ts +12 -0
- package/dist/client/index.js +52 -52
- package/dist/client/nodes/calculation.d.ts +12 -0
- package/dist/client/nodes/condition.d.ts +12 -0
- package/dist/client/nodes/default-node/components/AddButton.props.d.ts +3 -0
- package/dist/client/nodes/default-node/components/ViewUploadForm.d.ts +1 -0
- package/dist/client/nodes/default-node/components/ViewUploadForm.schema.d.ts +46 -0
- package/dist/client/nodes/default-node/hooks/useCancelActionProps.d.ts +3 -0
- package/dist/client/nodes/default-node/hooks/useCreateActionProps.d.ts +3 -0
- package/dist/client/nodes/end.d.ts +12 -0
- package/dist/client/nodes/updateOrCreate.d.ts +82 -0
- package/dist/client/variable.d.ts +1 -5
- package/dist/externalVersion.js +15 -15
- package/dist/locale/en-US.json +2 -0
- package/dist/locale/zh-CN.json +13 -0
- package/dist/node_modules/@babel/core/package.json +1 -1
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/form-data/package.json +1 -1
- package/dist/node_modules/jsonata/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/node_modules/mime-types/package.json +1 -1
- package/dist/node_modules/qrcode/package.json +1 -1
- package/dist/server/Plugin.js +27 -15
- package/dist/server/Processor.d.ts +1 -0
- package/dist/server/Processor.js +2 -1
- package/dist/server/features/omni-trigger/CustomActionTrigger.js +17 -6
- package/dist/server/instructions/ConditionInstruction.js +16 -0
- package/dist/server/instructions/UpdateOrCreateInstruction.d.ts +10 -0
- package/dist/server/instructions/UpdateOrCreateInstruction.js +232 -0
- package/package.json +17 -17
- package/dist/server/features/webhook/Plugin.d.ts +0 -4
- package/dist/server/features/webhook/Plugin.js +0 -109
- package/dist/server/features/webhook/index.d.ts +0 -1
- package/dist/server/features/webhook/index.js +0 -27
- package/dist/server/features/webhook/webhooks.d.ts +0 -9
- package/dist/server/features/webhook/webhooks.js +0 -286
|
@@ -57,6 +57,18 @@ export default class extends Instruction {
|
|
|
57
57
|
};
|
|
58
58
|
}[];
|
|
59
59
|
};
|
|
60
|
+
remarks: {
|
|
61
|
+
type: string;
|
|
62
|
+
title: string;
|
|
63
|
+
'x-decorator': string;
|
|
64
|
+
'x-component': string;
|
|
65
|
+
'x-component-props': {
|
|
66
|
+
autoSize: {
|
|
67
|
+
minRows: number;
|
|
68
|
+
};
|
|
69
|
+
placeholder: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
60
72
|
};
|
|
61
73
|
scope: {
|
|
62
74
|
renderEngineReference: (key: string) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -83,6 +83,18 @@ export default class extends Instruction {
|
|
|
83
83
|
};
|
|
84
84
|
required: boolean;
|
|
85
85
|
};
|
|
86
|
+
remarks: {
|
|
87
|
+
type: string;
|
|
88
|
+
title: string;
|
|
89
|
+
'x-decorator': string;
|
|
90
|
+
'x-component': string;
|
|
91
|
+
'x-component-props': {
|
|
92
|
+
autoSize: {
|
|
93
|
+
minRows: number;
|
|
94
|
+
};
|
|
95
|
+
placeholder: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
86
98
|
};
|
|
87
99
|
options: {
|
|
88
100
|
label: string;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { MenuProps } from 'antd';
|
|
2
3
|
import { BuiltinGroupType } from '../interface';
|
|
3
4
|
export declare function useProps(props: any): {
|
|
4
5
|
workflow: any;
|
|
5
6
|
menu: MenuProps;
|
|
7
|
+
isShowUploadModal: boolean;
|
|
8
|
+
setIsShowUploadModal: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
9
|
};
|
|
7
10
|
/** 工作流配置列表 */
|
|
8
11
|
export declare const NodeConfigList: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ViewUploadForm: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const schemaViewUploadForm: {
|
|
2
|
+
type: string;
|
|
3
|
+
'x-decorator': string;
|
|
4
|
+
properties: {
|
|
5
|
+
file: {
|
|
6
|
+
type: string;
|
|
7
|
+
title: string;
|
|
8
|
+
required: boolean;
|
|
9
|
+
'x-decorator': string;
|
|
10
|
+
'x-component': string;
|
|
11
|
+
'x-component-props': {
|
|
12
|
+
action: string;
|
|
13
|
+
multiple: boolean;
|
|
14
|
+
style: {
|
|
15
|
+
marginTop: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
footer: {
|
|
20
|
+
type: string;
|
|
21
|
+
'x-component': string;
|
|
22
|
+
'x-component-props': {
|
|
23
|
+
style: {
|
|
24
|
+
justifyContent: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
properties: {
|
|
28
|
+
cancel: {
|
|
29
|
+
type: string;
|
|
30
|
+
title: string;
|
|
31
|
+
'x-component': string;
|
|
32
|
+
'x-use-component-props': string;
|
|
33
|
+
};
|
|
34
|
+
submit: {
|
|
35
|
+
type: string;
|
|
36
|
+
title: string;
|
|
37
|
+
'x-component': string;
|
|
38
|
+
'x-component-props': {
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
'x-use-component-props': string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -20,6 +20,18 @@ export default class extends Instruction {
|
|
|
20
20
|
required: boolean;
|
|
21
21
|
default: JOB_STATUS;
|
|
22
22
|
};
|
|
23
|
+
remarks: {
|
|
24
|
+
type: string;
|
|
25
|
+
title: string;
|
|
26
|
+
'x-decorator': string;
|
|
27
|
+
'x-component': string;
|
|
28
|
+
'x-component-props': {
|
|
29
|
+
autoSize: {
|
|
30
|
+
minRows: number;
|
|
31
|
+
};
|
|
32
|
+
placeholder: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
23
35
|
};
|
|
24
36
|
end: boolean;
|
|
25
37
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCollectionDataSource } from '@tachybase/client';
|
|
3
|
+
import { FilterDynamicComponent } from '../components/FilterDynamicComponent';
|
|
4
|
+
import { Instruction } from './default-node/interface';
|
|
5
|
+
declare function IndividualHooksRadioWithTooltip({ onChange, ...props }: {
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
onChange: any;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default class extends Instruction {
|
|
10
|
+
title: string;
|
|
11
|
+
type: string;
|
|
12
|
+
group: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
color: string;
|
|
15
|
+
description: string;
|
|
16
|
+
fieldset: {
|
|
17
|
+
collection: {
|
|
18
|
+
'x-reactions': any[];
|
|
19
|
+
type: string;
|
|
20
|
+
title: string;
|
|
21
|
+
required: boolean;
|
|
22
|
+
'x-decorator': string;
|
|
23
|
+
'x-component': string;
|
|
24
|
+
};
|
|
25
|
+
params: {
|
|
26
|
+
type: string;
|
|
27
|
+
properties: {
|
|
28
|
+
individualHooks: {
|
|
29
|
+
type: string;
|
|
30
|
+
title: string;
|
|
31
|
+
'x-decorator': string;
|
|
32
|
+
'x-component': string;
|
|
33
|
+
'x-component-props': {
|
|
34
|
+
options: {
|
|
35
|
+
label: string;
|
|
36
|
+
value: boolean;
|
|
37
|
+
tooltip: string;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
filter: {
|
|
43
|
+
title: string;
|
|
44
|
+
"x-validator"(value: any): string;
|
|
45
|
+
type: string;
|
|
46
|
+
'x-decorator': string;
|
|
47
|
+
'x-component': string;
|
|
48
|
+
'x-use-component-props': () => {
|
|
49
|
+
options: any[];
|
|
50
|
+
className: string;
|
|
51
|
+
};
|
|
52
|
+
'x-component-props': {
|
|
53
|
+
dynamicComponent: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
values: {
|
|
57
|
+
'x-component-props': {
|
|
58
|
+
filter(this: any, field: any): any;
|
|
59
|
+
};
|
|
60
|
+
type: string;
|
|
61
|
+
title: string;
|
|
62
|
+
description: string;
|
|
63
|
+
'x-decorator': string;
|
|
64
|
+
'x-decorator-props': {
|
|
65
|
+
labelAlign: string;
|
|
66
|
+
className: string;
|
|
67
|
+
};
|
|
68
|
+
'x-component': string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
scope: {
|
|
74
|
+
useCollectionDataSource: typeof useCollectionDataSource;
|
|
75
|
+
};
|
|
76
|
+
components: {
|
|
77
|
+
FilterDynamicComponent: typeof FilterDynamicComponent;
|
|
78
|
+
CollectionFieldset: React.MemoExoticComponent<import("@tachybase/schema").ReactFC<Omit<any, "ref">>>;
|
|
79
|
+
IndividualHooksRadioWithTooltip: typeof IndividualHooksRadioWithTooltip;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export {};
|
|
@@ -64,11 +64,7 @@ export declare const BaseTypeSets: {
|
|
|
64
64
|
string: Set<string>;
|
|
65
65
|
date: Set<string>;
|
|
66
66
|
};
|
|
67
|
-
export declare function useWorkflowVariableOptions(options?: UseVariableOptions):
|
|
68
|
-
[x: number]: any;
|
|
69
|
-
key: any;
|
|
70
|
-
disabled: boolean;
|
|
71
|
-
}[];
|
|
67
|
+
export declare function useWorkflowVariableOptions(options?: UseVariableOptions): any[];
|
|
72
68
|
export declare function useWorkflowVariableFormOptions(options?: UseVariableOptions): {
|
|
73
69
|
[x: number]: any;
|
|
74
70
|
key: any;
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"react": "18.3.1",
|
|
3
|
-
"@tachybase/client": "0.
|
|
3
|
+
"@tachybase/client": "1.0.6",
|
|
4
4
|
"@ant-design/icons": "5.3.7",
|
|
5
5
|
"antd": "5.22.5",
|
|
6
6
|
"lodash": "4.17.21",
|
|
7
|
-
"@tachybase/utils": "0.
|
|
7
|
+
"@tachybase/utils": "1.0.6",
|
|
8
8
|
"react-i18next": "15.2.0",
|
|
9
9
|
"react-router-dom": "6.28.1",
|
|
10
|
-
"@tachybase/schema": "0.
|
|
11
|
-
"@tachybase/database": "0.
|
|
12
|
-
"@tachybase/logger": "0.
|
|
13
|
-
"@tachybase/server": "0.
|
|
14
|
-
"@tachybase/evaluators": "0.
|
|
15
|
-
"@tachybase/components": "0.
|
|
16
|
-
"@tachybase/actions": "0.
|
|
17
|
-
"@tachybase/data-source": "0.
|
|
10
|
+
"@tachybase/schema": "1.0.6",
|
|
11
|
+
"@tachybase/database": "1.0.6",
|
|
12
|
+
"@tachybase/logger": "1.0.6",
|
|
13
|
+
"@tachybase/server": "1.0.6",
|
|
14
|
+
"@tachybase/evaluators": "1.0.6",
|
|
15
|
+
"@tachybase/components": "1.0.6",
|
|
16
|
+
"@tachybase/actions": "1.0.6",
|
|
17
|
+
"@tachybase/data-source": "1.0.6",
|
|
18
18
|
"axios": "1.7.7",
|
|
19
19
|
"sequelize": "6.37.5",
|
|
20
|
-
"@tachybase/plugin-workflow-test": "0.
|
|
21
|
-
"@tachybase/test": "0.
|
|
22
|
-
"@tachybase/module-error-handler": "0.
|
|
23
|
-
"@tachybase/resourcer": "0.
|
|
24
|
-
"@tachybase/module-ui-schema": "0.
|
|
20
|
+
"@tachybase/plugin-workflow-test": "1.0.6",
|
|
21
|
+
"@tachybase/test": "1.0.6",
|
|
22
|
+
"@tachybase/module-error-handler": "1.0.6",
|
|
23
|
+
"@tachybase/resourcer": "1.0.6",
|
|
24
|
+
"@tachybase/module-ui-schema": "1.0.6"
|
|
25
25
|
};
|
package/dist/locale/en-US.json
CHANGED
|
@@ -166,6 +166,7 @@
|
|
|
166
166
|
"Initiate Request": "Initiate Request",
|
|
167
167
|
"Initiator": "Initiator",
|
|
168
168
|
"Input body comment": "Input body comment",
|
|
169
|
+
"Input remarks": "Input remarks",
|
|
169
170
|
"Input request data": "Input request data",
|
|
170
171
|
"Insert": "Insert",
|
|
171
172
|
"Interceptor": "Interceptor",
|
|
@@ -225,6 +226,7 @@
|
|
|
225
226
|
"Reject": "Reject",
|
|
226
227
|
"Rejected": "Rejected",
|
|
227
228
|
"Related approvals": "Related approvals",
|
|
229
|
+
"Remarks": "Remarks",
|
|
228
230
|
"Repeat limit": "Repeat limit",
|
|
229
231
|
"Repeat mode": "Repeat mode",
|
|
230
232
|
"Resource": "Resource",
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"Are you sure you want to cancel the execution?": "确定要取消该执行吗?",
|
|
52
52
|
"Are you sure you want to resubmit it?": "是否重新复制一份?",
|
|
53
53
|
"Are you sure you want to withdraw it?": "确定要撤回吗?",
|
|
54
|
+
"Arithmetic calculation": "算数演算",
|
|
54
55
|
"Assign value to a variable, for later use.": "给一个变量赋值以便于后续的使用。",
|
|
55
56
|
"Assign value to an existing variable": "给已有的变量赋值",
|
|
56
57
|
"Assigned": "已分配",
|
|
@@ -172,6 +173,7 @@
|
|
|
172
173
|
"Executed workflow cannot be modified": "已经执行过的工作流不能被修改",
|
|
173
174
|
"Execution ID is required": "执行 ID 是必需的",
|
|
174
175
|
"Execution history": "执行历史",
|
|
176
|
+
"Existence check": "存在性判断",
|
|
175
177
|
"Exit when query result is null": "查询结果为空时,退出流程",
|
|
176
178
|
"Expression": "表达式",
|
|
177
179
|
"Expression syntax error": "表达式语法错误",
|
|
@@ -182,6 +184,7 @@
|
|
|
182
184
|
"False": "假",
|
|
183
185
|
"Field name existed in form": "表单中已有对应标识的字段",
|
|
184
186
|
"Field to aggregate": "聚合字段",
|
|
187
|
+
"File": "文件",
|
|
185
188
|
"Filter settings": "筛选设置",
|
|
186
189
|
"For initiating approvals, or viewing and manipulating initiated approvals.": "用于发起审批,或者查看和操作已发起的审批。",
|
|
187
190
|
"For user actions that require immediate feedback. Can not use asynchronous nodes in such mode, and it is not recommended to perform time-consuming operations under synchronous mode.": "适用于需要即时反馈的用户操作。不能在此模式下使用异步节点,并且不建议在同步模式下执行耗时的操作。",
|
|
@@ -208,6 +211,7 @@
|
|
|
208
211
|
"Initiator": "发起人",
|
|
209
212
|
"Initiator's interface": "发起人的操作界面",
|
|
210
213
|
"Input body comment": "请输入请求的备注",
|
|
214
|
+
"Input remarks": "输入备注",
|
|
211
215
|
"Input request data": "输入请求数据",
|
|
212
216
|
"Insert": "插入",
|
|
213
217
|
"Interceptor": "拦截器",
|
|
@@ -281,6 +285,7 @@
|
|
|
281
285
|
"Rejected": "否决",
|
|
282
286
|
"Rejected from a manual node.": "被人工节点拒绝继续。",
|
|
283
287
|
"Related approvals": "相关审批",
|
|
288
|
+
"Remarks": "备注",
|
|
284
289
|
"Repeat limit": "重复次数",
|
|
285
290
|
"Repeat mode": "重复模式",
|
|
286
291
|
"Resolved": "完成",
|
|
@@ -371,10 +376,13 @@
|
|
|
371
376
|
"Update in a batch": "批量更新",
|
|
372
377
|
"Update mode": "更新模式",
|
|
373
378
|
"Update one by one": "逐条更新",
|
|
379
|
+
"Update or create record": "更新或创建数据",
|
|
380
|
+
"Update or create record, if no matching record is found, a new record will be created, with the ability to assign values to fields using variables from upstream nodes.": "更新或创建数据表中的数据,如果查询没有符合条件时则创建数据,并支持使用上游节点的变量为字段赋值。",
|
|
374
381
|
"Update record": "更新数据",
|
|
375
382
|
"Update record form": "更新数据表单",
|
|
376
383
|
"Update records of a collection. You can use variables from upstream nodes as query conditions and field values.": "更新一个数据表中的数据。可以使用上游节点里的变量作为查询条件和数据值。",
|
|
377
384
|
"Updated at": "更新于",
|
|
385
|
+
"Upload node": "上传节点",
|
|
378
386
|
"Use transaction": "启用事务",
|
|
379
387
|
"Use variable": "使用变量",
|
|
380
388
|
"Used to store expressions for use in workflows so that different expressions can be called for different data.": "用于存储表达式,在工作流中使用,以便针对不同的数据调用不同的表达式。",
|
|
@@ -403,10 +411,15 @@
|
|
|
403
411
|
"Workflow todos": "工作流待办",
|
|
404
412
|
"Workflow will be triggered before deleting succeeded.": "删除成功之前触发工作流。",
|
|
405
413
|
"Workflow will be triggered before or after submitting succeeded based on workflow type.": "工作流会基于其类型在提交成功之前或之后触发。",
|
|
414
|
+
"Workflow will be triggered before or after submitting succeeded.": "工作流会在提交成功之前或之后触发。",
|
|
406
415
|
"Workflow will be triggered directly once the button clicked, without data saving.": "按钮点击后直接触发工作流,但不会保存数据。",
|
|
407
416
|
"comment": "备注",
|
|
408
417
|
"concat": "连接",
|
|
409
418
|
"group-title-count": "类型-名称-使用次数",
|
|
419
|
+
"is empty": "为空",
|
|
420
|
+
"is false": "为假",
|
|
421
|
+
"is not empty": "不为空",
|
|
422
|
+
"is true": "为真",
|
|
410
423
|
"ms": "毫秒",
|
|
411
424
|
"needAuthorization": "是否携带权限校验",
|
|
412
425
|
"workflow loop!": "存在环形调用!"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@babel/core","version":"7.26.0","description":"Babel compiler core.","main":"./lib/index.js","author":"The Babel Team (https://babel.dev/team)","license":"MIT","publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/babel/babel.git","directory":"packages/babel-core"},"homepage":"https://babel.dev/docs/en/next/babel-core","bugs":"https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen","keywords":["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],"engines":{"node":">=6.9.0"},"funding":{"type":"opencollective","url":"https://opencollective.com/babel"},"browser":{"./lib/config/files/index.js":"./lib/config/files/index-browser.js","./lib/config/resolve-targets.js":"./lib/config/resolve-targets-browser.js","./lib/transform-file.js":"./lib/transform-file-browser.js","./src/config/files/index.ts":"./src/config/files/index-browser.ts","./src/config/resolve-targets.ts":"./src/config/resolve-targets-browser.ts","./src/transform-file.ts":"./src/transform-file-browser.ts"},"dependencies":{"@ampproject/remapping":"^2.2.0","@babel/code-frame":"^7.26.0","@babel/generator":"^7.26.0","@babel/helper-compilation-targets":"^7.25.9","@babel/helper-module-transforms":"^7.26.0","@babel/helpers":"^7.26.0","@babel/parser":"^7.26.0","@babel/template":"^7.25.9","@babel/traverse":"^7.25.9","@babel/types":"^7.26.0","convert-source-map":"^2.0.0","debug":"^4.1.0","gensync":"^1.0.0-beta.2","json5":"^2.2.3","semver":"^6.3.1"},"devDependencies":{"@babel/helper-transform-fixture-test-runner":"^7.26.0","@babel/plugin-syntax-flow":"^7.26.0","@babel/plugin-transform-flow-strip-types":"^7.25.9","@babel/plugin-transform-modules-commonjs":"^7.25.9","@babel/preset-env":"^7.26.0","@babel/preset-typescript":"^7.26.0","@jridgewell/trace-mapping":"^0.3.25","@types/convert-source-map":"^2.0.0","@types/debug":"^4.1.0","@types/gensync":"^1.0.0","@types/resolve":"^1.3.2","@types/semver":"^5.4.0","rimraf":"^3.0.0","ts-node":"^11.0.0-beta.1"},"type":"commonjs","_lastModified":"2025-
|
|
1
|
+
{"name":"@babel/core","version":"7.26.0","description":"Babel compiler core.","main":"./lib/index.js","author":"The Babel Team (https://babel.dev/team)","license":"MIT","publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/babel/babel.git","directory":"packages/babel-core"},"homepage":"https://babel.dev/docs/en/next/babel-core","bugs":"https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen","keywords":["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],"engines":{"node":">=6.9.0"},"funding":{"type":"opencollective","url":"https://opencollective.com/babel"},"browser":{"./lib/config/files/index.js":"./lib/config/files/index-browser.js","./lib/config/resolve-targets.js":"./lib/config/resolve-targets-browser.js","./lib/transform-file.js":"./lib/transform-file-browser.js","./src/config/files/index.ts":"./src/config/files/index-browser.ts","./src/config/resolve-targets.ts":"./src/config/resolve-targets-browser.ts","./src/transform-file.ts":"./src/transform-file-browser.ts"},"dependencies":{"@ampproject/remapping":"^2.2.0","@babel/code-frame":"^7.26.0","@babel/generator":"^7.26.0","@babel/helper-compilation-targets":"^7.25.9","@babel/helper-module-transforms":"^7.26.0","@babel/helpers":"^7.26.0","@babel/parser":"^7.26.0","@babel/template":"^7.25.9","@babel/traverse":"^7.25.9","@babel/types":"^7.26.0","convert-source-map":"^2.0.0","debug":"^4.1.0","gensync":"^1.0.0-beta.2","json5":"^2.2.3","semver":"^6.3.1"},"devDependencies":{"@babel/helper-transform-fixture-test-runner":"^7.26.0","@babel/plugin-syntax-flow":"^7.26.0","@babel/plugin-transform-flow-strip-types":"^7.25.9","@babel/plugin-transform-modules-commonjs":"^7.25.9","@babel/preset-env":"^7.26.0","@babel/preset-typescript":"^7.26.0","@jridgewell/trace-mapping":"^0.3.25","@types/convert-source-map":"^2.0.0","@types/debug":"^4.1.0","@types/gensync":"^1.0.0","@types/resolve":"^1.3.2","@types/semver":"^5.4.0","rimraf":"^3.0.0","ts-node":"^11.0.0-beta.1"},"type":"commonjs","_lastModified":"2025-04-02T03:01:36.832Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron-parser","version":"4.9.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"types/index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^3.2.1"},"devDependencies":{"eslint":"^8.27.0","sinon":"^15.0.1","tap":"^16.3.3","tsd":"^0.26.0"},"engines":{"node":">=12.0.0"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"files":["lib","types","LICENSE","README.md"],"_lastModified":"2025-
|
|
1
|
+
{"name":"cron-parser","version":"4.9.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"types/index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^3.2.1"},"devDependencies":{"eslint":"^8.27.0","sinon":"^15.0.1","tap":"^16.3.3","tsd":"^0.26.0"},"engines":{"node":">=12.0.0"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"files":["lib","types","LICENSE","README.md"],"_lastModified":"2025-04-02T03:01:37.086Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"author":"Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)","name":"form-data","description":"A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.","version":"4.0.1","repository":{"type":"git","url":"git://github.com/form-data/form-data.git"},"main":"./lib/form_data","browser":"./lib/browser","typings":"./index.d.ts","scripts":{"pretest":"npm run lint","pretests-only":"rimraf coverage test/tmp","tests-only":"istanbul cover test/run.js","posttests-only":"istanbul report lcov text","test":"npm run tests-only","posttest":"npx npm@'>=10.2' audit --production","lint":"eslint --ext=js,mjs .","report":"istanbul report lcov text","ci-lint":"is-node-modern 8 && npm run lint || is-node-not-modern 8","ci-test":"npm run tests-only && npm run browser && npm run report","predebug":"rimraf coverage test/tmp","debug":"verbose=1 ./test/run.js","browser":"browserify -t browserify-istanbul test/run-browser.js | obake --coverage","check":"istanbul check-coverage coverage/coverage*.json","files":"pkgfiles --sort=name","get-version":"node -e \"console.log(require('./package.json').version)\"","update-readme":"sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md","restore-readme":"mv README.md.bak README.md","prepublish":"in-publish && npm run update-readme || not-in-publish","postpublish":"npm run restore-readme"},"pre-commit":["lint","ci-test","check"],"engines":{"node":">= 6"},"dependencies":{"asynckit":"^0.4.0","combined-stream":"^1.0.8","mime-types":"^2.1.12"},"devDependencies":{"@types/node":"^12.0.10","browserify":"^13.1.1","browserify-istanbul":"^2.0.0","coveralls":"^3.0.4","cross-spawn":"^6.0.5","eslint":"^6.0.1","fake":"^0.2.2","far":"^0.0.7","formidable":"^1.0.17","in-publish":"^2.0.0","is-node-modern":"^1.0.0","istanbul":"^0.4.5","obake":"^0.1.2","puppeteer":"^1.19.0","pkgfiles":"^2.3.0","pre-commit":"^1.1.3","request":"^2.88.0","rimraf":"^2.7.1","tape":"^4.6.2","typescript":"^3.5.2"},"license":"MIT","_lastModified":"2025-
|
|
1
|
+
{"author":"Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)","name":"form-data","description":"A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.","version":"4.0.1","repository":{"type":"git","url":"git://github.com/form-data/form-data.git"},"main":"./lib/form_data","browser":"./lib/browser","typings":"./index.d.ts","scripts":{"pretest":"npm run lint","pretests-only":"rimraf coverage test/tmp","tests-only":"istanbul cover test/run.js","posttests-only":"istanbul report lcov text","test":"npm run tests-only","posttest":"npx npm@'>=10.2' audit --production","lint":"eslint --ext=js,mjs .","report":"istanbul report lcov text","ci-lint":"is-node-modern 8 && npm run lint || is-node-not-modern 8","ci-test":"npm run tests-only && npm run browser && npm run report","predebug":"rimraf coverage test/tmp","debug":"verbose=1 ./test/run.js","browser":"browserify -t browserify-istanbul test/run-browser.js | obake --coverage","check":"istanbul check-coverage coverage/coverage*.json","files":"pkgfiles --sort=name","get-version":"node -e \"console.log(require('./package.json').version)\"","update-readme":"sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md","restore-readme":"mv README.md.bak README.md","prepublish":"in-publish && npm run update-readme || not-in-publish","postpublish":"npm run restore-readme"},"pre-commit":["lint","ci-test","check"],"engines":{"node":">= 6"},"dependencies":{"asynckit":"^0.4.0","combined-stream":"^1.0.8","mime-types":"^2.1.12"},"devDependencies":{"@types/node":"^12.0.10","browserify":"^13.1.1","browserify-istanbul":"^2.0.0","coveralls":"^3.0.4","cross-spawn":"^6.0.5","eslint":"^6.0.1","fake":"^0.2.2","far":"^0.0.7","formidable":"^1.0.17","in-publish":"^2.0.0","is-node-modern":"^1.0.0","istanbul":"^0.4.5","obake":"^0.1.2","puppeteer":"^1.19.0","pkgfiles":"^2.3.0","pre-commit":"^1.1.3","request":"^2.88.0","rimraf":"^2.7.1","tape":"^4.6.2","typescript":"^3.5.2"},"license":"MIT","_lastModified":"2025-04-02T03:01:32.287Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"jsonata","version":"2.0.6","description":"JSON query and transformation language","module":"jsonata.js","main":"jsonata.js","typings":"jsonata.d.ts","homepage":"http://jsonata.org/","repository":{"type":"git","url":"https://github.com/jsonata-js/jsonata.git"},"scripts":{"pretest":"npm run lint","mocha":"nyc ./node_modules/mocha/bin/_mocha -- \"test/**/*.js\"","test":"npm run mocha","posttest":"npm run check-coverage && npm run browserify && npm run minify && npm run build-es5","build-es5":"npm run mkdir-dist && npm run regenerator && npm run browserify-es5 && npm run minify-es5","check-coverage":"nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100","browserify":"browserify src/jsonata.js --outfile jsonata.js --standalone jsonata","mkdir-dist":"mkdirp ./dist","regenerator":"babel src --out-dir dist --presets=@babel/env","browserify-es5":"regenerator --include-runtime polyfill.js > jsonata-es5.js; browserify dist/jsonata.js --standalone jsonata >> jsonata-es5.js","prepublishOnly":"npm run browserify && npm run minify && npm run build-es5","lint":"eslint src","doc":"jsdoc --configure jsdoc.json .","cover":"nyc _mocha","minify":"uglifyjs jsonata.js -o jsonata.min.js --compress --mangle","minify-es5":"uglifyjs jsonata-es5.js -o jsonata-es5.min.js --compress --mangle"},"license":"MIT","keywords":["JSON","query","transformation","transform","mapping","path"],"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/preset-env":"^7.8.4","browserify":"^16.5.0","chai":"^4.2.0","chai-as-promised":"^7.1.1","eslint":"8.0.0","eslint-plugin-ideal":"^0.1.3","eslint-plugin-promise":"^6.0.0","jsdoc":"^3.6.3","mkdirp":"^1.0.3","mocha":"^7.0.1","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","regenerator":"^0.14.4","request":"^2.88.2","uglify-es":"^3.3.10"},"engines":{"node":">= 8"},"_lastModified":"2025-
|
|
1
|
+
{"name":"jsonata","version":"2.0.6","description":"JSON query and transformation language","module":"jsonata.js","main":"jsonata.js","typings":"jsonata.d.ts","homepage":"http://jsonata.org/","repository":{"type":"git","url":"https://github.com/jsonata-js/jsonata.git"},"scripts":{"pretest":"npm run lint","mocha":"nyc ./node_modules/mocha/bin/_mocha -- \"test/**/*.js\"","test":"npm run mocha","posttest":"npm run check-coverage && npm run browserify && npm run minify && npm run build-es5","build-es5":"npm run mkdir-dist && npm run regenerator && npm run browserify-es5 && npm run minify-es5","check-coverage":"nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100","browserify":"browserify src/jsonata.js --outfile jsonata.js --standalone jsonata","mkdir-dist":"mkdirp ./dist","regenerator":"babel src --out-dir dist --presets=@babel/env","browserify-es5":"regenerator --include-runtime polyfill.js > jsonata-es5.js; browserify dist/jsonata.js --standalone jsonata >> jsonata-es5.js","prepublishOnly":"npm run browserify && npm run minify && npm run build-es5","lint":"eslint src","doc":"jsdoc --configure jsdoc.json .","cover":"nyc _mocha","minify":"uglifyjs jsonata.js -o jsonata.min.js --compress --mangle","minify-es5":"uglifyjs jsonata-es5.js -o jsonata-es5.min.js --compress --mangle"},"license":"MIT","keywords":["JSON","query","transformation","transform","mapping","path"],"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/preset-env":"^7.8.4","browserify":"^16.5.0","chai":"^4.2.0","chai-as-promised":"^7.1.1","eslint":"8.0.0","eslint-plugin-ideal":"^0.1.3","eslint-plugin-promise":"^6.0.0","jsdoc":"^3.6.3","mkdirp":"^1.0.3","mocha":"^7.0.1","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","regenerator":"^0.14.4","request":"^2.88.2","uglify-es":"^3.3.10"},"engines":{"node":">= 8"},"_lastModified":"2025-04-02T03:01:33.342Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"commonjs","_lastModified":"2025-
|
|
1
|
+
{"type":"commonjs","_lastModified":"2025-04-02T03:01:32.020Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"mime-types","description":"The ultimate javascript content-type utility.","version":"2.1.35","contributors":["Douglas Christopher Wilson <doug@somethingdoug.com>","Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)","Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"],"license":"MIT","keywords":["mime","types"],"repository":"jshttp/mime-types","dependencies":{"mime-db":"1.52.0"},"devDependencies":{"eslint":"7.32.0","eslint-config-standard":"14.1.1","eslint-plugin-import":"2.25.4","eslint-plugin-markdown":"2.2.1","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"5.2.0","eslint-plugin-standard":"4.1.0","mocha":"9.2.2","nyc":"15.1.0"},"files":["HISTORY.md","LICENSE","index.js"],"engines":{"node":">= 0.6"},"scripts":{"lint":"eslint .","test":"mocha --reporter spec test/test.js","test-ci":"nyc --reporter=lcov --reporter=text npm test","test-cov":"nyc --reporter=html --reporter=text npm test"},"_lastModified":"2025-
|
|
1
|
+
{"name":"mime-types","description":"The ultimate javascript content-type utility.","version":"2.1.35","contributors":["Douglas Christopher Wilson <doug@somethingdoug.com>","Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)","Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"],"license":"MIT","keywords":["mime","types"],"repository":"jshttp/mime-types","dependencies":{"mime-db":"1.52.0"},"devDependencies":{"eslint":"7.32.0","eslint-config-standard":"14.1.1","eslint-plugin-import":"2.25.4","eslint-plugin-markdown":"2.2.1","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"5.2.0","eslint-plugin-standard":"4.1.0","mocha":"9.2.2","nyc":"15.1.0"},"files":["HISTORY.md","LICENSE","index.js"],"engines":{"node":">= 0.6"},"scripts":{"lint":"eslint .","test":"mocha --reporter spec test/test.js","test-ci":"nyc --reporter=lcov --reporter=text npm test","test-cov":"nyc --reporter=html --reporter=text npm test"},"_lastModified":"2025-04-02T03:01:32.444Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"qrcode","description":"QRCode / 2d Barcode api with both server side and client side support using canvas","version":"1.5.4","author":"Ryan Day <soldair@gmail.com>","contributors":["Vincenzo Greco <greco.vincenzo@gmail.com>","Linus Unnebäck <linus@folkdatorn.se>"],"keywords":["qr","code","canvas","qrcode"],"main":"./lib/index.js","browser":{"./lib/index.js":"./lib/browser.js","fs":false},"files":["bin","build","lib","helper"],"homepage":"http://github.com/soldair/node-qrcode","license":"MIT","scripts":{"lint":"standard","pretest":"npm run lint","test":"node --throw-deprecation test.js","build":"rollup -c","prepublish":"npm run build","browser":"node examples/clientsideserver.js"},"bin":{"qrcode":"./bin/qrcode"},"dependencies":{"dijkstrajs":"^1.0.1","pngjs":"^5.0.0","yargs":"^15.3.1"},"devDependencies":{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","browserify":"^16.5.1","canvas":"^2.8.0","canvasutil":"0.0.4","colors":"^1.4.0","express":"^4.17.1","htmlparser2":"^4.1.0","rollup":"^2.6.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-terser":"^5.3.0","sinon":"^9.0.2","standard":"^16.0.4","tap":"^16.2.0"},"repository":{"type":"git","url":"git://github.com/soldair/node-qrcode.git"},"engines":{"node":">=10.13.0"},"standard":{"ignore":["build/","examples/vendors/","lib/core/regex.js"]},"_lastModified":"2025-
|
|
1
|
+
{"name":"qrcode","description":"QRCode / 2d Barcode api with both server side and client side support using canvas","version":"1.5.4","author":"Ryan Day <soldair@gmail.com>","contributors":["Vincenzo Greco <greco.vincenzo@gmail.com>","Linus Unnebäck <linus@folkdatorn.se>"],"keywords":["qr","code","canvas","qrcode"],"main":"./lib/index.js","browser":{"./lib/index.js":"./lib/browser.js","fs":false},"files":["bin","build","lib","helper"],"homepage":"http://github.com/soldair/node-qrcode","license":"MIT","scripts":{"lint":"standard","pretest":"npm run lint","test":"node --throw-deprecation test.js","build":"rollup -c","prepublish":"npm run build","browser":"node examples/clientsideserver.js"},"bin":{"qrcode":"./bin/qrcode"},"dependencies":{"dijkstrajs":"^1.0.1","pngjs":"^5.0.0","yargs":"^15.3.1"},"devDependencies":{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","browserify":"^16.5.1","canvas":"^2.8.0","canvasutil":"0.0.4","colors":"^1.4.0","express":"^4.17.1","htmlparser2":"^4.1.0","rollup":"^2.6.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-terser":"^5.3.0","sinon":"^9.0.2","standard":"^16.0.4","tap":"^16.2.0"},"repository":{"type":"git","url":"git://github.com/soldair/node-qrcode.git"},"engines":{"node":">=10.13.0"},"standard":{"ignore":["build/","examples/vendors/","lib/core/regex.js"]},"_lastModified":"2025-04-02T03:01:32.934Z"}
|
package/dist/server/Plugin.js
CHANGED
|
@@ -62,6 +62,7 @@ var import_DestroyInstruction = __toESM(require("./instructions/DestroyInstructi
|
|
|
62
62
|
var import_EndInstruction = __toESM(require("./instructions/EndInstruction"));
|
|
63
63
|
var import_QueryInstruction = __toESM(require("./instructions/QueryInstruction"));
|
|
64
64
|
var import_UpdateInstruction = __toESM(require("./instructions/UpdateInstruction"));
|
|
65
|
+
var import_UpdateOrCreateInstruction = __toESM(require("./instructions/UpdateOrCreateInstruction"));
|
|
65
66
|
var import_Processor = __toESM(require("./Processor"));
|
|
66
67
|
var import_CollectionTrigger = __toESM(require("./triggers/CollectionTrigger"));
|
|
67
68
|
var import_ScheduleTrigger = __toESM(require("./triggers/ScheduleTrigger"));
|
|
@@ -213,6 +214,7 @@ class PluginWorkflowServer extends import_server.Plugin {
|
|
|
213
214
|
this.registerInstruction("condition", import_ConditionInstruction.default);
|
|
214
215
|
this.registerInstruction("end", import_EndInstruction.default);
|
|
215
216
|
this.registerInstruction("create", import_CreateInstruction.default);
|
|
217
|
+
this.registerInstruction("updateorcreate", import_UpdateOrCreateInstruction.default);
|
|
216
218
|
this.registerInstruction("destroy", import_DestroyInstruction.default);
|
|
217
219
|
this.registerInstruction("query", import_QueryInstruction.default);
|
|
218
220
|
this.registerInstruction("update", import_UpdateInstruction.default);
|
|
@@ -248,15 +250,16 @@ class PluginWorkflowServer extends import_server.Plugin {
|
|
|
248
250
|
"executions:cancel",
|
|
249
251
|
"executions:retry",
|
|
250
252
|
"flow_nodes:update",
|
|
251
|
-
"flow_nodes:destroy"
|
|
253
|
+
"flow_nodes:destroy",
|
|
254
|
+
"flow_nodes:moveUp",
|
|
255
|
+
"flow_nodes:moveDown"
|
|
252
256
|
]
|
|
253
257
|
});
|
|
254
258
|
this.app.acl.registerSnippet({
|
|
255
259
|
name: "ui.*",
|
|
256
260
|
actions: ["workflows:list"]
|
|
257
261
|
});
|
|
258
|
-
this.app.acl.allow("workflows", ["trigger"], "loggedIn");
|
|
259
|
-
this.app.acl.allow("flow_nodes", ["moveUp", "moveDown"], "loggedIn");
|
|
262
|
+
this.app.acl.allow("workflows", ["trigger", "list"], "loggedIn");
|
|
260
263
|
db.on("workflows.beforeSave", this.onBeforeSave);
|
|
261
264
|
db.on("workflows.afterSave", (model) => this.toggle(model));
|
|
262
265
|
db.on("workflows.afterDestroy", (model) => this.toggle(model, false));
|
|
@@ -370,24 +373,33 @@ class PluginWorkflowServer extends import_server.Plugin {
|
|
|
370
373
|
}
|
|
371
374
|
async createExecution(workflow, context, options) {
|
|
372
375
|
const { transaction = await this.db.sequelize.transaction() } = options;
|
|
376
|
+
const sameTransaction = options.transaction === transaction;
|
|
373
377
|
const trigger = this.triggers.get(workflow.type);
|
|
374
378
|
const valid = await trigger.validateEvent(workflow, context, { ...options, transaction });
|
|
375
379
|
if (!valid) {
|
|
376
|
-
if (!
|
|
380
|
+
if (!sameTransaction) {
|
|
377
381
|
await transaction.commit();
|
|
378
382
|
}
|
|
379
383
|
return null;
|
|
380
384
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
385
|
+
let execution;
|
|
386
|
+
try {
|
|
387
|
+
execution = await workflow.createExecution(
|
|
388
|
+
{
|
|
389
|
+
context,
|
|
390
|
+
key: workflow.key,
|
|
391
|
+
status: import_constants.EXECUTION_STATUS.QUEUEING,
|
|
392
|
+
parentNode: options.parentNode || null,
|
|
393
|
+
parentId: options.parent ? options.parent.id : null
|
|
394
|
+
},
|
|
395
|
+
{ transaction }
|
|
396
|
+
);
|
|
397
|
+
} catch (err) {
|
|
398
|
+
if (!sameTransaction) {
|
|
399
|
+
await transaction.rollback();
|
|
400
|
+
}
|
|
401
|
+
throw err;
|
|
402
|
+
}
|
|
391
403
|
this.getLogger(workflow.id).info(`execution of workflow ${workflow.id} created as ${execution.id}`);
|
|
392
404
|
await workflow.increment(["executed", "allExecuted"], { transaction });
|
|
393
405
|
if (this.db.options.dialect !== "postgres") {
|
|
@@ -404,7 +416,7 @@ class PluginWorkflowServer extends import_server.Plugin {
|
|
|
404
416
|
transaction
|
|
405
417
|
}
|
|
406
418
|
);
|
|
407
|
-
if (!
|
|
419
|
+
if (!sameTransaction) {
|
|
408
420
|
await transaction.commit();
|
|
409
421
|
}
|
|
410
422
|
execution.workflow = workflow;
|
package/dist/server/Processor.js
CHANGED
|
@@ -280,7 +280,8 @@ class Processor {
|
|
|
280
280
|
$context: this.execution.context,
|
|
281
281
|
$jobsMapByNodeKey: this.jobsMapByNodeKey,
|
|
282
282
|
$system: systemFns,
|
|
283
|
-
$scopes
|
|
283
|
+
$scopes,
|
|
284
|
+
$env: this.options.plugin.app.environment.getVariables()
|
|
284
285
|
};
|
|
285
286
|
}
|
|
286
287
|
getParsedValue(value, sourceNodeId, additionalScope) {
|
|
@@ -152,8 +152,11 @@ const _OmniTrigger = class _OmniTrigger extends import_triggers.default {
|
|
|
152
152
|
const {
|
|
153
153
|
resourceName,
|
|
154
154
|
actionName,
|
|
155
|
-
params: { triggerWorkflows }
|
|
155
|
+
params: { triggerWorkflows, beforeWorkflows }
|
|
156
156
|
} = context.action;
|
|
157
|
+
if (beforeWorkflows) {
|
|
158
|
+
await this.trigger(context, beforeWorkflows, "before");
|
|
159
|
+
}
|
|
157
160
|
if (resourceName === "workflows" && actionName === "trigger") {
|
|
158
161
|
return this.triggerAction(context, next);
|
|
159
162
|
}
|
|
@@ -164,7 +167,7 @@ const _OmniTrigger = class _OmniTrigger extends import_triggers.default {
|
|
|
164
167
|
if (!["create", "update"].includes(actionName)) {
|
|
165
168
|
return;
|
|
166
169
|
}
|
|
167
|
-
return this.trigger(context);
|
|
170
|
+
return this.trigger(context, triggerWorkflows);
|
|
168
171
|
};
|
|
169
172
|
this.workflow.app.resourcer.registerActionHandler("trigger", this.triggerAction);
|
|
170
173
|
this.workflow.app.acl.allow("*", "trigger", "loggedIn");
|
|
@@ -177,10 +180,13 @@ const _OmniTrigger = class _OmniTrigger extends import_triggers.default {
|
|
|
177
180
|
ctx.status = err.status;
|
|
178
181
|
}
|
|
179
182
|
);
|
|
180
|
-
workflow.app.resourcer.use(this.middleware, { tag: "workflowTrigger", after: "
|
|
183
|
+
workflow.app.resourcer.use(this.middleware, { tag: "workflowTrigger", after: "acl" });
|
|
181
184
|
}
|
|
182
|
-
async trigger(context) {
|
|
183
|
-
|
|
185
|
+
async trigger(context, workflowList, order = "after") {
|
|
186
|
+
if (!workflowList) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const { values } = context.action.params;
|
|
184
190
|
const dataSourceHeader = context.get("x-data-source") || "main";
|
|
185
191
|
const { currentUser, currentRole } = context.state;
|
|
186
192
|
const { model: UserModel } = this.workflow.db.getCollection("users");
|
|
@@ -188,7 +194,7 @@ const _OmniTrigger = class _OmniTrigger extends import_triggers.default {
|
|
|
188
194
|
user: UserModel.build(currentUser).desensitize(),
|
|
189
195
|
roleName: currentRole
|
|
190
196
|
};
|
|
191
|
-
const triggers =
|
|
197
|
+
const triggers = workflowList.split(",").map((trigger) => trigger.split("!"));
|
|
192
198
|
const workflowRepo = this.workflow.db.getRepository("workflows");
|
|
193
199
|
const workflows = (await workflowRepo.find({
|
|
194
200
|
filter: {
|
|
@@ -206,6 +212,11 @@ const _OmniTrigger = class _OmniTrigger extends import_triggers.default {
|
|
|
206
212
|
const trigger = triggers.find((trigger2) => trigger2[0] === workflow.key);
|
|
207
213
|
const event = [workflow];
|
|
208
214
|
if (context.action.resourceName !== "workflows") {
|
|
215
|
+
if (order === "before") {
|
|
216
|
+
event.push({ data: context.action.params, ...userInfo });
|
|
217
|
+
(workflow.sync ? syncGroup : asyncGroup).push(event);
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
209
220
|
if (!context.body) {
|
|
210
221
|
continue;
|
|
211
222
|
}
|