@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.
Files changed (33) hide show
  1. package/lib/cjs/index.cjs +10 -8
  2. package/lib/cjs/index.cjs.map +1 -1
  3. package/lib/cjs/src/examples/async.d.ts +1 -1
  4. package/lib/cjs/src/examples/async.d.ts.map +1 -1
  5. package/lib/cjs/src/plugins/composite.d.ts +1 -1
  6. package/lib/cjs/src/plugins/composite.d.ts.map +1 -1
  7. package/lib/cjs/src/runtime/AbstractEngine.d.ts +1 -1
  8. package/lib/cjs/src/runtime/AbstractEngine.d.ts.map +1 -1
  9. package/lib/cjs/src/runtime/Engine.d.ts +1 -1
  10. package/lib/cjs/src/runtime/Engine.d.ts.map +1 -1
  11. package/lib/cjs/src/runtime/GraphRuntime.d.ts +1 -1
  12. package/lib/cjs/src/runtime/GraphRuntime.d.ts.map +1 -1
  13. package/lib/cjs/src/runtime/LocalRunner.d.ts +1 -1
  14. package/lib/cjs/src/runtime/LocalRunner.d.ts.map +1 -1
  15. package/lib/cjs/src/runtime/RunnerControl.d.ts +1 -1
  16. package/lib/cjs/src/runtime/RunnerControl.d.ts.map +1 -1
  17. package/lib/esm/index.js +10 -8
  18. package/lib/esm/index.js.map +1 -1
  19. package/lib/esm/src/examples/async.d.ts +1 -1
  20. package/lib/esm/src/examples/async.d.ts.map +1 -1
  21. package/lib/esm/src/plugins/composite.d.ts +1 -1
  22. package/lib/esm/src/plugins/composite.d.ts.map +1 -1
  23. package/lib/esm/src/runtime/AbstractEngine.d.ts +1 -1
  24. package/lib/esm/src/runtime/AbstractEngine.d.ts.map +1 -1
  25. package/lib/esm/src/runtime/Engine.d.ts +1 -1
  26. package/lib/esm/src/runtime/Engine.d.ts.map +1 -1
  27. package/lib/esm/src/runtime/GraphRuntime.d.ts +1 -1
  28. package/lib/esm/src/runtime/GraphRuntime.d.ts.map +1 -1
  29. package/lib/esm/src/runtime/LocalRunner.d.ts +1 -1
  30. package/lib/esm/src/runtime/LocalRunner.d.ts.map +1 -1
  31. package/lib/esm/src/runtime/RunnerControl.d.ts +1 -1
  32. package/lib/esm/src/runtime/RunnerControl.d.ts.map +1 -1
  33. 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
- // After activation, schedule nodes that have all inbound inputs present
1116
- for (const nodeId of this.nodes.keys()) {
1117
- if (this.allInboundHaveValue(nodeId))
1118
- this.scheduleInputsChanged(nodeId);
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);