@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.
- package/dist/{chunk-XO4ODEY2.js → chunk-I5EPWHNM.js} +3 -3
- package/dist/{chunk-XO4ODEY2.js.map → chunk-I5EPWHNM.js.map} +1 -1
- package/dist/{chunk-BBFHGAEN.js → chunk-J66LOLJR.js} +4 -4
- package/dist/{chunk-BBFHGAEN.js.map → chunk-J66LOLJR.js.map} +1 -1
- package/dist/{chunk-3EDB6ELL.js → chunk-KMONOPAK.js} +3 -3
- package/dist/{chunk-3EDB6ELL.js.map → chunk-KMONOPAK.js.map} +1 -1
- package/dist/{chunk-GPFIJR2K.js → chunk-LBE4L3DS.js} +4 -4
- package/dist/{chunk-GPFIJR2K.js.map → chunk-LBE4L3DS.js.map} +1 -1
- package/dist/{chunk-J5YUYDMK.js → chunk-OZHBAXMA.js} +21 -4
- package/dist/chunk-OZHBAXMA.js.map +1 -0
- package/dist/{chunk-S4MOUOG4.js → chunk-QMJVUT7C.js} +3 -3
- package/dist/{chunk-S4MOUOG4.js.map → chunk-QMJVUT7C.js.map} +1 -1
- package/dist/{chunk-4GNDRRJ3.js → chunk-R4G7SPLD.js} +3 -3
- package/dist/{chunk-4GNDRRJ3.js.map → chunk-R4G7SPLD.js.map} +1 -1
- package/dist/durable.cjs +19 -2
- package/dist/durable.cjs.map +1 -1
- package/dist/durable.js +1 -1
- package/dist/engine.cjs +19 -2
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.js +4 -4
- package/dist/index.cjs +19 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -12
- package/dist/registry.cjs +19 -2
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.js +2 -2
- package/dist/runtime.cjs +19 -2
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +3 -3
- package/dist/schema.cjs +19 -2
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +3 -3
- package/dist/screens.cjs +19 -2
- package/dist/screens.cjs.map +1 -1
- package/dist/screens.js +4 -4
- package/dist/ux.cjs +19 -2
- package/dist/ux.cjs.map +1 -1
- package/dist/ux.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-J5YUYDMK.js.map +0 -1
package/dist/runtime.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-
|
|
2
|
-
export { runCohort } from './chunk-
|
|
1
|
+
export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-QMJVUT7C.js';
|
|
2
|
+
export { runCohort } from './chunk-R4G7SPLD.js';
|
|
3
3
|
import './chunk-OWENS2H5.js';
|
|
4
|
-
export { RunIdentity, escapeSegment, runFlow } from './chunk-
|
|
4
|
+
export { RunIdentity, escapeSegment, runFlow } from './chunk-OZHBAXMA.js';
|
|
5
5
|
import './chunk-2QXKDLGT.js';
|
|
6
6
|
//# sourceMappingURL=runtime.js.map
|
|
7
7
|
//# sourceMappingURL=runtime.js.map
|
package/dist/schema.cjs
CHANGED
|
@@ -1161,6 +1161,7 @@ var branchExecutor = (ctx) => {
|
|
|
1161
1161
|
const inputs = ctx.inputs;
|
|
1162
1162
|
let taken;
|
|
1163
1163
|
const raw = config.condition;
|
|
1164
|
+
validateRoutingExpression(ctx, raw, "branch", "condition");
|
|
1164
1165
|
if (typeof raw === "string" && raw.trim() !== "") {
|
|
1165
1166
|
taken = truthy(resolve(raw, inputs));
|
|
1166
1167
|
warnIfUnresolved(ctx, raw, taken ? "true" : "false");
|
|
@@ -1330,6 +1331,7 @@ var switchCaseExecutor = (ctx) => {
|
|
|
1330
1331
|
const config = configOf(ctx.node);
|
|
1331
1332
|
const inputs = ctx.inputs;
|
|
1332
1333
|
const expression = config.value;
|
|
1334
|
+
validateRoutingExpression(ctx, expression, "switch_case", "value");
|
|
1333
1335
|
const value = text(resolve(expression, inputs));
|
|
1334
1336
|
const cases = config.cases ?? {};
|
|
1335
1337
|
const matched = Object.prototype.hasOwnProperty.call(cases, value);
|
|
@@ -1337,6 +1339,21 @@ var switchCaseExecutor = (ctx) => {
|
|
|
1337
1339
|
warnIfUnresolved(ctx, expression, port, "value");
|
|
1338
1340
|
return { __port: port, value: inputs.in ?? inputs };
|
|
1339
1341
|
};
|
|
1342
|
+
function validateRoutingExpression(ctx, value, kind, field) {
|
|
1343
|
+
if (typeof value !== "string" || value.trim() === "") return;
|
|
1344
|
+
const bare = value.trim();
|
|
1345
|
+
const subject = `${kind} "${ctx.node.id}" ${field} "${bare}"`;
|
|
1346
|
+
if (!value.includes("{{")) {
|
|
1347
|
+
ctx.abort(`${subject} is not an expression -- wrap it: {{ ${bare} }}`);
|
|
1348
|
+
}
|
|
1349
|
+
let open = 0;
|
|
1350
|
+
for (const [delimiter] of value.matchAll(/\{\{|\}\}/g)) {
|
|
1351
|
+
open = delimiter === "{{" ? open + 1 : Math.max(0, open - 1);
|
|
1352
|
+
}
|
|
1353
|
+
if (open > 0) {
|
|
1354
|
+
ctx.abort(`${subject} has an unclosed expression -- close every {{ with }}`);
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1340
1357
|
|
|
1341
1358
|
// src/registry/terminal-nodes.ts
|
|
1342
1359
|
var DEFAULT_TIMEOUT_MS = 12e4;
|
|
@@ -1828,7 +1845,7 @@ var KINDS = [
|
|
|
1828
1845
|
key: "condition",
|
|
1829
1846
|
label: "Raw expression (advanced)",
|
|
1830
1847
|
example: "{{ $json.active && $json.score > 10 }}",
|
|
1831
|
-
description: "Escape hatch for logic the builder can't express. Overrides the conditions above when set."
|
|
1848
|
+
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."
|
|
1832
1849
|
}
|
|
1833
1850
|
]
|
|
1834
1851
|
},
|
|
@@ -1848,7 +1865,7 @@ var KINDS = [
|
|
|
1848
1865
|
// moves the ports on the canvas and the ports the runtime activates.
|
|
1849
1866
|
outputs: (config) => casePorts(config?.cases),
|
|
1850
1867
|
configSchema: [
|
|
1851
|
-
{ type: "expression", key: "value", label: "Switch on", example: "{{ $json.kind }}", required: true },
|
|
1868
|
+
{ 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 },
|
|
1852
1869
|
{
|
|
1853
1870
|
type: "keyvalue",
|
|
1854
1871
|
key: "cases",
|