@bian-womp/spark-graph 0.3.33 → 0.3.34
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 +8 -4
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/src/runtime/GraphRuntime.d.ts +1 -1
- package/lib/cjs/src/runtime/GraphRuntime.d.ts.map +1 -1
- package/lib/cjs/src/runtime/components/NodeExecutor.d.ts +1 -1
- package/lib/cjs/src/runtime/components/NodeExecutor.d.ts.map +1 -1
- package/lib/cjs/src/runtime/components/interfaces.d.ts +1 -1
- package/lib/cjs/src/runtime/components/interfaces.d.ts.map +1 -1
- package/lib/esm/index.js +8 -4
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/src/runtime/GraphRuntime.d.ts +1 -1
- package/lib/esm/src/runtime/GraphRuntime.d.ts.map +1 -1
- package/lib/esm/src/runtime/components/NodeExecutor.d.ts +1 -1
- package/lib/esm/src/runtime/components/NodeExecutor.d.ts.map +1 -1
- package/lib/esm/src/runtime/components/interfaces.d.ts +1 -1
- package/lib/esm/src/runtime/components/interfaces.d.ts.map +1 -1
- package/package.json +2 -2
package/lib/cjs/index.cjs
CHANGED
|
@@ -2380,7 +2380,7 @@ class NodeExecutor {
|
|
|
2380
2380
|
/**
|
|
2381
2381
|
* Internal method for executing inputs changed (also used by GraphRuntime)
|
|
2382
2382
|
*/
|
|
2383
|
-
execute(nodeId, runContextIds) {
|
|
2383
|
+
execute(nodeId, runContextIds, canSkipHandleResolution) {
|
|
2384
2384
|
const node = this.graph.getNode(nodeId);
|
|
2385
2385
|
if (!node)
|
|
2386
2386
|
return;
|
|
@@ -2430,6 +2430,10 @@ class NodeExecutor {
|
|
|
2430
2430
|
if (runContextIds) {
|
|
2431
2431
|
this.graph.addNodeRunContextIds(nodeId, runContextIds);
|
|
2432
2432
|
}
|
|
2433
|
+
if (!canSkipHandleResolution &&
|
|
2434
|
+
!this.handleResolver.getPendingResolution(nodeId)) {
|
|
2435
|
+
this.handleResolver.scheduleRecomputeHandles(nodeId);
|
|
2436
|
+
}
|
|
2433
2437
|
// Check if handles are being resolved - wait for resolution before executing
|
|
2434
2438
|
// Do this AFTER setting up run contexts so handle resolution can track them
|
|
2435
2439
|
const pendingResolution = this.handleResolver.getPendingResolution(nodeId);
|
|
@@ -2444,7 +2448,7 @@ class NodeExecutor {
|
|
|
2444
2448
|
// Re-check node still exists and conditions
|
|
2445
2449
|
const nodeAfter = this.graph.getNode(nodeId);
|
|
2446
2450
|
if (nodeAfter) {
|
|
2447
|
-
this.execute(nodeId, runContextIds);
|
|
2451
|
+
this.execute(nodeId, runContextIds, true);
|
|
2448
2452
|
}
|
|
2449
2453
|
if (runContextIds && runContextIds.size > 0) {
|
|
2450
2454
|
for (const id of runContextIds) {
|
|
@@ -3638,8 +3642,8 @@ class GraphRuntime {
|
|
|
3638
3642
|
});
|
|
3639
3643
|
this.graph.clear();
|
|
3640
3644
|
}
|
|
3641
|
-
execute(nodeId, runContextIds) {
|
|
3642
|
-
this.nodeExecutor.execute(nodeId, runContextIds);
|
|
3645
|
+
execute(nodeId, runContextIds, resolveHandles) {
|
|
3646
|
+
this.nodeExecutor.execute(nodeId, runContextIds, resolveHandles);
|
|
3643
3647
|
}
|
|
3644
3648
|
propagate(srcNodeId, srcHandle, value, runContextIds) {
|
|
3645
3649
|
this.edgePropagator.propagate(srcNodeId, srcHandle, value, runContextIds);
|