@nocobase/plugin-workflow 1.7.0-beta.8 → 1.7.0
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/3c67def1831d0b23.js +10 -0
- package/dist/client/WorkflowCategoryTabs.d.ts +10 -0
- package/dist/client/WorkflowCollectionsProvider.d.ts +10 -0
- package/dist/client/WorkflowTasks.d.ts +12 -3
- package/dist/client/a4111333ce86663c.js +10 -0
- package/dist/client/a54c8c009524b6da.js +10 -0
- package/dist/client/components/EmunerationField.d.ts +9 -0
- package/dist/client/f9eeb46e5c6a9ffe.js +10 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -1
- package/dist/client/locale/index.d.ts +2 -1
- package/dist/client/schemas/executions.d.ts +126 -125
- package/dist/client/triggers/schedule/RepeatField.d.ts +2 -1
- package/dist/common/collections/executions.d.ts +136 -0
- package/dist/common/collections/executions.js +125 -0
- package/dist/common/collections/flow_nodes.d.ts +65 -0
- package/dist/common/collections/flow_nodes.js +94 -0
- package/dist/common/collections/jobs.d.ts +37 -0
- package/dist/common/collections/jobs.js +74 -0
- package/dist/common/collections/userWorkflowTasks.d.ts +37 -0
- package/dist/common/collections/userWorkflowTasks.js +65 -0
- package/dist/common/collections/workflowCategories.d.ts +65 -0
- package/dist/common/collections/workflowCategories.js +68 -0
- package/dist/common/collections/workflowCategoryRelations.d.ts +21 -0
- package/dist/common/collections/workflowCategoryRelations.js +51 -0
- package/dist/common/collections/workflowStats.d.ts +37 -0
- package/dist/common/collections/workflowStats.js +59 -0
- package/dist/common/collections/workflowTasks.d.ts +10 -0
- package/dist/common/collections/workflowTasks.js +64 -0
- package/dist/common/collections/workflowVersionStats.d.ts +37 -0
- package/dist/common/collections/workflowVersionStats.js +59 -0
- package/dist/common/collections/workflows.d.ts +263 -0
- package/dist/common/collections/workflows.js +244 -0
- package/dist/common/constants.d.ts +9 -0
- package/dist/{server/actions/workflowTasks.js → common/constants.js} +6 -17
- package/dist/externalVersion.js +15 -14
- package/dist/locale/en-US.json +127 -15
- package/dist/locale/zh-CN.json +10 -1
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/LICENSE +201 -0
- package/dist/node_modules/nodejs-snowflake/nodejs_snowflake.d.ts +62 -0
- package/dist/node_modules/nodejs-snowflake/nodejs_snowflake.js +1 -0
- package/dist/node_modules/nodejs-snowflake/nodejs_snowflake_bg.wasm +0 -0
- package/dist/node_modules/nodejs-snowflake/package.json +1 -0
- package/dist/server/Dispatcher.d.ts +11 -0
- package/dist/server/Dispatcher.js +35 -0
- package/dist/server/Plugin.d.ts +12 -2
- package/dist/server/Plugin.js +143 -105
- package/dist/server/Processor.d.ts +4 -11
- package/dist/server/Processor.js +50 -45
- package/dist/server/actions/index.js +2 -2
- package/dist/server/actions/nodes.js +7 -5
- package/dist/server/actions/{workflowTasks.d.ts → userWorkflowTasks.d.ts} +1 -1
- package/dist/server/actions/userWorkflowTasks.js +54 -0
- package/dist/server/actions/workflows.js +6 -3
- package/dist/server/collections/executions.js +12 -44
- package/dist/server/collections/flow_nodes.js +12 -57
- package/dist/server/collections/jobs.js +12 -36
- package/dist/server/collections/userWorkflowTasks.d.ts +11 -0
- package/dist/server/collections/userWorkflowTasks.js +43 -0
- package/dist/server/collections/workflowCategories.d.ts +11 -0
- package/dist/server/collections/workflowCategories.js +43 -0
- package/dist/server/collections/workflowCategoryRelations.d.ts +11 -0
- package/dist/server/collections/workflowCategoryRelations.js +43 -0
- package/dist/server/collections/workflowStats.d.ts +11 -0
- package/dist/server/collections/workflowStats.js +43 -0
- package/dist/server/collections/workflowTasks.d.ts +2 -1
- package/dist/server/collections/workflowTasks.js +12 -33
- package/dist/server/collections/workflowVersionStats.d.ts +11 -0
- package/dist/server/collections/workflowVersionStats.js +43 -0
- package/dist/server/collections/workflows.d.ts +2 -1
- package/dist/server/collections/workflows.js +12 -101
- package/dist/server/migrations/20250320223415-stats.d.ts +14 -0
- package/dist/server/migrations/20250320223415-stats.js +82 -0
- package/dist/server/migrations/20250409164913-remove-jobs-auto-increment.d.ts +14 -0
- package/dist/server/migrations/20250409164913-remove-jobs-auto-increment.js +57 -0
- package/dist/server/repositories/WorkflowRepository.js +3 -2
- package/dist/server/triggers/CollectionTrigger.js +3 -2
- package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.d.ts +5 -3
- package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.js +39 -36
- package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +4 -2
- package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.js +26 -24
- package/dist/server/triggers/ScheduleTrigger/index.d.ts +2 -1
- package/dist/server/triggers/ScheduleTrigger/index.js +4 -8
- package/dist/server/triggers/index.d.ts +1 -1
- package/dist/server/types/Workflow.d.ts +0 -2
- package/dist/swagger/index.d.ts +0 -14
- package/dist/swagger/index.js +0 -14
- package/package.json +6 -4
- package/dist/client/4d75ef32f02d7285.js +0 -10
- package/dist/client/56ce448358002e64.js +0 -10
- package/dist/client/58bb427e05b600de.js +0 -10
- package/dist/client/739d458621edf81f.js +0 -10
- package/dist/client/nodes/output.d.ts +0 -31
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
declare const _default: {
|
|
10
|
+
dumpRules: {
|
|
11
|
+
group: string;
|
|
12
|
+
};
|
|
13
|
+
migrationRules: string[];
|
|
14
|
+
name: string;
|
|
15
|
+
shared: boolean;
|
|
16
|
+
autoGenId: boolean;
|
|
17
|
+
fields: ({
|
|
18
|
+
name: string;
|
|
19
|
+
type: string;
|
|
20
|
+
primaryKey: boolean;
|
|
21
|
+
defaultValue?: undefined;
|
|
22
|
+
interface?: undefined;
|
|
23
|
+
uiSchema?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
type: string;
|
|
26
|
+
name: string;
|
|
27
|
+
defaultValue: number;
|
|
28
|
+
interface: string;
|
|
29
|
+
uiSchema: {
|
|
30
|
+
title: string;
|
|
31
|
+
'x-component': string;
|
|
32
|
+
'x-read-pretty': boolean;
|
|
33
|
+
};
|
|
34
|
+
primaryKey?: undefined;
|
|
35
|
+
})[];
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var workflowVersionStats_exports = {};
|
|
28
|
+
__export(workflowVersionStats_exports, {
|
|
29
|
+
default: () => workflowVersionStats_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(workflowVersionStats_exports);
|
|
32
|
+
var import_constants = require("../constants");
|
|
33
|
+
var workflowVersionStats_default = {
|
|
34
|
+
dumpRules: {
|
|
35
|
+
group: "log"
|
|
36
|
+
},
|
|
37
|
+
migrationRules: ["schema-only"],
|
|
38
|
+
name: "workflowVersionStats",
|
|
39
|
+
shared: true,
|
|
40
|
+
autoGenId: false,
|
|
41
|
+
fields: [
|
|
42
|
+
{
|
|
43
|
+
name: "id",
|
|
44
|
+
type: "bigInt",
|
|
45
|
+
primaryKey: true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: "bigInt",
|
|
49
|
+
name: "executed",
|
|
50
|
+
defaultValue: 0,
|
|
51
|
+
interface: "number",
|
|
52
|
+
uiSchema: {
|
|
53
|
+
title: `{{t("Executed", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
54
|
+
"x-component": "InputNumber",
|
|
55
|
+
"x-read-pretty": true
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
};
|
|
@@ -0,0 +1,263 @@
|
|
|
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
|
+
declare const _default: {
|
|
10
|
+
dumpRules: string;
|
|
11
|
+
migrationRules: string[];
|
|
12
|
+
name: string;
|
|
13
|
+
shared: boolean;
|
|
14
|
+
repository: string;
|
|
15
|
+
fields: ({
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
interface?: undefined;
|
|
19
|
+
uiSchema?: undefined;
|
|
20
|
+
defaultValue?: undefined;
|
|
21
|
+
required?: undefined;
|
|
22
|
+
target?: undefined;
|
|
23
|
+
onDelete?: undefined;
|
|
24
|
+
foreignKey?: undefined;
|
|
25
|
+
sourceKey?: undefined;
|
|
26
|
+
constraints?: undefined;
|
|
27
|
+
through?: undefined;
|
|
28
|
+
otherKey?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
type: string;
|
|
31
|
+
name: string;
|
|
32
|
+
interface: string;
|
|
33
|
+
uiSchema: {
|
|
34
|
+
title: string;
|
|
35
|
+
type: string;
|
|
36
|
+
'x-component': string;
|
|
37
|
+
required: boolean;
|
|
38
|
+
enum?: undefined;
|
|
39
|
+
default?: undefined;
|
|
40
|
+
'x-component-props'?: undefined;
|
|
41
|
+
'x-read-pretty'?: undefined;
|
|
42
|
+
};
|
|
43
|
+
defaultValue?: undefined;
|
|
44
|
+
required?: undefined;
|
|
45
|
+
target?: undefined;
|
|
46
|
+
onDelete?: undefined;
|
|
47
|
+
foreignKey?: undefined;
|
|
48
|
+
sourceKey?: undefined;
|
|
49
|
+
constraints?: undefined;
|
|
50
|
+
through?: undefined;
|
|
51
|
+
otherKey?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
type: string;
|
|
54
|
+
name: string;
|
|
55
|
+
defaultValue: boolean;
|
|
56
|
+
interface: string;
|
|
57
|
+
uiSchema: {
|
|
58
|
+
title: string;
|
|
59
|
+
type: string;
|
|
60
|
+
enum: ({
|
|
61
|
+
label: string;
|
|
62
|
+
value: boolean;
|
|
63
|
+
color: string;
|
|
64
|
+
} | {
|
|
65
|
+
label: string;
|
|
66
|
+
value: boolean;
|
|
67
|
+
color?: undefined;
|
|
68
|
+
})[];
|
|
69
|
+
'x-component': string;
|
|
70
|
+
default: boolean;
|
|
71
|
+
required?: undefined;
|
|
72
|
+
'x-component-props'?: undefined;
|
|
73
|
+
'x-read-pretty'?: undefined;
|
|
74
|
+
};
|
|
75
|
+
required?: undefined;
|
|
76
|
+
target?: undefined;
|
|
77
|
+
onDelete?: undefined;
|
|
78
|
+
foreignKey?: undefined;
|
|
79
|
+
sourceKey?: undefined;
|
|
80
|
+
constraints?: undefined;
|
|
81
|
+
through?: undefined;
|
|
82
|
+
otherKey?: undefined;
|
|
83
|
+
} | {
|
|
84
|
+
type: string;
|
|
85
|
+
name: string;
|
|
86
|
+
interface: string;
|
|
87
|
+
uiSchema: {
|
|
88
|
+
title: string;
|
|
89
|
+
type: string;
|
|
90
|
+
'x-component': string;
|
|
91
|
+
required?: undefined;
|
|
92
|
+
enum?: undefined;
|
|
93
|
+
default?: undefined;
|
|
94
|
+
'x-component-props'?: undefined;
|
|
95
|
+
'x-read-pretty'?: undefined;
|
|
96
|
+
};
|
|
97
|
+
defaultValue?: undefined;
|
|
98
|
+
required?: undefined;
|
|
99
|
+
target?: undefined;
|
|
100
|
+
onDelete?: undefined;
|
|
101
|
+
foreignKey?: undefined;
|
|
102
|
+
sourceKey?: undefined;
|
|
103
|
+
constraints?: undefined;
|
|
104
|
+
through?: undefined;
|
|
105
|
+
otherKey?: undefined;
|
|
106
|
+
} | {
|
|
107
|
+
type: string;
|
|
108
|
+
name: string;
|
|
109
|
+
required: boolean;
|
|
110
|
+
interface: string;
|
|
111
|
+
uiSchema: {
|
|
112
|
+
title: string;
|
|
113
|
+
type: string;
|
|
114
|
+
'x-component': string;
|
|
115
|
+
enum: string;
|
|
116
|
+
required: boolean;
|
|
117
|
+
default?: undefined;
|
|
118
|
+
'x-component-props'?: undefined;
|
|
119
|
+
'x-read-pretty'?: undefined;
|
|
120
|
+
};
|
|
121
|
+
defaultValue?: undefined;
|
|
122
|
+
target?: undefined;
|
|
123
|
+
onDelete?: undefined;
|
|
124
|
+
foreignKey?: undefined;
|
|
125
|
+
sourceKey?: undefined;
|
|
126
|
+
constraints?: undefined;
|
|
127
|
+
through?: undefined;
|
|
128
|
+
otherKey?: undefined;
|
|
129
|
+
} | {
|
|
130
|
+
type: string;
|
|
131
|
+
name: string;
|
|
132
|
+
required: boolean;
|
|
133
|
+
defaultValue: {};
|
|
134
|
+
interface?: undefined;
|
|
135
|
+
uiSchema?: undefined;
|
|
136
|
+
target?: undefined;
|
|
137
|
+
onDelete?: undefined;
|
|
138
|
+
foreignKey?: undefined;
|
|
139
|
+
sourceKey?: undefined;
|
|
140
|
+
constraints?: undefined;
|
|
141
|
+
through?: undefined;
|
|
142
|
+
otherKey?: undefined;
|
|
143
|
+
} | {
|
|
144
|
+
type: string;
|
|
145
|
+
name: string;
|
|
146
|
+
target: string;
|
|
147
|
+
onDelete: string;
|
|
148
|
+
interface?: undefined;
|
|
149
|
+
uiSchema?: undefined;
|
|
150
|
+
defaultValue?: undefined;
|
|
151
|
+
required?: undefined;
|
|
152
|
+
foreignKey?: undefined;
|
|
153
|
+
sourceKey?: undefined;
|
|
154
|
+
constraints?: undefined;
|
|
155
|
+
through?: undefined;
|
|
156
|
+
otherKey?: undefined;
|
|
157
|
+
} | {
|
|
158
|
+
type: string;
|
|
159
|
+
name: string;
|
|
160
|
+
defaultValue: number;
|
|
161
|
+
interface?: undefined;
|
|
162
|
+
uiSchema?: undefined;
|
|
163
|
+
required?: undefined;
|
|
164
|
+
target?: undefined;
|
|
165
|
+
onDelete?: undefined;
|
|
166
|
+
foreignKey?: undefined;
|
|
167
|
+
sourceKey?: undefined;
|
|
168
|
+
constraints?: undefined;
|
|
169
|
+
through?: undefined;
|
|
170
|
+
otherKey?: undefined;
|
|
171
|
+
} | {
|
|
172
|
+
type: string;
|
|
173
|
+
name: string;
|
|
174
|
+
defaultValue: boolean;
|
|
175
|
+
interface: string;
|
|
176
|
+
uiSchema: {
|
|
177
|
+
title: string;
|
|
178
|
+
type: string;
|
|
179
|
+
'x-component': string;
|
|
180
|
+
enum: {
|
|
181
|
+
label: string;
|
|
182
|
+
value: boolean;
|
|
183
|
+
color: string;
|
|
184
|
+
}[];
|
|
185
|
+
required: boolean;
|
|
186
|
+
default?: undefined;
|
|
187
|
+
'x-component-props'?: undefined;
|
|
188
|
+
'x-read-pretty'?: undefined;
|
|
189
|
+
};
|
|
190
|
+
required?: undefined;
|
|
191
|
+
target?: undefined;
|
|
192
|
+
onDelete?: undefined;
|
|
193
|
+
foreignKey?: undefined;
|
|
194
|
+
sourceKey?: undefined;
|
|
195
|
+
constraints?: undefined;
|
|
196
|
+
through?: undefined;
|
|
197
|
+
otherKey?: undefined;
|
|
198
|
+
} | {
|
|
199
|
+
type: string;
|
|
200
|
+
name: string;
|
|
201
|
+
target: string;
|
|
202
|
+
foreignKey: string;
|
|
203
|
+
sourceKey: string;
|
|
204
|
+
constraints: boolean;
|
|
205
|
+
onDelete: string;
|
|
206
|
+
interface?: undefined;
|
|
207
|
+
uiSchema?: undefined;
|
|
208
|
+
defaultValue?: undefined;
|
|
209
|
+
required?: undefined;
|
|
210
|
+
through?: undefined;
|
|
211
|
+
otherKey?: undefined;
|
|
212
|
+
} | {
|
|
213
|
+
type: string;
|
|
214
|
+
name: string;
|
|
215
|
+
defaultValue: {};
|
|
216
|
+
interface?: undefined;
|
|
217
|
+
uiSchema?: undefined;
|
|
218
|
+
required?: undefined;
|
|
219
|
+
target?: undefined;
|
|
220
|
+
onDelete?: undefined;
|
|
221
|
+
foreignKey?: undefined;
|
|
222
|
+
sourceKey?: undefined;
|
|
223
|
+
constraints?: undefined;
|
|
224
|
+
through?: undefined;
|
|
225
|
+
otherKey?: undefined;
|
|
226
|
+
} | {
|
|
227
|
+
type: string;
|
|
228
|
+
name: string;
|
|
229
|
+
target: string;
|
|
230
|
+
through: string;
|
|
231
|
+
foreignKey: string;
|
|
232
|
+
otherKey: string;
|
|
233
|
+
sourceKey: string;
|
|
234
|
+
constraints: boolean;
|
|
235
|
+
interface: string;
|
|
236
|
+
uiSchema: {
|
|
237
|
+
type: string;
|
|
238
|
+
title: string;
|
|
239
|
+
'x-component': string;
|
|
240
|
+
'x-component-props': {
|
|
241
|
+
multiple: boolean;
|
|
242
|
+
fieldNames: {
|
|
243
|
+
label: string;
|
|
244
|
+
value: string;
|
|
245
|
+
color: string;
|
|
246
|
+
};
|
|
247
|
+
mode: string;
|
|
248
|
+
};
|
|
249
|
+
'x-read-pretty': boolean;
|
|
250
|
+
required?: undefined;
|
|
251
|
+
enum?: undefined;
|
|
252
|
+
default?: undefined;
|
|
253
|
+
};
|
|
254
|
+
defaultValue?: undefined;
|
|
255
|
+
required?: undefined;
|
|
256
|
+
onDelete?: undefined;
|
|
257
|
+
})[];
|
|
258
|
+
indexes: {
|
|
259
|
+
unique: boolean;
|
|
260
|
+
fields: string[];
|
|
261
|
+
}[];
|
|
262
|
+
};
|
|
263
|
+
export default _default;
|
|
@@ -0,0 +1,244 @@
|
|
|
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
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var workflows_exports = {};
|
|
28
|
+
__export(workflows_exports, {
|
|
29
|
+
default: () => workflows_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(workflows_exports);
|
|
32
|
+
var import_constants = require("../constants");
|
|
33
|
+
var workflows_default = {
|
|
34
|
+
dumpRules: "required",
|
|
35
|
+
migrationRules: ["overwrite", "schema-only"],
|
|
36
|
+
name: "workflows",
|
|
37
|
+
shared: true,
|
|
38
|
+
repository: "WorkflowRepository",
|
|
39
|
+
fields: [
|
|
40
|
+
{
|
|
41
|
+
name: "key",
|
|
42
|
+
type: "uid"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: "string",
|
|
46
|
+
name: "title",
|
|
47
|
+
interface: "input",
|
|
48
|
+
uiSchema: {
|
|
49
|
+
title: '{{t("Name")}}',
|
|
50
|
+
type: "string",
|
|
51
|
+
"x-component": "Input",
|
|
52
|
+
required: true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: "boolean",
|
|
57
|
+
name: "enabled",
|
|
58
|
+
defaultValue: false,
|
|
59
|
+
interface: "radioGroup",
|
|
60
|
+
uiSchema: {
|
|
61
|
+
title: `{{t("Status", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
62
|
+
type: "string",
|
|
63
|
+
enum: [
|
|
64
|
+
{ label: `{{t("On", { ns: "${import_constants.NAMESPACE}" })}}`, value: true, color: "#52c41a" },
|
|
65
|
+
{ label: `{{t("Off", { ns: "${import_constants.NAMESPACE}" })}}`, value: false }
|
|
66
|
+
],
|
|
67
|
+
"x-component": "Radio.Group",
|
|
68
|
+
default: false
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: "text",
|
|
73
|
+
name: "description",
|
|
74
|
+
interface: "textarea",
|
|
75
|
+
uiSchema: {
|
|
76
|
+
title: '{{t("Description")}}',
|
|
77
|
+
type: "string",
|
|
78
|
+
"x-component": "Input.TextArea"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: "string",
|
|
83
|
+
name: "type",
|
|
84
|
+
required: true,
|
|
85
|
+
interface: "select",
|
|
86
|
+
uiSchema: {
|
|
87
|
+
title: `{{t("Trigger type", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
88
|
+
type: "string",
|
|
89
|
+
"x-component": "Select",
|
|
90
|
+
enum: "{{useTriggersOptions()}}",
|
|
91
|
+
required: true
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: "string",
|
|
96
|
+
name: "triggerTitle"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: "jsonb",
|
|
100
|
+
name: "config",
|
|
101
|
+
required: true,
|
|
102
|
+
defaultValue: {}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: "hasMany",
|
|
106
|
+
name: "nodes",
|
|
107
|
+
target: "flow_nodes",
|
|
108
|
+
onDelete: "CASCADE"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
type: "hasMany",
|
|
112
|
+
name: "executions"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: "integer",
|
|
116
|
+
name: "executed",
|
|
117
|
+
defaultValue: 0
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: "integer",
|
|
121
|
+
name: "allExecuted",
|
|
122
|
+
defaultValue: 0
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: "boolean",
|
|
126
|
+
name: "current"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: "boolean",
|
|
130
|
+
name: "sync",
|
|
131
|
+
defaultValue: false,
|
|
132
|
+
interface: "radioGroup",
|
|
133
|
+
uiSchema: {
|
|
134
|
+
title: `{{t("Mode", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
135
|
+
type: "boolean",
|
|
136
|
+
"x-component": "Radio.Group",
|
|
137
|
+
enum: [
|
|
138
|
+
{
|
|
139
|
+
label: `{{ t("Asynchronously", { ns: "${import_constants.NAMESPACE}" }) }}`,
|
|
140
|
+
value: false,
|
|
141
|
+
color: "cyan"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
label: `{{ t("Synchronously", { ns: "${import_constants.NAMESPACE}" }) }}`,
|
|
145
|
+
value: true,
|
|
146
|
+
color: "orange"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
required: true
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
type: "hasMany",
|
|
154
|
+
name: "revisions",
|
|
155
|
+
target: "workflows",
|
|
156
|
+
foreignKey: "key",
|
|
157
|
+
sourceKey: "key",
|
|
158
|
+
// NOTE: no constraints needed here because tricky self-referencing
|
|
159
|
+
constraints: false,
|
|
160
|
+
onDelete: "NO ACTION"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
type: "jsonb",
|
|
164
|
+
name: "options",
|
|
165
|
+
defaultValue: {}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
type: "hasOne",
|
|
169
|
+
name: "stats",
|
|
170
|
+
target: "workflowStats",
|
|
171
|
+
foreignKey: "key",
|
|
172
|
+
sourceKey: "key",
|
|
173
|
+
constraints: false,
|
|
174
|
+
onDelete: "CASCADE"
|
|
175
|
+
// interface: 'oho',
|
|
176
|
+
// uiSchema: {
|
|
177
|
+
// type: 'object',
|
|
178
|
+
// 'x-component': 'AssociationSelect',
|
|
179
|
+
// 'x-component-props': {
|
|
180
|
+
// fieldNames: {
|
|
181
|
+
// label: 'executed',
|
|
182
|
+
// value: 'key',
|
|
183
|
+
// },
|
|
184
|
+
// },
|
|
185
|
+
// 'x-read-pretty': true,
|
|
186
|
+
// },
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
type: "hasOne",
|
|
190
|
+
name: "versionStats",
|
|
191
|
+
target: "workflowVersionStats",
|
|
192
|
+
foreignKey: "id",
|
|
193
|
+
sourceKey: "id",
|
|
194
|
+
constraints: false,
|
|
195
|
+
onDelete: "CASCADE"
|
|
196
|
+
// interface: 'oho',
|
|
197
|
+
// uiSchema: {
|
|
198
|
+
// type: 'object',
|
|
199
|
+
// 'x-component': 'AssociationSelect',
|
|
200
|
+
// 'x-component-props': {
|
|
201
|
+
// fieldNames: {
|
|
202
|
+
// label: 'executed',
|
|
203
|
+
// value: 'id',
|
|
204
|
+
// },
|
|
205
|
+
// },
|
|
206
|
+
// 'x-read-pretty': true,
|
|
207
|
+
// },
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
type: "belongsToMany",
|
|
211
|
+
name: "categories",
|
|
212
|
+
target: "workflowCategories",
|
|
213
|
+
through: "workflowCategoryRelations",
|
|
214
|
+
foreignKey: "workflowId",
|
|
215
|
+
otherKey: "categoryId",
|
|
216
|
+
sourceKey: "id",
|
|
217
|
+
constraints: false,
|
|
218
|
+
interface: "m2m",
|
|
219
|
+
uiSchema: {
|
|
220
|
+
type: "array",
|
|
221
|
+
title: `{{t("Category", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
222
|
+
"x-component": "AssociationField",
|
|
223
|
+
"x-component-props": {
|
|
224
|
+
multiple: true,
|
|
225
|
+
// objectValue: false,
|
|
226
|
+
fieldNames: {
|
|
227
|
+
label: "title",
|
|
228
|
+
value: "id",
|
|
229
|
+
color: "color"
|
|
230
|
+
},
|
|
231
|
+
mode: "Tag"
|
|
232
|
+
},
|
|
233
|
+
"x-read-pretty": true
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
// NOTE: use unique index for avoiding deadlock in mysql when setCurrent
|
|
238
|
+
indexes: [
|
|
239
|
+
{
|
|
240
|
+
unique: true,
|
|
241
|
+
fields: ["key", "current"]
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export declare const NAMESPACE = "workflow";
|
|
@@ -24,24 +24,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var
|
|
28
|
-
__export(
|
|
29
|
-
|
|
27
|
+
var constants_exports = {};
|
|
28
|
+
__export(constants_exports, {
|
|
29
|
+
NAMESPACE: () => NAMESPACE
|
|
30
30
|
});
|
|
31
|
-
module.exports = __toCommonJS(
|
|
32
|
-
|
|
33
|
-
var import_actions = require("@nocobase/actions");
|
|
34
|
-
async function countMine(context, next) {
|
|
35
|
-
const repository = import_actions.utils.getRepositoryFromParams(context);
|
|
36
|
-
context.body = await repository.countAll({
|
|
37
|
-
where: {
|
|
38
|
-
userId: context.state.currentUser.id,
|
|
39
|
-
workflowId: { [import_sequelize.Op.ne]: null }
|
|
40
|
-
}
|
|
41
|
-
}) || [];
|
|
42
|
-
await next();
|
|
43
|
-
}
|
|
31
|
+
module.exports = __toCommonJS(constants_exports);
|
|
32
|
+
const NAMESPACE = "workflow";
|
|
44
33
|
// Annotate the CommonJS export names for ESM import in node:
|
|
45
34
|
0 && (module.exports = {
|
|
46
|
-
|
|
35
|
+
NAMESPACE
|
|
47
36
|
});
|
package/dist/externalVersion.js
CHANGED
|
@@ -11,24 +11,25 @@ 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.7.0
|
|
15
|
-
"@nocobase/utils": "1.7.0
|
|
16
|
-
"antd": "5.
|
|
14
|
+
"@nocobase/client": "1.7.0",
|
|
15
|
+
"@nocobase/utils": "1.7.0",
|
|
16
|
+
"antd": "5.24.2",
|
|
17
17
|
"@ant-design/icons": "5.6.1",
|
|
18
18
|
"react-router-dom": "6.28.1",
|
|
19
19
|
"react-i18next": "11.18.6",
|
|
20
20
|
"lodash": "4.17.21",
|
|
21
|
+
"@dnd-kit/core": "6.1.0",
|
|
22
|
+
"@formily/shared": "2.3.2",
|
|
21
23
|
"sequelize": "6.35.2",
|
|
22
|
-
"@nocobase/database": "1.7.0
|
|
23
|
-
"@nocobase/server": "1.7.0
|
|
24
|
-
"@nocobase/data-source-manager": "1.7.0
|
|
25
|
-
"@nocobase/logger": "1.7.0
|
|
26
|
-
"@nocobase/evaluators": "1.7.0
|
|
27
|
-
"@formily/antd-v5": "1.
|
|
24
|
+
"@nocobase/database": "1.7.0",
|
|
25
|
+
"@nocobase/server": "1.7.0",
|
|
26
|
+
"@nocobase/data-source-manager": "1.7.0",
|
|
27
|
+
"@nocobase/logger": "1.7.0",
|
|
28
|
+
"@nocobase/evaluators": "1.7.0",
|
|
29
|
+
"@formily/antd-v5": "1.2.3",
|
|
28
30
|
"@formily/reactive": "2.3.0",
|
|
29
|
-
"@
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"@nocobase/
|
|
33
|
-
"@nocobase/test": "1.7.0-beta.8"
|
|
31
|
+
"@nocobase/actions": "1.7.0",
|
|
32
|
+
"dayjs": "1.11.13",
|
|
33
|
+
"@nocobase/plugin-workflow-test": "1.7.0",
|
|
34
|
+
"@nocobase/test": "1.7.0"
|
|
34
35
|
};
|