@bian-womp/spark-graph 0.3.74 → 0.3.76
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 +7 -2
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/src/core/types.d.ts +2 -0
- package/lib/cjs/src/core/types.d.ts.map +1 -1
- package/lib/cjs/src/runtime/GraphRuntime.d.ts +2 -2
- 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/esm/index.js +7 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/src/core/types.d.ts +2 -0
- package/lib/esm/src/core/types.d.ts.map +1 -1
- package/lib/esm/src/runtime/GraphRuntime.d.ts +2 -2
- package/lib/esm/src/runtime/GraphRuntime.d.ts.map +1 -1
- package/lib/esm/src/runtime/components/EdgePropagator.d.ts.map +1 -1
- package/package.json +2 -2
package/lib/cjs/index.cjs
CHANGED
|
@@ -2821,7 +2821,10 @@ class EdgePropagator {
|
|
|
2821
2821
|
*/
|
|
2822
2822
|
shouldPropagateExecution(effectiveRunContexts) {
|
|
2823
2823
|
if (!effectiveRunContexts) {
|
|
2824
|
-
|
|
2824
|
+
// Without run-context IDs, only auto mode should schedule downstream execution.
|
|
2825
|
+
// In manual mode this path is used for value refresh/re-emits (e.g. handle updates),
|
|
2826
|
+
// and should not implicitly trigger node runs.
|
|
2827
|
+
return this.runtime.getRunMode() === "auto";
|
|
2825
2828
|
}
|
|
2826
2829
|
// Check propagate flag (only in run-context mode)
|
|
2827
2830
|
for (const id of effectiveRunContexts) {
|
|
@@ -4150,6 +4153,7 @@ class GraphRuntime {
|
|
|
4150
4153
|
node.lifecycle?.dispose?.({
|
|
4151
4154
|
state: node.state,
|
|
4152
4155
|
setState: (next) => this.graph.updateNodeState(node.nodeId, next),
|
|
4156
|
+
disposeReason: "node-removed",
|
|
4153
4157
|
});
|
|
4154
4158
|
this.graph.deleteNode(nodeId);
|
|
4155
4159
|
this.edgePropagator.clearArrayBuckets(nodeId);
|
|
@@ -4370,7 +4374,7 @@ class GraphRuntime {
|
|
|
4370
4374
|
}
|
|
4371
4375
|
}
|
|
4372
4376
|
}
|
|
4373
|
-
dispose() {
|
|
4377
|
+
dispose(reason = "runtime-dispose") {
|
|
4374
4378
|
this.runContextManager.resolveAll();
|
|
4375
4379
|
this.graph.forEachNode((node) => {
|
|
4376
4380
|
node.runtime.onDeactivated?.();
|
|
@@ -4378,6 +4382,7 @@ class GraphRuntime {
|
|
|
4378
4382
|
node.lifecycle?.dispose?.({
|
|
4379
4383
|
state: node.state,
|
|
4380
4384
|
setState: (next) => this.graph.updateNodeState(node.nodeId, next),
|
|
4385
|
+
disposeReason: reason,
|
|
4381
4386
|
});
|
|
4382
4387
|
});
|
|
4383
4388
|
this.graph.clear();
|