@plume-canvas/plugin-node-ui 0.1.8 → 0.1.9

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.
Files changed (2) hide show
  1. package/dist/server.js +7 -4
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -58879,14 +58879,17 @@ import { createHash as createHash3 } from "node:crypto";
58879
58879
 
58880
58880
  // src/task/declare.ts
58881
58881
  var SCRIPT_CALL_RE = /(?:^|[{,(\s])["\']?name["\']?\s*:\s*["\']([A-Za-z0-9_-]{1,64})["\']/g;
58882
+ var TASK_CALL_RE = /(?:CanvasUI\s*\.\s*task|(?<![.\w])task)\s*\(\s*["\']([A-Za-z0-9_-]{1,64})["\']/g;
58882
58883
  function detectScriptCalls(html, knownNames) {
58883
58884
  if (!html) return [];
58884
58885
  const known = new Set(knownNames);
58885
58886
  const out = /* @__PURE__ */ new Set();
58886
- const re = new RegExp(SCRIPT_CALL_RE.source, SCRIPT_CALL_RE.flags);
58887
- for (const m of html.matchAll(re)) {
58888
- const name2 = m[1];
58889
- if (name2 && known.has(name2)) out.add(name2);
58887
+ for (const source of [SCRIPT_CALL_RE.source, TASK_CALL_RE.source]) {
58888
+ const re = new RegExp(source, "g");
58889
+ for (const m of html.matchAll(re)) {
58890
+ const name2 = m[1];
58891
+ if (name2 && known.has(name2)) out.add(name2);
58892
+ }
58890
58893
  }
58891
58894
  return [...out].sort();
58892
58895
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plume-canvas/plugin-node-ui",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "plume": {
6
6
  "title": "可视化节点",