@bian-womp/spark-graph 0.3.83 → 0.3.85
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/lib/cjs/index.cjs +18 -9
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/src/runtime/GraphRuntime.d.ts.map +1 -1
- package/lib/cjs/src/runtime/components/EdgePropagator.d.ts.map +1 -1
- package/lib/cjs/src/runtime/utils.d.ts +0 -4
- package/lib/cjs/src/runtime/utils.d.ts.map +1 -1
- package/lib/esm/index.js +18 -9
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/src/runtime/GraphRuntime.d.ts.map +1 -1
- package/lib/esm/src/runtime/components/EdgePropagator.d.ts.map +1 -1
- package/lib/esm/src/runtime/utils.d.ts +0 -4
- package/lib/esm/src/runtime/utils.d.ts.map +1 -1
- package/package.json +2 -2
package/lib/cjs/index.cjs
CHANGED
|
@@ -2221,14 +2221,7 @@ function valuesEqual(a, b) {
|
|
|
2221
2221
|
*/
|
|
2222
2222
|
function formatNodeRef(graph, nodeId) {
|
|
2223
2223
|
const node = graph.getNode(nodeId);
|
|
2224
|
-
return `${nodeId}
|
|
2225
|
-
}
|
|
2226
|
-
/**
|
|
2227
|
-
* Format a node handle reference as <nodeId>.<handle>[<typeId>] for concise logs.
|
|
2228
|
-
*/
|
|
2229
|
-
function formatNodeHandleTypeRef(graph, nodeId, handle) {
|
|
2230
|
-
const node = graph.getNode(nodeId);
|
|
2231
|
-
return `${nodeId}.${handle}[${node?.typeId ?? "unknown"}]`;
|
|
2224
|
+
return `${nodeId}<${node?.typeId ?? "unknown"}>`;
|
|
2232
2225
|
}
|
|
2233
2226
|
|
|
2234
2227
|
function tryHandleResolving(def, registry, environment) {
|
|
@@ -2866,7 +2859,7 @@ class EdgePropagator {
|
|
|
2866
2859
|
edge.typeId ??
|
|
2867
2860
|
"unknown";
|
|
2868
2861
|
const toType = Array.isArray(edge.dstDeclared) ? edge.dstDeclared.join("|") : (edge.dstDeclared ?? "unknown");
|
|
2869
|
-
console.warn(`No convert function for edge ${edge.id} [${
|
|
2862
|
+
console.warn(`No convert function for edge ${edge.id} [${formatNodeRef(this.graph, edge.source.nodeId)}.${edge.source.handle} -> ${formatNodeRef(this.graph, edge.target.nodeId)}.${edge.target.handle}] from:${fromType} to:${toType}`);
|
|
2870
2863
|
console.warn(`Edge ${edge.id} unresolved-handle details: resolvedHandles:{srcNode:${srcResolvedNode},srcHandle:${srcResolvedHandle},dstNode:${dstResolvedNode},dstHandle:${dstResolvedHandle}}`);
|
|
2871
2864
|
}
|
|
2872
2865
|
this.applyToTarget(edge, convertedValue, effectiveRunContexts);
|
|
@@ -4281,6 +4274,22 @@ class GraphRuntime {
|
|
|
4281
4274
|
return;
|
|
4282
4275
|
this.hydrate({ outputs: { [toNodeId]: { ...fromNode.outputs } } }, { invalidate: !options?.dry });
|
|
4283
4276
|
this.handleResolver.scheduleRecomputeHandles(toNodeId);
|
|
4277
|
+
if (options?.dry) {
|
|
4278
|
+
// Dry copy should propagate values only, never schedule node execution.
|
|
4279
|
+
const runContextId = this.runContextManager.createRunContext(toNodeId, { propagate: false });
|
|
4280
|
+
const runContextIds = new Set([runContextId]);
|
|
4281
|
+
try {
|
|
4282
|
+
for (const [handle, value] of Object.entries(fromNode.outputs || {})) {
|
|
4283
|
+
if (value !== undefined) {
|
|
4284
|
+
this.propagate(toNodeId, handle, value, runContextIds);
|
|
4285
|
+
}
|
|
4286
|
+
}
|
|
4287
|
+
}
|
|
4288
|
+
finally {
|
|
4289
|
+
this.runContextManager.releaseScheduling(runContextId);
|
|
4290
|
+
}
|
|
4291
|
+
return;
|
|
4292
|
+
}
|
|
4284
4293
|
this.executeNodeAutoRun(toNodeId, { reason: "copyOutputs" });
|
|
4285
4294
|
}
|
|
4286
4295
|
hydrate(payload, opts) {
|