@calmo/task-runner 3.1.0 → 3.2.0

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/coverage/coverage-final.json +3 -2
  3. package/coverage/index.html +9 -9
  4. package/coverage/lcov-report/index.html +9 -9
  5. package/coverage/lcov-report/src/EventBus.ts.html +1 -1
  6. package/coverage/lcov-report/src/TaskGraphValidator.ts.html +1 -1
  7. package/coverage/lcov-report/src/TaskRunner.ts.html +12 -3
  8. package/coverage/lcov-report/src/TaskRunnerBuilder.ts.html +1 -1
  9. package/coverage/lcov-report/src/TaskRunnerExecutionConfig.ts.html +1 -1
  10. package/coverage/lcov-report/src/TaskStateManager.ts.html +1 -1
  11. package/coverage/lcov-report/src/WorkflowExecutor.ts.html +1 -1
  12. package/coverage/lcov-report/src/contracts/RunnerEvents.ts.html +1 -1
  13. package/coverage/lcov-report/src/contracts/index.html +1 -1
  14. package/coverage/lcov-report/src/index.html +1 -1
  15. package/coverage/lcov-report/src/strategies/DryRunExecutionStrategy.ts.html +1 -1
  16. package/coverage/lcov-report/src/strategies/RetryingExecutionStrategy.ts.html +355 -0
  17. package/coverage/lcov-report/src/strategies/StandardExecutionStrategy.ts.html +3 -3
  18. package/coverage/lcov-report/src/strategies/index.html +20 -5
  19. package/coverage/lcov.info +150 -74
  20. package/coverage/src/EventBus.ts.html +1 -1
  21. package/coverage/src/TaskGraphValidator.ts.html +1 -1
  22. package/coverage/src/TaskRunner.ts.html +12 -3
  23. package/coverage/src/TaskRunnerBuilder.ts.html +1 -1
  24. package/coverage/src/TaskRunnerExecutionConfig.ts.html +1 -1
  25. package/coverage/src/TaskStateManager.ts.html +1 -1
  26. package/coverage/src/WorkflowExecutor.ts.html +1 -1
  27. package/coverage/src/contracts/RunnerEvents.ts.html +1 -1
  28. package/coverage/src/contracts/index.html +1 -1
  29. package/coverage/src/index.html +1 -1
  30. package/coverage/src/strategies/DryRunExecutionStrategy.ts.html +1 -1
  31. package/coverage/src/strategies/RetryingExecutionStrategy.ts.html +355 -0
  32. package/coverage/src/strategies/StandardExecutionStrategy.ts.html +3 -3
  33. package/coverage/src/strategies/index.html +20 -5
  34. package/dist/TaskRunner.js +2 -1
  35. package/dist/TaskRunner.js.map +1 -1
  36. package/dist/TaskStep.d.ts +3 -0
  37. package/dist/contracts/TaskRetryConfig.d.ts +8 -0
  38. package/dist/contracts/TaskRetryConfig.js +2 -0
  39. package/dist/contracts/TaskRetryConfig.js.map +1 -0
  40. package/dist/index.d.ts +2 -0
  41. package/dist/index.js +1 -0
  42. package/dist/index.js.map +1 -1
  43. package/dist/strategies/RetryingExecutionStrategy.d.ts +12 -0
  44. package/dist/strategies/RetryingExecutionStrategy.js +74 -0
  45. package/dist/strategies/RetryingExecutionStrategy.js.map +1 -0
  46. package/openspec/changes/archive/2026-01-18-add-workflow-preview/tasks.md +7 -0
  47. package/package.json +1 -1
  48. package/src/TaskRunner.ts +4 -1
  49. package/src/TaskStep.ts +3 -0
  50. package/src/contracts/TaskRetryConfig.ts +8 -0
  51. package/src/index.ts +2 -0
  52. package/src/strategies/RetryingExecutionStrategy.ts +90 -0
  53. package/test-report.xml +112 -92
  54. package/openspec/changes/add-workflow-preview/tasks.md +0 -7
  55. /package/openspec/changes/{add-workflow-preview → archive/2026-01-18-add-workflow-preview}/proposal.md +0 -0
@@ -129,18 +129,18 @@ BRH:16
129
129
  end_of_record
130
130
  TN:
131
131
  SF:src/TaskRunner.ts
132
- FN:30,(anonymous_0)
133
- FN:37,(anonymous_1)
134
- FN:49,(anonymous_2)
135
- FN:62,(anonymous_3)
136
- FN:73,(anonymous_4)
137
- FN:81,(anonymous_5)
138
- FN:82,(anonymous_6)
139
- FN:112,(anonymous_7)
140
- FN:124,(anonymous_8)
141
- FN:130,(anonymous_9)
142
- FN:158,(anonymous_10)
143
- FN:174,(anonymous_11)
132
+ FN:33,(anonymous_0)
133
+ FN:40,(anonymous_1)
134
+ FN:52,(anonymous_2)
135
+ FN:65,(anonymous_3)
136
+ FN:76,(anonymous_4)
137
+ FN:84,(anonymous_5)
138
+ FN:85,(anonymous_6)
139
+ FN:115,(anonymous_7)
140
+ FN:127,(anonymous_8)
141
+ FN:133,(anonymous_9)
142
+ FN:161,(anonymous_10)
143
+ FN:177,(anonymous_11)
144
144
  FNF:12
145
145
  FNH:12
146
146
  FNDA:52,(anonymous_0)
@@ -155,73 +155,73 @@ FNDA:47,(anonymous_8)
155
155
  FNDA:125,(anonymous_9)
156
156
  FNDA:3,(anonymous_10)
157
157
  FNDA:1,(anonymous_11)
158
- DA:23,52
159
158
  DA:24,52
160
159
  DA:25,52
161
- DA:30,52
162
- DA:41,15
163
- DA:54,3
164
- DA:64,2
165
- DA:65,2
166
- DA:74,4
167
- DA:81,12
168
- DA:82,24
169
- DA:86,4
170
- DA:90,12
171
- DA:94,4
172
- DA:95,12
173
- DA:96,5
174
- DA:97,6
175
- DA:104,4
176
- DA:113,24
177
- DA:129,47
178
- DA:130,125
179
- DA:136,47
180
- DA:137,47
181
- DA:138,8
182
- DA:141,39
183
- DA:143,39
160
+ DA:26,52
161
+ DA:33,52
162
+ DA:44,15
163
+ DA:57,3
164
+ DA:67,2
165
+ DA:68,2
166
+ DA:77,4
167
+ DA:84,12
168
+ DA:85,24
169
+ DA:89,4
170
+ DA:93,12
171
+ DA:97,4
172
+ DA:98,12
173
+ DA:99,5
174
+ DA:100,6
175
+ DA:107,4
176
+ DA:116,24
177
+ DA:132,47
178
+ DA:133,125
179
+ DA:139,47
180
+ DA:140,47
181
+ DA:141,8
184
182
  DA:144,39
185
- DA:145,2
186
- DA:148,39
187
- DA:156,39
188
- DA:157,5
189
- DA:158,5
190
- DA:159,3
191
- DA:162,5
192
- DA:166,5
193
- DA:167,3
194
- DA:170,1
195
- DA:171,1
196
- DA:174,2
197
- DA:175,1
183
+ DA:146,39
184
+ DA:147,39
185
+ DA:148,2
186
+ DA:151,39
187
+ DA:159,39
188
+ DA:160,5
189
+ DA:161,5
190
+ DA:162,3
191
+ DA:165,5
192
+ DA:169,5
193
+ DA:170,3
194
+ DA:173,1
195
+ DA:174,1
198
196
  DA:177,2
199
- DA:181,5
200
- DA:182,5
197
+ DA:178,1
198
+ DA:180,2
201
199
  DA:184,5
202
200
  DA:185,5
203
- DA:186,2
204
- DA:190,34
201
+ DA:187,5
202
+ DA:188,5
203
+ DA:189,2
204
+ DA:193,34
205
205
  LF:47
206
206
  LH:47
207
- BRDA:95,0,0,5
208
- BRDA:95,0,1,7
209
- BRDA:132,1,0,125
210
- BRDA:132,1,1,58
211
- BRDA:137,2,0,8
212
- BRDA:137,2,1,39
213
- BRDA:144,3,0,2
214
- BRDA:144,3,1,37
215
- BRDA:156,4,0,5
216
- BRDA:156,4,1,34
217
- BRDA:166,5,0,3
218
- BRDA:166,5,1,2
219
- BRDA:167,6,0,1
220
- BRDA:167,6,1,2
221
- BRDA:185,7,0,2
222
- BRDA:185,7,1,3
223
- BRDA:185,8,0,5
224
- BRDA:185,8,1,3
207
+ BRDA:98,0,0,5
208
+ BRDA:98,0,1,7
209
+ BRDA:135,1,0,125
210
+ BRDA:135,1,1,58
211
+ BRDA:140,2,0,8
212
+ BRDA:140,2,1,39
213
+ BRDA:147,3,0,2
214
+ BRDA:147,3,1,37
215
+ BRDA:159,4,0,5
216
+ BRDA:159,4,1,34
217
+ BRDA:169,5,0,3
218
+ BRDA:169,5,1,2
219
+ BRDA:170,6,0,1
220
+ BRDA:170,6,1,2
221
+ BRDA:188,7,0,2
222
+ BRDA:188,7,1,3
223
+ BRDA:188,8,0,5
224
+ BRDA:188,8,1,3
225
225
  BRF:18
226
226
  BRH:18
227
227
  end_of_record
@@ -456,13 +456,89 @@ BRF:0
456
456
  BRH:0
457
457
  end_of_record
458
458
  TN:
459
+ SF:src/strategies/RetryingExecutionStrategy.ts
460
+ FN:9,(anonymous_0)
461
+ FN:11,(anonymous_1)
462
+ FN:65,(anonymous_2)
463
+ FN:66,(anonymous_3)
464
+ FN:72,(anonymous_4)
465
+ FN:77,(anonymous_5)
466
+ FN:83,(anonymous_6)
467
+ FNF:7
468
+ FNH:7
469
+ FNDA:62,(anonymous_0)
470
+ FNDA:105,(anonymous_1)
471
+ FNDA:8,(anonymous_2)
472
+ FNDA:8,(anonymous_3)
473
+ FNDA:6,(anonymous_4)
474
+ FNDA:1,(anonymous_5)
475
+ FNDA:7,(anonymous_6)
476
+ DA:9,62
477
+ DA:16,105
478
+ DA:17,105
479
+ DA:18,98
480
+ DA:21,7
481
+ DA:22,7
482
+ DA:24,13
483
+ DA:25,1
484
+ DA:31,12
485
+ DA:33,12
486
+ DA:34,1
487
+ DA:38,11
488
+ DA:39,2
489
+ DA:42,9
490
+ DA:45,9
491
+ DA:46,9
492
+ DA:47,3
493
+ DA:51,9
494
+ DA:52,9
495
+ DA:54,3
496
+ DA:55,2
497
+ DA:60,1
498
+ DA:66,8
499
+ DA:67,8
500
+ DA:68,1
501
+ DA:69,1
502
+ DA:72,7
503
+ DA:73,6
504
+ DA:74,6
505
+ DA:77,7
506
+ DA:78,1
507
+ DA:79,1
508
+ DA:80,1
509
+ DA:83,7
510
+ DA:84,7
511
+ DA:87,7
512
+ LF:36
513
+ LH:36
514
+ BRDA:17,0,0,98
515
+ BRDA:17,0,1,7
516
+ BRDA:24,1,0,1
517
+ BRDA:24,1,1,12
518
+ BRDA:33,2,0,1
519
+ BRDA:33,2,1,11
520
+ BRDA:33,3,0,12
521
+ BRDA:33,3,1,11
522
+ BRDA:33,3,2,11
523
+ BRDA:38,4,0,2
524
+ BRDA:38,4,1,9
525
+ BRDA:46,5,0,3
526
+ BRDA:46,5,1,6
527
+ BRDA:54,6,0,2
528
+ BRDA:54,6,1,1
529
+ BRDA:67,7,0,1
530
+ BRDA:67,7,1,7
531
+ BRF:17
532
+ BRH:17
533
+ end_of_record
534
+ TN:
459
535
  SF:src/strategies/StandardExecutionStrategy.ts
460
536
  FN:11,(anonymous_0)
461
537
  FNF:1
462
538
  FNH:1
463
- FNDA:101,(anonymous_0)
464
- DA:16,101
465
- DA:17,101
539
+ FNDA:114,(anonymous_0)
540
+ DA:16,114
541
+ DA:17,114
466
542
  DA:20,10
467
543
  DA:24,6
468
544
  DA:29,4
@@ -322,7 +322,7 @@ export class EventBus<TContext> {
322
322
  <div class='footer quiet pad2 space-top1 center small'>
323
323
  Code coverage generated by
324
324
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
325
- at 2026-01-18T18:12:39.248Z
325
+ at 2026-01-18T18:46:49.766Z
326
326
  </div>
327
327
  <script src="../prettify.js"></script>
328
328
  <script>
@@ -559,7 +559,7 @@ export class TaskGraphValidator implements ITaskGraphValidator {
559
559
  <div class='footer quiet pad2 space-top1 center small'>
560
560
  Code coverage generated by
561
561
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
562
- at 2026-01-18T18:12:39.248Z
562
+ at 2026-01-18T18:46:49.766Z
563
563
  </div>
564
564
  <script src="../prettify.js"></script>
565
565
  <script>
@@ -256,7 +256,11 @@
256
256
  <a name='L191'></a><a href='#L191'>191</a>
257
257
  <a name='L192'></a><a href='#L192'>192</a>
258
258
  <a name='L193'></a><a href='#L193'>193</a>
259
- <a name='L194'></a><a href='#L194'>194</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
259
+ <a name='L194'></a><a href='#L194'>194</a>
260
+ <a name='L195'></a><a href='#L195'>195</a>
261
+ <a name='L196'></a><a href='#L196'>196</a>
262
+ <a name='L197'></a><a href='#L197'>197</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
263
+ <span class="cline-any cline-neutral">&nbsp;</span>
260
264
  <span class="cline-any cline-neutral">&nbsp;</span>
261
265
  <span class="cline-any cline-neutral">&nbsp;</span>
262
266
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -285,6 +289,8 @@
285
289
  <span class="cline-any cline-neutral">&nbsp;</span>
286
290
  <span class="cline-any cline-neutral">&nbsp;</span>
287
291
  <span class="cline-any cline-neutral">&nbsp;</span>
292
+ <span class="cline-any cline-neutral">&nbsp;</span>
293
+ <span class="cline-any cline-neutral">&nbsp;</span>
288
294
  <span class="cline-any cline-yes">52x</span>
289
295
  <span class="cline-any cline-neutral">&nbsp;</span>
290
296
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -460,6 +466,7 @@ import { TaskRunnerExecutionConfig } from "./TaskRunnerExecutionConfig.js";
460
466
  import { TaskStateManager } from "./TaskStateManager.js";
461
467
  import { IExecutionStrategy } from "./strategies/IExecutionStrategy.js";
462
468
  import { StandardExecutionStrategy } from "./strategies/StandardExecutionStrategy.js";
469
+ import { RetryingExecutionStrategy } from "./strategies/RetryingExecutionStrategy.js";
463
470
  import { DryRunExecutionStrategy } from "./strategies/DryRunExecutionStrategy.js";
464
471
  &nbsp;
465
472
  // Re-export types for backward compatibility
@@ -473,7 +480,9 @@ export { RunnerEventPayloads, RunnerEventListener, TaskRunnerExecutionConfig };
473
480
  export class TaskRunner&lt;TContext&gt; {
474
481
  private eventBus = new EventBus&lt;TContext&gt;();
475
482
  private validator = new TaskGraphValidator();
476
- private executionStrategy: IExecutionStrategy&lt;TContext&gt; = new StandardExecutionStrategy();
483
+ private executionStrategy: IExecutionStrategy&lt;TContext&gt; = new RetryingExecutionStrategy(
484
+ new StandardExecutionStrategy()
485
+ );
477
486
  &nbsp;
478
487
  /**
479
488
  * @param context The shared context object to be passed to each task.
@@ -649,7 +658,7 @@ export class TaskRunner&lt;TContext&gt; {
649
658
  <div class='footer quiet pad2 space-top1 center small'>
650
659
  Code coverage generated by
651
660
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
652
- at 2026-01-18T18:12:39.248Z
661
+ at 2026-01-18T18:46:49.766Z
653
662
  </div>
654
663
  <script src="../prettify.js"></script>
655
664
  <script>
@@ -298,7 +298,7 @@ export class TaskRunnerBuilder&lt;TContext&gt; {
298
298
  <div class='footer quiet pad2 space-top1 center small'>
299
299
  Code coverage generated by
300
300
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
301
- at 2026-01-18T18:12:39.248Z
301
+ at 2026-01-18T18:46:49.766Z
302
302
  </div>
303
303
  <script src="../prettify.js"></script>
304
304
  <script>
@@ -124,7 +124,7 @@ export interface TaskRunnerExecutionConfig {
124
124
  <div class='footer quiet pad2 space-top1 center small'>
125
125
  Code coverage generated by
126
126
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
127
- at 2026-01-18T18:12:39.248Z
127
+ at 2026-01-18T18:46:49.766Z
128
128
  </div>
129
129
  <script src="../prettify.js"></script>
130
130
  <script>
@@ -496,7 +496,7 @@ export class TaskStateManager&lt;TContext&gt; {
496
496
  <div class='footer quiet pad2 space-top1 center small'>
497
497
  Code coverage generated by
498
498
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
499
- at 2026-01-18T18:12:39.248Z
499
+ at 2026-01-18T18:46:49.766Z
500
500
  </div>
501
501
  <script src="../prettify.js"></script>
502
502
  <script>
@@ -430,7 +430,7 @@ export class WorkflowExecutor&lt;TContext&gt; {
430
430
  <div class='footer quiet pad2 space-top1 center small'>
431
431
  Code coverage generated by
432
432
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
433
- at 2026-01-18T18:12:39.248Z
433
+ at 2026-01-18T18:46:49.766Z
434
434
  </div>
435
435
  <script src="../prettify.js"></script>
436
436
  <script>
@@ -202,7 +202,7 @@ export type ListenerMap&lt;TContext&gt; = {
202
202
  <div class='footer quiet pad2 space-top1 center small'>
203
203
  Code coverage generated by
204
204
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
205
- at 2026-01-18T18:12:39.248Z
205
+ at 2026-01-18T18:46:49.766Z
206
206
  </div>
207
207
  <script src="../../prettify.js"></script>
208
208
  <script>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2026-01-18T18:12:39.248Z
104
+ at 2026-01-18T18:46:49.766Z
105
105
  </div>
106
106
  <script src="../../prettify.js"></script>
107
107
  <script>
@@ -191,7 +191,7 @@
191
191
  <div class='footer quiet pad2 space-top1 center small'>
192
192
  Code coverage generated by
193
193
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
194
- at 2026-01-18T18:12:39.248Z
194
+ at 2026-01-18T18:46:49.766Z
195
195
  </div>
196
196
  <script src="../prettify.js"></script>
197
197
  <script>
@@ -163,7 +163,7 @@ export class DryRunExecutionStrategy&lt;TContext&gt;
163
163
  <div class='footer quiet pad2 space-top1 center small'>
164
164
  Code coverage generated by
165
165
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
166
- at 2026-01-18T18:12:39.248Z
166
+ at 2026-01-18T18:46:49.766Z
167
167
  </div>
168
168
  <script src="../../prettify.js"></script>
169
169
  <script>