@tachybase/module-workflow 1.3.22 → 1.3.24

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.
@@ -0,0 +1,52 @@
1
+ // 'mime-score' back-ported to CommonJS
2
+
3
+ // Score RFC facets (see https://tools.ietf.org/html/rfc6838#section-3)
4
+ var FACET_SCORES = {
5
+ 'prs.': 100,
6
+ 'x-': 200,
7
+ 'x.': 300,
8
+ 'vnd.': 400,
9
+ default: 900
10
+ }
11
+
12
+ // Score mime source (Logic originally from `jshttp/mime-types` module)
13
+ var SOURCE_SCORES = {
14
+ nginx: 10,
15
+ apache: 20,
16
+ iana: 40,
17
+ default: 30 // definitions added by `jshttp/mime-db` project?
18
+ }
19
+
20
+ var TYPE_SCORES = {
21
+ // prefer application/xml over text/xml
22
+ // prefer application/rtf over text/rtf
23
+ application: 1,
24
+
25
+ // prefer font/woff over application/font-woff
26
+ font: 2,
27
+
28
+ default: 0
29
+ }
30
+
31
+ /**
32
+ * Get each component of the score for a mime type. The sum of these is the
33
+ * total score. The higher the score, the more "official" the type.
34
+ */
35
+ module.exports = function mimeScore (mimeType, source = 'default') {
36
+ if (mimeType === 'application/octet-stream') {
37
+ return 0
38
+ }
39
+
40
+ const [type, subtype] = mimeType.split('/')
41
+
42
+ const facet = subtype.replace(/(\.|x-).*/, '$1')
43
+
44
+ const facetScore = FACET_SCORES[facet] || FACET_SCORES.default
45
+ const sourceScore = SOURCE_SCORES[source] || SOURCE_SCORES.default
46
+ const typeScore = TYPE_SCORES[type] || TYPE_SCORES.default
47
+
48
+ // All else being equal prefer shorter types
49
+ const lengthScore = 1 - mimeType.length / 100
50
+
51
+ return facetScore + sourceScore + typeScore + lengthScore
52
+ }
@@ -1 +1 @@
1
- {"name":"mime-types","description":"The ultimate javascript content-type utility.","version":"2.1.35","contributors":["Douglas Christopher Wilson <doug@somethingdoug.com>","Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)","Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"],"license":"MIT","keywords":["mime","types"],"repository":"jshttp/mime-types","dependencies":{"mime-db":"1.52.0"},"devDependencies":{"eslint":"7.32.0","eslint-config-standard":"14.1.1","eslint-plugin-import":"2.25.4","eslint-plugin-markdown":"2.2.1","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"5.2.0","eslint-plugin-standard":"4.1.0","mocha":"9.2.2","nyc":"15.1.0"},"files":["HISTORY.md","LICENSE","index.js"],"engines":{"node":">= 0.6"},"scripts":{"lint":"eslint .","test":"mocha --reporter spec test/test.js","test-ci":"nyc --reporter=lcov --reporter=text npm test","test-cov":"nyc --reporter=html --reporter=text npm test"},"_lastModified":"2025-07-29T06:21:28.321Z"}
1
+ {"name":"mime-types","description":"The ultimate javascript content-type utility.","version":"3.0.1","contributors":["Douglas Christopher Wilson <doug@somethingdoug.com>","Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)","Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"],"license":"MIT","keywords":["mime","types"],"repository":"jshttp/mime-types","dependencies":{"mime-db":"^1.54.0"},"devDependencies":{"eslint":"8.33.0","eslint-config-standard":"14.1.1","eslint-plugin-import":"2.27.5","eslint-plugin-markdown":"3.0.0","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"6.1.1","eslint-plugin-standard":"4.1.0","mocha":"10.2.0","nyc":"15.1.0"},"files":["HISTORY.md","LICENSE","index.js","mimeScore.js"],"engines":{"node":">= 0.6"},"scripts":{"lint":"eslint .","test":"mocha --reporter spec test/test.js","test-ci":"nyc --reporter=lcov --reporter=text npm test","test-cov":"nyc --reporter=html --reporter=text npm test"},"_lastModified":"2025-08-03T23:10:15.605Z"}
@@ -1 +1 @@
1
- {"name":"qrcode","description":"QRCode / 2d Barcode api with both server side and client side support using canvas","version":"1.5.4","author":"Ryan Day <soldair@gmail.com>","contributors":["Vincenzo Greco <greco.vincenzo@gmail.com>","Linus Unnebäck <linus@folkdatorn.se>"],"keywords":["qr","code","canvas","qrcode"],"main":"./lib/index.js","browser":{"./lib/index.js":"./lib/browser.js","fs":false},"files":["bin","build","lib","helper"],"homepage":"http://github.com/soldair/node-qrcode","license":"MIT","scripts":{"lint":"standard","pretest":"npm run lint","test":"node --throw-deprecation test.js","build":"rollup -c","prepublish":"npm run build","browser":"node examples/clientsideserver.js"},"bin":{"qrcode":"./bin/qrcode"},"dependencies":{"dijkstrajs":"^1.0.1","pngjs":"^5.0.0","yargs":"^15.3.1"},"devDependencies":{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","browserify":"^16.5.1","canvas":"^2.8.0","canvasutil":"0.0.4","colors":"^1.4.0","express":"^4.17.1","htmlparser2":"^4.1.0","rollup":"^2.6.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-terser":"^5.3.0","sinon":"^9.0.2","standard":"^16.0.4","tap":"^16.2.0"},"repository":{"type":"git","url":"git://github.com/soldair/node-qrcode.git"},"engines":{"node":">=10.13.0"},"standard":{"ignore":["build/","examples/vendors/","lib/core/regex.js"]},"_lastModified":"2025-07-29T06:21:28.809Z"}
1
+ {"name":"qrcode","description":"QRCode / 2d Barcode api with both server side and client side support using canvas","version":"1.5.4","author":"Ryan Day <soldair@gmail.com>","contributors":["Vincenzo Greco <greco.vincenzo@gmail.com>","Linus Unnebäck <linus@folkdatorn.se>"],"keywords":["qr","code","canvas","qrcode"],"main":"./lib/index.js","browser":{"./lib/index.js":"./lib/browser.js","fs":false},"files":["bin","build","lib","helper"],"homepage":"http://github.com/soldair/node-qrcode","license":"MIT","scripts":{"lint":"standard","pretest":"npm run lint","test":"node --throw-deprecation test.js","build":"rollup -c","prepublish":"npm run build","browser":"node examples/clientsideserver.js"},"bin":{"qrcode":"./bin/qrcode"},"dependencies":{"dijkstrajs":"^1.0.1","pngjs":"^5.0.0","yargs":"^15.3.1"},"devDependencies":{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","browserify":"^16.5.1","canvas":"^2.8.0","canvasutil":"0.0.4","colors":"^1.4.0","express":"^4.17.1","htmlparser2":"^4.1.0","rollup":"^2.6.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-terser":"^5.3.0","sinon":"^9.0.2","standard":"^16.0.4","tap":"^16.2.0"},"repository":{"type":"git","url":"git://github.com/soldair/node-qrcode.git"},"engines":{"node":">=10.13.0"},"standard":{"ignore":["build/","examples/vendors/","lib/core/regex.js"]},"_lastModified":"2025-08-03T23:10:16.080Z"}
@@ -33,7 +33,7 @@ module.exports = __toCommonJS(script_instruction_exports);
33
33
  var import_node_crypto = __toESM(require("node:crypto"));
34
34
  var import_node_vm = require("node:vm");
35
35
  var import_core = require("@babel/core");
36
- var import_server = require("@tego/server");
36
+ var import_dayjs = __toESM(require("dayjs"));
37
37
  var import_jsonata = __toESM(require("jsonata"));
38
38
  var import_lodash = __toESM(require("lodash"));
39
39
  var import_qrcode = __toESM(require("qrcode"));
@@ -121,7 +121,7 @@ async function convertByJsCode(code, data) {
121
121
  qrcode: import_qrcode.default,
122
122
  crypto: import_node_crypto.default,
123
123
  jsonata: import_jsonata.default,
124
- dayjs: import_server.dayjs
124
+ dayjs: import_dayjs.default
125
125
  }
126
126
  });
127
127
  return ctx.body;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/module-workflow",
3
3
  "displayName": "Workflow",
4
- "version": "1.3.22",
4
+ "version": "1.3.24",
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
  "keywords": [
7
7
  "Workflow"
@@ -16,10 +16,10 @@
16
16
  "@babel/preset-react": "7.27.1",
17
17
  "@babel/preset-typescript": "7.27.1",
18
18
  "@dnd-kit/core": "^6.3.1",
19
- "@tachybase/schema": "^1.3.39",
20
- "@tachybase/test": "^1.3.39",
21
- "@tego/client": "^1.3.39",
22
- "@tego/server": "^1.3.39",
19
+ "@tachybase/schema": "^1.3.49",
20
+ "@tachybase/test": "^1.3.49",
21
+ "@tego/client": "^1.3.49",
22
+ "@tego/server": "^1.3.49",
23
23
  "@types/babel__core": "7.20.5",
24
24
  "@types/ejs": "^3.1.5",
25
25
  "@types/file-saver": "^2.0.7",
@@ -28,24 +28,25 @@
28
28
  "antd": "5.22.5",
29
29
  "axios": "1.7.7",
30
30
  "cron-parser": "4.9.0",
31
+ "dayjs": "^1.11.13",
31
32
  "file-saver": "^2.0.5",
32
33
  "form-data": "^4.0.4",
33
34
  "jsonata": "^2.0.6",
34
35
  "lodash": "4.17.21",
35
36
  "lru-cache": "11.1.0",
36
- "mime-types": "^2.1.35",
37
+ "mime-types": "^3.0.1",
37
38
  "qrcode": "^1.5.4",
38
39
  "react": "18.3.1",
39
40
  "react-i18next": "15.2.0",
40
41
  "react-js-cron": "^3.2.0",
41
42
  "react-router-dom": "6.28.1",
42
43
  "sequelize": "^6.37.5",
43
- "@tachybase/client": "1.3.22",
44
- "@tachybase/module-collection": "1.3.22",
45
- "@tachybase/module-error-handler": "1.3.22",
46
- "@tachybase/module-ui-schema": "1.3.22",
47
- "@tachybase/module-user": "1.3.22",
48
- "@tachybase/plugin-workflow-test": "1.3.22"
44
+ "@tachybase/client": "1.3.24",
45
+ "@tachybase/module-collection": "1.3.24",
46
+ "@tachybase/module-error-handler": "1.3.24",
47
+ "@tachybase/module-ui-schema": "1.3.24",
48
+ "@tachybase/module-user": "1.3.24",
49
+ "@tachybase/plugin-workflow-test": "1.3.24"
49
50
  },
50
51
  "description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。",
51
52
  "displayName.zh-CN": "工作流",