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