@particle-academy/fancy-flow 0.74.0 → 0.75.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-XV5L4JQH.js → chunk-2H5H2DDP.js} +10 -9
- package/dist/chunk-2H5H2DDP.js.map +1 -0
- package/dist/{chunk-3RXQGYGH.js → chunk-4BPCA3ZO.js} +3 -3
- package/dist/{chunk-3RXQGYGH.js.map → chunk-4BPCA3ZO.js.map} +1 -1
- package/dist/{chunk-K7KO3UJ3.js → chunk-LKEDPVR3.js} +3 -3
- package/dist/{chunk-K7KO3UJ3.js.map → chunk-LKEDPVR3.js.map} +1 -1
- package/dist/{chunk-7DJ56PUA.js → chunk-T7E7QPHI.js} +4 -4
- package/dist/{chunk-7DJ56PUA.js.map → chunk-T7E7QPHI.js.map} +1 -1
- package/dist/{chunk-EX34GCKK.js → chunk-W7DMO3H7.js} +18 -6
- package/dist/chunk-W7DMO3H7.js.map +1 -0
- package/dist/{chunk-VAF2SWTC.js → chunk-XZFLPKO2.js} +3 -3
- package/dist/{chunk-VAF2SWTC.js.map → chunk-XZFLPKO2.js.map} +1 -1
- package/dist/{chunk-GQ5LEA7Q.js → chunk-ZBHIEKCN.js} +3 -3
- package/dist/{chunk-GQ5LEA7Q.js.map → chunk-ZBHIEKCN.js.map} +1 -1
- package/dist/durable.cjs +16 -4
- package/dist/durable.cjs.map +1 -1
- package/dist/durable.js +1 -1
- package/dist/engine.cjs +16 -4
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.js +4 -4
- package/dist/index.cjs +22 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -12
- package/dist/registry.cjs +16 -4
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.js +2 -2
- package/dist/runtime.cjs +16 -4
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +3 -3
- package/dist/schema.cjs +16 -4
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +3 -3
- package/dist/screens.cjs +22 -9
- package/dist/screens.cjs.map +1 -1
- package/dist/screens.js +4 -4
- package/dist/ux.cjs +17 -5
- package/dist/ux.cjs.map +1 -1
- package/dist/ux.js +2 -2
- package/dist/ux.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-EX34GCKK.js.map +0 -1
- package/dist/chunk-XV5L4JQH.js.map +0 -1
package/dist/durable.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pauseForHuman, decodePause } from './chunk-UEOE6B52.js';
|
|
2
|
-
import { getNodeKind, runFlow, resolveKindId, kindIds, truthy, RunIdentity, undeliveredEdgeWarnings } from './chunk-
|
|
2
|
+
import { getNodeKind, runFlow, resolveKindId, kindIds, truthy, RunIdentity, undeliveredEdgeWarnings } from './chunk-W7DMO3H7.js';
|
|
3
3
|
import './chunk-2QXKDLGT.js';
|
|
4
4
|
|
|
5
5
|
// src/durable/state.ts
|
package/dist/engine.cjs
CHANGED
|
@@ -2531,8 +2531,9 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
2531
2531
|
outputs[node.id] = stored;
|
|
2532
2532
|
const activated = activatedPorts(node, stored);
|
|
2533
2533
|
for (const portId of activated.ports) {
|
|
2534
|
-
|
|
2535
|
-
|
|
2534
|
+
const value = portValueOf(activated, portId);
|
|
2535
|
+
portValues.set(`${node.id}:${portId}`, value);
|
|
2536
|
+
onEvent({ type: "node-output", nodeId: node.id, portId, value });
|
|
2536
2537
|
}
|
|
2537
2538
|
completed.add(node.id);
|
|
2538
2539
|
onEvent({ type: "node-status", nodeId: node.id, status: "done", text: "resumed" });
|
|
@@ -2595,8 +2596,9 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
2595
2596
|
outputs[node.id] = result;
|
|
2596
2597
|
const activated = activatedPorts(node, result);
|
|
2597
2598
|
for (const portId of activated.ports) {
|
|
2598
|
-
|
|
2599
|
-
|
|
2599
|
+
const value = portValueOf(activated, portId);
|
|
2600
|
+
portValues.set(`${node.id}:${portId}`, value);
|
|
2601
|
+
onEvent({ type: "node-output", nodeId: node.id, portId, value });
|
|
2600
2602
|
}
|
|
2601
2603
|
completed.add(node.id);
|
|
2602
2604
|
onEvent({ type: "node-status", nodeId: node.id, status: "done" });
|
|
@@ -2702,6 +2704,13 @@ function activatedPorts(node, result) {
|
|
|
2702
2704
|
if (typeof r.__port === "string") {
|
|
2703
2705
|
return { ports: [r.__port], value: r.value };
|
|
2704
2706
|
}
|
|
2707
|
+
if (Array.isArray(r.__ports)) {
|
|
2708
|
+
return { ports: r.__ports.filter((p) => typeof p === "string"), value: r.value };
|
|
2709
|
+
}
|
|
2710
|
+
if (r.__ports && typeof r.__ports === "object") {
|
|
2711
|
+
const values = r.__ports;
|
|
2712
|
+
return { ports: Object.keys(values), value: r.value, values };
|
|
2713
|
+
}
|
|
2705
2714
|
if (typeof r.branch === "string") {
|
|
2706
2715
|
return { ports: [r.branch], value: Object.prototype.hasOwnProperty.call(r, "value") ? r.value : r };
|
|
2707
2716
|
}
|
|
@@ -2710,6 +2719,9 @@ function activatedPorts(node, result) {
|
|
|
2710
2719
|
const declared = resolveNodePorts(node, kind).outputs?.map((p) => p.id);
|
|
2711
2720
|
return { ports: declared?.length ? declared : ["out"], value: result };
|
|
2712
2721
|
}
|
|
2722
|
+
function portValueOf(activated, portId) {
|
|
2723
|
+
return activated.values && Object.prototype.hasOwnProperty.call(activated.values, portId) ? activated.values[portId] : activated.value;
|
|
2724
|
+
}
|
|
2713
2725
|
function announce(onEvent, node, phase) {
|
|
2714
2726
|
const data = node.data;
|
|
2715
2727
|
const raw = phase === "start" ? data?.startingMsg : data?.stoppingMsg;
|