@workglow/task-graph 0.2.11 → 0.2.13

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/browser.js CHANGED
@@ -1719,6 +1719,7 @@ class Task {
1719
1719
  static passthroughInputsToOutputs = false;
1720
1720
  static customizable = false;
1721
1721
  static isGraphOutput = false;
1722
+ static isPassthrough = false;
1722
1723
  static hasDynamicEntitlements = false;
1723
1724
  static entitlements() {
1724
1725
  return EMPTY_ENTITLEMENTS;
@@ -2686,7 +2687,9 @@ class DependencyBasedScheduler {
2686
2687
  // src/task-graph/TaskGraphRunner.ts
2687
2688
  function taskPrototypeHasOwnExecute(task) {
2688
2689
  const Ctor = task.constructor;
2689
- return Object.hasOwn(Ctor.prototype, "execute");
2690
+ if (Ctor.isPassthrough)
2691
+ return false;
2692
+ return Object.hasOwn(Ctor.prototype, "execute") || Object.hasOwn(Ctor.prototype, "executeStream") || task.hasChildren();
2690
2693
  }
2691
2694
  var PROPERTY_ARRAY = "PROPERTY_ARRAY";
2692
2695
  var GRAPH_RESULT_ARRAY = "GRAPH_RESULT_ARRAY";
@@ -2733,7 +2736,7 @@ class TaskGraphRunner {
2733
2736
  const runAsync = async () => {
2734
2737
  let errorRouted = false;
2735
2738
  try {
2736
- const taskInput = isRootTask ? input : this.filterInputForTask(task, input);
2739
+ const taskInput = isRootTask ? input : config?.matchAllEmptyInputs ? this.filterInputForTask(task, input) : {};
2737
2740
  const taskPromise = this.runTask(task, taskInput);
2738
2741
  this.inProgressTasks.set(task.id, taskPromise);
2739
2742
  const taskResult = await taskPromise;
@@ -3378,7 +3381,7 @@ class TaskGraphRunner {
3378
3381
  class GraphAsTaskRunner extends TaskRunner {
3379
3382
  async executeTaskChildren(input) {
3380
3383
  const unsubscribe = this.task.subGraph.subscribe("graph_progress", (progress, message, ...args) => {
3381
- this.task.emit("progress", progress, message, ...args);
3384
+ this.handleProgress(progress, message, ...args);
3382
3385
  });
3383
3386
  const results = await this.task.subGraph.run(input, {
3384
3387
  parentSignal: this.abortController?.signal,
@@ -8267,4 +8270,4 @@ export {
8267
8270
  BROWSER_GRANTS
8268
8271
  };
8269
8272
 
8270
- //# debugId=216D117BD58091BC64756E2164756E21
8273
+ //# debugId=A2F9041FD815B90264756E2164756E21