@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/engine.js CHANGED
@@ -1,7 +1,7 @@
1
- export { runCohort } from './chunk-4GNDRRJ3.js';
2
- export { checkGraphConnectivity, mayFloat } from './chunk-3EDB6ELL.js';
3
- import { runFlow, decodePause, getNodeKind, resolveNodePorts } from './chunk-J5YUYDMK.js';
4
- export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, RunIdentity, UnresolvedPathError, applyKindSchemaOverlay, clearKindSchemaOverlays, decodePause, defaultConfigFor, encodePause, escapeSegment, evaluateConfig, evaluateExpression, getNodeKind, isPause, kindIds, listNodeKinds, pauseForHuman, registerNodeKind, resolveKindId, resolvePath, runFlow, text, truthy, tryResolvePath, unregisterNodeKind, validateConfig } from './chunk-J5YUYDMK.js';
1
+ export { runCohort } from './chunk-R4G7SPLD.js';
2
+ export { checkGraphConnectivity, mayFloat } from './chunk-KMONOPAK.js';
3
+ import { runFlow, decodePause, getNodeKind, resolveNodePorts } from './chunk-OZHBAXMA.js';
4
+ export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, RunIdentity, UnresolvedPathError, applyKindSchemaOverlay, clearKindSchemaOverlays, decodePause, defaultConfigFor, encodePause, escapeSegment, evaluateConfig, evaluateExpression, getNodeKind, isPause, kindIds, listNodeKinds, pauseForHuman, registerNodeKind, resolveKindId, resolvePath, runFlow, text, truthy, tryResolvePath, unregisterNodeKind, validateConfig } from './chunk-OZHBAXMA.js';
5
5
  import { isResolutionFailure, registerLlmClient, registerWorkflowResolver } from './chunk-2QXKDLGT.js';
6
6
 
7
7
  // src/marketplace/manifest.ts
package/dist/index.cjs CHANGED
@@ -2989,6 +2989,7 @@ var branchExecutor = (ctx) => {
2989
2989
  const inputs = ctx.inputs;
2990
2990
  let taken;
2991
2991
  const raw = config.condition;
2992
+ validateRoutingExpression(ctx, raw, "branch", "condition");
2992
2993
  if (typeof raw === "string" && raw.trim() !== "") {
2993
2994
  taken = truthy(resolve(raw, inputs));
2994
2995
  warnIfUnresolved(ctx, raw, taken ? "true" : "false");
@@ -3158,6 +3159,7 @@ var switchCaseExecutor = (ctx) => {
3158
3159
  const config = configOf(ctx.node);
3159
3160
  const inputs = ctx.inputs;
3160
3161
  const expression = config.value;
3162
+ validateRoutingExpression(ctx, expression, "switch_case", "value");
3161
3163
  const value = text(resolve(expression, inputs));
3162
3164
  const cases = config.cases ?? {};
3163
3165
  const matched = Object.prototype.hasOwnProperty.call(cases, value);
@@ -3165,6 +3167,21 @@ var switchCaseExecutor = (ctx) => {
3165
3167
  warnIfUnresolved(ctx, expression, port, "value");
3166
3168
  return { __port: port, value: inputs.in ?? inputs };
3167
3169
  };
3170
+ function validateRoutingExpression(ctx, value, kind, field) {
3171
+ if (typeof value !== "string" || value.trim() === "") return;
3172
+ const bare = value.trim();
3173
+ const subject = `${kind} "${ctx.node.id}" ${field} "${bare}"`;
3174
+ if (!value.includes("{{")) {
3175
+ ctx.abort(`${subject} is not an expression -- wrap it: {{ ${bare} }}`);
3176
+ }
3177
+ let open = 0;
3178
+ for (const [delimiter] of value.matchAll(/\{\{|\}\}/g)) {
3179
+ open = delimiter === "{{" ? open + 1 : Math.max(0, open - 1);
3180
+ }
3181
+ if (open > 0) {
3182
+ ctx.abort(`${subject} has an unclosed expression -- close every {{ with }}`);
3183
+ }
3184
+ }
3168
3185
 
3169
3186
  // src/registry/terminal-nodes.ts
3170
3187
  var DEFAULT_TIMEOUT_MS = 12e4;
@@ -3656,7 +3673,7 @@ var KINDS = [
3656
3673
  key: "condition",
3657
3674
  label: "Raw expression (advanced)",
3658
3675
  example: "{{ $json.active && $json.score > 10 }}",
3659
- description: "Escape hatch for logic the builder can't express. Overrides the conditions above when set."
3676
+ 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."
3660
3677
  }
3661
3678
  ]
3662
3679
  },
@@ -3676,7 +3693,7 @@ var KINDS = [
3676
3693
  // moves the ports on the canvas and the ports the runtime activates.
3677
3694
  outputs: (config) => casePorts(config?.cases),
3678
3695
  configSchema: [
3679
- { type: "expression", key: "value", label: "Switch on", example: "{{ $json.kind }}", required: true },
3696
+ { 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 },
3680
3697
  {
3681
3698
  type: "keyvalue",
3682
3699
  key: "cases",