@particle-academy/fancy-flow 0.59.0 → 0.63.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/{HumanPrompt-Bw09OyS3.d.ts → HumanPrompt-BKThiyjB.d.ts} +1 -1
- package/dist/{HumanPrompt-DV5-xnDa.d.cts → HumanPrompt-Bpp3JiVH.d.cts} +1 -1
- package/dist/{chunk-M7M6GLFV.js → chunk-5H54OTKT.js} +3 -3
- package/dist/{chunk-M7M6GLFV.js.map → chunk-5H54OTKT.js.map} +1 -1
- package/dist/{chunk-MX4SJDNI.js → chunk-EO6444T2.js} +4 -4
- package/dist/{chunk-MX4SJDNI.js.map → chunk-EO6444T2.js.map} +1 -1
- package/dist/{chunk-HBE4LVPX.js → chunk-JF6WCRBU.js} +9 -7
- package/dist/chunk-JF6WCRBU.js.map +1 -0
- package/dist/{chunk-LGLOBK6Q.js → chunk-MBVX4ZRB.js} +3 -3
- package/dist/{chunk-LGLOBK6Q.js.map → chunk-MBVX4ZRB.js.map} +1 -1
- package/dist/{chunk-FGYG5JVW.js → chunk-MEIDPBKE.js} +3 -3
- package/dist/{chunk-FGYG5JVW.js.map → chunk-MEIDPBKE.js.map} +1 -1
- package/dist/{chunk-A3TLZS5B.js → chunk-RIAFHQT5.js} +3 -3
- package/dist/{chunk-A3TLZS5B.js.map → chunk-RIAFHQT5.js.map} +1 -1
- package/dist/{chunk-BHM5HGXH.js → chunk-UM4C46AF.js} +38 -14
- package/dist/chunk-UM4C46AF.js.map +1 -0
- package/dist/connectors.d.cts +1 -1
- package/dist/connectors.d.ts +1 -1
- package/dist/durable.cjs +7 -5
- package/dist/durable.cjs.map +1 -1
- package/dist/durable.js +2 -2
- package/dist/engine.cjs +138 -29
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.d.cts +3 -2
- package/dist/engine.d.ts +3 -2
- package/dist/engine.js +6 -5
- package/dist/engine.js.map +1 -1
- package/dist/expr-BfXDrs4H.d.cts +149 -0
- package/dist/expr-BfXDrs4H.d.ts +149 -0
- package/dist/fields/react-fancy.d.cts +2 -2
- package/dist/fields/react-fancy.d.ts +2 -2
- package/dist/index.cjs +44 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -84
- package/dist/index.d.ts +7 -84
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/registry/index.d.cts +3 -3
- package/dist/registry/index.d.ts +3 -3
- package/dist/{registry-1qhmRtvC.d.cts → registry-CntAdUcY.d.cts} +1 -1
- package/dist/{registry-D2qocEsY.d.ts → registry-DYoV-MQi.d.ts} +1 -1
- package/dist/registry.cjs +7 -5
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.js +2 -2
- package/dist/runtime.cjs +7 -5
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +3 -3
- package/dist/schema.cjs +7 -5
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/screens.cjs +7 -5
- package/dist/screens.cjs.map +1 -1
- package/dist/screens.js +4 -4
- package/dist/{types-CLSUZW8c.d.ts → types-Ckhz-YwC.d.ts} +7 -2
- package/dist/{types-BLVpNNLN.d.cts → types-D71SKA5A.d.cts} +7 -2
- package/dist/ux.cjs +7 -5
- package/dist/ux.cjs.map +1 -1
- package/dist/ux.d.cts +1 -1
- package/dist/ux.d.ts +1 -1
- package/dist/ux.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-BHM5HGXH.js.map +0 -1
- package/dist/chunk-HBE4LVPX.js.map +0 -1
package/dist/durable.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { truthy } from './chunk-
|
|
1
|
+
import { truthy } from './chunk-UM4C46AF.js';
|
|
2
2
|
import { pauseForHuman, decodePause } from './chunk-UEOE6B52.js';
|
|
3
|
-
import { getNodeKind, runFlow, resolveKindId, kindIds, RunIdentity } from './chunk-
|
|
3
|
+
import { getNodeKind, runFlow, resolveKindId, kindIds, RunIdentity } from './chunk-JF6WCRBU.js';
|
|
4
4
|
import './chunk-F5RPRB7A.js';
|
|
5
5
|
import './chunk-USL4FMFU.js';
|
|
6
6
|
|
package/dist/engine.cjs
CHANGED
|
@@ -2166,38 +2166,38 @@ function attrRemoveNS2(fullname) {
|
|
|
2166
2166
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
2167
2167
|
};
|
|
2168
2168
|
}
|
|
2169
|
-
function attrConstant2(name,
|
|
2169
|
+
function attrConstant2(name, interpolate2, value1) {
|
|
2170
2170
|
var string00, string1 = value1 + "", interpolate0;
|
|
2171
2171
|
return function() {
|
|
2172
2172
|
var string0 = this.getAttribute(name);
|
|
2173
|
-
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 =
|
|
2173
|
+
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1);
|
|
2174
2174
|
};
|
|
2175
2175
|
}
|
|
2176
|
-
function attrConstantNS2(fullname,
|
|
2176
|
+
function attrConstantNS2(fullname, interpolate2, value1) {
|
|
2177
2177
|
var string00, string1 = value1 + "", interpolate0;
|
|
2178
2178
|
return function() {
|
|
2179
2179
|
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2180
|
-
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 =
|
|
2180
|
+
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1);
|
|
2181
2181
|
};
|
|
2182
2182
|
}
|
|
2183
|
-
function attrFunction2(name,
|
|
2183
|
+
function attrFunction2(name, interpolate2, value) {
|
|
2184
2184
|
var string00, string10, interpolate0;
|
|
2185
2185
|
return function() {
|
|
2186
2186
|
var string0, value1 = value(this), string1;
|
|
2187
2187
|
if (value1 == null) return void this.removeAttribute(name);
|
|
2188
2188
|
string0 = this.getAttribute(name);
|
|
2189
2189
|
string1 = value1 + "";
|
|
2190
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 =
|
|
2190
|
+
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
|
|
2191
2191
|
};
|
|
2192
2192
|
}
|
|
2193
|
-
function attrFunctionNS2(fullname,
|
|
2193
|
+
function attrFunctionNS2(fullname, interpolate2, value) {
|
|
2194
2194
|
var string00, string10, interpolate0;
|
|
2195
2195
|
return function() {
|
|
2196
2196
|
var string0, value1 = value(this), string1;
|
|
2197
2197
|
if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
2198
2198
|
string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2199
2199
|
string1 = value1 + "";
|
|
2200
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 =
|
|
2200
|
+
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
|
|
2201
2201
|
};
|
|
2202
2202
|
}
|
|
2203
2203
|
function attr_default2(name, value) {
|
|
@@ -2407,11 +2407,11 @@ function selection_default2() {
|
|
|
2407
2407
|
}
|
|
2408
2408
|
|
|
2409
2409
|
// node_modules/d3-transition/src/transition/style.js
|
|
2410
|
-
function styleNull(name,
|
|
2410
|
+
function styleNull(name, interpolate2) {
|
|
2411
2411
|
var string00, string10, interpolate0;
|
|
2412
2412
|
return function() {
|
|
2413
2413
|
var string0 = styleValue(this, name), string1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
2414
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 =
|
|
2414
|
+
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, string10 = string1);
|
|
2415
2415
|
};
|
|
2416
2416
|
}
|
|
2417
2417
|
function styleRemove2(name) {
|
|
@@ -2419,19 +2419,19 @@ function styleRemove2(name) {
|
|
|
2419
2419
|
this.style.removeProperty(name);
|
|
2420
2420
|
};
|
|
2421
2421
|
}
|
|
2422
|
-
function styleConstant2(name,
|
|
2422
|
+
function styleConstant2(name, interpolate2, value1) {
|
|
2423
2423
|
var string00, string1 = value1 + "", interpolate0;
|
|
2424
2424
|
return function() {
|
|
2425
2425
|
var string0 = styleValue(this, name);
|
|
2426
|
-
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 =
|
|
2426
|
+
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1);
|
|
2427
2427
|
};
|
|
2428
2428
|
}
|
|
2429
|
-
function styleFunction2(name,
|
|
2429
|
+
function styleFunction2(name, interpolate2, value) {
|
|
2430
2430
|
var string00, string10, interpolate0;
|
|
2431
2431
|
return function() {
|
|
2432
2432
|
var string0 = styleValue(this, name), value1 = value(this), string1 = value1 + "";
|
|
2433
2433
|
if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
2434
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 =
|
|
2434
|
+
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
|
|
2435
2435
|
};
|
|
2436
2436
|
}
|
|
2437
2437
|
function styleMaybeRemove(id2, name) {
|
|
@@ -2749,7 +2749,7 @@ function defaultConstrain(transform2, extent, translateExtent) {
|
|
|
2749
2749
|
);
|
|
2750
2750
|
}
|
|
2751
2751
|
function zoom_default2() {
|
|
2752
|
-
var filter2 = defaultFilter2, extent = defaultExtent, constrain = defaultConstrain, wheelDelta2 = defaultWheelDelta, touchable = defaultTouchable2, scaleExtent = [0, Infinity], translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], duration = 250,
|
|
2752
|
+
var filter2 = defaultFilter2, extent = defaultExtent, constrain = defaultConstrain, wheelDelta2 = defaultWheelDelta, touchable = defaultTouchable2, scaleExtent = [0, Infinity], translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], duration = 250, interpolate2 = zoom_default, listeners2 = dispatch_default("start", "zoom", "end"), touchstarting, touchfirst, touchending, touchDelay = 500, wheelDelay = 150, clickDistance2 = 0, tapDistance = 10;
|
|
2753
2753
|
function zoom(selection2) {
|
|
2754
2754
|
selection2.property("__zoom", defaultTransform).on("wheel.zoom", wheeled, { passive: false }).on("mousedown.zoom", mousedowned).on("dblclick.zoom", dblclicked).filter(touchable).on("touchstart.zoom", touchstarted).on("touchmove.zoom", touchmoved).on("touchend.zoom touchcancel.zoom", touchended).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
2755
2755
|
}
|
|
@@ -2810,7 +2810,7 @@ function zoom_default2() {
|
|
|
2810
2810
|
}).on("interrupt.zoom end.zoom", function() {
|
|
2811
2811
|
gesture(this, arguments).event(event).end();
|
|
2812
2812
|
}).tween("zoom", function() {
|
|
2813
|
-
var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform2 === "function" ? transform2.apply(that, args) : transform2, i =
|
|
2813
|
+
var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform2 === "function" ? transform2.apply(that, args) : transform2, i = interpolate2(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
|
|
2814
2814
|
return function(t) {
|
|
2815
2815
|
if (t === 1) t = b;
|
|
2816
2816
|
else {
|
|
@@ -3015,7 +3015,7 @@ function zoom_default2() {
|
|
|
3015
3015
|
return arguments.length ? (duration = +_, zoom) : duration;
|
|
3016
3016
|
};
|
|
3017
3017
|
zoom.interpolate = function(_) {
|
|
3018
|
-
return arguments.length ? (
|
|
3018
|
+
return arguments.length ? (interpolate2 = _, zoom) : interpolate2;
|
|
3019
3019
|
};
|
|
3020
3020
|
zoom.on = function() {
|
|
3021
3021
|
var value = listeners2.on.apply(listeners2, arguments);
|
|
@@ -9030,11 +9030,11 @@ function NoteNodeInner(props) {
|
|
|
9030
9030
|
const config = data.config ?? {};
|
|
9031
9031
|
const api = useFlowEditorOptional();
|
|
9032
9032
|
const hasConfigText = typeof config.text === "string" && config.text.length > 0;
|
|
9033
|
-
const
|
|
9033
|
+
const text2 = hasConfigText ? String(config.text) : typeof data.body === "string" ? data.body : typeof data.text === "string" ? data.text : "";
|
|
9034
9034
|
const title = typeof config.title === "string" && config.title || (!hasConfigText && typeof data.body === "string" && typeof data.label === "string" ? data.label : "");
|
|
9035
9035
|
const skin = NOTE_COLORS[coerceColor(config.color)];
|
|
9036
9036
|
const [editing, setEditing] = ReactExports.useState(false);
|
|
9037
|
-
const [draft, setDraft] = ReactExports.useState(
|
|
9037
|
+
const [draft, setDraft] = ReactExports.useState(text2);
|
|
9038
9038
|
const areaRef = ReactExports.useRef(null);
|
|
9039
9039
|
ReactExports.useEffect(() => {
|
|
9040
9040
|
if (editing && areaRef.current) {
|
|
@@ -9045,7 +9045,7 @@ function NoteNodeInner(props) {
|
|
|
9045
9045
|
}, [editing]);
|
|
9046
9046
|
const commit = () => {
|
|
9047
9047
|
setEditing(false);
|
|
9048
|
-
if (!api || draft ===
|
|
9048
|
+
if (!api || draft === text2) return;
|
|
9049
9049
|
const current = api.nodes.find((n) => n.id === props.id);
|
|
9050
9050
|
if (!current) return;
|
|
9051
9051
|
api.updateNode({
|
|
@@ -9059,7 +9059,7 @@ function NoteNodeInner(props) {
|
|
|
9059
9059
|
className: ["ff-note", props.selected ? "ff-note--selected" : ""].filter(Boolean).join(" "),
|
|
9060
9060
|
style: { background: skin.bg, borderColor: skin.border },
|
|
9061
9061
|
onDoubleClick: api ? () => {
|
|
9062
|
-
setDraft(
|
|
9062
|
+
setDraft(text2);
|
|
9063
9063
|
setEditing(true);
|
|
9064
9064
|
} : void 0,
|
|
9065
9065
|
children: [
|
|
@@ -9078,7 +9078,7 @@ function NoteNodeInner(props) {
|
|
|
9078
9078
|
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) commit();
|
|
9079
9079
|
}
|
|
9080
9080
|
}
|
|
9081
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ff-note__body", children:
|
|
9081
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ff-note__body", children: text2 || /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-note__placeholder", children: api ? "Double-click to write a note\u2026" : "Note" }) })
|
|
9082
9082
|
]
|
|
9083
9083
|
}
|
|
9084
9084
|
);
|
|
@@ -9304,8 +9304,9 @@ var KINDS = [
|
|
|
9304
9304
|
// ───────────── Triggers ─────────────
|
|
9305
9305
|
{
|
|
9306
9306
|
name: "@particle-academy/manual_trigger",
|
|
9307
|
-
//
|
|
9308
|
-
|
|
9307
|
+
// Returns the raw inputs MAP, not the `in` port -- flat at an entry
|
|
9308
|
+
// point, port-keyed the moment the node has an inbound edge.
|
|
9309
|
+
emits: "input-map-merged",
|
|
9309
9310
|
aliases: ["manual_trigger", "@fancy/manual_trigger"],
|
|
9310
9311
|
category: "trigger",
|
|
9311
9312
|
label: "Manual",
|
|
@@ -9338,8 +9339,9 @@ var KINDS = [
|
|
|
9338
9339
|
{ path: "cron", type: "string", description: "The cron expression that fired." },
|
|
9339
9340
|
{ path: "timezone", type: "string", description: "The timezone it was evaluated in." }
|
|
9340
9341
|
],
|
|
9341
|
-
//
|
|
9342
|
-
|
|
9342
|
+
// Merges $ctx->inputs ITSELF beside cron/timezone -- the MAP, whose
|
|
9343
|
+
// shape depends on position, not each port's payload the way `merge` does.
|
|
9344
|
+
emits: "input-map-merged",
|
|
9343
9345
|
aliases: ["schedule_trigger", "@fancy/schedule_trigger"],
|
|
9344
9346
|
category: "trigger",
|
|
9345
9347
|
label: "Schedule",
|
|
@@ -10739,7 +10741,7 @@ function activatedPorts(node, result) {
|
|
|
10739
10741
|
return { ports: [r.__port], value: r.value };
|
|
10740
10742
|
}
|
|
10741
10743
|
if (typeof r.branch === "string") {
|
|
10742
|
-
return { ports: [r.branch], value: r.value
|
|
10744
|
+
return { ports: [r.branch], value: Object.prototype.hasOwnProperty.call(r, "value") ? r.value : r };
|
|
10743
10745
|
}
|
|
10744
10746
|
}
|
|
10745
10747
|
const kind = getNodeKind(node.data?.kind ?? node.type ?? "") ?? void 0;
|
|
@@ -10800,6 +10802,106 @@ function errorText(error) {
|
|
|
10800
10802
|
return error instanceof Error ? error.message : String(error);
|
|
10801
10803
|
}
|
|
10802
10804
|
|
|
10805
|
+
// src/expressions/expr.ts
|
|
10806
|
+
function wholeExpression(trimmed) {
|
|
10807
|
+
if (trimmed.length < 4) return null;
|
|
10808
|
+
if (!trimmed.startsWith("{{") || !trimmed.endsWith("}}")) return null;
|
|
10809
|
+
return trimmed.slice(2, -2);
|
|
10810
|
+
}
|
|
10811
|
+
function interpolate(template, resolve) {
|
|
10812
|
+
let out = "";
|
|
10813
|
+
let i = 0;
|
|
10814
|
+
for (; ; ) {
|
|
10815
|
+
const open = template.indexOf("{{", i);
|
|
10816
|
+
if (open === -1) return out + template.slice(i);
|
|
10817
|
+
const close = template.indexOf("}}", open + 2);
|
|
10818
|
+
if (close === -1) return out + template.slice(i);
|
|
10819
|
+
out += template.slice(i, open) + resolve(template.slice(open + 2, close));
|
|
10820
|
+
i = close + 2;
|
|
10821
|
+
}
|
|
10822
|
+
}
|
|
10823
|
+
var FALSY_STRINGS = /* @__PURE__ */ new Set(["", "0", "false", "no", "off", "null"]);
|
|
10824
|
+
var UnresolvedPathError = class extends Error {
|
|
10825
|
+
constructor(path) {
|
|
10826
|
+
super(
|
|
10827
|
+
`Expression path "${path}" did not resolve. Under the "throw" policy an unresolvable path is an error rather than an empty string.`
|
|
10828
|
+
);
|
|
10829
|
+
this.path = path;
|
|
10830
|
+
this.name = "UnresolvedPathError";
|
|
10831
|
+
}
|
|
10832
|
+
};
|
|
10833
|
+
function tryResolvePath(path, context) {
|
|
10834
|
+
const unresolved = { resolved: false, value: null };
|
|
10835
|
+
const trimmed = path.trim();
|
|
10836
|
+
if (trimmed === "") return unresolved;
|
|
10837
|
+
const segments = trimmed.split(".");
|
|
10838
|
+
let cursor;
|
|
10839
|
+
const head = segments[0];
|
|
10840
|
+
if (head === "$json" || head === "$input") {
|
|
10841
|
+
cursor = context !== null && typeof context === "object" && "in" in context ? context.in : context;
|
|
10842
|
+
segments.shift();
|
|
10843
|
+
} else {
|
|
10844
|
+
cursor = context;
|
|
10845
|
+
}
|
|
10846
|
+
for (const segment of segments) {
|
|
10847
|
+
if (cursor === null || cursor === void 0) return unresolved;
|
|
10848
|
+
if (typeof cursor !== "object") return unresolved;
|
|
10849
|
+
const next = cursor[segment];
|
|
10850
|
+
if (next === void 0) return unresolved;
|
|
10851
|
+
cursor = next;
|
|
10852
|
+
}
|
|
10853
|
+
return { resolved: true, value: cursor === void 0 ? null : cursor };
|
|
10854
|
+
}
|
|
10855
|
+
function resolvePath(path, context) {
|
|
10856
|
+
return tryResolvePath(path, context).value;
|
|
10857
|
+
}
|
|
10858
|
+
function evaluateExpression(template, context, options = {}) {
|
|
10859
|
+
if (typeof template !== "string") return template;
|
|
10860
|
+
const policy = options.onUnresolved ?? "empty";
|
|
10861
|
+
const whole = wholeExpression(template.trim());
|
|
10862
|
+
if (whole !== null) {
|
|
10863
|
+
const r = tryResolvePath(whole, context);
|
|
10864
|
+
if (r.resolved) return r.value;
|
|
10865
|
+
if (policy === "throw") throw new UnresolvedPathError(whole);
|
|
10866
|
+
return policy === "keep" ? template : null;
|
|
10867
|
+
}
|
|
10868
|
+
return interpolate(template, (path) => {
|
|
10869
|
+
const r = tryResolvePath(path, context);
|
|
10870
|
+
if (r.resolved) return stringify(r.value);
|
|
10871
|
+
if (policy === "throw") throw new UnresolvedPathError(path);
|
|
10872
|
+
return policy === "keep" ? `{{${path}}}` : "";
|
|
10873
|
+
});
|
|
10874
|
+
}
|
|
10875
|
+
function truthy(value) {
|
|
10876
|
+
if (typeof value === "boolean") return value;
|
|
10877
|
+
if (value === null || value === void 0) return false;
|
|
10878
|
+
if (typeof value === "string") return !FALSY_STRINGS.has(value.trim().toLowerCase());
|
|
10879
|
+
if (Array.isArray(value)) return value.length > 0;
|
|
10880
|
+
if (typeof value === "number") return value !== 0;
|
|
10881
|
+
return Boolean(value);
|
|
10882
|
+
}
|
|
10883
|
+
function text(value) {
|
|
10884
|
+
return stringify(value);
|
|
10885
|
+
}
|
|
10886
|
+
function stringify(value) {
|
|
10887
|
+
if (typeof value === "string") return value;
|
|
10888
|
+
if (typeof value === "boolean") return value ? "true" : "false";
|
|
10889
|
+
if (value === null || value === void 0) return "";
|
|
10890
|
+
if (typeof value === "number" || typeof value === "bigint") return String(value);
|
|
10891
|
+
try {
|
|
10892
|
+
return JSON.stringify(value) ?? "";
|
|
10893
|
+
} catch {
|
|
10894
|
+
return "";
|
|
10895
|
+
}
|
|
10896
|
+
}
|
|
10897
|
+
function evaluateConfig(config, context, options = {}) {
|
|
10898
|
+
const out = {};
|
|
10899
|
+
for (const [key2, value] of Object.entries(config)) {
|
|
10900
|
+
out[key2] = Array.isArray(value) ? value.map((v) => evaluateExpression(v, context, options)) : value !== null && typeof value === "object" ? evaluateConfig(value, context, options) : evaluateExpression(value, context, options);
|
|
10901
|
+
}
|
|
10902
|
+
return out;
|
|
10903
|
+
}
|
|
10904
|
+
|
|
10803
10905
|
// src/registry/pause.ts
|
|
10804
10906
|
var PAUSE_PREFIX = "fancy-flow:pause:";
|
|
10805
10907
|
var LEGACY_PAUSE_PREFIXES = [
|
|
@@ -11207,7 +11309,7 @@ async function resume(kindId, testCase, executor, pausedNodeId, submit) {
|
|
|
11207
11309
|
const port = node.id.slice("probe:".length);
|
|
11208
11310
|
executors[node.id] = ((c) => {
|
|
11209
11311
|
fired.push(port);
|
|
11210
|
-
carried = c.inputs
|
|
11312
|
+
carried = c.inputs && Object.prototype.hasOwnProperty.call(c.inputs, "in") ? c.inputs.in : c.inputs;
|
|
11211
11313
|
return void 0;
|
|
11212
11314
|
});
|
|
11213
11315
|
}
|
|
@@ -11237,7 +11339,7 @@ async function runFixtures(file, executor) {
|
|
|
11237
11339
|
const port = node.id.slice("probe:".length);
|
|
11238
11340
|
executors[node.id] = ((ctx) => {
|
|
11239
11341
|
fired.push(port);
|
|
11240
|
-
carried = ctx.inputs
|
|
11342
|
+
carried = ctx.inputs && Object.prototype.hasOwnProperty.call(ctx.inputs, "in") ? ctx.inputs.in : ctx.inputs;
|
|
11241
11343
|
return void 0;
|
|
11242
11344
|
});
|
|
11243
11345
|
}
|
|
@@ -11432,12 +11534,15 @@ exports.LEGACY_PAUSE_PREFIXES = LEGACY_PAUSE_PREFIXES;
|
|
|
11432
11534
|
exports.NODE_MANIFEST_SCHEMA_VERSION = NODE_MANIFEST_SCHEMA_VERSION;
|
|
11433
11535
|
exports.PAUSE_PREFIX = PAUSE_PREFIX;
|
|
11434
11536
|
exports.RunIdentity = RunIdentity;
|
|
11537
|
+
exports.UnresolvedPathError = UnresolvedPathError;
|
|
11435
11538
|
exports.checkCapabilities = checkCapabilities;
|
|
11436
11539
|
exports.checkRuntimeSupport = checkRuntimeSupport;
|
|
11437
11540
|
exports.decodePause = decodePause;
|
|
11438
11541
|
exports.defaultConfigFor = defaultConfigFor;
|
|
11439
11542
|
exports.encodePause = encodePause;
|
|
11440
11543
|
exports.escapeSegment = escapeSegment;
|
|
11544
|
+
exports.evaluateConfig = evaluateConfig;
|
|
11545
|
+
exports.evaluateExpression = evaluateExpression;
|
|
11441
11546
|
exports.findSubflowCycle = findSubflowCycle;
|
|
11442
11547
|
exports.getNodeKind = getNodeKind;
|
|
11443
11548
|
exports.isPause = isPause;
|
|
@@ -11446,10 +11551,14 @@ exports.listNodeKinds = listNodeKinds;
|
|
|
11446
11551
|
exports.pauseForHuman = pauseForHuman;
|
|
11447
11552
|
exports.registerNodeKind = registerNodeKind;
|
|
11448
11553
|
exports.resolveKindId = resolveKindId;
|
|
11554
|
+
exports.resolvePath = resolvePath;
|
|
11449
11555
|
exports.runCohort = runCohort;
|
|
11450
11556
|
exports.runFixtures = runFixtures;
|
|
11451
11557
|
exports.runFlow = runFlow;
|
|
11452
11558
|
exports.satisfiesRange = satisfiesRange;
|
|
11559
|
+
exports.text = text;
|
|
11560
|
+
exports.truthy = truthy;
|
|
11561
|
+
exports.tryResolvePath = tryResolvePath;
|
|
11453
11562
|
exports.validateConfig = validateConfig;
|
|
11454
11563
|
exports.validateFixtureFile = validateFixtureFile;
|
|
11455
11564
|
exports.validateNodeManifest = validateNodeManifest;
|