@tachybase/module-workflow 0.23.58 → 1.0.18
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/index.js +52 -52
- 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/updateOrCreate.d.ts +82 -0
- package/dist/externalVersion.js +15 -15
- package/dist/locale/zh-CN.json +11 -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 +6 -3
- 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 +18 -17
|
@@ -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
|
+
};
|
|
@@ -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 {};
|
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.18",
|
|
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.18",
|
|
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.18",
|
|
11
|
+
"@tachybase/database": "1.0.18",
|
|
12
|
+
"@tachybase/logger": "1.0.18",
|
|
13
|
+
"@tachybase/server": "1.0.18",
|
|
14
|
+
"@tachybase/evaluators": "1.0.18",
|
|
15
|
+
"@tachybase/components": "1.0.18",
|
|
16
|
+
"@tachybase/actions": "1.0.18",
|
|
17
|
+
"@tachybase/data-source": "1.0.18",
|
|
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.18",
|
|
21
|
+
"@tachybase/test": "1.0.18",
|
|
22
|
+
"@tachybase/module-error-handler": "1.0.18",
|
|
23
|
+
"@tachybase/resourcer": "1.0.18",
|
|
24
|
+
"@tachybase/module-ui-schema": "1.0.18"
|
|
25
25
|
};
|
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.": "适用于需要即时反馈的用户操作。不能在此模式下使用异步节点,并且不建议在同步模式下执行耗时的操作。",
|
|
@@ -373,10 +376,13 @@
|
|
|
373
376
|
"Update in a batch": "批量更新",
|
|
374
377
|
"Update mode": "更新模式",
|
|
375
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.": "更新或创建数据表中的数据,如果查询没有符合条件时则创建数据,并支持使用上游节点的变量为字段赋值。",
|
|
376
381
|
"Update record": "更新数据",
|
|
377
382
|
"Update record form": "更新数据表单",
|
|
378
383
|
"Update records of a collection. You can use variables from upstream nodes as query conditions and field values.": "更新一个数据表中的数据。可以使用上游节点里的变量作为查询条件和数据值。",
|
|
379
384
|
"Updated at": "更新于",
|
|
385
|
+
"Upload node": "上传节点",
|
|
380
386
|
"Use transaction": "启用事务",
|
|
381
387
|
"Use variable": "使用变量",
|
|
382
388
|
"Used to store expressions for use in workflows so that different expressions can be called for different data.": "用于存储表达式,在工作流中使用,以便针对不同的数据调用不同的表达式。",
|
|
@@ -405,10 +411,15 @@
|
|
|
405
411
|
"Workflow todos": "工作流待办",
|
|
406
412
|
"Workflow will be triggered before deleting succeeded.": "删除成功之前触发工作流。",
|
|
407
413
|
"Workflow will be triggered before or after submitting succeeded based on workflow type.": "工作流会基于其类型在提交成功之前或之后触发。",
|
|
414
|
+
"Workflow will be triggered before or after submitting succeeded.": "工作流会在提交成功之前或之后触发。",
|
|
408
415
|
"Workflow will be triggered directly once the button clicked, without data saving.": "按钮点击后直接触发工作流,但不会保存数据。",
|
|
409
416
|
"comment": "备注",
|
|
410
417
|
"concat": "连接",
|
|
411
418
|
"group-title-count": "类型-名称-使用次数",
|
|
419
|
+
"is empty": "为空",
|
|
420
|
+
"is false": "为假",
|
|
421
|
+
"is not empty": "不为空",
|
|
422
|
+
"is true": "为真",
|
|
412
423
|
"ms": "毫秒",
|
|
413
424
|
"needAuthorization": "是否携带权限校验",
|
|
414
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-18T20:38:01.490Z"}
|
|
@@ -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-18T20:38:01.752Z"}
|
|
@@ -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-18T20:37:56.766Z"}
|
|
@@ -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-18T20:37:57.774Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"commonjs","_lastModified":"2025-
|
|
1
|
+
{"type":"commonjs","_lastModified":"2025-04-18T20:37:56.503Z"}
|
|
@@ -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-18T20:37:56.944Z"}
|
|
@@ -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-18T20:37:57.362Z"}
|
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));
|
|
@@ -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
|
}
|
|
@@ -87,6 +87,22 @@ calculators.register("startsWith", startsWith);
|
|
|
87
87
|
calculators.register("notStartsWith", notStartsWith);
|
|
88
88
|
calculators.register("endsWith", endsWith);
|
|
89
89
|
calculators.register("notEndsWith", notEndsWith);
|
|
90
|
+
function isEmpty(a) {
|
|
91
|
+
return a == null;
|
|
92
|
+
}
|
|
93
|
+
function isNotEmpty(a) {
|
|
94
|
+
return !isEmpty(a);
|
|
95
|
+
}
|
|
96
|
+
function isTrue(a) {
|
|
97
|
+
return a === true;
|
|
98
|
+
}
|
|
99
|
+
function isFalse(a) {
|
|
100
|
+
return a === false;
|
|
101
|
+
}
|
|
102
|
+
calculators.register("isEmpty", isEmpty);
|
|
103
|
+
calculators.register("isNotEmpty", isNotEmpty);
|
|
104
|
+
calculators.register("isTrue", isTrue);
|
|
105
|
+
calculators.register("isFalse", isFalse);
|
|
90
106
|
function calculate(calculation = {}) {
|
|
91
107
|
let fn;
|
|
92
108
|
if (!(calculation.calculator && (fn = calculators.get(calculation.calculator)))) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Instruction } from '.';
|
|
2
|
+
import type Processor from '../Processor';
|
|
3
|
+
import type { FlowNodeModel } from '../types';
|
|
4
|
+
export declare class UpdateOrCreateInstruction extends Instruction {
|
|
5
|
+
run(node: FlowNodeModel, input: any, processor: Processor): Promise<{
|
|
6
|
+
result: any;
|
|
7
|
+
status: 1;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export default UpdateOrCreateInstruction;
|