@darkhorseprojects/circuitry 0.2.26 → 0.2.27

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/dist/index.js CHANGED
@@ -627,15 +627,15 @@ var runCircuitryGraphExecution = async ({
627
627
  const ready = [];
628
628
  for (const nodeId of nodeIds) {
629
629
  const node = executionGraph.nodes.get(nodeId);
630
- if (node.completed) {
631
- completed.add(nodeId);
632
- if (node.output) {
633
- outputs.set(nodeId, node.output);
634
- }
635
- continue;
636
- }
630
+ if (!node.completed) continue;
631
+ completed.add(nodeId);
632
+ outputs.set(nodeId, node.output || "");
633
+ }
634
+ for (const nodeId of nodeIds) {
635
+ if (completed.has(nodeId)) continue;
636
+ const node = executionGraph.nodes.get(nodeId);
637
637
  const count = node.inputNodeIds.filter(
638
- (sourceId) => executionGraph.nodes.has(sourceId)
638
+ (sourceId) => executionGraph.nodes.has(sourceId) && !completed.has(sourceId)
639
639
  ).length;
640
640
  remainingDependencies.set(nodeId, count);
641
641
  if (count === 0) {
package/dist/node.js CHANGED
@@ -549,15 +549,15 @@ var runCircuitryGraphExecution = async ({
549
549
  const ready = [];
550
550
  for (const nodeId of nodeIds) {
551
551
  const node = executionGraph.nodes.get(nodeId);
552
- if (node.completed) {
553
- completed.add(nodeId);
554
- if (node.output) {
555
- outputs.set(nodeId, node.output);
556
- }
557
- continue;
558
- }
552
+ if (!node.completed) continue;
553
+ completed.add(nodeId);
554
+ outputs.set(nodeId, node.output || "");
555
+ }
556
+ for (const nodeId of nodeIds) {
557
+ if (completed.has(nodeId)) continue;
558
+ const node = executionGraph.nodes.get(nodeId);
559
559
  const count = node.inputNodeIds.filter(
560
- (sourceId) => executionGraph.nodes.has(sourceId)
560
+ (sourceId) => executionGraph.nodes.has(sourceId) && !completed.has(sourceId)
561
561
  ).length;
562
562
  remainingDependencies.set(nodeId, count);
563
563
  if (count === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darkhorseprojects/circuitry",
3
- "version": "0.2.26",
3
+ "version": "0.2.27",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",