@workglow/task-graph 0.2.25 → 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/bun.js CHANGED
@@ -6821,15 +6821,16 @@ class IteratorTaskRunner extends GraphAsTaskRunner {
6821
6821
  this.aggregatingParentMapProgress = false;
6822
6822
  }
6823
6823
  }
6824
- emitMapParentProgressFromPartials(childMessage) {
6824
+ emitMapParentProgressFromPartials(childMessage, activeIterationIndex) {
6825
6825
  const n = this.mapPartialIterationCount;
6826
6826
  if (n <= 0)
6827
6827
  return;
6828
6828
  const sum = this.mapPartialProgress.reduce((a, b) => a + b, 0);
6829
6829
  const overall = Math.round(sum / n);
6830
6830
  const done = this.mapPartialProgress.filter((v) => v >= 100).length;
6831
- const base = `Map ${done}/${n}`;
6832
- const msg = childMessage ? `${base} \u2014 ${childMessage}` : `${base} iterations`;
6831
+ const displayIteration = activeIterationIndex === undefined ? done : Math.min(activeIterationIndex + 1, n);
6832
+ const base = `Map ${displayIteration}/${n}`;
6833
+ const msg = activeIterationIndex === undefined ? `${base} iterations` : childMessage ? `${base} \u2014 ${childMessage}` : base;
6833
6834
  this.handleProgress(overall, msg);
6834
6835
  }
6835
6836
  async executeReduceIterations(analysis) {
@@ -6902,7 +6903,7 @@ class IteratorTaskRunner extends GraphAsTaskRunner {
6902
6903
  this.task.emit("iteration_progress", index, iterationCount, p, message);
6903
6904
  if (p !== undefined && this.aggregatingParentMapProgress && this.mapPartialIterationCount > 0) {
6904
6905
  this.mapPartialProgress[index] = Math.max(this.mapPartialProgress[index] ?? 0, p);
6905
- this.emitMapParentProgressFromPartials(message);
6906
+ this.emitMapParentProgressFromPartials(message, index);
6906
6907
  }
6907
6908
  };
6908
6909
  const unsubscribeGraphProgress = graphClone.subscribe("graph_progress", onGraphProgress);
@@ -8884,4 +8885,4 @@ export {
8884
8885
  BROWSER_GRANTS
8885
8886
  };
8886
8887
 
8887
- //# debugId=732100600E6F7E9764756E2164756E21
8888
+ //# debugId=7D842AEB230FDB7F64756E2164756E21