@nocobase/plugin-workflow 1.5.0-beta.3 → 1.5.0-beta.30
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/112c72b90000c81b.js +10 -0
- package/dist/client/739d458621edf81f.js +10 -0
- package/dist/client/98864c2e0ff69ea1.js +10 -0
- package/dist/client/FlowContext.d.ts +2 -0
- package/dist/client/components/TriggerCollectionRecordSelect.d.ts +10 -0
- package/dist/client/components/index.d.ts +1 -0
- package/dist/client/constants.d.ts +1 -0
- package/dist/client/e7b9d67c6a964bec.js +10 -0
- package/dist/client/index.js +1 -566
- package/dist/client/triggers/collection.d.ts +14 -0
- package/dist/client/triggers/index.d.ts +3 -3
- package/dist/client/triggers/schedule/ScheduleModes.d.ts +170 -0
- package/dist/client/triggers/schedule/TriggerScheduleConfig.d.ts +10 -0
- package/dist/client/triggers/schedule/index.d.ts +13 -0
- package/dist/client/variable.d.ts +16 -1
- package/dist/externalVersion.js +11 -11
- package/dist/locale/zh-CN.json +19 -5
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/server/Plugin.d.ts +13 -6
- package/dist/server/Plugin.js +165 -83
- package/dist/server/Processor.js +3 -3
- package/dist/server/actions/workflows.d.ts +5 -0
- package/dist/server/actions/workflows.js +59 -61
- package/dist/server/collections/executions.js +8 -0
- package/dist/server/collections/workflows.js +2 -2
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +2 -0
- package/dist/server/instructions/CreateInstruction.js +1 -1
- package/dist/server/instructions/DestroyInstruction.js +1 -1
- package/dist/server/instructions/UpdateInstruction.js +1 -1
- package/dist/server/repositories/WorkflowRepository.d.ts +12 -0
- package/dist/server/repositories/WorkflowRepository.js +112 -0
- package/dist/server/triggers/CollectionTrigger.d.ts +7 -2
- package/dist/server/triggers/CollectionTrigger.js +104 -73
- package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.d.ts +3 -2
- package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.js +51 -17
- package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +1 -0
- package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.js +3 -0
- package/dist/server/triggers/ScheduleTrigger/index.d.ts +1 -0
- package/dist/server/triggers/ScheduleTrigger/index.js +7 -0
- package/dist/server/triggers/index.d.ts +4 -2
- package/dist/server/triggers/index.js +4 -0
- package/package.json +3 -3
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
|
|
11
11
|
import { useWorkflowAnyExecuted } from '../hooks';
|
|
12
12
|
import { Trigger } from '.';
|
|
13
|
+
import { TriggerCollectionRecordSelect } from '../components/TriggerCollectionRecordSelect';
|
|
13
14
|
declare function useVariables(config: any, options: any): import("../variable").VariableOption[];
|
|
14
15
|
export default class extends Trigger {
|
|
15
16
|
title: string;
|
|
@@ -117,7 +118,20 @@ export default class extends Trigger {
|
|
|
117
118
|
};
|
|
118
119
|
components: {
|
|
119
120
|
FieldsSelect: import("react").MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
|
|
121
|
+
TriggerCollectionRecordSelect: typeof TriggerCollectionRecordSelect;
|
|
120
122
|
};
|
|
123
|
+
triggerFieldset: {
|
|
124
|
+
data: {
|
|
125
|
+
type: string;
|
|
126
|
+
title: string;
|
|
127
|
+
description: string;
|
|
128
|
+
'x-decorator': string;
|
|
129
|
+
'x-component': string;
|
|
130
|
+
default: any;
|
|
131
|
+
required: boolean;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
validate(values: any): any;
|
|
121
135
|
useVariables: typeof useVariables;
|
|
122
136
|
useInitializers(config: any): SchemaInitializerItemType | null;
|
|
123
137
|
}
|
|
@@ -15,9 +15,9 @@ export declare abstract class Trigger {
|
|
|
15
15
|
title: string;
|
|
16
16
|
description?: string;
|
|
17
17
|
useVariables?(config: Record<string, any>, options?: UseVariableOptions): VariableOption[];
|
|
18
|
-
fieldset:
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
fieldset: Record<string, ISchema>;
|
|
19
|
+
triggerFieldset?: Record<string, ISchema>;
|
|
20
|
+
validate(config: Record<string, any>): boolean;
|
|
21
21
|
view?: ISchema;
|
|
22
22
|
scope?: {
|
|
23
23
|
[key: string]: any;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export declare const ScheduleModes: {
|
|
11
|
+
[x: number]: {
|
|
12
|
+
fieldset: {
|
|
13
|
+
startsOn: {
|
|
14
|
+
type: string;
|
|
15
|
+
title: string;
|
|
16
|
+
'x-decorator': string;
|
|
17
|
+
'x-component': string;
|
|
18
|
+
'x-component-props': {
|
|
19
|
+
showTime: boolean;
|
|
20
|
+
};
|
|
21
|
+
required: boolean;
|
|
22
|
+
'x-reactions'?: undefined;
|
|
23
|
+
};
|
|
24
|
+
repeat: {
|
|
25
|
+
type: string;
|
|
26
|
+
title: string;
|
|
27
|
+
'x-decorator': string;
|
|
28
|
+
'x-component': string;
|
|
29
|
+
'x-reactions': {
|
|
30
|
+
target: string;
|
|
31
|
+
fulfill: {
|
|
32
|
+
state: {
|
|
33
|
+
visible: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}[];
|
|
37
|
+
};
|
|
38
|
+
endsOn: {
|
|
39
|
+
type: string;
|
|
40
|
+
title: string;
|
|
41
|
+
'x-decorator': string;
|
|
42
|
+
'x-component': string;
|
|
43
|
+
'x-component-props': {
|
|
44
|
+
showTime: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
limit: {
|
|
48
|
+
type: string;
|
|
49
|
+
title: string;
|
|
50
|
+
'x-decorator': string;
|
|
51
|
+
'x-component': string;
|
|
52
|
+
'x-component-props': {
|
|
53
|
+
placeholder: string;
|
|
54
|
+
min: number;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
collection?: undefined;
|
|
58
|
+
appends?: undefined;
|
|
59
|
+
};
|
|
60
|
+
triggerFieldset: {
|
|
61
|
+
date: {
|
|
62
|
+
type: string;
|
|
63
|
+
title: string;
|
|
64
|
+
'x-decorator': string;
|
|
65
|
+
'x-component': string;
|
|
66
|
+
'x-component-props': {
|
|
67
|
+
nullable: boolean;
|
|
68
|
+
changeOnSelect: boolean;
|
|
69
|
+
render(props: any): React.JSX.Element;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
data?: undefined;
|
|
73
|
+
};
|
|
74
|
+
validate(config: any): boolean;
|
|
75
|
+
} | {
|
|
76
|
+
fieldset: {
|
|
77
|
+
collection: {
|
|
78
|
+
'x-component-props': {
|
|
79
|
+
dataSourceFilter(item: any): any;
|
|
80
|
+
};
|
|
81
|
+
'x-reactions': any[];
|
|
82
|
+
type: string;
|
|
83
|
+
title: string;
|
|
84
|
+
required: boolean;
|
|
85
|
+
'x-decorator': string;
|
|
86
|
+
'x-component': string;
|
|
87
|
+
};
|
|
88
|
+
startsOn: {
|
|
89
|
+
type: string;
|
|
90
|
+
title: string;
|
|
91
|
+
'x-decorator': string;
|
|
92
|
+
'x-component': string;
|
|
93
|
+
'x-reactions': {
|
|
94
|
+
target: string;
|
|
95
|
+
fulfill: {
|
|
96
|
+
state: {
|
|
97
|
+
visible: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}[];
|
|
101
|
+
required: boolean;
|
|
102
|
+
'x-component-props'?: undefined;
|
|
103
|
+
};
|
|
104
|
+
repeat: {
|
|
105
|
+
type: string;
|
|
106
|
+
title: string;
|
|
107
|
+
'x-decorator': string;
|
|
108
|
+
'x-component': string;
|
|
109
|
+
'x-reactions': {
|
|
110
|
+
target: string;
|
|
111
|
+
fulfill: {
|
|
112
|
+
state: {
|
|
113
|
+
visible: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
}[];
|
|
117
|
+
};
|
|
118
|
+
endsOn: {
|
|
119
|
+
type: string;
|
|
120
|
+
title: string;
|
|
121
|
+
'x-decorator': string;
|
|
122
|
+
'x-component': string;
|
|
123
|
+
'x-component-props'?: undefined;
|
|
124
|
+
};
|
|
125
|
+
limit: {
|
|
126
|
+
type: string;
|
|
127
|
+
title: string;
|
|
128
|
+
'x-decorator': string;
|
|
129
|
+
'x-component': string;
|
|
130
|
+
'x-component-props': {
|
|
131
|
+
placeholder: string;
|
|
132
|
+
min: number;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
appends: {
|
|
136
|
+
'x-reactions': {
|
|
137
|
+
dependencies: string[];
|
|
138
|
+
fulfill: {
|
|
139
|
+
state: {
|
|
140
|
+
visible: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
}[];
|
|
144
|
+
type: string;
|
|
145
|
+
title: string;
|
|
146
|
+
description: string;
|
|
147
|
+
'x-decorator': string;
|
|
148
|
+
'x-component': string;
|
|
149
|
+
'x-component-props': {
|
|
150
|
+
title: string;
|
|
151
|
+
multiple: boolean;
|
|
152
|
+
useCollection(): any;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
triggerFieldset: {
|
|
157
|
+
data: {
|
|
158
|
+
type: string;
|
|
159
|
+
title: string;
|
|
160
|
+
description: string;
|
|
161
|
+
'x-decorator': string;
|
|
162
|
+
'x-component': string;
|
|
163
|
+
default: any;
|
|
164
|
+
required: boolean;
|
|
165
|
+
};
|
|
166
|
+
date?: undefined;
|
|
167
|
+
};
|
|
168
|
+
validate(config: any): any;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export declare function TriggerScheduleConfig(): React.JSX.Element;
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
/// <reference types="react" />
|
|
10
10
|
import { SchemaInitializerItemType, useCollectionDataSource } from '@nocobase/client';
|
|
11
11
|
import { Trigger } from '..';
|
|
12
|
+
import { TriggerScheduleConfig } from './TriggerScheduleConfig';
|
|
13
|
+
import { WorkflowVariableWrapper } from '../../variable';
|
|
14
|
+
import { TriggerCollectionRecordSelect } from '../../components/TriggerCollectionRecordSelect';
|
|
12
15
|
declare function useVariables(config: any, opts: any): any[];
|
|
13
16
|
export default class extends Trigger {
|
|
14
17
|
sync: boolean;
|
|
@@ -21,11 +24,21 @@ export default class extends Trigger {
|
|
|
21
24
|
'x-component-props': {};
|
|
22
25
|
};
|
|
23
26
|
};
|
|
27
|
+
triggerFieldset: {
|
|
28
|
+
proxy: {
|
|
29
|
+
type: string;
|
|
30
|
+
'x-component': string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
validate(config: any): any;
|
|
24
34
|
scope: {
|
|
25
35
|
useCollectionDataSource: typeof useCollectionDataSource;
|
|
26
36
|
};
|
|
27
37
|
components: {
|
|
28
38
|
ScheduleConfig: () => import("react").JSX.Element;
|
|
39
|
+
TriggerScheduleConfig: typeof TriggerScheduleConfig;
|
|
40
|
+
TriggerCollectionRecordSelect: typeof TriggerCollectionRecordSelect;
|
|
41
|
+
WorkflowVariableWrapper: typeof WorkflowVariableWrapper;
|
|
29
42
|
};
|
|
30
43
|
useVariables: typeof useVariables;
|
|
31
44
|
useInitializers(config: any): SchemaInitializerItemType | null;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
import React from 'react';
|
|
10
10
|
export type VariableOption = {
|
|
11
11
|
key?: string;
|
|
12
12
|
value?: string;
|
|
@@ -59,6 +59,9 @@ export declare const systemOptions: {
|
|
|
59
59
|
value: string;
|
|
60
60
|
useOptions(options: UseVariableOptions): any;
|
|
61
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated
|
|
64
|
+
*/
|
|
62
65
|
export declare const BaseTypeSets: {
|
|
63
66
|
boolean: Set<string>;
|
|
64
67
|
number: Set<string>;
|
|
@@ -88,3 +91,15 @@ export declare function WorkflowVariableJSON({ variableOptions, ...props }: {
|
|
|
88
91
|
[x: string]: any;
|
|
89
92
|
variableOptions: any;
|
|
90
93
|
}): JSX.Element;
|
|
94
|
+
/**
|
|
95
|
+
* @experimental
|
|
96
|
+
*/
|
|
97
|
+
export declare function WorkflowVariableWrapper(props: any): JSX.Element;
|
|
98
|
+
/**
|
|
99
|
+
* @experimental
|
|
100
|
+
*/
|
|
101
|
+
export declare const HideVariableContext: React.Context<boolean>;
|
|
102
|
+
/**
|
|
103
|
+
* @experimental
|
|
104
|
+
*/
|
|
105
|
+
export declare function useHideVariable(): boolean;
|
package/dist/externalVersion.js
CHANGED
|
@@ -11,24 +11,24 @@ module.exports = {
|
|
|
11
11
|
"react": "18.2.0",
|
|
12
12
|
"@formily/core": "2.3.0",
|
|
13
13
|
"@formily/react": "2.3.0",
|
|
14
|
-
"@nocobase/client": "1.5.0-beta.
|
|
15
|
-
"@nocobase/utils": "1.5.0-beta.
|
|
14
|
+
"@nocobase/client": "1.5.0-beta.30",
|
|
15
|
+
"@nocobase/utils": "1.5.0-beta.30",
|
|
16
16
|
"antd": "5.12.8",
|
|
17
17
|
"@ant-design/icons": "5.2.6",
|
|
18
18
|
"react-router-dom": "6.21.0",
|
|
19
19
|
"react-i18next": "11.18.6",
|
|
20
20
|
"@formily/shared": "2.3.2",
|
|
21
21
|
"lodash": "4.17.21",
|
|
22
|
-
"
|
|
23
|
-
"@nocobase/
|
|
24
|
-
"@nocobase/
|
|
25
|
-
"@nocobase/
|
|
22
|
+
"sequelize": "6.35.2",
|
|
23
|
+
"@nocobase/database": "1.5.0-beta.30",
|
|
24
|
+
"@nocobase/server": "1.5.0-beta.30",
|
|
25
|
+
"@nocobase/logger": "1.5.0-beta.30",
|
|
26
|
+
"@nocobase/actions": "1.5.0-beta.30",
|
|
27
|
+
"@nocobase/data-source-manager": "1.5.0-beta.30",
|
|
28
|
+
"@nocobase/evaluators": "1.5.0-beta.30",
|
|
26
29
|
"@formily/antd-v5": "1.1.9",
|
|
27
30
|
"@formily/reactive": "2.3.0",
|
|
28
|
-
"@nocobase/actions": "1.5.0-beta.3",
|
|
29
31
|
"dayjs": "1.11.10",
|
|
30
|
-
"@nocobase/
|
|
31
|
-
"
|
|
32
|
-
"@nocobase/plugin-workflow-test": "1.5.0-beta.3",
|
|
33
|
-
"@nocobase/test": "1.5.0-beta.3"
|
|
32
|
+
"@nocobase/plugin-workflow-test": "1.5.0-beta.30",
|
|
33
|
+
"@nocobase/test": "1.5.0-beta.30"
|
|
34
34
|
};
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -16,6 +16,15 @@
|
|
|
16
16
|
"Duplicate": "复制",
|
|
17
17
|
"Duplicate to new workflow": "复制为新工作流",
|
|
18
18
|
"Delete a main version will cause all other revisions to be deleted too.": "删除主版本将导致其他版本一并被删除。",
|
|
19
|
+
"Execute manually": "手动执行",
|
|
20
|
+
"The trigger is not configured correctly, please check the trigger configuration.": "触发器配置不正确,请检查触发器配置。",
|
|
21
|
+
"This type of trigger has not been supported to be executed manually.": "该类型的触发器暂未支持手动执行。",
|
|
22
|
+
"Trigger variables need to be filled for executing.": "执行需要填写触发器变量。",
|
|
23
|
+
"A new version will be created automatically after execution if current version is not executed.": "如果当前版本还未执行过,将在执行后自动创建一个新版本。",
|
|
24
|
+
"This will perform all the actions configured in the workflow. Are you sure you want to continue?": "将按照工作流中配置的所有操作执行,确定继续吗?",
|
|
25
|
+
"Automatically create a new version after execution": "执行后自动创建新版本",
|
|
26
|
+
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "工作流已执行,结果状态为 <1>{{statusText}}</1><2>查看执行详情</2>",
|
|
27
|
+
|
|
19
28
|
"Loading": "加载中",
|
|
20
29
|
"Load failed": "加载失败",
|
|
21
30
|
"Use transaction": "启用事务",
|
|
@@ -64,6 +73,8 @@
|
|
|
64
73
|
"Preload associations": "预加载关联数据",
|
|
65
74
|
"Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution.":
|
|
66
75
|
"请选中需要在后续节点中被访问的关系字段。超过两层的对多关联可能会导致性能问题,请谨慎使用。",
|
|
76
|
+
"Choose a record or primary key of a record in the collection to trigger.": "选择数据表中的一行记录或者记录的主键来触发。",
|
|
77
|
+
|
|
67
78
|
"Schedule event": "定时任务",
|
|
68
79
|
"Triggered according to preset time conditions. Suitable for one-time or periodic tasks, such as sending notifications and cleaning data on a schedule.": "按预设的时间条件定时触发。适用于一次性或周期性的任务,如定时发送通知、清理数据等。",
|
|
69
80
|
"Trigger mode": "触发模式",
|
|
@@ -92,6 +103,9 @@
|
|
|
92
103
|
"By field": "数据表字段",
|
|
93
104
|
"By custom date": "自定义时间",
|
|
94
105
|
"Advanced": "高级模式",
|
|
106
|
+
"Execute on": "执行时间",
|
|
107
|
+
"Current time": "当前时间",
|
|
108
|
+
|
|
95
109
|
"End": "结束",
|
|
96
110
|
"Node result": "节点数据",
|
|
97
111
|
"Variable key of node": "节点变量标识",
|
|
@@ -143,19 +157,19 @@
|
|
|
143
157
|
"Node type": "节点类型",
|
|
144
158
|
"Unknown node": "未知节点",
|
|
145
159
|
"Node with unknown type will cause error. Please delete it or check plugin which provide this type.": "未知类型的节点会导致错误,请删除或检查提供该类型的插件。",
|
|
146
|
-
"Calculation": "
|
|
147
|
-
"Calculation engine": "
|
|
160
|
+
"Calculation": "计算",
|
|
161
|
+
"Calculation engine": "计算引擎",
|
|
148
162
|
"Basic": "基础",
|
|
149
|
-
"Calculation expression": "
|
|
163
|
+
"Calculation expression": "计算表达式",
|
|
150
164
|
"Expression syntax error": "表达式语法错误",
|
|
151
165
|
"Syntax references: ": "语法参考:",
|
|
152
|
-
"Calculation result": "
|
|
166
|
+
"Calculation result": "计算结果",
|
|
153
167
|
"True": "真",
|
|
154
168
|
"False": "假",
|
|
155
169
|
"concat": "连接",
|
|
156
170
|
"Condition": "条件判断",
|
|
157
171
|
"Based on boolean result of the calculation to determine whether to \"continue\" or \"exit\" the process, or continue on different branches of \"yes\" and \"no\".":
|
|
158
|
-
"
|
|
172
|
+
"基于计算结果的真假来决定“继续”或“退出”流程,或者在“是”与“否”的分支上分别继续。",
|
|
159
173
|
"Mode": "模式",
|
|
160
174
|
"Continue when \"Yes\"": "“是”则继续",
|
|
161
175
|
"Branch into \"Yes\" and \"No\"": "“是”和“否”分别继续",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","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":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"
|
|
1
|
+
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","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":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2025-01-16T03:42:59.775Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"
|
|
1
|
+
{"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2025-01-16T03:42:59.425Z"}
|
package/dist/server/Plugin.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { Transactionable } from '
|
|
9
|
+
import { Transactionable } from 'sequelize';
|
|
10
10
|
import { Plugin } from '@nocobase/server';
|
|
11
11
|
import { Registry } from '@nocobase/utils';
|
|
12
12
|
import { Logger } from '@nocobase/logger';
|
|
@@ -16,10 +16,14 @@ import Trigger from './triggers';
|
|
|
16
16
|
import { InstructionInterface } from './instructions';
|
|
17
17
|
import type { ExecutionModel, WorkflowModel } from './types';
|
|
18
18
|
type ID = number | string;
|
|
19
|
-
type EventOptions = {
|
|
19
|
+
export type EventOptions = {
|
|
20
20
|
eventKey?: string;
|
|
21
21
|
context?: any;
|
|
22
22
|
deferred?: boolean;
|
|
23
|
+
manually?: boolean;
|
|
24
|
+
force?: boolean;
|
|
25
|
+
stack?: Array<ID>;
|
|
26
|
+
onTriggerFail?: Function;
|
|
23
27
|
[key: string]: any;
|
|
24
28
|
} & Transactionable;
|
|
25
29
|
export default class PluginWorkflowServer extends Plugin {
|
|
@@ -36,11 +40,11 @@ export default class PluginWorkflowServer extends Plugin {
|
|
|
36
40
|
private meter;
|
|
37
41
|
private checker;
|
|
38
42
|
private onBeforeSave;
|
|
39
|
-
|
|
43
|
+
handleSyncMessage(message: any): Promise<void>;
|
|
40
44
|
/**
|
|
41
45
|
* @experimental
|
|
42
46
|
*/
|
|
43
|
-
getLogger(workflowId
|
|
47
|
+
getLogger(workflowId?: ID): Logger;
|
|
44
48
|
/**
|
|
45
49
|
* @experimental
|
|
46
50
|
* @param {WorkflowModel} workflow
|
|
@@ -55,6 +59,7 @@ export default class PluginWorkflowServer extends Plugin {
|
|
|
55
59
|
}): void;
|
|
56
60
|
private initTriggers;
|
|
57
61
|
private initInstructions;
|
|
62
|
+
beforeLoad(): Promise<void>;
|
|
58
63
|
/**
|
|
59
64
|
* @internal
|
|
60
65
|
*/
|
|
@@ -67,12 +72,14 @@ export default class PluginWorkflowServer extends Plugin {
|
|
|
67
72
|
* Start a deferred execution
|
|
68
73
|
* @experimental
|
|
69
74
|
*/
|
|
70
|
-
start(execution: ExecutionModel): void
|
|
71
|
-
|
|
75
|
+
start(execution: ExecutionModel): Promise<void>;
|
|
76
|
+
private validateEvent;
|
|
72
77
|
private createExecution;
|
|
73
78
|
private prepare;
|
|
74
79
|
private dispatch;
|
|
80
|
+
createProcessor(execution: ExecutionModel, options?: {}): Processor;
|
|
75
81
|
private process;
|
|
82
|
+
execute(workflow: WorkflowModel, values: any, options?: EventOptions): Promise<void | Processor>;
|
|
76
83
|
/**
|
|
77
84
|
* @experimental
|
|
78
85
|
* @param {string} dataSourceName
|