@workglow/task-graph 0.0.75 → 0.0.77

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/node.js CHANGED
@@ -368,7 +368,7 @@ class TaskRunner {
368
368
  }
369
369
  async executeTaskReactive(input, output) {
370
370
  const reactiveResult = await this.task.executeReactive(input, output, { own: this.own });
371
- return Object.keys(reactiveResult || {}) >= Object.keys(output || {}) ? reactiveResult : output ?? {};
371
+ return Object.assign({}, output, reactiveResult ?? {});
372
372
  }
373
373
  async handleStart(config = {}) {
374
374
  if (this.task.status === TaskStatus.PROCESSING)
@@ -1474,7 +1474,7 @@ class GraphAsTaskRunner extends TaskRunner {
1474
1474
  this.task.runOutputData = this.task.subGraph.mergeExecuteOutputsToRunOutput(reactiveResults, this.task.compoundMerge);
1475
1475
  } else {
1476
1476
  const reactiveResults = await super.executeTaskReactive(this.fixInput(input), output);
1477
- this.task.runOutputData = reactiveResults ?? output ?? {};
1477
+ this.task.runOutputData = Object.assign({}, output, reactiveResults ?? {});
1478
1478
  }
1479
1479
  return this.task.runOutputData;
1480
1480
  }
@@ -2427,6 +2427,15 @@ class ArrayTaskRunner extends GraphAsTaskRunner {
2427
2427
  async executeTaskChildren(_input) {
2428
2428
  return super.executeTaskChildren({});
2429
2429
  }
2430
+ async executeTaskReactive(input, output) {
2431
+ const reactiveResults = await super.executeTaskReactive(input, output);
2432
+ if (this.task.hasChildren()) {
2433
+ return reactiveResults;
2434
+ } else {
2435
+ this.task.runOutputData = Object.assign({}, output, reactiveResults ?? {});
2436
+ return this.task.runOutputData;
2437
+ }
2438
+ }
2430
2439
  }
2431
2440
  // src/task/JobQueueFactory.ts
2432
2441
  import {
@@ -2972,4 +2981,4 @@ export {
2972
2981
  ArrayTask
2973
2982
  };
2974
2983
 
2975
- //# debugId=D259218BB96B548464756E2164756E21
2984
+ //# debugId=F26A838715A2A35164756E2164756E21