@bian-womp/spark-graph 0.2.31 → 0.2.33
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 +10 -8
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/src/examples/async.d.ts +1 -1
- package/lib/cjs/src/examples/async.d.ts.map +1 -1
- package/lib/cjs/src/plugins/composite.d.ts +1 -1
- package/lib/cjs/src/plugins/composite.d.ts.map +1 -1
- package/lib/cjs/src/runtime/AbstractEngine.d.ts +1 -1
- package/lib/cjs/src/runtime/AbstractEngine.d.ts.map +1 -1
- package/lib/cjs/src/runtime/Engine.d.ts +1 -1
- package/lib/cjs/src/runtime/Engine.d.ts.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/LocalRunner.d.ts +1 -1
- package/lib/cjs/src/runtime/LocalRunner.d.ts.map +1 -1
- package/lib/cjs/src/runtime/RunnerControl.d.ts +1 -1
- package/lib/cjs/src/runtime/RunnerControl.d.ts.map +1 -1
- package/lib/esm/index.js +10 -8
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/src/examples/async.d.ts +1 -1
- package/lib/esm/src/examples/async.d.ts.map +1 -1
- package/lib/esm/src/plugins/composite.d.ts +1 -1
- package/lib/esm/src/plugins/composite.d.ts.map +1 -1
- package/lib/esm/src/runtime/AbstractEngine.d.ts +1 -1
- package/lib/esm/src/runtime/AbstractEngine.d.ts.map +1 -1
- package/lib/esm/src/runtime/Engine.d.ts +1 -1
- package/lib/esm/src/runtime/Engine.d.ts.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/LocalRunner.d.ts +1 -1
- package/lib/esm/src/runtime/LocalRunner.d.ts.map +1 -1
- package/lib/esm/src/runtime/RunnerControl.d.ts +1 -1
- package/lib/esm/src/runtime/RunnerControl.d.ts.map +1 -1
- package/package.json +2 -2
package/lib/cjs/index.cjs
CHANGED
|
@@ -1088,7 +1088,7 @@ class GraphRuntime {
|
|
|
1088
1088
|
// Invalidate downstream for this node so UI refreshes
|
|
1089
1089
|
this.invalidateDownstream(nodeId);
|
|
1090
1090
|
}
|
|
1091
|
-
launch() {
|
|
1091
|
+
launch(invalidate = false) {
|
|
1092
1092
|
// call onActivated for nodes that implement it
|
|
1093
1093
|
for (const node of this.nodes.values()) {
|
|
1094
1094
|
const ctrl = new AbortController();
|
|
@@ -1112,10 +1112,12 @@ class GraphRuntime {
|
|
|
1112
1112
|
});
|
|
1113
1113
|
node.runtime.onActivated?.(ctx);
|
|
1114
1114
|
}
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
this.
|
|
1115
|
+
if (invalidate) {
|
|
1116
|
+
// After activation, schedule nodes that have all inbound inputs present
|
|
1117
|
+
for (const nodeId of this.nodes.keys()) {
|
|
1118
|
+
if (this.allInboundHaveValue(nodeId))
|
|
1119
|
+
this.scheduleInputsChanged(nodeId);
|
|
1120
|
+
}
|
|
1119
1121
|
}
|
|
1120
1122
|
}
|
|
1121
1123
|
triggerExternal(nodeId, event) {
|
|
@@ -1901,11 +1903,11 @@ class AbstractEngine {
|
|
|
1901
1903
|
constructor(graphRuntime) {
|
|
1902
1904
|
this.graphRuntime = graphRuntime;
|
|
1903
1905
|
}
|
|
1904
|
-
launch() {
|
|
1905
|
-
this.graphRuntime.launch();
|
|
1906
|
+
launch(invalidate = false) {
|
|
1907
|
+
this.graphRuntime.launch(invalidate);
|
|
1906
1908
|
}
|
|
1907
1909
|
setInput(nodeId, handle, value) {
|
|
1908
|
-
this.setInputs(nodeId, { [handle]: value });
|
|
1910
|
+
this.graphRuntime.setInputs(nodeId, { [handle]: value });
|
|
1909
1911
|
}
|
|
1910
1912
|
setInputs(nodeId, inputs) {
|
|
1911
1913
|
this.graphRuntime.setInputs(nodeId, inputs);
|