@bian-womp/spark-graph 0.3.34 → 0.3.36
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 +4 -4
- 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/HandleResolver.d.ts.map +1 -1
- package/lib/esm/index.js +4 -4
- 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/HandleResolver.d.ts.map +1 -1
- package/package.json +2 -2
package/lib/cjs/index.cjs
CHANGED
|
@@ -1842,8 +1842,6 @@ class HandleResolver {
|
|
|
1842
1842
|
if ((this.recomputeTokenByNode.get(nodeId) ?? 0) !== token)
|
|
1843
1843
|
return;
|
|
1844
1844
|
const before = this.graph.getResolvedHandles(nodeId);
|
|
1845
|
-
if (!before)
|
|
1846
|
-
return;
|
|
1847
1845
|
// Re-fetch desc to ensure we have the latest (node might have been updated)
|
|
1848
1846
|
const nodeDesc = this.registry.nodes.get(node.typeId);
|
|
1849
1847
|
if (!nodeDesc)
|
|
@@ -1872,8 +1870,9 @@ class HandleResolver {
|
|
|
1872
1870
|
...resolved?.inputDefaults,
|
|
1873
1871
|
};
|
|
1874
1872
|
const after = { inputs, outputs, inputDefaults };
|
|
1875
|
-
//
|
|
1876
|
-
|
|
1873
|
+
// If we have prior handles, skip update when unchanged; for new nodes (no before),
|
|
1874
|
+
// always write the resolved handles.
|
|
1875
|
+
if (before && JSON.stringify(before) === JSON.stringify(after))
|
|
1877
1876
|
return;
|
|
1878
1877
|
// Call GraphRuntime's updateNodeHandles to update edges and re-propagate values
|
|
1879
1878
|
// Note: updateNodeHandles will set the resolved handles internally
|
|
@@ -3326,6 +3325,7 @@ class GraphRuntime {
|
|
|
3326
3325
|
if (!fromNode?.outputs)
|
|
3327
3326
|
return;
|
|
3328
3327
|
this.hydrate({ outputs: { [toNodeId]: { ...fromNode.outputs } } }, { invalidate: !options?.dry });
|
|
3328
|
+
this.handleResolver.scheduleRecomputeHandles(toNodeId);
|
|
3329
3329
|
}
|
|
3330
3330
|
hydrate(payload, opts) {
|
|
3331
3331
|
const releasePause = this.requestPause();
|