@nocobase/plugin-workflow 2.2.0-beta.13 → 2.2.0-beta.14

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.
@@ -11,8 +11,8 @@ module.exports = {
11
11
  "react": "18.2.0",
12
12
  "@formily/core": "2.3.7",
13
13
  "@formily/react": "2.3.7",
14
- "@nocobase/client": "2.2.0-beta.13",
15
- "@nocobase/utils": "2.2.0-beta.13",
14
+ "@nocobase/client": "2.2.0-beta.14",
15
+ "@nocobase/utils": "2.2.0-beta.14",
16
16
  "antd": "5.24.2",
17
17
  "@ant-design/icons": "5.6.1",
18
18
  "react-router-dom": "6.30.1",
@@ -20,21 +20,21 @@ module.exports = {
20
20
  "lodash": "4.18.1",
21
21
  "@dnd-kit/core": "6.1.0",
22
22
  "@formily/shared": "2.3.7",
23
- "@nocobase/flow-engine": "2.2.0-beta.13",
24
- "@nocobase/plugin-mobile": "2.2.0-beta.13",
23
+ "@nocobase/flow-engine": "2.2.0-beta.14",
24
+ "@nocobase/plugin-mobile": "2.2.0-beta.14",
25
25
  "sequelize": "6.35.2",
26
- "@nocobase/server": "2.2.0-beta.13",
27
- "@nocobase/database": "2.2.0-beta.13",
28
- "@nocobase/data-source-manager": "2.2.0-beta.13",
29
- "@nocobase/logger": "2.2.0-beta.13",
30
- "@nocobase/evaluators": "2.2.0-beta.13",
26
+ "@nocobase/server": "2.2.0-beta.14",
27
+ "@nocobase/database": "2.2.0-beta.14",
28
+ "@nocobase/data-source-manager": "2.2.0-beta.14",
29
+ "@nocobase/logger": "2.2.0-beta.14",
30
+ "@nocobase/evaluators": "2.2.0-beta.14",
31
31
  "@formily/antd-v5": "1.2.3",
32
32
  "@formily/reactive": "2.3.7",
33
33
  "@emotion/css": "11.13.0",
34
34
  "@formily/json-schema": "2.3.7",
35
35
  "@formily/reactive-react": "2.3.7",
36
- "@nocobase/actions": "2.2.0-beta.13",
36
+ "@nocobase/actions": "2.2.0-beta.14",
37
37
  "dayjs": "1.11.13",
38
- "@nocobase/plugin-workflow-test": "2.2.0-beta.13",
39
- "@nocobase/test": "2.2.0-beta.13"
38
+ "@nocobase/plugin-workflow-test": "2.2.0-beta.14",
39
+ "@nocobase/test": "2.2.0-beta.14"
40
40
  };
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Wird im Hintergrund als Aufgabe in der Warteschlange ausgeführt.",
253
253
  "Workflow": "Workflow",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow ausgeführt, der Ergebnisstatus ist <1>{{statusText}}</1><2>Ausführung anzeigen</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Der Workflow wurde nicht ausgelöst, weil die aktuelle Anfrage die Auslöseanforderungen nicht erfüllt.",
255
256
  "Workflow of execution is not existed": "Workflow of execution is not existed",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Workflow-Aufgaben",
@@ -265,6 +265,7 @@
265
265
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
266
266
  "Workflow": "Workflow",
267
267
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
268
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Workflow was not triggered because the current request did not meet the trigger requirements.",
268
269
  "Workflow of execution is not existed": "Workflow of execution is not existed",
269
270
  "Workflow tasks": "Workflow tasks",
270
271
  "Workflow todos": "Workflow todos",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
253
253
  "Workflow": "Flujo de trabajo",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "El flujo de trabajo no se activó porque la solicitud actual no cumplió los requisitos del desencadenador.",
255
256
  "Workflow of execution is not existed": "Workflow of execution is not existed",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Workflow todos",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
253
253
  "Workflow": "Workflow",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Le workflow n’a pas été déclenché, car la requête actuelle ne répond pas aux exigences du déclencheur.",
255
256
  "Workflow of execution is not existed": "Workflow of execution is not existed",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Workflow todos",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "A háttérben sorba állított feladatként kerül végrehajtásra.",
253
253
  "Workflow": "Munkafolyamat",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Munkafolyamat végrehajtva, az eredmény állapota: <1>{{statusText}}</1><2>Végrehajtás megtekintése</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "A munkafolyamat nem indult el, mert az aktuális kérés nem felelt meg az indítási feltételeknek.",
255
256
  "Workflow is not exists": "Workflow is not exists",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Munkafolyamat teendők",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Akan dieksekusi di latar belakang sebagai tugas antrean.",
253
253
  "Workflow": "Alur kerja",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Alur kerja dieksekusi, status hasilnya adalah <1>{{statusText}}</1><2>Lihat eksekusi</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Alur kerja tidak dipicu karena permintaan saat ini tidak memenuhi persyaratan pemicu.",
255
256
  "Workflow is not exists": "Workflow is not exists",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Tugas alur kerja",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Verrà eseguito in background come attività in coda.",
253
253
  "Workflow": "Workflow",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow eseguito, lo stato del risultato è <1>{{statusText}}</1><2>Visualizza l'esecuzione</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Il workflow non è stato attivato perché la richiesta corrente non soddisfa i requisiti del trigger.",
255
256
  "Workflow of execution is not existed": "Workflow of execution is not existed",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Da fare",
@@ -254,6 +254,7 @@
254
254
  "Will be executed in the background as a queued task.": "キュータスクとしてバックグラウンドで実行されます。",
255
255
  "Workflow": "ワークフロー",
256
256
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "ワークフローが実行されました。結果ステータス: <1>{{statusText}}</1><2>実行詳細を表示</2>",
257
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "現在のリクエストがトリガー要件を満たしていないため、ワークフローはトリガーされませんでした。",
257
258
  "Workflow of execution is not existed": "Workflow of execution is not existed",
258
259
  "Workflow tasks": "Workflow tasks",
259
260
  "Workflow todos": "ワークフロー対応事項",
@@ -270,6 +270,7 @@
270
270
  "Will be executed in the background as a queued task.": "백그라운드에서 대기 작업으로 실행됩니다.",
271
271
  "Workflow": "워크플로우",
272
272
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "워크플로우가 실행되었습니다. 결과 상태는 <1>{{statusText}}</1><2>실행 보기</2>",
273
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "현재 요청이 트리거 요구 사항을 충족하지 않아 워크플로우가 트리거되지 않았습니다.",
273
274
  "Workflow of execution is not existed": "Workflow of execution is not existed",
274
275
  "Workflow tasks": "Workflow tasks",
275
276
  "Workflow todos": "워크플로우 할 일",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
253
253
  "Workflow": "Workflow",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "De workflow is niet geactiveerd omdat de huidige aanvraag niet aan de triggervereisten voldoet.",
255
256
  "Workflow of execution is not existed": "Workflow of execution is not existed",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Workflow todos",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
253
253
  "Workflow": "Fluxo de trabalho",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "O workflow não foi acionado porque a solicitação atual não atende aos requisitos do gatilho.",
255
256
  "Workflow of execution is not existed": "Workflow of execution is not existed",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Workflow todos",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Будет выполнен в фоновом режиме как задача в очереди.",
253
253
  "Workflow": "Рабочий процесс",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Рабочий процесс выполнен, статус результата: <1>{{statusText}}</1><2>Посмотреть выполнение</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Рабочий процесс не был запущен, так как текущий запрос не соответствует требованиям триггера.",
255
256
  "Workflow of execution is not existed": "Workflow of execution is not existed",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Задачи рабочего процесса",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
253
253
  "Workflow": "İş Akışı",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Geçerli istek tetikleme gereksinimlerini karşılamadığı için iş akışı tetiklenmedi.",
255
256
  "Workflow of execution is not existed": "Workflow of execution is not existed",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Workflow todos",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
253
253
  "Workflow": "Workflow",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Робочий процес не було запущено, оскільки поточний запит не відповідає вимогам тригера.",
255
256
  "Workflow of execution is not existed": "Workflow of execution is not existed",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Workflow todos",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
253
253
  "Workflow": "Workflow",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Quy trình làm việc không được kích hoạt vì yêu cầu hiện tại không đáp ứng các điều kiện kích hoạt.",
255
256
  "Workflow is not exists": "Workflow is not exists",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Workflow todos",
@@ -274,6 +274,7 @@
274
274
  "Will be executed in the background as a queued task.": "将作为队列任务在后台执行。",
275
275
  "Workflow": "工作流",
276
276
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "工作流已执行,结果状态为 <1>{{statusText}}</1><2>查看执行详情</2>",
277
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "当前请求未满足触发要求,工作流未触发。",
277
278
  "Workflow of execution is not existed": "执行计划对应的工作流不存在",
278
279
  "Workflow tasks": "流程待办",
279
280
  "Workflow todos": "流程待办",
@@ -252,6 +252,7 @@
252
252
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
253
253
  "Workflow": "Workflow",
254
254
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
255
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "目前請求未滿足觸發要求,工作流未觸發。",
255
256
  "Workflow of execution is not existed": "Workflow of execution is not existed",
256
257
  "Workflow tasks": "Workflow tasks",
257
258
  "Workflow todos": "Workflow todos",
@@ -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":"2026-07-11T16:39:33.444Z"}
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":"2026-07-15T08:47:28.370Z"}
@@ -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-07-11T16:39:33.172Z"}
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-07-15T08:47:28.084Z"}
@@ -1 +1 @@
1
- {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"11.3.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","prepare":"tshy && bash scripts/build.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/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","lint":"oxlint --fix src test","postsnap":"npm run lint","postlint":"npm run format"},"main":"./dist/commonjs/index.min.js","types":"./dist/commonjs/index.d.ts","tshy":{"esmDialects":["node","browser"],"exports":{"./raw":"./src/index.ts",".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"selfLink":false},"repository":{"type":"git","url":"git+ssh://git@github.com/isaacs/node-lru-cache.git"},"devDependencies":{"benchmark":"^2.1.4","esbuild":"^0.25.9","marked":"^4.2.12","mkdirp":"^3.0.1","oxlint":"^1.58.0","oxlint-tsgolint":"^0.19.0","prettier":"^3.8.1","tap":"^21.6.3","tshy":"^4.1.1","typedoc":"^0.28.18"},"license":"BlueOak-1.0.0","files":["dist"],"engines":{"node":"20 || >=22"},"exports":{"./raw":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"type":"module","module":"./dist/esm/index.min.js","_lastModified":"2026-07-11T16:39:32.419Z"}
1
+ {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"11.3.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","prepare":"tshy && bash scripts/build.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/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","lint":"oxlint --fix src test","postsnap":"npm run lint","postlint":"npm run format"},"main":"./dist/commonjs/index.min.js","types":"./dist/commonjs/index.d.ts","tshy":{"esmDialects":["node","browser"],"exports":{"./raw":"./src/index.ts",".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"selfLink":false},"repository":{"type":"git","url":"git+ssh://git@github.com/isaacs/node-lru-cache.git"},"devDependencies":{"benchmark":"^2.1.4","esbuild":"^0.25.9","marked":"^4.2.12","mkdirp":"^3.0.1","oxlint":"^1.58.0","oxlint-tsgolint":"^0.19.0","prettier":"^3.8.1","tap":"^21.6.3","tshy":"^4.1.1","typedoc":"^0.28.18"},"license":"BlueOak-1.0.0","files":["dist"],"engines":{"node":"20 || >=22"},"exports":{"./raw":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"type":"module","module":"./dist/esm/index.min.js","_lastModified":"2026-07-15T08:47:27.283Z"}
@@ -1 +1 @@
1
- {"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-07-11T16:39:32.246Z"}
1
+ {"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-07-15T08:47:27.104Z"}
@@ -184,6 +184,12 @@ async function execute(context, next) {
184
184
  let processor;
185
185
  try {
186
186
  processor = await plugin.execute(workflow, values, { manually: true });
187
+ if (processor === null) {
188
+ context.body = {
189
+ execution: null
190
+ };
191
+ return next();
192
+ }
187
193
  if (!processor) {
188
194
  return context.throw(400, "workflow not triggered");
189
195
  }
@@ -30,7 +30,7 @@ export default class CollectionTrigger extends Trigger {
30
30
  code?: string;
31
31
  };
32
32
  prepare(workflow: WorkflowModel, data: Model | Record<string, any> | string | number, options: any): Promise<{
33
- data: any;
33
+ data: string | number | Record<string, any> | Model<any, any>;
34
34
  }>;
35
35
  on(workflow: WorkflowModel): void;
36
36
  off(workflow: WorkflowModel): void;
@@ -305,6 +305,9 @@ class CollectionTrigger extends import__.default {
305
305
  // }
306
306
  async execute(workflow, values, options) {
307
307
  const ctx = await this.prepare(workflow, values == null ? void 0 : values.data, options);
308
+ if (!ctx) {
309
+ return null;
310
+ }
308
311
  const [dataSourceName] = (0, import_data_source_manager.parseCollectionName)(workflow.config.collection);
309
312
  const { transaction } = options;
310
313
  return this.workflow.trigger(workflow, ctx, {
@@ -26,6 +26,6 @@ export declare abstract class Trigger {
26
26
  [key: string]: string;
27
27
  };
28
28
  sync?: boolean;
29
- execute?(workflow: WorkflowModel, values: any, options: Transactionable): void | Processor | Promise<void | Processor>;
29
+ execute?(workflow: WorkflowModel, values: any, options: Transactionable): void | Processor | null | Promise<void | Processor | null>;
30
30
  }
31
31
  export default Trigger;
@@ -32,5 +32,5 @@ export declare function getWorkflowExecutionLogMeta(workflow: WorkflowModel, pro
32
32
  lastJobStatus: number;
33
33
  };
34
34
  export declare function abortExecution(plugin: PluginWorkflowServer, execution: ExecutionModel, options?: AbortOptions): Promise<boolean>;
35
- export declare function toJSON(data: any): any;
35
+ export declare function toJSON<T>(data: T): T;
36
36
  export {};
@@ -164,6 +164,16 @@ async function abortExecution(plugin, execution, options = {}) {
164
164
  throw error;
165
165
  }
166
166
  }
167
+ function getHiddenFieldNames(model) {
168
+ const { collection } = model.constructor;
169
+ if (!(collection == null ? void 0 : collection.fields)) {
170
+ return [];
171
+ }
172
+ return Array.from(collection.fields.values()).filter((field) => {
173
+ var _a;
174
+ return (_a = field == null ? void 0 : field.options) == null ? void 0 : _a.hidden;
175
+ }).map((field) => field.options.name).filter((name) => typeof name === "string");
176
+ }
167
177
  function toJSON(data) {
168
178
  if (Array.isArray(data)) {
169
179
  return data.map(toJSON);
@@ -171,7 +181,10 @@ function toJSON(data) {
171
181
  if (!(data instanceof import_database.Model) || !data) {
172
182
  return data;
173
183
  }
174
- const result = data.get();
184
+ const result = { ...data.get() };
185
+ for (const fieldName of getHiddenFieldNames(data)) {
186
+ delete result[fieldName];
187
+ }
175
188
  Object.keys(data.constructor.associations).forEach((key) => {
176
189
  if (result[key] != null && typeof result[key] === "object") {
177
190
  result[key] = toJSON(result[key]);
@@ -428,6 +428,7 @@ declare const _default: {
428
428
  properties: {
429
429
  execution: {
430
430
  type: string;
431
+ nullable: boolean;
431
432
  properties: {
432
433
  id: {
433
434
  type: string;
@@ -394,7 +394,8 @@ var swagger_default = {
394
394
  "**autoRevision:** When set to `1`, if the workflow has never been executed",
395
395
  "(`executed === 0`), a new revision is created automatically after execution.",
396
396
  "",
397
- "**Returns:** `{ execution: { id, status }, newVersionId? }`"
397
+ "**Returns:** `{ execution: { id, status } | null, newVersionId? }`.",
398
+ "`execution` is `null` when the request is valid but no execution is started."
398
399
  ].join("\n"),
399
400
  parameters: [
400
401
  {
@@ -433,6 +434,7 @@ var swagger_default = {
433
434
  properties: {
434
435
  execution: {
435
436
  type: "object",
437
+ nullable: true,
436
438
  properties: {
437
439
  id: { type: "integer", description: "Execution ID" },
438
440
  status: { type: "integer", description: "Execution status code" }
@@ -449,7 +451,7 @@ var swagger_default = {
449
451
  }
450
452
  },
451
453
  400: {
452
- description: "Bad Request. Request body or `filterByTk` is missing/invalid, or workflow not triggered."
454
+ description: "Bad Request. Request body or `filterByTk` is missing/invalid."
453
455
  },
454
456
  404: { description: "Not Found. Workflow does not exist." }
455
457
  }
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.",
7
7
  "description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。",
8
8
  "description.ru-RU": "Мощный инструмент BPM, обеспечивающий базовую поддержку автоматизации бизнес-процессов с возможностью неограниченного расширения триггеров и узлов.",
9
- "version": "2.2.0-beta.13",
9
+ "version": "2.2.0-beta.14",
10
10
  "license": "Apache-2.0",
11
11
  "main": "./dist/server/index.js",
12
12
  "homepage": "https://docs.nocobase.com/handbook/workflow",
@@ -49,7 +49,7 @@
49
49
  "@nocobase/test": "2.x",
50
50
  "@nocobase/utils": "2.x"
51
51
  },
52
- "gitHead": "8fff12b34f41f4336075cdafcc700ec694f9b78a",
52
+ "gitHead": "1ef021f3ce0a84469e40f181a19551a50b6f850c",
53
53
  "keywords": [
54
54
  "Workflow"
55
55
  ]
@@ -1,10 +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
-
10
- "use strict";(self.webpackChunk_nocobase_plugin_workflow=self.webpackChunk_nocobase_plugin_workflow||[]).push([["67"],{2596:function(e,t,r){r.d(t,{i:function(){return x}});var n=r(2059),o=r(9155),l=r.n(o);let a=(0,o.createContext)(null),i={didCatch:!1,error:null};class c extends o.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=i}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(null!==e){for(var t,r,n=arguments.length,o=Array(n),l=0;l<n;l++)o[l]=arguments[l];null==(t=(r=this.props).onReset)||t.call(r,{args:o,reason:"imperative-api"}),this.setState(i)}}componentDidCatch(e,t){var r,n;null==(r=(n=this.props).onError)||r.call(n,e,t)}componentDidUpdate(e,t){let{didCatch:r}=this.state,{resetKeys:n}=this.props;if(r&&null!==t.error&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,n)){var o,l;null==(o=(l=this.props).onReset)||o.call(l,{next:n,prev:e.resetKeys,reason:"keys"}),this.setState(i)}}render(){let{children:e,fallbackRender:t,FallbackComponent:r,fallback:n}=this.props,{didCatch:l,error:i}=this.state,c=e;if(l){let e={error:i,resetErrorBoundary:this.resetErrorBoundary};if((0,o.isValidElement)(n))c=n;else if("function"==typeof t)c=t(e);else if(r)c=(0,o.createElement)(r,e);else throw i}return(0,o.createElement)(a.Provider,{value:{didCatch:l,error:i,resetErrorBoundary:this.resetErrorBoundary}},c)}}var s=r(7375),u=r(3342),d=r(5324),f=r(8083),p=r(404),m=r(3872),v=r(6660),y=r(8201),b=r(4562);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function w(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function g(){var e=w(["\n margin-top: 0 !important;\n "]);return g=function(){return e},e}function E(){var e=w(["\n margin-bottom: 1em;\n "]);return E=function(){return e},e}function k(){var e=w(["\n margin-top: 0 !important;\n "]);return k=function(){return e},e}function x(e){var t,r,o=e.entry,a=(0,v.A)().styles,i=(0,b.sD)(),w=(0,p.x)(),x=(0,u.useCompile)(),C=(0,u.usePlugin)(d.default),A=function(e){if(Array.isArray(e))return e}(t=l().useState(100))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(t=n.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw r}}return o}}(t)||function(e){if(e){if("string"==typeof e)return h(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return h(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),O=A[0],S=A[1],j=null==w?void 0:w.clipboard,P=j?C.instructions.get(j.type):null,D=j?P?x(P.title):j.type:"";return l().createElement("div",{className:"workflow-canvas-wrapper"},l().createElement(c,{FallbackComponent:u.ErrorFallback,onError:console.error},l().createElement("div",{className:"workflow-canvas",style:{zoom:O/100}},l().createElement("div",{className:(0,u.cx)(a.branchBlockClass,(0,u.css)(g()))},l().createElement("div",{className:a.branchClass},i?l().createElement(n.Alert,{type:"warning",message:(0,m.vV)("Executed workflow cannot be modified. Could be copied to a new version to modify."),showIcon:!0,className:(0,u.css)(E())}):null,l().createElement(y.Vo,null),l().createElement("div",{className:(0,u.cx)(a.branchBlockClass,(0,u.css)(k()))},l().createElement(f.lg,{entry:o})),l().createElement("div",{className:a.terminalClass},(0,m.vV)("End")))))),j?l().createElement("div",{className:a.clipboardPreviewClass},l().createElement("div",{className:"workflow-clipboard-header"},l().createElement("span",null,(0,m.vV)("Copied node")),l().createElement(n.Button,{type:"text",size:"small",icon:l().createElement(s.CloseOutlined,null),onClick:function(){var e;return null==w||null==(e=w.clearClipboard)?void 0:e.call(w)}})),l().createElement("div",{className:"workflow-clipboard-card"},l().createElement("div",{className:"workflow-clipboard-type"},D),l().createElement("div",{className:"workflow-clipboard-title"},null!=(r=j.title)?r:j.type))):null,l().createElement("div",{className:"workflow-canvas-zoomer"},l().createElement(n.Slider,{vertical:!0,reverse:!0,defaultValue:100,step:10,min:10,value:O,onChange:S})))}},1110:function(e,t,r){r.r(t),r.d(t,{WorkflowPage:function(){return G}});var n=r(3342),o=r(9155),l=r.n(o),a=r(4442),i=r(6660),c=r(5953),s=r(2059),u=r(7375),d=r(5230),f=r(7768),p=r(2596),m=r(2662),v=r(4421),y=r(7846),b=r(3872),h=r(6481),w=r(6072),g=r(6864),E=r(512),k=r(8201),x=r(7428),C=r(7107),A=r(4562),O=r(5433),S=r(3610),j=r(3312),P=r(404),D=r(2815);function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function V(e,t,r,n,o,l,a){try{var i=e[l](a),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(n,o)}function R(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var l=e.apply(t,r);function a(e){V(l,n,o,a,i,"next",e)}function i(e){V(l,n,o,a,i,"throw",e)}a(void 0)})}}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function B(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function I(e,t){if(null==e)return{};var r,n,o,l={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(Object(e));o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n]);return l}if(l=function(e,t){if(null==e)return{};var r,n,o={},l=Object.getOwnPropertyNames(e);for(n=0;n<l.length;n++)r=l[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n]);return l}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var l=[],a=!0,i=!1;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(l.push(r.value),!t||l.length!==t);a=!0);}catch(e){i=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(i)throw n}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(e,t){var r,n,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(a,"next",{value:c(0)}),i(a,"throw",{value:c(1)}),i(a,"return",{value:c(2)}),"function"==typeof Symbol&&i(a,Symbol.iterator,{value:function(){return this}}),a;function c(i){return function(c){var s=[i,c];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(l=0)),l;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return l.label++,{value:s[1],done:!1};case 5:l.label++,n=s[1],s=[0];continue;case 7:s=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){l=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){l.label=s[1];break}if(6===s[0]&&l.label<o[1]){l.label=o[1],o=s;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(s);break}o[2]&&l.ops.pop(),l.trys.pop();continue}s=t.call(e,l)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}}function K(){var e,t,r=(e=["\n margin-bottom: 1em;\n "],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return K=function(){return r},r}function M(e){var t,r=e.request,o=(e.filter,I(e,["request","filter"])),a=(0,y.$K)().workflow,i=B(T({},o),{request:B(T({},r),{params:B(T({},null==r?void 0:r.params),{filter:B(T({},null==r||null==(t=r.params)?void 0:t.filter),{key:a.key})})})});return l().createElement(n.ResourceActionProvider,i)}function U(e){var t=e.data,r=e.option,o=(0,n.useCompile)()(r.label);return l().createElement(c.Trans,{ns:b.CU,values:{statusText:o}},"Workflow executed, the result status is ",l().createElement(s.Tag,{color:r.color},"{{statusText}}"),l().createElement(a.Link,{to:(0,w.mz)(t.id)},"View the execution"))}function Y(){var e=(0,y.$K)().workflow,t=(0,d.useForm)(),r=(0,n.useResourceContext)().resource,a=(0,n.useActionContext)(),i=(0,n.useNavigateNoUpdate)(),c=s.App.useApp().message,u=(0,A.sD)(),f=F((0,o.useState)(!1),2),p=f[0],m=f[1];return{loading:p,run:function(){return R(function(){var n,o,s,d;return z(this,function(f){switch(f.label){case 0:m(!0),f.label=1;case 1:return f.trys.push([1,,4,5]),o=(n=t.values).autoRevision,s=I(n,["autoRevision"]),[4,t.submit()];case 2:return f.sent(),[4,r.execute(T({filterByTk:e.id,values:s},!u&&o?{autoRevision:1}:{}))];case 3:var p,v,y,b;return d=f.sent().data.data,t.reset(),a.setFormValueChanged(!1),a.setVisible(!1),null==c||c.open((v=(p=d.execution).id,y=p.status,(b=x.$Y[y])?{type:"info",content:l().createElement(U,{data:{id:v},option:b})}:null)),d.newVersionId&&i((0,w.Yz)(d.newVersionId)),[3,5];case 4:return m(!1),[7];case 5:return[2]}})})()}}}function $(e){var t=e.children,r=(0,d.useField)(),n=(0,y.$K)().workflow,o=(0,k.s5)(),a=o.validate(n.config),i="";switch(!0){case!a:i=(0,b.vV)("The trigger is not configured correctly, please check the trigger configuration.");break;case!o.triggerFieldset:i=(0,b.vV)("This type of trigger has not been supported to be executed manually.")}return r.setPattern(i?"disabled":"editable"),i?l().createElement(s.Tooltip,{title:i},t):t}function _(){var e,t=(0,y.$K)().workflow,r=(0,A.sD)(),o=(0,k.s5)();return l().createElement(y.AA.Provider,{value:t},l().createElement(C.Ws.Provider,{value:!0},l().createElement(n.SchemaComponent,{components:T({Alert:s.Alert,Fieldset:g.L,ActionDisabledProvider:$},o.components),scope:T({useCancelAction:n.useCancelAction,useExecuteConfirmAction:Y},o.scope),schema:{name:"trigger-modal-".concat(t.type,"-").concat(t.id),type:"void","x-decorator":"ActionDisabledProvider","x-component":"Action","x-component-props":{openSize:"small"},title:"{{t('Execute manually', { ns: \"".concat(b.CU,'" })}}'),properties:{drawer:{type:"void","x-decorator":"FormV2","x-component":"Action.Modal",title:"{{t('Execute manually', { ns: \"".concat(b.CU,'" })}}'),properties:B(T(B(T({},Object.keys(null!=(e=o.triggerFieldset)?e:{}).length?{alert:{type:"void","x-component":"Alert","x-component-props":{message:"{{t('Trigger variables need to be filled for executing.', { ns: \"".concat(b.CU,'" })}}'),className:(0,n.css)(K())}}}:{description:{type:"void","x-component":"p","x-content":"{{t('This will perform all the actions configured in the workflow. Are you sure you want to continue?', { ns: \"".concat(b.CU,'" })}}')}}),{fieldset:{type:"void","x-decorator":"FormItem","x-component":"Fieldset",title:"{{t('Trigger variables', { ns: \"".concat(b.CU,'" })}}'),properties:o.triggerFieldset}}),r?{}:{autoRevision:{type:"boolean","x-decorator":"FormItem","x-component":"Checkbox","x-content":"{{t('Automatically create a new version after execution', { ns: \"".concat(b.CU,'" })}}'),default:!0}}),{footer:{type:"void","x-component":"Action.Modal.Footer",properties:{cancel:{type:"void",title:"{{t('Cancel')}}","x-component":"Action","x-component-props":{useAction:"{{useCancelAction}}"}},submit:{type:"void",title:"{{t('Confirm')}}","x-component":"Action","x-component-props":{type:"primary",useAction:"{{useExecuteConfirmAction}}"}}}}})}}}})))}function L(){var e=(0,y.$K)(),t=e.workflow,r=e.revisions,d=void 0===r?[]:r,p=F((0,o.useState)(!1),2),g=p[0],k=p[1],C=F((0,o.useState)(!1),2),O=C[0],S=C[1],j=F((0,o.useState)(""),2),P=j[0],N=j[1],V=(0,a.useNavigate)(),T=(0,c.useTranslation)().t,B=s.App.useApp().modal,I=(0,n.useApp)(),K=(0,n.useResourceContext)().resource,U=(0,n.useResourceActionContext)().refresh,Y=s.App.useApp().message,$=(0,i.A)().styles,_=(0,A.Eh)(),L=(0,o.useCallback)(function(){return R(function(){var e;return z(this,function(r){switch(r.label){case 0:return[4,K.revision({filterByTk:t.id,filter:{key:t.key}})];case 1:return e=r.sent().data.data,Y.success(T("Operation succeeded")),V((0,w.Yz)(e.id)),[2]}})})()},[K,t.id,t.key,Y,T,V]),W=(0,o.useCallback)(function(){return R(function(){var e;return z(this,function(r){return e=t.current?(0,b.vV)("This is a main version, delete it will cause the whole workflow to be deleted (including all other revisions)."):(0,b.vV)("Current version will be deleted (without affecting other versions)."),B.confirm({title:T("Are you sure you want to delete it?"),content:e,onOk:function(){return R(function(){var e,r,n,o;return z(this,function(l){switch(l.label){case 0:return[4,K.destroy({filterByTk:t.id})];case 1:if(l.sent(),Y.success(T("Operation succeeded")),e=I.pluginSettingsManager.getRoutePath("workflow"),t.current)return[2,V(e)];return d.length&&V((0,w.Yz)(null==(r=d.find(function(e){return e.current}))?void 0:r.id)),[4,K.list({filter:{key:t.key,current:!0},fields:["id"],pageSize:1})];case 2:if(200!==(n=l.sent()).status)return[2];if(!(o=F(n.data.data,1)[0]))return[2,V(e)];return[2,V((0,w.Yz)(o.id))]}})})()}}),[2]})})()},[t,B,T,K,Y,V,I.pluginSettingsManager,d]),q=(0,o.useCallback)(function(e){switch(e.key){case"details":S(!0);return;case"refresh":U();return;case"history":k(!0);return;case"revision":return L();case"delete":return W()}},[W,L,U]),G=(0,o.useCallback)(function(e){return(null==e?void 0:e.nickname)||(null==e?void 0:e.username)||(null==e?void 0:e.email)||(null==e?void 0:e.id)||"-"},[]),H=(0,o.useCallback)(function(e){return e?(0,f.dayjs)(e).format("YYYY-MM-DD HH:mm:ss"):"-"},[]);(0,o.useEffect)(function(){if(O){var e;N(null!=(e=t.description)?e:"")}},[O,t.description]);var J=(0,o.useCallback)(function(e){N(e.target.value)},[]),Q=(0,o.useCallback)(function(e){return R(function(){var r,n;return z(this,function(o){switch(o.label){case 0:if((n=e.target.value)===(null!=(r=t.description)?r:""))return[2];return[4,K.update({filterByTk:t.id,values:{description:n}})];case 1:return o.sent(),U(),[2]}})})()},[U,K,t.description,t.id]);return l().createElement(l().Fragment,null,l().createElement(s.Dropdown,{menu:{items:[{role:"button","aria-label":"details",key:"details",label:T("Details")},{type:"divider"},{role:"button","aria-label":"refresh",key:"refresh",label:T("Refresh")},{role:"button","aria-label":"history",key:"history",label:(0,b.vV)("Execution history"),disabled:!_},{role:"button","aria-label":"revision",key:"revision",label:(0,b.vV)("Copy to new version")},{type:"divider"},{role:"button","aria-label":"delete",danger:!0,key:"delete",label:T("Delete")}],onClick:q}},l().createElement(s.Button,{"aria-label":"more",type:"text",icon:l().createElement(u.EllipsisOutlined,null)})),l().createElement(s.Modal,{open:O,title:T("Details"),width:640,footer:null,onCancel:function(){return S(!1)}},l().createElement(s.Descriptions,{bordered:!0,column:2,size:"small"},l().createElement(s.Descriptions.Item,{label:"Key",span:2},t.key||"-"),l().createElement(s.Descriptions.Item,{label:T("Created by")},G(t.createdBy)),l().createElement(s.Descriptions.Item,{label:T("Created at")},H(t.createdAt)),l().createElement(s.Descriptions.Item,{label:T("Last updated by")},G(t.updatedBy)),l().createElement(s.Descriptions.Item,{label:T("Last updated at")},H(t.updatedAt)),l().createElement(s.Descriptions.Item,{label:T("Description"),span:2},l().createElement(s.Input.TextArea,{"aria-label":T("Description"),value:P,onChange:J,onBlur:Q,placeholder:"-",className:$.workflowDetailsDescriptionClass,autoSize:{minRows:3,maxRows:8}})))),l().createElement(n.ActionContextProvider,{value:{visible:g,setVisible:k}},l().createElement(n.SchemaComponent,{schema:h.M,components:{ExecutionResourceProvider:M,ExecutionLink:v.d,ExecutionStatusColumn:m.t_},scope:{useRefreshActionProps:E.t,useResourceFilterActionProps:D.A,ExecutionStatusOptions:x.$A}})))}function W(){var e,t=(0,i.A)().styles,r=(0,a.useNavigate)(),c=(0,y.$K)().workflow,d=(0,o.useCallback)(function(e){var t=e.key;t!=c.id&&r((0,w.Yz)(t))},[c.id,r]),p=(0,n.useRequest)({resource:"workflows",action:"list",params:{filter:{key:c.key},fields:["id","createdAt","current","enabled","versionStats.executed"],sort:"-id"}},{refreshDeps:[c.id],manual:!0}),m=p.data,v=p.run,h=(0,o.useCallback)(function(e){e&&v()},[v]),g=null!=(e=null==m?void 0:m.data)?e:[];return l().createElement(s.Dropdown,{className:"workflow-versions",trigger:["click"],onOpenChange:h,menu:{onClick:d,defaultSelectedKeys:["".concat(c.id)],className:(0,n.cx)(t.dropdownClass,t.workflowVersionDropdownClass),items:g.sort(function(e,t){return t.id-e.id}).map(function(e,t){return{role:"button","aria-label":"version-".concat(t),key:"".concat(e.id),icon:e.current?l().createElement(u.RightOutlined,null):null,className:(0,n.cx)({executed:e.versionStats.executed>0,unexecuted:0==e.versionStats.executed,enabled:e.enabled}),label:l().createElement(l().Fragment,null,l().createElement("strong",null,"#".concat(e.id)),l().createElement("time",null,(0,f.dayjs)(e.createdAt).fromNow()))}})}},l().createElement(s.Button,{type:"text","aria-label":"version"},l().createElement("label",null,(0,b.vV)("Version")),l().createElement("span",null,(null==c?void 0:c.id)?"#".concat(c.id):null),l().createElement(u.DownOutlined,null)))}function q(){var e,t,r,i=(0,a.useNavigate)(),c=(0,n.useApp)(),u=(0,n.useResourceActionContext)(),d=u.data,f=u.refresh,m=u.loading,v=(0,n.useResourceContext)().resource,h=(0,n.useDocumentTitle)().setTitle,g=F((0,o.useState)(null!=(e=null==d||null==(r=d.data)?void 0:r.enabled)&&e),2),E=g[0],k=g[1],x=F((0,o.useState)(!1),2),C=x[0],A=x[1],D=null!=(t=null==d?void 0:d.data)?t:{},N=D.nodes,V=void 0===N?[]:N,T=I(D,["nodes"]);(0,w.KD)(V),(0,o.useEffect)(function(){var e,t=null!=(e=null==d?void 0:d.data)?e:{},r=t.title,n=t.enabled;null==h||h("".concat((0,b.vV)("Workflow")).concat(r?": ".concat(r):"")),k(n)},[null==d?void 0:d.data,h]);var B=(0,o.useCallback)(function(e){return R(function(){return z(this,function(t){switch(t.label){case 0:return A(!0),[4,v.update({filterByTk:T.id,values:{enabled:e}})];case 1:return t.sent(),A(!1),k(e),[2]}})})()},[v,T.id]);if(!(null==d?void 0:d.data))return m?l().createElement(s.Spin,null):l().createElement(s.Result,{status:"404",title:"Not found",extra:l().createElement(s.Button,{onClick:function(){return i(-1)}},(0,b.vV)("Go back"))});var K=V.find(function(e){return!e.upstream});return l().createElement(y.cB.Provider,{value:{workflow:T,nodes:V,refresh:f}},l().createElement("div",{className:"workflow-toolbar"},l().createElement("header",null,l().createElement(s.Breadcrumb,{items:[{title:l().createElement(a.Link,{to:c.pluginSettingsManager.getRoutePath("workflow")},(0,b.vV)("Workflow"))},{title:l().createElement(s.Tooltip,{title:"Key: ".concat(T.key)},l().createElement("strong",null,T.title))}]}),T.sync?l().createElement(s.Tag,{color:"orange"},(0,b.vV)("Synchronously")):l().createElement(s.Tag,{color:"cyan"},(0,b.vV)("Asynchronously"))),l().createElement("aside",null,l().createElement(_,null),l().createElement(W,null),l().createElement(s.Switch,{checked:E,onChange:B,checkedChildren:(0,b.vV)("On"),unCheckedChildren:(0,b.vV)("Off"),loading:C}),l().createElement(L,null))),l().createElement(O.yf,null,l().createElement(S.J,null,l().createElement(j.b,null,l().createElement(P.L,null,l().createElement(p.i,{entry:K}))))))}var G=function(){var e,t,r,o=(0,a.useParams)(),c=(0,i.A)().styles;return l().createElement("div",{className:(0,n.cx)(c.workflowPageClass)},l().createElement(n.SchemaComponent,{schema:{type:"void",properties:(e={},t="provider_".concat(o.id),r={type:"void","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:{name:"workflows",fields:[]},resourceName:"workflows",request:{resource:"workflows",action:"get",params:{filter:{id:o.id},appends:["nodes","stats.executed","versionStats.executed","createdBy","updatedBy"]}}},"x-component":"WorkflowCanvas"},t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e)},components:{WorkflowCanvas:q}}))}}}]);