@nocobase/plugin-workflow-javascript 2.4.0-alpha.4 → 2.4.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/externalVersion.js
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.4.0-alpha.
|
|
12
|
-
"@nocobase/plugin-workflow": "2.4.0-alpha.
|
|
13
|
-
"@nocobase/flow-engine": "2.4.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.4.0-alpha.6",
|
|
12
|
+
"@nocobase/plugin-workflow": "2.4.0-alpha.6",
|
|
13
|
+
"@nocobase/flow-engine": "2.4.0-alpha.6",
|
|
14
14
|
"react-i18next": "11.18.6",
|
|
15
|
-
"@nocobase/client-v2": "2.4.0-alpha.
|
|
15
|
+
"@nocobase/client-v2": "2.4.0-alpha.6",
|
|
16
16
|
"winston": "3.13.0",
|
|
17
|
-
"@nocobase/server": "2.4.0-alpha.
|
|
17
|
+
"@nocobase/server": "2.4.0-alpha.6",
|
|
18
18
|
"sequelize": "6.35.2",
|
|
19
19
|
"antd": "5.24.2",
|
|
20
20
|
"@emotion/css": "11.13.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-09-
|
|
1
|
+
{"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-09-15T13:19:16.287Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"winston-transport","description":"Base stream implementations for winston@3 and up.","version":"4.7.0","main":"index.js","browser":"dist/index.js","scripts":{"lint":"eslint test/*.js index.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist","pretest":"npm run lint && npm run build","test":"nyc mocha test/*.test.js","report":"nyc report --reporter=lcov","build":"rimraf dist && babel *.js -d ./dist","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git@github.com:winstonjs/winston-transport.git"},"keywords":["winston","transport","winston3"],"author":"Charlie Robbins <charlie.robbins@gmail.com>","license":"MIT","bugs":{"url":"https://github.com/winstonjs/winston-transport/issues"},"homepage":"https://github.com/winstonjs/winston-transport#readme","dependencies":{"logform":"^2.3.2","readable-stream":"^3.6.0","triple-beam":"^1.3.0"},"devDependencies":{"@types/node":"^20.8.6","abstract-winston-transport":">=0.5.1","assume":"^2.3.0","babel-cli":"^6.26.0","babel-preset-env":"^1.7.0","deep-equal":"^2.0.5","eslint":"^8.8.0","@dabh/eslint-config-populist":"^5.0.0","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^5.0.5","winston-compat":"^0.1.5"},"engines":{"node":">= 12.0.0"},"_lastModified":"2026-09-
|
|
1
|
+
{"name":"winston-transport","description":"Base stream implementations for winston@3 and up.","version":"4.7.0","main":"index.js","browser":"dist/index.js","scripts":{"lint":"eslint test/*.js index.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist","pretest":"npm run lint && npm run build","test":"nyc mocha test/*.test.js","report":"nyc report --reporter=lcov","build":"rimraf dist && babel *.js -d ./dist","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git@github.com:winstonjs/winston-transport.git"},"keywords":["winston","transport","winston3"],"author":"Charlie Robbins <charlie.robbins@gmail.com>","license":"MIT","bugs":{"url":"https://github.com/winstonjs/winston-transport/issues"},"homepage":"https://github.com/winstonjs/winston-transport#readme","dependencies":{"logform":"^2.3.2","readable-stream":"^3.6.0","triple-beam":"^1.3.0"},"devDependencies":{"@types/node":"^20.8.6","abstract-winston-transport":">=0.5.1","assume":"^2.3.0","babel-cli":"^6.26.0","babel-preset-env":"^1.7.0","deep-equal":"^2.0.5","eslint":"^8.8.0","@dabh/eslint-config-populist":"^5.0.0","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^5.0.5","winston-compat":"^0.1.5"},"engines":{"node":">= 12.0.0"},"_lastModified":"2026-09-15T13:19:16.534Z"}
|
|
@@ -47,6 +47,9 @@ function getJavaScriptArguments(job) {
|
|
|
47
47
|
function getErrorMessage(error) {
|
|
48
48
|
return error instanceof Error ? error.message : String(error);
|
|
49
49
|
}
|
|
50
|
+
function isSameClaim(left, right) {
|
|
51
|
+
return (left == null ? void 0 : left.getTime()) === (right == null ? void 0 : right.getTime());
|
|
52
|
+
}
|
|
50
53
|
function createJobAbortController(workflowPlugin, runningJobs, job, execution) {
|
|
51
54
|
const controller = new AbortController();
|
|
52
55
|
let timeoutGuard = null;
|
|
@@ -292,8 +295,14 @@ class TaskConsumer {
|
|
|
292
295
|
startedAt: job.startedAt
|
|
293
296
|
}
|
|
294
297
|
}
|
|
295
|
-
).then(([affected]) => {
|
|
296
|
-
if (
|
|
298
|
+
).then(async ([affected]) => {
|
|
299
|
+
if (affected) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
const currentJob = await JobModel.findByPk(job.id, {
|
|
303
|
+
attributes: ["status", "startedAt"]
|
|
304
|
+
});
|
|
305
|
+
if (!currentJob || currentJob.status !== import_plugin_workflow.JOB_STATUS.PENDING || !isSameClaim(currentJob.startedAt, job.startedAt)) {
|
|
297
306
|
abort();
|
|
298
307
|
}
|
|
299
308
|
}).catch((error) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-workflow-javascript",
|
|
3
|
-
"version": "2.4.0-alpha.
|
|
3
|
+
"version": "2.4.0-alpha.6",
|
|
4
4
|
"displayName": "Workflow: JavaScript",
|
|
5
5
|
"displayName.zh-CN": "工作流:JavaScript 节点",
|
|
6
6
|
"description": "Execute a piece of JavaScript in an isolated Node.js environment.",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"Workflow"
|
|
36
36
|
],
|
|
37
37
|
"license": "Apache-2.0",
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "1fc4fcd17a0cd79912a642600bdc2103e2104bdb"
|
|
39
39
|
}
|