@nocobase/plugin-workflow 1.6.28 → 1.6.29
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/{51abfb0378927a98.js → 2472eee6dce2df85.js} +1 -1
- package/dist/client/WorkflowTasks.d.ts +2 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +10 -10
- package/dist/locale/zh-CN.json +2 -1
- 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 +5 -2
- package/dist/server/Plugin.js +32 -44
- package/dist/server/Processor.js +2 -0
- package/dist/server/actions/index.js +2 -2
- package/dist/server/actions/{workflowTasks.d.ts → userWorkflowTasks.d.ts} +1 -1
- package/dist/server/actions/userWorkflowTasks.js +54 -0
- package/dist/server/collections/userWorkflowTasks.d.ts +37 -0
- package/dist/server/{actions/workflowTasks.js → collections/userWorkflowTasks.js} +37 -19
- package/dist/server/collections/workflowTasks.d.ts +3 -0
- package/package.json +3 -3
- package/dist/client/nodes/output.d.ts +0 -31
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.6.
|
|
15
|
-
"@nocobase/utils": "1.6.
|
|
14
|
+
"@nocobase/client": "1.6.29",
|
|
15
|
+
"@nocobase/utils": "1.6.29",
|
|
16
16
|
"antd": "5.12.8",
|
|
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
21
|
"sequelize": "6.35.2",
|
|
22
|
-
"@nocobase/database": "1.6.
|
|
23
|
-
"@nocobase/server": "1.6.
|
|
24
|
-
"@nocobase/data-source-manager": "1.6.
|
|
25
|
-
"@nocobase/logger": "1.6.
|
|
26
|
-
"@nocobase/evaluators": "1.6.
|
|
22
|
+
"@nocobase/database": "1.6.29",
|
|
23
|
+
"@nocobase/server": "1.6.29",
|
|
24
|
+
"@nocobase/data-source-manager": "1.6.29",
|
|
25
|
+
"@nocobase/logger": "1.6.29",
|
|
26
|
+
"@nocobase/evaluators": "1.6.29",
|
|
27
27
|
"@formily/antd-v5": "1.1.9",
|
|
28
28
|
"@formily/reactive": "2.3.0",
|
|
29
29
|
"@formily/shared": "2.3.2",
|
|
30
|
-
"@nocobase/actions": "1.6.
|
|
30
|
+
"@nocobase/actions": "1.6.29",
|
|
31
31
|
"dayjs": "1.11.10",
|
|
32
|
-
"@nocobase/plugin-workflow-test": "1.6.
|
|
33
|
-
"@nocobase/test": "1.6.
|
|
32
|
+
"@nocobase/plugin-workflow-test": "1.6.29",
|
|
33
|
+
"@nocobase/test": "1.6.29"
|
|
34
34
|
};
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"Copy to new version": "复制到新版本",
|
|
16
16
|
"Duplicate": "复制",
|
|
17
17
|
"Duplicate to new workflow": "复制为新工作流",
|
|
18
|
-
"
|
|
18
|
+
"This is a main version, delete it will cause the whole workflow to be deleted (including all other revisions).": "当前是主版本,删除将导致整个流程被删除(包括所有其他版本)。",
|
|
19
|
+
"Current version will be deleted (without affecting other versions).": "当前版本将被删除(不影响其他版本)。",
|
|
19
20
|
"Execute manually": "手动执行",
|
|
20
21
|
"The trigger is not configured correctly, please check the trigger configuration.": "触发器配置不正确,请检查触发器配置。",
|
|
21
22
|
"This type of trigger has not been supported to be executed manually.": "该类型的触发器暂未支持手动执行。",
|
|
@@ -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":"2025-05-
|
|
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-05-13T06:35:50.118Z"}
|
|
@@ -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":"2025-05-
|
|
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-05-13T06:35:49.775Z"}
|
package/dist/server/Plugin.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import Processor from './Processor';
|
|
|
14
14
|
import { CustomFunction } from './functions';
|
|
15
15
|
import Trigger from './triggers';
|
|
16
16
|
import { InstructionInterface } from './instructions';
|
|
17
|
-
import type { ExecutionModel, WorkflowModel
|
|
17
|
+
import type { ExecutionModel, WorkflowModel } from './types';
|
|
18
18
|
type ID = number | string;
|
|
19
19
|
export type EventOptions = {
|
|
20
20
|
eventKey?: string;
|
|
@@ -91,6 +91,9 @@ export default class PluginWorkflowServer extends Plugin {
|
|
|
91
91
|
/**
|
|
92
92
|
* @experimental
|
|
93
93
|
*/
|
|
94
|
-
|
|
94
|
+
updateTasksStats(userId: number, type: string, stats: {
|
|
95
|
+
pending: number;
|
|
96
|
+
all: number;
|
|
97
|
+
}, { transaction }: Transactionable): Promise<void>;
|
|
95
98
|
}
|
|
96
99
|
export {};
|
package/dist/server/Plugin.js
CHANGED
|
@@ -60,7 +60,6 @@ var import_DestroyInstruction = __toESM(require("./instructions/DestroyInstructi
|
|
|
60
60
|
var import_QueryInstruction = __toESM(require("./instructions/QueryInstruction"));
|
|
61
61
|
var import_UpdateInstruction = __toESM(require("./instructions/UpdateInstruction"));
|
|
62
62
|
var import_WorkflowRepository = __toESM(require("./repositories/WorkflowRepository"));
|
|
63
|
-
var import_WorkflowTasksRepository = __toESM(require("./repositories/WorkflowTasksRepository"));
|
|
64
63
|
class PluginWorkflowServer extends import_server.Plugin {
|
|
65
64
|
instructions = new import_utils.Registry();
|
|
66
65
|
triggers = new import_utils.Registry();
|
|
@@ -74,7 +73,10 @@ class PluginWorkflowServer extends import_server.Plugin {
|
|
|
74
73
|
loggerCache;
|
|
75
74
|
meter = null;
|
|
76
75
|
checker = null;
|
|
77
|
-
onBeforeSave = async (instance, { transaction }) => {
|
|
76
|
+
onBeforeSave = async (instance, { transaction, cycling }) => {
|
|
77
|
+
if (cycling) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
78
80
|
const Model = instance.constructor;
|
|
79
81
|
if (!instance.key) {
|
|
80
82
|
instance.set("key", (0, import_utils.uid)());
|
|
@@ -94,13 +96,12 @@ class PluginWorkflowServer extends import_server.Plugin {
|
|
|
94
96
|
});
|
|
95
97
|
if (!previous) {
|
|
96
98
|
instance.set("current", true);
|
|
97
|
-
}
|
|
98
|
-
if (instance.current && previous) {
|
|
99
|
+
} else if (instance.current) {
|
|
99
100
|
await previous.update(
|
|
100
101
|
{ enabled: false, current: null },
|
|
101
102
|
{
|
|
102
103
|
transaction,
|
|
103
|
-
|
|
104
|
+
cycling: true
|
|
104
105
|
}
|
|
105
106
|
);
|
|
106
107
|
this.toggle(previous, false, { transaction });
|
|
@@ -196,8 +197,7 @@ class PluginWorkflowServer extends import_server.Plugin {
|
|
|
196
197
|
}
|
|
197
198
|
async beforeLoad() {
|
|
198
199
|
this.db.registerRepositories({
|
|
199
|
-
WorkflowRepository: import_WorkflowRepository.default
|
|
200
|
-
WorkflowTasksRepository: import_WorkflowTasksRepository.default
|
|
200
|
+
WorkflowRepository: import_WorkflowRepository.default
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
@@ -240,15 +240,8 @@ class PluginWorkflowServer extends import_server.Plugin {
|
|
|
240
240
|
name: "ui.workflows",
|
|
241
241
|
actions: ["workflows:list"]
|
|
242
242
|
});
|
|
243
|
-
this.app.acl.allow("
|
|
243
|
+
this.app.acl.allow("userWorkflowTasks", "listMine", "loggedIn");
|
|
244
244
|
this.app.acl.allow("*", ["trigger"], "loggedIn");
|
|
245
|
-
this.db.addMigrations({
|
|
246
|
-
namespace: this.name,
|
|
247
|
-
directory: import_path.default.resolve(__dirname, "migrations"),
|
|
248
|
-
context: {
|
|
249
|
-
plugin: this
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
245
|
db.on("workflows.beforeSave", this.onBeforeSave);
|
|
253
246
|
db.on("workflows.afterCreate", (model, { transaction }) => {
|
|
254
247
|
if (model.enabled) {
|
|
@@ -261,13 +254,6 @@ class PluginWorkflowServer extends import_server.Plugin {
|
|
|
261
254
|
);
|
|
262
255
|
db.on("workflows.afterDestroy", async (model, { transaction }) => {
|
|
263
256
|
this.toggle(model, false, { transaction });
|
|
264
|
-
const TaskRepo = this.db.getRepository("workflowTasks");
|
|
265
|
-
await TaskRepo.destroy({
|
|
266
|
-
filter: {
|
|
267
|
-
workflowId: model.id
|
|
268
|
-
},
|
|
269
|
-
transaction
|
|
270
|
-
});
|
|
271
257
|
});
|
|
272
258
|
this.app.on("afterStart", async () => {
|
|
273
259
|
this.ready = true;
|
|
@@ -644,36 +630,38 @@ class PluginWorkflowServer extends import_server.Plugin {
|
|
|
644
630
|
/**
|
|
645
631
|
* @experimental
|
|
646
632
|
*/
|
|
647
|
-
async
|
|
633
|
+
async updateTasksStats(userId, type, stats = { pending: 0, all: 0 }, { transaction }) {
|
|
648
634
|
const { db } = this.app;
|
|
649
|
-
const repository = db.getRepository("
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
635
|
+
const repository = db.getRepository("userWorkflowTasks");
|
|
636
|
+
let record = await repository.findOne({
|
|
637
|
+
filter: {
|
|
638
|
+
userId,
|
|
639
|
+
type
|
|
640
|
+
},
|
|
641
|
+
transaction
|
|
642
|
+
});
|
|
643
|
+
if (record) {
|
|
644
|
+
await record.update(
|
|
645
|
+
{
|
|
646
|
+
stats
|
|
655
647
|
},
|
|
656
|
-
transaction
|
|
657
|
-
|
|
648
|
+
{ transaction }
|
|
649
|
+
);
|
|
658
650
|
} else {
|
|
659
|
-
await repository.
|
|
660
|
-
|
|
661
|
-
|
|
651
|
+
record = await repository.create({
|
|
652
|
+
values: {
|
|
653
|
+
userId,
|
|
654
|
+
type,
|
|
655
|
+
stats
|
|
656
|
+
},
|
|
662
657
|
transaction
|
|
663
658
|
});
|
|
664
659
|
}
|
|
665
|
-
if (
|
|
666
|
-
const counts = await repository.countAll({
|
|
667
|
-
where: {
|
|
668
|
-
userId: task.userId,
|
|
669
|
-
workflowId: { [import_database.Op.ne]: null }
|
|
670
|
-
},
|
|
671
|
-
transaction
|
|
672
|
-
}) || [];
|
|
660
|
+
if (userId) {
|
|
673
661
|
this.app.emit("ws:sendToTag", {
|
|
674
662
|
tagKey: "userId",
|
|
675
|
-
tagValue: `${
|
|
676
|
-
message: { type: "workflow:tasks:updated", payload:
|
|
663
|
+
tagValue: `${userId}`,
|
|
664
|
+
message: { type: "workflow:tasks:updated", payload: record.get() }
|
|
677
665
|
});
|
|
678
666
|
}
|
|
679
667
|
}
|
package/dist/server/Processor.js
CHANGED
|
@@ -123,11 +123,13 @@ class Processor {
|
|
|
123
123
|
execution.workflow = plugin.enabledCache.get(execution.workflowId) || await execution.getWorkflow({ transaction });
|
|
124
124
|
}
|
|
125
125
|
const nodes = await execution.workflow.getNodes({ transaction });
|
|
126
|
+
execution.workflow.nodes = nodes;
|
|
126
127
|
this.makeNodes(nodes);
|
|
127
128
|
const jobs = await execution.getJobs({
|
|
128
129
|
order: [["id", "ASC"]],
|
|
129
130
|
transaction
|
|
130
131
|
});
|
|
132
|
+
execution.jobs = jobs;
|
|
131
133
|
this.makeJobs(jobs);
|
|
132
134
|
}
|
|
133
135
|
async start() {
|
|
@@ -42,7 +42,7 @@ module.exports = __toCommonJS(actions_exports);
|
|
|
42
42
|
var workflows = __toESM(require("./workflows"));
|
|
43
43
|
var nodes = __toESM(require("./nodes"));
|
|
44
44
|
var executions = __toESM(require("./executions"));
|
|
45
|
-
var
|
|
45
|
+
var userWorkflowTasks = __toESM(require("./userWorkflowTasks"));
|
|
46
46
|
function make(name, mod) {
|
|
47
47
|
return Object.keys(mod).reduce(
|
|
48
48
|
(result, key) => ({
|
|
@@ -64,6 +64,6 @@ function actions_default({ app }) {
|
|
|
64
64
|
test: nodes.test
|
|
65
65
|
}),
|
|
66
66
|
...make("executions", executions),
|
|
67
|
-
...make("
|
|
67
|
+
...make("userWorkflowTasks", userWorkflowTasks)
|
|
68
68
|
});
|
|
69
69
|
}
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import { Context } from '@nocobase/actions';
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function listMine(context: Context, next: any): Promise<void>;
|
|
@@ -0,0 +1,54 @@
|
|
|
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 __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var userWorkflowTasks_exports = {};
|
|
38
|
+
__export(userWorkflowTasks_exports, {
|
|
39
|
+
listMine: () => listMine
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(userWorkflowTasks_exports);
|
|
42
|
+
var import_actions = __toESM(require("@nocobase/actions"));
|
|
43
|
+
async function listMine(context, next) {
|
|
44
|
+
context.action.mergeParams({
|
|
45
|
+
filter: {
|
|
46
|
+
userId: context.state.currentUser.id
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return import_actions.default.list(context, next);
|
|
50
|
+
}
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
listMine
|
|
54
|
+
});
|
|
@@ -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
|
+
fields: ({
|
|
17
|
+
name: string;
|
|
18
|
+
type: string;
|
|
19
|
+
foreignKey?: undefined;
|
|
20
|
+
defaultValue?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
name: string;
|
|
23
|
+
type: string;
|
|
24
|
+
foreignKey: string;
|
|
25
|
+
defaultValue?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
type: string;
|
|
28
|
+
name: string;
|
|
29
|
+
defaultValue: {};
|
|
30
|
+
foreignKey?: undefined;
|
|
31
|
+
})[];
|
|
32
|
+
indexes: {
|
|
33
|
+
unique: boolean;
|
|
34
|
+
fields: string[];
|
|
35
|
+
}[];
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
@@ -24,24 +24,42 @@ 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 userWorkflowTasks_exports = {};
|
|
28
|
+
__export(userWorkflowTasks_exports, {
|
|
29
|
+
default: () => userWorkflowTasks_default
|
|
30
30
|
});
|
|
31
|
-
module.exports = __toCommonJS(
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
module.exports = __toCommonJS(userWorkflowTasks_exports);
|
|
32
|
+
var userWorkflowTasks_default = {
|
|
33
|
+
dumpRules: {
|
|
34
|
+
group: "log"
|
|
35
|
+
},
|
|
36
|
+
migrationRules: ["schema-only"],
|
|
37
|
+
name: "userWorkflowTasks",
|
|
38
|
+
shared: true,
|
|
39
|
+
fields: [
|
|
40
|
+
{
|
|
41
|
+
name: "userId",
|
|
42
|
+
type: "bigInt"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "user",
|
|
46
|
+
type: "belongsTo",
|
|
47
|
+
foreignKey: "userId"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "type",
|
|
51
|
+
type: "string"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: "json",
|
|
55
|
+
name: "stats",
|
|
56
|
+
defaultValue: {}
|
|
40
57
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
58
|
+
],
|
|
59
|
+
indexes: [
|
|
60
|
+
{
|
|
61
|
+
unique: true,
|
|
62
|
+
fields: ["userId", "type"]
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
};
|
package/package.json
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"displayName.zh-CN": "工作流",
|
|
5
5
|
"description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.",
|
|
6
6
|
"description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。",
|
|
7
|
-
"version": "1.6.
|
|
7
|
+
"version": "1.6.29",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/workflow",
|
|
11
11
|
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/workflow",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@nocobase/plugin-workflow-test": "1.6.
|
|
13
|
+
"@nocobase/plugin-workflow-test": "1.6.29"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@ant-design/icons": "5.x",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@nocobase/test": "1.x",
|
|
46
46
|
"@nocobase/utils": "1.x"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "9539ebb7c421a09dc795507edb1e3adcb2686038",
|
|
49
49
|
"keywords": [
|
|
50
50
|
"Workflow"
|
|
51
51
|
]
|
|
@@ -1,31 +0,0 @@
|
|
|
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 { Instruction } from '.';
|
|
10
|
-
import { WorkflowVariableInput } from '../variable';
|
|
11
|
-
export default class extends Instruction {
|
|
12
|
-
title: string;
|
|
13
|
-
type: string;
|
|
14
|
-
group: string;
|
|
15
|
-
description: string;
|
|
16
|
-
fieldset: {
|
|
17
|
-
result: {
|
|
18
|
-
type: string;
|
|
19
|
-
title: string;
|
|
20
|
-
'x-decorator': string;
|
|
21
|
-
'x-component': string;
|
|
22
|
-
'x-component-props': {
|
|
23
|
-
useTypedConstant: boolean;
|
|
24
|
-
};
|
|
25
|
-
required: boolean;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
components: {
|
|
29
|
-
WorkflowVariableInput: typeof WorkflowVariableInput;
|
|
30
|
-
};
|
|
31
|
-
}
|