@particle-academy/fancy-flow 0.78.0 → 0.79.0

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 (40) hide show
  1. package/dist/{chunk-XO4ODEY2.js → chunk-I5EPWHNM.js} +3 -3
  2. package/dist/{chunk-XO4ODEY2.js.map → chunk-I5EPWHNM.js.map} +1 -1
  3. package/dist/{chunk-BBFHGAEN.js → chunk-J66LOLJR.js} +4 -4
  4. package/dist/{chunk-BBFHGAEN.js.map → chunk-J66LOLJR.js.map} +1 -1
  5. package/dist/{chunk-3EDB6ELL.js → chunk-KMONOPAK.js} +3 -3
  6. package/dist/{chunk-3EDB6ELL.js.map → chunk-KMONOPAK.js.map} +1 -1
  7. package/dist/{chunk-GPFIJR2K.js → chunk-LBE4L3DS.js} +4 -4
  8. package/dist/{chunk-GPFIJR2K.js.map → chunk-LBE4L3DS.js.map} +1 -1
  9. package/dist/{chunk-J5YUYDMK.js → chunk-OZHBAXMA.js} +21 -4
  10. package/dist/chunk-OZHBAXMA.js.map +1 -0
  11. package/dist/{chunk-S4MOUOG4.js → chunk-QMJVUT7C.js} +3 -3
  12. package/dist/{chunk-S4MOUOG4.js.map → chunk-QMJVUT7C.js.map} +1 -1
  13. package/dist/{chunk-4GNDRRJ3.js → chunk-R4G7SPLD.js} +3 -3
  14. package/dist/{chunk-4GNDRRJ3.js.map → chunk-R4G7SPLD.js.map} +1 -1
  15. package/dist/durable.cjs +19 -2
  16. package/dist/durable.cjs.map +1 -1
  17. package/dist/durable.js +1 -1
  18. package/dist/engine.cjs +19 -2
  19. package/dist/engine.cjs.map +1 -1
  20. package/dist/engine.js +4 -4
  21. package/dist/index.cjs +19 -2
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.js +12 -12
  24. package/dist/registry.cjs +19 -2
  25. package/dist/registry.cjs.map +1 -1
  26. package/dist/registry.js +2 -2
  27. package/dist/runtime.cjs +19 -2
  28. package/dist/runtime.cjs.map +1 -1
  29. package/dist/runtime.js +3 -3
  30. package/dist/schema.cjs +19 -2
  31. package/dist/schema.cjs.map +1 -1
  32. package/dist/schema.js +3 -3
  33. package/dist/screens.cjs +19 -2
  34. package/dist/screens.cjs.map +1 -1
  35. package/dist/screens.js +4 -4
  36. package/dist/ux.cjs +19 -2
  37. package/dist/ux.cjs.map +1 -1
  38. package/dist/ux.js +1 -1
  39. package/package.json +2 -2
  40. package/dist/chunk-J5YUYDMK.js.map +0 -1
package/dist/schema.js CHANGED
@@ -1,6 +1,6 @@
1
- export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-GPFIJR2K.js';
2
- import './chunk-3EDB6ELL.js';
3
- import './chunk-J5YUYDMK.js';
1
+ export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-LBE4L3DS.js';
2
+ import './chunk-KMONOPAK.js';
3
+ import './chunk-OZHBAXMA.js';
4
4
  import './chunk-2QXKDLGT.js';
5
5
  //# sourceMappingURL=schema.js.map
6
6
  //# sourceMappingURL=schema.js.map
package/dist/screens.cjs CHANGED
@@ -10358,6 +10358,7 @@ var branchExecutor = (ctx) => {
10358
10358
  const inputs = ctx.inputs;
10359
10359
  let taken;
10360
10360
  const raw = config.condition;
10361
+ validateRoutingExpression(ctx, raw, "branch", "condition");
10361
10362
  if (typeof raw === "string" && raw.trim() !== "") {
10362
10363
  taken = truthy(resolve(raw, inputs));
10363
10364
  warnIfUnresolved(ctx, raw, taken ? "true" : "false");
@@ -10527,6 +10528,7 @@ var switchCaseExecutor = (ctx) => {
10527
10528
  const config = configOf(ctx.node);
10528
10529
  const inputs = ctx.inputs;
10529
10530
  const expression = config.value;
10531
+ validateRoutingExpression(ctx, expression, "switch_case", "value");
10530
10532
  const value = text(resolve(expression, inputs));
10531
10533
  const cases = config.cases ?? {};
10532
10534
  const matched = Object.prototype.hasOwnProperty.call(cases, value);
@@ -10534,6 +10536,21 @@ var switchCaseExecutor = (ctx) => {
10534
10536
  warnIfUnresolved(ctx, expression, port, "value");
10535
10537
  return { __port: port, value: inputs.in ?? inputs };
10536
10538
  };
10539
+ function validateRoutingExpression(ctx, value, kind, field) {
10540
+ if (typeof value !== "string" || value.trim() === "") return;
10541
+ const bare = value.trim();
10542
+ const subject = `${kind} "${ctx.node.id}" ${field} "${bare}"`;
10543
+ if (!value.includes("{{")) {
10544
+ ctx.abort(`${subject} is not an expression -- wrap it: {{ ${bare} }}`);
10545
+ }
10546
+ let open = 0;
10547
+ for (const [delimiter] of value.matchAll(/\{\{|\}\}/g)) {
10548
+ open = delimiter === "{{" ? open + 1 : Math.max(0, open - 1);
10549
+ }
10550
+ if (open > 0) {
10551
+ ctx.abort(`${subject} has an unclosed expression -- close every {{ with }}`);
10552
+ }
10553
+ }
10537
10554
 
10538
10555
  // src/registry/terminal-nodes.ts
10539
10556
  var DEFAULT_TIMEOUT_MS = 12e4;
@@ -11025,7 +11042,7 @@ var KINDS = [
11025
11042
  key: "condition",
11026
11043
  label: "Raw expression (advanced)",
11027
11044
  example: "{{ $json.active && $json.score > 10 }}",
11028
- description: "Escape hatch for logic the builder can't express. Overrides the conditions above when set."
11045
+ description: "Escape hatch for logic the builder can't express. Overrides the conditions above when set. String values must be {{ }}-wrapped expressions; bare strings and unclosed templates abort the run."
11029
11046
  }
11030
11047
  ]
11031
11048
  },
@@ -11045,7 +11062,7 @@ var KINDS = [
11045
11062
  // moves the ports on the canvas and the ports the runtime activates.
11046
11063
  outputs: (config) => casePorts(config?.cases),
11047
11064
  configSchema: [
11048
- { type: "expression", key: "value", label: "Switch on", example: "{{ $json.kind }}", required: true },
11065
+ { type: "expression", key: "value", label: "Switch on", description: "String values must be {{ }}-wrapped expressions; bare strings and unclosed templates abort the run.", example: "{{ $json.kind }}", required: true },
11049
11066
  {
11050
11067
  type: "keyvalue",
11051
11068
  key: "cases",