@systemfsoftware/stryker-js 16.0.1 → 17.0.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.
package/dist/main.mjs CHANGED
@@ -11789,7 +11789,7 @@ const FailureImpl = function(failure) {
11789
11789
  };
11790
11790
  FailureImpl.prototype = FailureProto;
11791
11791
  /** @internal */
11792
- const fail$9 = (failure) => new FailureImpl(failure);
11792
+ const fail$10 = (failure) => new FailureImpl(failure);
11793
11793
  /** @internal */
11794
11794
  const SuccessImpl = function(success) {
11795
11795
  this.success = success;
@@ -11800,7 +11800,7 @@ const succeed$11 = (success) => new SuccessImpl(success);
11800
11800
  /** @internal */
11801
11801
  const getSuccess$1 = (self) => isFailure$2(self) ? none$1 : some$2(self.success);
11802
11802
  /** @internal */
11803
- const fromOption$3 = /*#__PURE__*/ dual(2, (self, onNone) => isNone$1(self) ? fail$9(onNone()) : succeed$11(self.value));
11803
+ const fromOption$3 = /*#__PURE__*/ dual(2, (self, onNone) => isNone$1(self) ? fail$10(onNone()) : succeed$11(self.value));
11804
11804
  //#endregion
11805
11805
  //#region ../../node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Order.js
11806
11806
  /**
@@ -14452,7 +14452,7 @@ const succeed$10 = succeed$11;
14452
14452
  * @category constructors
14453
14453
  * @since 4.0.0
14454
14454
  */
14455
- const fail$8 = fail$9;
14455
+ const fail$9 = fail$10;
14456
14456
  /**
14457
14457
  * Converts an `Option<A>` into a `Result<A, E>`.
14458
14458
  *
@@ -14489,12 +14489,12 @@ const try_$2 = (evaluate) => {
14489
14489
  if (isFunction(evaluate)) try {
14490
14490
  return succeed$10(evaluate());
14491
14491
  } catch (e) {
14492
- return fail$8(e);
14492
+ return fail$9(e);
14493
14493
  }
14494
14494
  else try {
14495
14495
  return succeed$10(evaluate.try());
14496
14496
  } catch (e) {
14497
- return fail$8(evaluate.catch(e));
14497
+ return fail$9(evaluate.catch(e));
14498
14498
  }
14499
14499
  };
14500
14500
  /**
@@ -14646,7 +14646,7 @@ const getSuccess = getSuccess$1;
14646
14646
  * @category mapping
14647
14647
  * @since 4.0.0
14648
14648
  */
14649
- const mapError$5 = /*#__PURE__*/ dual(2, (self, f) => isFailure$1(self) ? fail$8(f(self.failure)) : self);
14649
+ const mapError$5 = /*#__PURE__*/ dual(2, (self, f) => isFailure$1(self) ? fail$9(f(self.failure)) : self);
14650
14650
  /**
14651
14651
  * Transforms the success channel of a `Result`, leaving the failure channel unchanged.
14652
14652
  *
@@ -14817,7 +14817,7 @@ const getOrThrow = /*#__PURE__*/ (/* @__PURE__ */ dual(2, (self, onFailure) => {
14817
14817
  * @category sequencing
14818
14818
  * @since 2.0.0
14819
14819
  */
14820
- const flatMap$8 = /*#__PURE__*/ dual(2, (self, f) => isFailure$1(self) ? fail$8(self.failure) : f(self.success));
14820
+ const flatMap$8 = /*#__PURE__*/ dual(2, (self, f) => isFailure$1(self) ? fail$9(self.failure) : f(self.success));
14821
14821
  /**
14822
14822
  * Collects a structure of `Result`s into a single `Result` of collected values.
14823
14823
  *
@@ -16900,7 +16900,7 @@ const toPredicate = (self) => (input) => !isFailure$1(self(input));
16900
16900
  * @category constructors
16901
16901
  * @since 4.0.0
16902
16902
  */
16903
- const has$5 = (key) => (input) => input.has(key) ? succeed$10(input) : fail$8(input);
16903
+ const has$5 = (key) => (input) => input.has(key) ? succeed$10(input) : fail$9(input);
16904
16904
  /**
16905
16905
  * Composes two filters sequentially, feeding the output of the first into the second.
16906
16906
  *
@@ -17919,7 +17919,7 @@ const causeInterrupt = (fiberId) => new CauseImpl([new Interrupt(fiberId)]);
17919
17919
  /** @internal */
17920
17920
  const findFail$1 = (self) => {
17921
17921
  const reason = self.reasons.find(isFailReason$1);
17922
- return reason ? succeed$10(reason) : fail$8(self);
17922
+ return reason ? succeed$10(reason) : fail$9(self);
17923
17923
  };
17924
17924
  /** @internal */
17925
17925
  const findError$1 = (self) => {
@@ -17927,7 +17927,7 @@ const findError$1 = (self) => {
17927
17927
  const reason = self.reasons[i];
17928
17928
  if (reason._tag === "Fail") return succeed$10(reason.error);
17929
17929
  }
17930
- return fail$8(self);
17930
+ return fail$9(self);
17931
17931
  };
17932
17932
  /** @internal */
17933
17933
  const findErrorOption$1 = /*#__PURE__*/ toOption$1(findError$1);
@@ -17936,7 +17936,7 @@ const hasDies$1 = (self) => self.reasons.some(isDieReason$1);
17936
17936
  /** @internal */
17937
17937
  const findDefect = (self) => {
17938
17938
  const reason = self.reasons.find(isDieReason$1);
17939
- return reason ? succeed$10(reason.defect) : fail$8(self);
17939
+ return reason ? succeed$10(reason.defect) : fail$9(self);
17940
17940
  };
17941
17941
  /** @internal */
17942
17942
  const hasInterrupts$1 = (self) => self.reasons.some(isInterruptReason);
@@ -17949,7 +17949,7 @@ const causeFilterInterruptors = (self) => {
17949
17949
  interruptors ??= /* @__PURE__ */ new Set();
17950
17950
  if (f.fiberId !== void 0) interruptors.add(f.fiberId);
17951
17951
  }
17952
- return interruptors ? succeed$10(interruptors) : fail$8(self);
17952
+ return interruptors ? succeed$10(interruptors) : fail$9(self);
17953
17953
  };
17954
17954
  /** @internal */
17955
17955
  const causeInterruptors = (self) => {
@@ -18407,7 +18407,7 @@ const succeed$9 = exitSucceed;
18407
18407
  /** @internal */
18408
18408
  const failCause$6 = exitFailCause;
18409
18409
  /** @internal */
18410
- const fail$7 = exitFail;
18410
+ const fail$8 = exitFail;
18411
18411
  /** @internal */
18412
18412
  const sync$1 = /*#__PURE__*/ makePrimitive$1({
18413
18413
  op: "Sync",
@@ -18425,10 +18425,10 @@ const suspend$5 = /*#__PURE__*/ makePrimitive$1({
18425
18425
  }
18426
18426
  });
18427
18427
  /** @internal */
18428
- const fromOption$1 = /*#__PURE__*/ dual((args) => args.length >= 2 || isOption(args[0]), (option, onNone) => isNone(option) ? fail$7(onNone ? onNone() : new NoSuchElementError("Effect.fromOption: Option.none")) : succeed$9(option.value));
18428
+ const fromOption$1 = /*#__PURE__*/ dual((args) => args.length >= 2 || isOption(args[0]), (option, onNone) => isNone(option) ? fail$8(onNone ? onNone() : new NoSuchElementError("Effect.fromOption: Option.none")) : succeed$9(option.value));
18429
18429
  /** @internal */
18430
18430
  const fromResult$1 = /*#__PURE__*/ match$6({
18431
- onFailure: fail$7,
18431
+ onFailure: fail$8,
18432
18432
  onSuccess: succeed$9
18433
18433
  });
18434
18434
  /** @internal */
@@ -18454,7 +18454,7 @@ const failCauseSync$1 = (evaluate) => suspend$5(() => failCause$6(evaluate()));
18454
18454
  /** @internal */
18455
18455
  const die$3 = (defect) => exitDie(defect);
18456
18456
  /** @internal */
18457
- const failSync$1 = (error) => suspend$5(() => fail$7(error()));
18457
+ const failSync$1 = (error) => suspend$5(() => fail$8(error()));
18458
18458
  /** @internal */
18459
18459
  const void_$3 = /*#__PURE__*/ succeed$9(void 0);
18460
18460
  /** @internal */
@@ -18465,7 +18465,7 @@ const try_$1 = (options) => {
18465
18465
  try {
18466
18466
  return succeed$9(evaluate());
18467
18467
  } catch (err) {
18468
- return fail$7(catcher(err));
18468
+ return fail$8(catcher(err));
18469
18469
  }
18470
18470
  });
18471
18471
  };
@@ -18480,7 +18480,7 @@ const tryPromise$1 = (options) => {
18480
18480
  return callbackOptions(function(resume, signal) {
18481
18481
  const failWithCatch = (cause) => {
18482
18482
  try {
18483
- resume(fail$7(internalCall(() => catcher(cause))));
18483
+ resume(fail$8(internalCall(() => catcher(cause))));
18484
18484
  } catch (err) {
18485
18485
  resume(die$3(err));
18486
18486
  }
@@ -18729,7 +18729,7 @@ const tap$3 = /*#__PURE__*/ dual(2, (self, f) => new ContImpl(self, isEffect$1(f
18729
18729
  /** @internal */
18730
18730
  const asVoid$1 = (self) => new ContImpl(self, returnPayload, exitVoid);
18731
18731
  /** @internal */
18732
- const sandbox$1 = (self) => catchCause$2(self, fail$7);
18732
+ const sandbox$1 = (self) => catchCause$2(self, fail$8);
18733
18733
  /** @internal */
18734
18734
  const raceAllFirst = (all, options) => withFiber$1((parent) => {
18735
18735
  const fibers = /* @__PURE__ */ new Set();
@@ -18794,7 +18794,7 @@ const exitIsSuccess = (self) => self._tag === "Success";
18794
18794
  /** @internal */
18795
18795
  const exitIsFailure = (self) => self._tag === "Failure";
18796
18796
  /** @internal */
18797
- const exitFilterCause = (self) => self._tag === "Failure" ? succeed$10(self.cause) : fail$8(self);
18797
+ const exitFilterCause = (self) => self._tag === "Failure" ? succeed$10(self.cause) : fail$9(self);
18798
18798
  /** @internal */
18799
18799
  const exitVoid = /*#__PURE__*/ exitSucceed(void 0);
18800
18800
  /** @internal */
@@ -18930,14 +18930,14 @@ const catchTags$1 = /*#__PURE__*/ dual((args) => isEffect$1(args[0]), (self, cas
18930
18930
  let keys;
18931
18931
  return catchFilter$1(self, (e) => {
18932
18932
  keys ??= Object.keys(cases);
18933
- return hasProperty(e, "_tag") && isString$1(e["_tag"]) && keys.includes(e["_tag"]) ? succeed$10(e) : fail$8(e);
18933
+ return hasProperty(e, "_tag") && isString$1(e["_tag"]) && keys.includes(e["_tag"]) ? succeed$10(e) : fail$9(e);
18934
18934
  }, (e) => cases[e["_tag"]](e), orElse);
18935
18935
  });
18936
18936
  /** @internal */
18937
18937
  const catchReason$1 = /*#__PURE__*/ dual((args) => isEffect$1(args[0]), (self, errorTag, reasonTag, f, orElse) => catchIf$1(self, (e) => isTagged(e, errorTag) && hasProperty(e, "reason") && (orElse !== void 0 || isTagged(e.reason, reasonTag)), (e) => {
18938
18938
  const reason = e.reason;
18939
18939
  if (isTagged(reason, reasonTag)) return f(reason, e);
18940
- return orElse ? orElse(reason, e) : fail$7(e);
18940
+ return orElse ? orElse(reason, e) : fail$8(e);
18941
18941
  }));
18942
18942
  /** @internal */
18943
18943
  const mapError$4 = /*#__PURE__*/ dual(2, (self, f) => catch_$3(self, (error) => failSync$1(() => f(error))));
@@ -18984,7 +18984,7 @@ const option$2 = (self) => match$4(self, {
18984
18984
  });
18985
18985
  /** @internal */
18986
18986
  const result$2 = (self) => matchEager(self, {
18987
- onFailure: fail$8,
18987
+ onFailure: fail$9,
18988
18988
  onSuccess: succeed$10
18989
18989
  });
18990
18990
  /** @internal */
@@ -19069,7 +19069,7 @@ const timeout$1 = /*#__PURE__*/ dual(2, (self, duration) => {
19069
19069
  const decoded = fromInputUnsafe$1(duration);
19070
19070
  return timeoutOrElse$1(self, {
19071
19071
  duration: decoded,
19072
- orElse: () => fail$7(timeoutErrorFromDuration(decoded))
19072
+ orElse: () => fail$8(timeoutErrorFromDuration(decoded))
19073
19073
  });
19074
19074
  });
19075
19075
  /** @internal */
@@ -19855,7 +19855,7 @@ const annotateCurrentSpan$1 = (...args) => withFiber$1((fiber) => {
19855
19855
  /** @internal */
19856
19856
  const currentSpan$1 = /*#__PURE__*/ withFiber$1((fiber) => {
19857
19857
  const span = fiber.currentSpanLocal;
19858
- return span ? succeed$9(span) : fail$7(new NoSuchElementError());
19858
+ return span ? succeed$9(span) : fail$8(new NoSuchElementError());
19859
19859
  });
19860
19860
  /** @internal */
19861
19861
  const ClockRef = /*#__PURE__*/ Reference("effect/Clock", { defaultValue: () => new ClockImpl() });
@@ -20229,7 +20229,7 @@ const failCause$5 = exitFailCause;
20229
20229
  * @category constructors
20230
20230
  * @since 2.0.0
20231
20231
  */
20232
- const fail$6 = exitFail;
20232
+ const fail$7 = exitFail;
20233
20233
  /**
20234
20234
  * Creates a failed Exit from a defect (unexpected error).
20235
20235
  *
@@ -20494,6 +20494,38 @@ const _await = (self) => callback$2((resume) => {
20494
20494
  */
20495
20495
  const done$1 = /* @__PURE__ */ dual(2, (self, effect) => sync$1(() => doneUnsafe(self, effect)));
20496
20496
  /**
20497
+ * Attempts to complete the `Deferred` with the specified error.
20498
+ *
20499
+ * **When to use**
20500
+ *
20501
+ * Use to complete a `Deferred` with a typed failure value.
20502
+ *
20503
+ * **Details**
20504
+ *
20505
+ * Fibers waiting on the `Deferred` fail with that error only if this call
20506
+ * completes it. The returned effect succeeds with `true` when this call
20507
+ * completed the `Deferred`, or `false` if it was already completed.
20508
+ *
20509
+ * **Example** (Failing a Deferred with an error)
20510
+ *
20511
+ * ```ts import.meta.vitest
20512
+ * import { Deferred, Effect, Exit } from "effect"
20513
+ *
20514
+ * const program = Effect.gen(function*() {
20515
+ * const deferred = yield* Deferred.make<number, string>()
20516
+ * const success = yield* Deferred.fail(deferred, "Operation failed")
20517
+ * const exit = yield* Effect.exit(Deferred.await(deferred))
20518
+ * return [success, exit]
20519
+ * })
20520
+ *
20521
+ * await Effect.runPromise(program) // => [true, Exit.fail("Operation failed")]
20522
+ * ```
20523
+ *
20524
+ * @category completion
20525
+ * @since 2.0.0
20526
+ */
20527
+ const fail$6 = /*#__PURE__*/ dual(2, (self, error) => done$1(self, exitFail(error)));
20528
+ /**
20497
20529
  * Attempts to complete the `Deferred` with the specified `Cause`.
20498
20530
  *
20499
20531
  * **When to use**
@@ -23532,8 +23564,8 @@ const filterDone = (cause) => {
23532
23564
  let hasFailure = false;
23533
23565
  for (const reason of cause.reasons) if (isDoneFailure(reason)) done ??= reason.error;
23534
23566
  else if (reason._tag !== "Interrupt") hasFailure = true;
23535
- if (done === void 0) return fail$8(cause);
23536
- return hasFailure ? fail$8(fromReasons(cause.reasons.filter((reason) => !isDoneFailure(reason)))) : succeed$10(done);
23567
+ if (done === void 0) return fail$9(cause);
23568
+ return hasFailure ? fail$9(fromReasons(cause.reasons.filter((reason) => !isDoneFailure(reason)))) : succeed$10(done);
23537
23569
  };
23538
23570
  /**
23539
23571
  * Filters a Cause to extract the leftover value from done errors.
@@ -24003,7 +24035,7 @@ const retryOrElse$1 = /*#__PURE__*/ dual(3, (self, policy, orElse) => flatMap$6(
24003
24035
  /** @internal */
24004
24036
  const retry$1 = /*#__PURE__*/ dual(2, (self, options) => {
24005
24037
  const schedule = typeof options === "function" ? options(identity) : isSchedule(options) ? options : buildFromOptions(options);
24006
- return retryOrElse$1(self, schedule, fail$7);
24038
+ return retryOrElse$1(self, schedule, fail$8);
24007
24039
  });
24008
24040
  const passthroughForever = /*#__PURE__*/ passthrough$2(forever$1);
24009
24041
  /** @internal */
@@ -25358,7 +25390,7 @@ const gen = gen$1;
25358
25390
  * @category constructors
25359
25391
  * @since 2.0.0
25360
25392
  */
25361
- const fail$4 = fail$7;
25393
+ const fail$4 = fail$8;
25362
25394
  /**
25363
25395
  * Creates an `Effect` that represents a recoverable error using a lazy evaluation.
25364
25396
  *
@@ -35121,6 +35153,22 @@ const succeed$4 = (value) => fromEffect$2(succeed$5(value));
35121
35153
  */
35122
35154
  const empty$13 = /*#__PURE__*/ fromPull$1(/*#__PURE__*/ succeed$5(/*#__PURE__*/ done()));
35123
35155
  /**
35156
+ * Constructs a channel that fails immediately with the specified error.
35157
+ *
35158
+ * **Example** (Failing with an error)
35159
+ *
35160
+ * ```ts import.meta.vitest
35161
+ * import { Channel, Effect, Exit } from "effect"
35162
+ *
35163
+ * const failedChannel = Channel.fail("Something went wrong")
35164
+ * Effect.runSync(Effect.exit(Channel.runCollect(failedChannel))) // => Exit.fail("Something went wrong")
35165
+ * ```
35166
+ *
35167
+ * @category constructors
35168
+ * @since 2.0.0
35169
+ */
35170
+ const fail$3 = (error) => fromPull$1(succeed$5(fail$4(error)));
35171
+ /**
35124
35172
  * Constructs a channel that fails immediately with the specified `Cause`.
35125
35173
  *
35126
35174
  * **When to use**
@@ -35916,6 +35964,15 @@ const catchCauseFilter = /*#__PURE__*/ dual(3, (self, filter, f) => catchCause(s
35916
35964
  }));
35917
35965
  const catch_$1 = /*#__PURE__*/ dual(2, (self, f) => catchCauseFilter(self, findError, (e) => f(e)));
35918
35966
  /**
35967
+ * Returns a new channel, which is the same as this one, except the failure
35968
+ * value of the returned channel is created by applying the specified function
35969
+ * to the failure value of this channel.
35970
+ *
35971
+ * @category error handling
35972
+ * @since 2.0.0
35973
+ */
35974
+ const mapError$2 = /*#__PURE__*/ dual(2, (self, f) => catch_$1(self, (err) => fail$3(f(err))));
35975
+ /**
35919
35976
  * Merges multiple channels with specified concurrency and buffering options.
35920
35977
  *
35921
35978
  * **When to use**
@@ -38228,6 +38285,30 @@ const filterMap$2 = /*#__PURE__*/ dual(2, (self, filter) => fromChannel(filterMa
38228
38285
  const filterEffect = /*#__PURE__*/ dual(2, (self, predicate) => fromChannel(filterArrayEffect(toChannel(self), predicate)));
38229
38286
  const catch_ = /*#__PURE__*/ dual(2, (self, f) => fromChannel(catch_$1(self.channel, (error) => f(error).channel)));
38230
38287
  /**
38288
+ * Transforms the errors emitted by this stream using `f`.
38289
+ *
38290
+ * **Example** (Mapping stream errors)
38291
+ *
38292
+ * ```ts import.meta.vitest
38293
+ * import { Effect, Stream } from "effect"
38294
+ *
38295
+ * const program = Effect.gen(function*() {
38296
+ * const result = yield* Stream.fail("bad").pipe(
38297
+ * Stream.mapError((error) => `mapped: ${error}`),
38298
+ * Stream.catch((error) => Stream.make(`recovered from ${error}`)),
38299
+ * Stream.runCollect
38300
+ * )
38301
+ * result // => [ 'recovered from mapped: bad' ]
38302
+ * })
38303
+ *
38304
+ * await Effect.runPromise(program)
38305
+ * ```
38306
+ *
38307
+ * @category error handling
38308
+ * @since 2.0.0
38309
+ */
38310
+ const mapError$1 = /*#__PURE__*/ dual(2, (self, f) => fromChannel(mapError$2(self.channel, f)));
38311
+ /**
38231
38312
  * Takes elements until the predicate matches.
38232
38313
  *
38233
38314
  * **Details**
@@ -38466,7 +38547,7 @@ const transduce = /*#__PURE__*/ dual(2, (self, sink) => transformPull(self, (ups
38466
38547
  }
38467
38548
  return upstream;
38468
38549
  }).pipe(catch_$2((error) => {
38469
- done$10 = fail$6(error);
38550
+ done$10 = fail$7(error);
38470
38551
  return done();
38471
38552
  }));
38472
38553
  const pull = map$7(suspend$4(() => sink.transform(upstreamWithLeftover, scope)), ([value, leftover_]) => {
@@ -40240,14 +40321,14 @@ const encode = (input) => encodeBytes(typeof input === "string" ? encoder$2.enco
40240
40321
  const decode$1 = (str) => {
40241
40322
  const stripped = stripCrlf(str);
40242
40323
  const length = stripped.length;
40243
- if (length % 4 !== 0) return fail$8(new EncodingError({
40324
+ if (length % 4 !== 0) return fail$9(new EncodingError({
40244
40325
  kind: "Decode",
40245
40326
  module: "Base64",
40246
40327
  input: stripped,
40247
40328
  message: `Length must be a multiple of 4, but is ${length}`
40248
40329
  }));
40249
40330
  const index = stripped.indexOf("=");
40250
- if (index !== -1 && (index < length - 2 || index === length - 2 && stripped[length - 1] !== "=")) return fail$8(new EncodingError({
40331
+ if (index !== -1 && (index < length - 2 || index === length - 2 && stripped[length - 1] !== "=")) return fail$9(new EncodingError({
40251
40332
  kind: "Decode",
40252
40333
  module: "Base64",
40253
40334
  input: stripped,
@@ -40264,7 +40345,7 @@ const decode$1 = (str) => {
40264
40345
  }
40265
40346
  return succeed$10(result);
40266
40347
  } catch (cause) {
40267
- return fail$8(new EncodingError({
40348
+ return fail$9(new EncodingError({
40268
40349
  kind: "Decode",
40269
40350
  module: "Base64",
40270
40351
  input: stripped,
@@ -44045,7 +44126,7 @@ function stepArray(s, item, exit, i) {
44045
44126
  if (s.options.errors === "all") {
44046
44127
  if (s.issues) s.issues.push(issue);
44047
44128
  else s.issues = [issue];
44048
- } else return fail$6(new Composite(s.ast, [issue], s.input, s.options));
44129
+ } else return fail$7(new Composite(s.ast, [issue], s.input, s.options));
44049
44130
  }
44050
44131
  }
44051
44132
  const parseArrayOptions = {
@@ -44066,7 +44147,7 @@ const wrapPropertyKeyIssue = (s, ast, key, exit) => {
44066
44147
  if (s.options.errors === "all") {
44067
44148
  if (s.issues) s.issues.push(pointer);
44068
44149
  else s.issues = [pointer];
44069
- } else return fail$6(new Composite(ast, [pointer], s.input, s.options));
44150
+ } else return fail$7(new Composite(ast, [pointer], s.input, s.options));
44070
44151
  };
44071
44152
  /**
44072
44153
  * floating point or integer, with optional exponent
@@ -44369,7 +44450,7 @@ function stepProperty(s, p, exit) {
44369
44450
  if (s.issues) s.issues.push(issue);
44370
44451
  else s.issues = [issue];
44371
44452
  return;
44372
- } else return fail$6(new Composite(s.ast, [issue], s.input, s.options));
44453
+ } else return fail$7(new Composite(s.ast, [issue], s.input, s.options));
44373
44454
  }
44374
44455
  }
44375
44456
  const parsePropertiesOptions = {
@@ -44711,7 +44792,7 @@ const Union$1 = class extends ASTNodeImpl {
44711
44792
  function failSingleUnionCandidate(ast, cause, input, options) {
44712
44793
  const issue = getSchemaIssue(cause);
44713
44794
  if (!issue) return failCause$5(cause);
44714
- return fail$6(new AnyOf(ast, [issue], input, options));
44795
+ return fail$7(new AnyOf(ast, [issue], input, options));
44715
44796
  }
44716
44797
  function catchSingleUnionCandidate(ast, result, input, options) {
44717
44798
  return catchCause$1(result, (cause) => failSingleUnionCandidate(ast, cause, input, options));
@@ -44753,7 +44834,7 @@ const parseUnion = /*#__PURE__*/ iterateEager()({
44753
44834
  } else {
44754
44835
  if (s.out && s.successes) {
44755
44836
  s.successes.push(s.ast.types[i]);
44756
- return fail$6(new OneOf(s.ast, s.successes, s.input, s.options));
44837
+ return fail$7(new OneOf(s.ast, s.successes, s.input, s.options));
44757
44838
  }
44758
44839
  s.out = exit;
44759
44840
  if (s.successes) s.successes.push(s.ast.types[i]);
@@ -46003,7 +46084,7 @@ function asResult(parser) {
46003
46084
  return (input, options) => {
46004
46085
  const exit = parserExit(input, options);
46005
46086
  if (isSuccess(exit)) return succeed$10(exit.value);
46006
- return fail$8(getSchemaIssueOrThrow(exit.cause, "Result adapter can only return schema issues"));
46087
+ return fail$9(getSchemaIssueOrThrow(exit.cause, "Result adapter can only return schema issues"));
46007
46088
  };
46008
46089
  }
46009
46090
  function runSync(effect, message) {
@@ -47702,7 +47783,7 @@ const wordToOctets = (word) => [
47702
47783
  word >>> 8 & 255,
47703
47784
  word & 255
47704
47785
  ];
47705
- const addressError = (input, message) => fail$8(new NetAddressError({
47786
+ const addressError = (input, message) => fail$9(new NetAddressError({
47706
47787
  input,
47707
47788
  message
47708
47789
  }));
@@ -51983,7 +52064,7 @@ function schema$1(codec, path) {
51983
52064
  const fullPath = [...pathPrefix, ...localPath];
51984
52065
  return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed$10), catchEager((issue) => {
51985
52066
  const error = new ConfigError$1(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
51986
- return hasProviderInput(encodedAst, cursor.node) ? fail$4(error) : succeed$5(fail$8(error));
52067
+ return hasProviderInput(encodedAst, cursor.node) ? fail$4(error) : succeed$5(fail$9(error));
51987
52068
  }))), catchDefect((defect) => isSourceError(defect) ? fail$4(new ConfigError$1(defect)) : die(defect)));
51988
52069
  });
51989
52070
  }
@@ -61777,7 +61858,7 @@ const makeOrPredicate = (patterns) => {
61777
61858
  /** @internal */
61778
61859
  const type$1 = () => makeTypeMatcher(identity, []);
61779
61860
  /** @internal */
61780
- const value$1 = (i) => makeValueMatcher(i, fail$8(i));
61861
+ const value$1 = (i) => makeValueMatcher(i, fail$9(i));
61781
61862
  /** @internal */
61782
61863
  const valueTags$1 = /*#__PURE__*/ dual(2, (input, fields) => {
61783
61864
  return tagsExhaustive(fields)(makeTypeMatcher(identity, []))(input);
@@ -61848,7 +61929,7 @@ const result = (self) => {
61848
61929
  const input = self.select(...args);
61849
61930
  if (_case._tag === "When" && _case.guard(input) === true) return succeed$10(_case.evaluate(input, ...args));
61850
61931
  else if (_case._tag === "Not" && _case.guard(input) === false) return succeed$10(_case.evaluate(input, ...args));
61851
- return fail$8(input);
61932
+ return fail$9(input);
61852
61933
  };
61853
61934
  }
61854
61935
  return (...args) => {
@@ -61858,7 +61939,7 @@ const result = (self) => {
61858
61939
  if (_case._tag === "When" && _case.guard(input) === true) return succeed$10(_case.evaluate(input, ...args));
61859
61940
  else if (_case._tag === "Not" && _case.guard(input) === false) return succeed$10(_case.evaluate(input, ...args));
61860
61941
  }
61861
- return fail$8(input);
61942
+ return fail$9(input);
61862
61943
  };
61863
61944
  };
61864
61945
  const getExhaustiveAbsurdErrorMessage = "effect/match/Match/exhaustive: absurd";
@@ -65465,6 +65546,9 @@ const MutantRunResultSchema = Union([
65465
65546
  errorMessage: String$7
65466
65547
  })
65467
65548
  ]);
65549
+ var MutantRunStarted = class extends TaggedClass()("MutantRunStarted", {}) {};
65550
+ var MutantRunSettled$1 = class extends TaggedClass()("MutantRunSettled", { result: MutantRunResultSchema }) {};
65551
+ const MutantRunEventSchema = Union([MutantRunStarted, MutantRunSettled$1]);
65468
65552
  const CoverageAnalysisSchema = Literals$3([
65469
65553
  "off",
65470
65554
  "all",
@@ -65680,8 +65764,9 @@ const dryRun$1 = make$32("dryRun", {
65680
65764
  }).middleware(TraceContextMiddleware);
65681
65765
  const mutantRun = make$32("mutantRun", {
65682
65766
  payload: TestRunnerMutantRunRequest,
65683
- success: MutantRunResultSchema,
65684
- error: TestRunnerFailed
65767
+ success: MutantRunEventSchema,
65768
+ error: TestRunnerFailed,
65769
+ stream: true
65685
65770
  }).middleware(TraceContextMiddleware);
65686
65771
  const check$1 = make$32("check", {
65687
65772
  payload: CheckerRequest,
@@ -65832,7 +65917,10 @@ var TestRunner_exports = /* @__PURE__ */ __exportAll$4({
65832
65917
  HitLimitReason: () => HitLimitReason,
65833
65918
  HitLimitReasonPrefix: () => HitLimitReasonPrefix,
65834
65919
  HitLimitReasonText: () => HitLimitReasonText,
65920
+ MutantRunEventSchema: () => MutantRunEventSchema,
65835
65921
  MutantRunResultSchema: () => MutantRunResultSchema,
65922
+ MutantRunSettled: () => MutantRunSettled$1,
65923
+ MutantRunStarted: () => MutantRunStarted,
65836
65924
  MutantRunStatus: () => MutantRunStatus,
65837
65925
  TestId: () => TestId,
65838
65926
  TestResultSchema: () => TestResultSchema,
@@ -72843,7 +72931,7 @@ const applyMutant = dual((args) => args.length >= 2, applyMutantDataFirst);
72843
72931
  function cloneWithReplacement(mutant, originalTree) {
72844
72932
  const mutatedAst = cloneNode(originalTree);
72845
72933
  const { original, replacement } = mutant;
72846
- return value(hasReplaced(mutatedAst, original, replacement)).pipe(when(true, () => succeed$10(mutatedAst)), when(false, () => fail$8(MutantNotApplied.make({
72934
+ return value(hasReplaced(mutatedAst, original, replacement)).pipe(when(true, () => succeed$10(mutatedAst)), when(false, () => fail$9(MutantNotApplied.make({
72847
72935
  fileName: mutant.fileName,
72848
72936
  mutatorName: mutant.mutatorName
72849
72937
  }))), exhaustive);
@@ -74769,7 +74857,7 @@ const externalModuleArgumentText = (value) => match$1(isTruthy(value), {
74769
74857
  function printDataFirst(file, entryForFormat) {
74770
74858
  const context = { print: (inner) => print(inner, entryForFormat) };
74771
74859
  return match$8(entryForFormat(formatKeyOf(file)), {
74772
- onNone: () => fail$8(PrintFailed.make({ message: `No registered format renders the "${formatKeyOf(file)}" AST` })),
74860
+ onNone: () => fail$9(PrintFailed.make({ message: `No registered format renders the "${formatKeyOf(file)}" AST` })),
74773
74861
  onSome: (entry) => succeed$10(entry.print(file, context))
74774
74862
  });
74775
74863
  }
@@ -74864,7 +74952,7 @@ const resolveFormat = Workflow_exports.make({
74864
74952
  command: FormatResolutionCommand,
74865
74953
  decision: Union([FormatAssigned, FormatSkipped]),
74866
74954
  error: FormatOverrideUnclaimed,
74867
- decide: (command) => value(selectionFor(command)).pipe(tag("ClaimSelected", ({ claim }) => succeed$10(assignedFrom(claim, command))), tag("PinUnclaimed", ({ formatId }) => fail$8(overrideUnclaimedFrom(command, formatId))), tag("ExtensionUnclaimed", () => succeed$10(skippedFrom(command))), exhaustive)
74955
+ decide: (command) => value(selectionFor(command)).pipe(tag("ClaimSelected", ({ claim }) => succeed$10(assignedFrom(claim, command))), tag("PinUnclaimed", ({ formatId }) => fail$9(overrideUnclaimedFrom(command, formatId))), tag("ExtensionUnclaimed", () => succeed$10(skippedFrom(command))), exhaustive)
74868
74956
  });
74869
74957
  const AridRuleId = Literals$3([
74870
74958
  "arid-logging",
@@ -75200,7 +75288,7 @@ const claimingPlacer = (facts) => value(facts).pipe(when({
75200
75288
  isExpression: true,
75201
75289
  expressionIsValid: true
75202
75290
  }, () => some$1("expression")), when({ isStatement: true }, () => some$1("statement")), when({ isSwitchCase: true }, () => some$1("switch-case")), orElse$1(() => none()));
75203
- const placerOf = (command) => value(claimingPlacer(command.facts)).pipe(when(isSome, (chosen) => succeed$10(chosen.value)), when(isNone, () => fail$8(NoPlacerClaimsNode.make({ fileName: command.fileName }))), exhaustive);
75291
+ const placerOf = (command) => value(claimingPlacer(command.facts)).pipe(when(isSome, (chosen) => succeed$10(chosen.value)), when(isNone, () => fail$9(NoPlacerClaimsNode.make({ fileName: command.fileName }))), exhaustive);
75204
75292
  const expectedKindOf = (placer) => value(placer).pipe(when("expression", () => "an expression"), when("statement", () => "a statement"), when("switch-case", () => "a switch case"), exhaustive);
75205
75293
  const matchesPlacer = (placer, replacement) => value(placer).pipe(when("expression", () => replacement.isExpression), when("statement", () => replacement.isStatement), when("switch-case", () => replacement.isSwitchCase), exhaustive);
75206
75294
  const firstMismatch = (command, placer) => map$13(fromNullishOr(command.mutants.find((mutant) => !matchesPlacer(placer, mutant.replacement))), (mutant) => MutantKindMismatch.make({
@@ -75210,7 +75298,7 @@ const firstMismatch = (command, placer) => map$13(fromNullishOr(command.mutants.
75210
75298
  mutatorName: mutant.mutatorName,
75211
75299
  expected: expectedKindOf(placer)
75212
75300
  }));
75213
- const placementRefusal = (command, placer) => value(firstMismatch(command, placer)).pipe(when(isSome, (mismatch) => fail$8(mismatch.value)), when(isNone, () => succeed$10(void 0)), exhaustive);
75301
+ const placementRefusal = (command, placer) => value(firstMismatch(command, placer)).pipe(when(isSome, (mismatch) => fail$9(mismatch.value)), when(isNone, () => succeed$10(void 0)), exhaustive);
75214
75302
  const siteOf = (command, placer) => {
75215
75303
  const mutantIds = command.mutants.map((mutant) => mutant.id);
75216
75304
  return value(placer).pipe(when("expression", () => ExpressionSite.make({
@@ -75415,7 +75503,7 @@ const shiftedLocation = (location, offset) => ({
75415
75503
  end: shiftedPosition(location.end, offset)
75416
75504
  });
75417
75505
  const plannedMutant = (command, candidate, policyReason) => match$8(fromNullishOr(candidate.location), {
75418
- onNone: () => fail$8(MutantWithoutLocation.make({
75506
+ onNone: () => fail$9(MutantWithoutLocation.make({
75419
75507
  fileName: command.fileName,
75420
75508
  mutatorName: candidate.mutatorName
75421
75509
  })),
@@ -75549,19 +75637,19 @@ const placementFailureMessage = (refusal, node, mutants, fileName, lineStarts, b
75549
75637
  return `${placementLocation(node, fileName, lineStarts, basePath)} ${message}. Either remove this file from the list of files to be mutated, or exclude the mutator (using \`mutator.excludedMutations\`). Original error: ${refusalDetail(refusal)}`;
75550
75638
  };
75551
75639
  function nodeOfKind(mutant, node, isKind, kind) {
75552
- return isKind(node) ? succeed$10(node) : fail$8(/* @__PURE__ */ new Error(`Cannot place mutant ${mutant.id}: expected ${kind}, got ${node.type}`));
75640
+ return isKind(node) ? succeed$10(node) : fail$9(/* @__PURE__ */ new Error(`Cannot place mutant ${mutant.id}: expected ${kind}, got ${node.type}`));
75553
75641
  }
75554
75642
  function expressionOf$2(node) {
75555
- return isExpressionKind(node) ? succeed$10(node) : fail$8(/* @__PURE__ */ new Error(`Expected an expression, got ${node.type}`));
75643
+ return isExpressionKind(node) ? succeed$10(node) : fail$9(/* @__PURE__ */ new Error(`Expected an expression, got ${node.type}`));
75556
75644
  }
75557
75645
  function statementOf(node) {
75558
- return isStatementKind(node) ? succeed$10(node) : fail$8(/* @__PURE__ */ new Error(`Expected a statement, got ${node.type}`));
75646
+ return isStatementKind(node) ? succeed$10(node) : fail$9(/* @__PURE__ */ new Error(`Expected a statement, got ${node.type}`));
75559
75647
  }
75560
75648
  function isSwitchCase(node) {
75561
75649
  return nodeType(node) === "SwitchCase";
75562
75650
  }
75563
75651
  function switchCaseOf(node) {
75564
- return isSwitchCase(node) ? succeed$10(node) : fail$8(/* @__PURE__ */ new Error(`Expected a switch case, got ${node.type}`));
75652
+ return isSwitchCase(node) ? succeed$10(node) : fail$9(/* @__PURE__ */ new Error(`Expected a switch case, got ${node.type}`));
75565
75653
  }
75566
75654
  const fileNameWithin = (basePath, fileName) => basePath === void 0 ? fileName : relativeTo$1(basePath, fileName);
75567
75655
  function placementLocation(node, fileName, lineStarts, basePath) {
@@ -75892,7 +75980,7 @@ const shouldSkipNode = (frame, location, mutateDescription) => [
75892
75980
  isOutsideMutateRanges(location, mutateDescription)
75893
75981
  ].some((skip) => skip);
75894
75982
  const locationOfNode = (frame, context) => match$8(map$13(fromNullishOr(spanOf$4(frame.node)), (span) => locationOf(context.lineStarts, span)), {
75895
- onNone: () => fail$8(NodeWithoutSpan.make({ fileName: context.fileName })),
75983
+ onNone: () => fail$9(NodeWithoutSpan.make({ fileName: context.fileName })),
75896
75984
  onSome: succeed$10
75897
75985
  });
75898
75986
  const refusedPlacement = (refusal, node, mutants, context) => PlacementRefused.make({ message: placementFailureMessage(refusal, node, mutants, context.fileName, context.lineStarts, context.basePath) });
@@ -75910,7 +75998,7 @@ const applyToClaim = (mutants, target, state, context) => {
75910
75998
  }));
75911
75999
  };
75912
76000
  const attachPlaceable = (mutants, frame, state, context) => value(mutants.length > 0).pipe(when(false, () => succeed$10(state)), when(true, () => match$8(fromNullishOr(framesUpward(frame).find((candidate) => state.claims.some((claim) => claim.node === candidate.node))), {
75913
- onNone: () => fail$8(MutantsUnplaced.make({
76001
+ onNone: () => fail$9(MutantsUnplaced.make({
75914
76002
  fileName: context.fileName,
75915
76003
  detail: JSON.stringify(mutants, null, 2)
75916
76004
  })),
@@ -75954,7 +76042,7 @@ const planMutantsAt = (frame, candidates, directives, location, state, context)
75954
76042
  candidates: candidates.map((candidate) => candidate.data),
75955
76043
  mutantSetPolicy: context.mutantSetPolicy
75956
76044
  }));
75957
- return value(plan).pipe(when(isFailure$1, (failed) => fail$8(failed.failure)), orElse$1((succeeded) => collectPlan(frame, candidates, succeeded.success, state, context)));
76045
+ return value(plan).pipe(when(isFailure$1, (failed) => fail$9(failed.failure)), orElse$1((succeeded) => collectPlan(frame, candidates, succeeded.success, state, context)));
75958
76046
  };
75959
76047
  const candidatesFor = (frame, location, context) => value(shouldMutateAt(location, context.mutateDescription)).pipe(when(true, () => mutablesFor(frame, location, context)), orElse$1(() => []));
75960
76048
  const needsPlan = (candidates, directives) => [candidates.length > 0, directives.length > 0].some(Boolean);
@@ -75981,7 +76069,7 @@ const siteOfClaim = (claim, context) => {
75981
76069
  facts: claim.facts,
75982
76070
  mutants: claim.applied.map(([mutant, applied]) => replacementRecord(mutant, applied))
75983
76071
  }));
75984
- return value(decision).pipe(when(isFailure$1, (refused) => fail$8(refusedPlacement(refused.failure, claim.node, mutants, context))), orElse$1((decided) => succeed$10(decided.success)));
76072
+ return value(decision).pipe(when(isFailure$1, (refused) => fail$9(refusedPlacement(refused.failure, claim.node, mutants, context))), orElse$1((decided) => succeed$10(decided.success)));
75985
76073
  };
75986
76074
  const emitClaim = (claim, state, context) => value(claim.applied.length > 0).pipe(when(false, () => succeed$10(state)), when(true, () => map$12(siteOfClaim(claim, context), (site) => ({
75987
76075
  ...state,
@@ -76666,7 +76754,7 @@ const makeHtmlReporter = dual(2, (options, _init) => (events) => build(nodeFsPat
76666
76754
  var HtmlReporter_exports = /* @__PURE__ */ __exportAll$3({ makeHtmlReporter: () => makeHtmlReporter });
76667
76755
  //#endregion
76668
76756
  //#region package.json
76669
- var version = "16.0.1";
76757
+ var version = "17.0.0";
76670
76758
  //#endregion
76671
76759
  //#region ../../node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/cli/CliOutput.js
76672
76760
  /**
@@ -83184,7 +83272,7 @@ const runWith = (command, config) => {
83184
83272
  onSome: (level) => make$72(MinimumLogLevel, level)
83185
83273
  });
83186
83274
  yield* provideContext$3(program, services);
83187
- }, catchFilter((error) => isCliError(error) && error._tag === "ShowHelp" ? succeed$10(error) : fail$8(error), (error) => andThen$1(showHelp(command, error, config.renderErrors !== false), fail$4(error))), catchFilter((error) => config.renderErrors !== false && isCliError(error) && error._tag === "UserError" ? succeed$10(error) : fail$8(error), (error) => andThen$1(showUserError(error), fail$4(error))), catchFilter((e) => isQuitError(e) ? succeed$10(e) : fail$8(e), (_) => interrupt$1));
83275
+ }, catchFilter((error) => isCliError(error) && error._tag === "ShowHelp" ? succeed$10(error) : fail$9(error), (error) => andThen$1(showHelp(command, error, config.renderErrors !== false), fail$4(error))), catchFilter((error) => config.renderErrors !== false && isCliError(error) && error._tag === "UserError" ? succeed$10(error) : fail$9(error), (error) => andThen$1(showUserError(error), fail$4(error))), catchFilter((e) => isQuitError(e) ? succeed$10(e) : fail$9(e), (_) => interrupt$1));
83188
83276
  };
83189
83277
  //#endregion
83190
83278
  //#region src/bin/enable-compile-cache.ts
@@ -83307,7 +83395,7 @@ const refusedOutcome = (observation) => RunRefused.make({
83307
83395
  rule: observation.rule,
83308
83396
  message: observation.message
83309
83397
  });
83310
- const decide$30 = (command) => value(command.observation).pipe(tag("RunSucceededClean", () => succeed$10(succeededCleanOutcome())), tag("RunSucceededVerdict", (observation) => succeed$10(succeededVerdictOutcome(observation))), tag("RunInterruptedObservation", () => fail$8(RunInterrupted.make({ code: 130 }))), tag("RunHelpObservation", (observation) => succeed$10(helpOutcome(observation))), tag("RunCliErrorObservation", (observation) => succeed$10(cliErrorOutcome(observation))), tag("RunSurvivorsRejectedObservation", (observation) => succeed$10(survivorsRejectedOutcome(observation))), tag("RunSchemaErrorObservation", (observation) => succeed$10(schemaErrorOutcome(observation))), tag("RunClassedObservation", (observation) => succeed$10(classedOutcome(observation))), tag("RunGenericFailureObservation", (observation) => succeed$10(genericFailureOutcome(observation))), tag("RunRefusedObservation", (observation) => succeed$10(refusedOutcome(observation))), exhaustive);
83398
+ const decide$30 = (command) => value(command.observation).pipe(tag("RunSucceededClean", () => succeed$10(succeededCleanOutcome())), tag("RunSucceededVerdict", (observation) => succeed$10(succeededVerdictOutcome(observation))), tag("RunInterruptedObservation", () => fail$9(RunInterrupted.make({ code: 130 }))), tag("RunHelpObservation", (observation) => succeed$10(helpOutcome(observation))), tag("RunCliErrorObservation", (observation) => succeed$10(cliErrorOutcome(observation))), tag("RunSurvivorsRejectedObservation", (observation) => succeed$10(survivorsRejectedOutcome(observation))), tag("RunSchemaErrorObservation", (observation) => succeed$10(schemaErrorOutcome(observation))), tag("RunClassedObservation", (observation) => succeed$10(classedOutcome(observation))), tag("RunGenericFailureObservation", (observation) => succeed$10(genericFailureOutcome(observation))), tag("RunRefusedObservation", (observation) => succeed$10(refusedOutcome(observation))), exhaustive);
83311
83399
  const classifyRunOutcome = Workflow_exports.make({
83312
83400
  command: RunOutcomeCommand,
83313
83401
  decision: Union([
@@ -83521,7 +83609,7 @@ const decide$28 = (command) => value({
83521
83609
  dryRunOnly: command.dryRunOnly,
83522
83610
  githubActions: command.githubActions,
83523
83611
  allowLocalMutation: command.allowLocalMutation
83524
- }).pipe(when({ dryRunOnly: true }, () => succeed$10(LocalMutationAllowed.make({}))), when({ githubActions: "true" }, () => succeed$10(LocalMutationAllowed.make({}))), when({ allowLocalMutation: "1" }, () => succeed$10(LocalMutationAllowed.make({}))), orElse$1(() => fail$8(LocalMutationRefused.make({
83612
+ }).pipe(when({ dryRunOnly: true }, () => succeed$10(LocalMutationAllowed.make({}))), when({ githubActions: "true" }, () => succeed$10(LocalMutationAllowed.make({}))), when({ allowLocalMutation: "1" }, () => succeed$10(LocalMutationAllowed.make({}))), orElse$1(() => fail$9(LocalMutationRefused.make({
83525
83613
  rule: "mutation-runs-on-main-ci",
83526
83614
  message: "mutation runs only on main CI"
83527
83615
  }))));
@@ -83639,7 +83727,7 @@ const ADMISSION_RULES = [
83639
83727
  }
83640
83728
  ];
83641
83729
  const admissionOutcomeOf = (input) => getOrElse$1(map$13(findFirst(ADMISSION_RULES, (rule) => rule.holds(input)), (rule) => rule.outcome), () => SurvivorsMatchOutcome.make({ survivors: input.priorSurvivors }));
83642
- const reject = (reason, detail) => fail$8(SurvivorsRejection.make({
83730
+ const reject = (reason, detail) => fail$9(SurvivorsRejection.make({
83643
83731
  reason,
83644
83732
  remediation: `${detail} ${SURVIVORS_RUN_FIRST_REMEDIATION}`
83645
83733
  }));
@@ -84479,7 +84567,7 @@ const resolveConfig = Workflow_exports.make({
84479
84567
  error: ConfigOptionsRefused,
84480
84568
  decide: (command) => match$6(decodeOptions$1(command.document), {
84481
84569
  onSuccess: (options) => succeed$10(decidedFromOf(command.fileFound, options)),
84482
- onFailure: (failure) => fail$8(ConfigOptionsRefused.make({ message: failure.message }))
84570
+ onFailure: (failure) => fail$9(ConfigOptionsRefused.make({ message: failure.message }))
84483
84571
  })
84484
84572
  });
84485
84573
  //#endregion
@@ -87938,7 +88026,7 @@ const make$17 = /*#__PURE__*/ fnUntraced(function* (group, options) {
87938
88026
  defect: decodeDefect(message.defect)
87939
88027
  });
87940
88028
  case "ClientProtocolError": {
87941
- const exit = fail$6(message.error);
88029
+ const exit = fail$7(message.error);
87942
88030
  return forEach$1(entries.keys(), (requestId) => write({
87943
88031
  _tag: "Exit",
87944
88032
  clientId: 0,
@@ -88894,7 +88982,7 @@ const mapRunResult = (mutant, result) => value(result).pipe(discriminator("statu
88894
88982
  const uniqueNames = (names) => dedupe(filter$4(names, (name) => name !== void 0));
88895
88983
  const partitionByFile = (files, fileNames) => {
88896
88984
  const [present, missing] = separate(map$10(fileNames, (fileName) => match$8(get$9(files, fileName), {
88897
- onNone: () => fail$8(fileName),
88985
+ onNone: () => fail$9(fileName),
88898
88986
  onSome: (file) => succeed$10(file)
88899
88987
  })));
88900
88988
  return {
@@ -89197,7 +89285,7 @@ const writeIncrementalReport = fn(SpanTaxonomy_exports.Spans.mutationReportingWr
89197
89285
  const runInputsDigest = yield* runInputsDigestOf(deps.fs, deps.path, input.basePath, input.options);
89198
89286
  const json = yield* encodeEffect(fromJsonString(Unknown, { space: 2 }))({
89199
89287
  incrementalVersion: "3",
89200
- verdictSemanticsVersion: 3,
89288
+ verdictSemanticsVersion: 4,
89201
89289
  mutantSetPolicy: input.options.mutator.mutantSetPolicy,
89202
89290
  runInputsDigest,
89203
89291
  ...report,
@@ -89247,7 +89335,7 @@ const slimIncrementalReport = fn(SpanTaxonomy_exports.Spans.mutationReportingSli
89247
89335
  const runInputsDigest = yield* runInputsDigestOf(deps.fs, deps.path, input.basePath, input.options);
89248
89336
  return {
89249
89337
  incrementalVersion: "3",
89250
- verdictSemanticsVersion: 3,
89338
+ verdictSemanticsVersion: 4,
89251
89339
  mutantSetPolicy: input.options.mutator.mutantSetPolicy,
89252
89340
  runInputsDigest,
89253
89341
  schemaVersion: Report_exports.WrittenSchemaVersion.literal,
@@ -89815,7 +89903,7 @@ const terminalReportOf = make$69((event) => value(event).pipe(tag("mutationTestR
89815
89903
  report: ready.report,
89816
89904
  metrics: ready.metrics,
89817
89905
  static: ready.static
89818
- })), orElse$1(() => fail$8("not-terminal"))));
89906
+ })), orElse$1(() => fail$9("not-terminal"))));
89819
89907
  const renderOptionsOf = (options) => ({
89820
89908
  allowColor: options.clearTextReporter.allowColor,
89821
89909
  allowEmojis: options.clearTextReporter.allowEmojis,
@@ -89907,7 +89995,7 @@ const renderJsonReport = Workflow_exports.make({
89907
89995
  });
89908
89996
  //#endregion
89909
89997
  //#region src/json-report.cell.ts
89910
- const reportOf$1 = make$69((event) => value(event).pipe(tag("mutationTestReportReady", (ready) => succeed$10(ready.report)), orElse$1(() => fail$8("not-ready"))));
89998
+ const reportOf$1 = make$69((event) => value(event).pipe(tag("mutationTestReportReady", (ready) => succeed$10(ready.report)), orElse$1(() => fail$9("not-ready"))));
89911
89999
  const readJsonReport = (input) => map$7(fromAsyncIterable(input.events, failAsJsonReporter).pipe(filterMap$2(reportOf$1), run$4(last())), (last) => ({
89912
90000
  _tag: "JsonReportCommand",
89913
90001
  reported: getOrUndefined$1(last),
@@ -90566,7 +90654,7 @@ const failAsSarif = (cause) => Reporter_exports.ReporterFailed.make({
90566
90654
  event: "mutationTestReportReady",
90567
90655
  cause: getOrElse$1(map$13(ErrorText_exports.errorTextOf(cause), (rendered) => rendered.text), () => "")
90568
90656
  });
90569
- const reportOf = make$69((event) => value(event).pipe(tag("mutationTestReportReady", (ready) => succeed$10(ready.report)), orElse$1(() => fail$8("not-ready"))));
90657
+ const reportOf = make$69((event) => value(event).pipe(tag("mutationTestReportReady", (ready) => succeed$10(ready.report)), orElse$1(() => fail$9("not-ready"))));
90570
90658
  const readSarifReport = (events) => map$7(fromAsyncIterable(events, failAsSarif).pipe(filterMap$2(reportOf), run$4(last())), (last) => getOrUndefined$1(last));
90571
90659
  const writeSarifReport = (options, report) => gen(function* () {
90572
90660
  const fs = yield* FileSystem;
@@ -90819,7 +90907,7 @@ const survivorsRawOf = (input) => {
90819
90907
  priorReportPath
90820
90908
  }),
90821
90909
  onTrue: () => fromResult(match$6(decodeUnknownResult(PriorReportDocument)(read.raw), {
90822
- onFailure: (error) => fail$8(error),
90910
+ onFailure: (error) => fail$9(error),
90823
90911
  onSuccess: (document) => succeed$10({
90824
90912
  currentConfig: resolvedOptions,
90825
90913
  frameworkVersion: StrykerPackage.version,
@@ -91473,11 +91561,11 @@ const readableToPullUnsafe = (options) => {
91473
91561
  latch.openUnsafe();
91474
91562
  }
91475
91563
  function onError(error) {
91476
- exit.current = fail$6(options.onError(error));
91564
+ exit.current = fail$7(options.onError(error));
91477
91565
  latch.openUnsafe();
91478
91566
  }
91479
91567
  function onEnd() {
91480
- exit.current = fail$6(Done());
91568
+ exit.current = fail$7(Done());
91481
91569
  latch.openUnsafe();
91482
91570
  }
91483
91571
  readable.on("readable", onReadable);
@@ -95916,7 +96004,7 @@ const makeNetServer = /*#__PURE__*/ fnUntraced(function* (options) {
95916
96004
  if (!isDeno) conn.pause();
95917
96005
  onConnection(conn);
95918
96006
  });
95919
- server.on("error", (err) => doneUnsafe(errorDeferred, fail$6(err)));
96007
+ server.on("error", (err) => doneUnsafe(errorDeferred, fail$7(err)));
95920
96008
  yield* callback$1((resume) => {
95921
96009
  server.listen(options.listenOptions, () => resume(void_$1));
95922
96010
  }).pipe(raceFirst(mapError$3(_await(errorDeferred), (err) => new SocketServerError({ reason: new SocketServerOpenError({ cause: err }) }))));
@@ -96475,7 +96563,7 @@ const modeFromEnvironment = (command) => match$8(configured$1(command.envMode),
96475
96563
  const decideMode = (command) => value(command).pipe(when({
96476
96564
  text: true,
96477
96565
  json: true
96478
- }, () => fail$8(ModeConflictError.make({
96566
+ }, () => fail$9(ModeConflictError.make({
96479
96567
  option: "json",
96480
96568
  value: "text",
96481
96569
  expected: CONFLICT_EXPECTED
@@ -96806,8 +96894,8 @@ const stateAfter = (decision, fallback) => match$6(decision, {
96806
96894
  onSuccess: (d) => d.state
96807
96895
  });
96808
96896
  const framedEventOf = (decision) => match$8(decision, {
96809
- onNone: () => fail$8(void 0),
96810
- onSome: (d) => value(d).pipe(tag("EventFramed", (framed) => succeed$10(framed.event)), tag("EventSuppressed", () => fail$8(void 0)), exhaustive)
96897
+ onNone: () => fail$9(void 0),
96898
+ onSome: (d) => value(d).pipe(tag("EventFramed", (framed) => succeed$10(framed.event)), tag("EventSuppressed", () => fail$9(void 0)), exhaustive)
96811
96899
  });
96812
96900
  const DEFAULT_PROGRESS_STREAM_FILE = "reports/mutation-stream.jsonl";
96813
96901
  var RunEventDrain = class RunEventDrain extends Service$1()("@systemfsoftware/stryker-js/run-event-stream.service/RunEventDrain") {
@@ -97107,7 +97195,7 @@ const allowedSecondsOf = (baselineSeconds, tolerance) => baselineSeconds * (1 +
97107
97195
  const withinOrExceeded = (command, baseline) => {
97108
97196
  const allowedSeconds = allowedSecondsOf(baseline.actualSeconds, command.tolerance);
97109
97197
  return match$1(command.actualSeconds > allowedSeconds, {
97110
- onTrue: () => fail$8(BudgetExceeded.make({
97198
+ onTrue: () => fail$9(BudgetExceeded.make({
97111
97199
  baselineSeconds: baseline.actualSeconds,
97112
97200
  allowedSeconds,
97113
97201
  actualSeconds: command.actualSeconds,
@@ -97124,7 +97212,7 @@ const baselineUnusable$1 = (baselineFile) => BudgetInputUnusable.make({ reason:
97124
97212
  const decide$21 = (command) => match$1(command.updateBaseline, {
97125
97213
  onTrue: () => succeed$10(updated(command)),
97126
97214
  onFalse: () => match$8(fromNullishOr(command.baseline), {
97127
- onNone: () => fail$8(baselineUnusable$1(command.baselineFile)),
97215
+ onNone: () => fail$9(baselineUnusable$1(command.baselineFile)),
97128
97216
  onSome: (baseline) => withinOrExceeded(command, baseline)
97129
97217
  })
97130
97218
  });
@@ -97270,7 +97358,7 @@ const decide$20 = (command) => {
97270
97358
  const mismatches = mismatchesOf(command);
97271
97359
  return match$8(fromUndefinedOr(mismatches[0]), {
97272
97360
  onNone: () => succeed$10(VerdictsMatch.make({})),
97273
- onSome: () => fail$8(VerdictsDiffer.make({ mismatches }))
97361
+ onSome: () => fail$9(VerdictsDiffer.make({ mismatches }))
97274
97362
  });
97275
97363
  };
97276
97364
  const compareVerdicts = Workflow_exports.make({
@@ -97453,14 +97541,14 @@ const clearedOrRejected = (command, committed) => {
97453
97541
  baseline: null,
97454
97542
  unchecked
97455
97543
  })),
97456
- onSome: () => fail$8(GateRejected.make({
97544
+ onSome: () => fail$9(GateRejected.make({
97457
97545
  newSurvivors,
97458
97546
  unchecked
97459
97547
  }))
97460
97548
  });
97461
97549
  };
97462
97550
  const verdictOf = (command) => match$8(fromNullishOr(command.committed), {
97463
- onNone: () => fail$8(baselineUnusable(command.baselineFile)),
97551
+ onNone: () => fail$9(baselineUnusable(command.baselineFile)),
97464
97552
  onSome: (committed) => clearedOrRejected(command, committed)
97465
97553
  });
97466
97554
  const decide$19 = (command) => match$1(command.updateBaseline, {
@@ -105434,7 +105522,7 @@ const readProject = fn(SpanTaxonomy_exports.Spans.projectReadFromDisk.name)(func
105434
105522
  _tag: "AdmitIncrementalReportCommand",
105435
105523
  report: reportRead.report,
105436
105524
  expectedIncrementalVersion: "3",
105437
- verdictSemanticsVersion: 3,
105525
+ verdictSemanticsVersion: 4,
105438
105526
  mutantSetPolicy: options.mutator.mutantSetPolicy,
105439
105527
  runInputsDigest,
105440
105528
  options,
@@ -105762,7 +105850,7 @@ const decideComplete = (command) => value({
105762
105850
  testCount: command.testCount,
105763
105851
  failedTestCount: command.failedTestCount,
105764
105852
  failedTests: command.failedTests
105765
- }).pipe(when({ outcome: "noTests" }, () => fail$8(DryRunError.make({
105853
+ }).pipe(when({ outcome: "noTests" }, () => fail$9(DryRunError.make({
105766
105854
  stage: "dryRunNoTests",
105767
105855
  reason: "No tests were executed. Stryker will exit prematurely. Please check your configuration."
105768
105856
  }))), when({ outcome: "failed" }, ({ testCount, failedTestCount, failedTests }) => succeed$10(DryRunFailed.make({
@@ -105771,10 +105859,10 @@ const decideComplete = (command) => value({
105771
105859
  failedTests
105772
105860
  }))), when({ outcome: "passed" }, ({ testCount }) => succeed$10(DryRunPassed.make({ testCount }))), exhaustive);
105773
105861
  const reasonOrDefault = (reason, fallback) => value(reason).pipe(when(void 0, () => fallback), orElse$1((present) => present));
105774
- const decide$16 = (command) => value(command.status).pipe(when("Error", () => fail$8(DryRunError.make({
105862
+ const decide$16 = (command) => value(command.status).pipe(when("Error", () => fail$9(DryRunError.make({
105775
105863
  stage: "dryRun",
105776
105864
  reason: reasonOrDefault(command.errorMessage, "Dry run error")
105777
- }))), when("Timeout", () => fail$8(DryRunError.make({
105865
+ }))), when("Timeout", () => fail$9(DryRunError.make({
105778
105866
  stage: "dryRun",
105779
105867
  reason: reasonOrDefault(command.reason, "Initial test run timed out")
105780
105868
  }))), when("Complete", () => decideComplete(command)), exhaustive);
@@ -106315,7 +106403,7 @@ var PluginLoadRefusedError = class extends TaggedError()("PluginLoadRefusedError
106315
106403
  const TypeId$9 = Symbol.for("~systemfsoftware/stryker-js/Sandbox");
106316
106404
  const SandboxHandle = Handle_exports.make()(TypeId$9);
106317
106405
  SandboxHandle.is;
106318
- const sandboxFileNameOf = (fileMap, fileName) => value(fileMap.get(fileName)).pipe(when(isString$1, (sandboxFileName) => succeed$10(sandboxFileName)), orElse$1(() => fail$8(StrykerError.make({ message: `Cannot find sandbox file for ${fileName}` }))));
106406
+ const sandboxFileNameOf = (fileMap, fileName) => value(fileMap.get(fileName)).pipe(when(isString$1, (sandboxFileName) => succeed$10(sandboxFileName)), orElse$1(() => fail$9(StrykerError.make({ message: `Cannot find sandbox file for ${fileName}` }))));
106319
106407
  const withoutLeadingSeparator = (suffix) => match$1(suffix.startsWith("/"), {
106320
106408
  onTrue: () => suffix.slice(1),
106321
106409
  onFalse: () => suffix
@@ -106451,6 +106539,43 @@ const make$1 = (runner) => PooledTestRunner.make({
106451
106539
  dryRun: runner.dryRun,
106452
106540
  mutantRun: runner.mutantRun
106453
106541
  });
106542
+ const wallClockTimeoutResult = {
106543
+ status: "timeout",
106544
+ reason: TestRunner_exports.WallClockTimeoutReason.literal
106545
+ };
106546
+ const endedWithoutResult = () => TestRunner_exports.TestRunnerFailed.make({
106547
+ runnerName: "test runner",
106548
+ phase: "mutantRun",
106549
+ cause: "the mutant run ended without reporting a result"
106550
+ });
106551
+ const deadlineArmedMutantRun = dual(2, (events, timeoutMs) => scoped$3(gen(function* () {
106552
+ const started = yield* make$67();
106553
+ const settled = yield* make$67();
106554
+ const pump = events.pipe(runForEach((event) => value(event).pipe(tag("MutantRunStarted", () => succeed$7(started, void 0)), tag("MutantRunSettled", ({ result }) => succeed$7(settled, result)), exhaustive, asVoid)), onExit((exit) => match$3(exit, {
106555
+ onFailure: (cause) => failCause$4(settled, cause),
106556
+ onSuccess: () => fail$6(settled, endedWithoutResult())
106557
+ }).pipe(asVoid)));
106558
+ yield* forkScoped(pump);
106559
+ const deadline = raceFirst(_await(started).pipe(as(true)), _await(settled).pipe(as(false))).pipe(timeoutOption(WORKER_BOOT_TIMEOUT), flatMap$4(match$8({
106560
+ onNone: () => succeed$5(wallClockTimeoutResult),
106561
+ onSome: (began) => began ? sleep(millis(timeoutMs)).pipe(as(wallClockTimeoutResult)) : _await(settled)
106562
+ })));
106563
+ return yield* raceFirst(deadline, _await(settled));
106564
+ })));
106565
+ /**
106566
+ * The dry run keeps the configured absolute budget. A mutant run is bounded from
106567
+ * its own start by {@link deadlineArmedMutantRun}, so it is not wrapped here.
106568
+ */
106569
+ const withDryRunTimeout = (inner) => make$1({
106570
+ ...inner,
106571
+ dryRun: (options) => inner.dryRun(options).pipe(timeoutOrElse({
106572
+ duration: millis(options.timeout),
106573
+ orElse: () => succeed$5({
106574
+ status: "timeout",
106575
+ reason: TestRunner_exports.WallClockTimeoutReason.literal
106576
+ })
106577
+ }))
106578
+ });
106454
106579
  const withTimeout = (inner) => make$1({
106455
106580
  ...inner,
106456
106581
  dryRun: (options) => inner.dryRun(options).pipe(timeoutOrElse({
@@ -106673,7 +106798,7 @@ const scopedOf = fnUntraced(function* (params) {
106673
106798
  capabilities: client.capabilities().pipe(mapError$3(toRunnerFailure(runnerName, "capabilities"))),
106674
106799
  init: void_$1,
106675
106800
  dryRun: (options) => client.dryRun({ options }).pipe(mapError$3(toRunnerFailure(runnerName, "dryRun"))),
106676
- mutantRun: (options) => client.mutantRun({ options }).pipe(mapError$3(toRunnerFailure(runnerName, "mutantRun")))
106801
+ mutantRun: (options) => deadlineArmedMutantRun(client.mutantRun({ options }).pipe(mapError$1(toRunnerFailure(runnerName, "mutantRun"))), options.timeout)
106677
106802
  });
106678
106803
  });
106679
106804
  const TestRunners = Blueprint_exports.make()(TypeId$6).steps({
@@ -106685,7 +106810,7 @@ const commandRunnerEffect = (context) => ChildProcessSpawner.pipe(map$7((spawner
106685
106810
  const inProcessRunner = (context) => value(context.options.testRunner).pipe(when(isCommandRunner, () => some$1(commandRunnerEffect(context))), orElse$1(() => none()));
106686
106811
  const decorateChildRunner = fnUntraced(function* (context, childProcessRunner) {
106687
106812
  const base = yield* childProcessRunner;
106688
- const timed = withTimeout(base);
106813
+ const timed = withDryRunTimeout(base);
106689
106814
  const limited = yield* withMaxReuse(context.options, context.retire)(timed);
106690
106815
  const reloading = yield* withEnvironmentReload(context.retire)(limited);
106691
106816
  return withRetry(reloading);
@@ -106886,7 +107011,7 @@ const resolvedSpawnOf = (command, matches, label) => match$8(workerSourceOf(comm
106886
107011
  })),
106887
107012
  onNone: () => {
106888
107013
  const kindLabel = labelOfKind(command.kind);
106889
- return fail$8(WorkerSpawnMissing.make({
107014
+ return fail$9(WorkerSpawnMissing.make({
106890
107015
  reason: `the ${kindLabel} plugin "${label}" is not among the loaded plugins`,
106891
107016
  descriptor: `${command.kind}:${label}`
106892
107017
  }));
@@ -108103,7 +108228,7 @@ const decide$10 = (command) => value({
108103
108228
  dryRunOnly: command.dryRunOnly,
108104
108229
  isZero: command.isZero,
108105
108230
  allowEmpty: command.allowEmpty
108106
- }).pipe(when({ invalid: true }, () => fail$8(MutationTestError.make({
108231
+ }).pipe(when({ invalid: true }, () => fail$9(MutationTestError.make({
108107
108232
  stage: "mutationTest",
108108
108233
  reason: "Invalid test count"
108109
108234
  }))), when({ dryRunOnly: true }, () => succeed$10(MutationTestDryRunOnly.make({}))), when({
@@ -108176,7 +108301,7 @@ const skippedRequested = (command, acknowledged) => liftPredicate(isReadonlyArra
108176
108301
  const contractBreach = (command, requested, submitted) => firstSomeOf([answeredUnrequested(command, submitted, requested), skippedRequested(command, acknowledgedIds(submitted, requested))]);
108177
108302
  const admit = (command, requested, submitted, decision) => match$8(contractBreach(command, requested, submitted), {
108178
108303
  onNone: () => succeed$10(decision),
108179
- onSome: (breach) => fail$8(breach)
108304
+ onSome: (breach) => fail$9(breach)
108180
108305
  });
108181
108306
  const idGroupsOf = (command) => getOrElse$1(() => [])(fromUndefinedOr(command.idGroups));
108182
108307
  const answersOf = (command) => getOrElse$1(() => ({}))(fromUndefinedOr(command.answers));
@@ -108285,7 +108410,7 @@ const lookupOf = (partitioned) => ({
108285
108410
  wireById: new Map(partitioned.wire.map((mutant) => [mutant.id, mutant])),
108286
108411
  undescribableById: new Map(partitioned.undescribable.map((mutant) => [mutant.id, mutant]))
108287
108412
  });
108288
- const wireOrFallbackOf = (mutant, lookup) => getOrElse$1(map$13(fromUndefinedOr(lookup.wireById.get(mutant.id)), succeed$10), () => getOrElse$1(map$13(fromUndefinedOr(lookup.undescribableById.get(mutant.id)), fail$8), () => wireRecordOf(mutant)));
108413
+ const wireOrFallbackOf = (mutant, lookup) => getOrElse$1(map$13(fromUndefinedOr(lookup.wireById.get(mutant.id)), succeed$10), () => getOrElse$1(map$13(fromUndefinedOr(lookup.undescribableById.get(mutant.id)), fail$9), () => wireRecordOf(mutant)));
108289
108414
  const selectedFromLookup = (plans, lookup) => {
108290
108415
  const [wire, undescribable] = separate(map$10(plans, (plan) => wireOrFallbackOf(plan.mutant, lookup)));
108291
108416
  return {
@@ -109004,7 +109129,7 @@ const readIncrementalReuseCommand = fn(SpanTaxonomy_exports.Spans.incrementalReu
109004
109129
  previousRecords: [...previousRecords],
109005
109130
  closureDigestsByMutantId: closures.digests,
109006
109131
  closureAnalysisFailed: closures.failed,
109007
- verdictSemanticsVersion: 3,
109132
+ verdictSemanticsVersion: 4,
109008
109133
  mutantSetPolicy: input.options.mutator.mutantSetPolicy,
109009
109134
  runInputsDigest,
109010
109135
  force: input.force,
@@ -109548,7 +109673,7 @@ const toRunPlan = (mutant, command, netTime, testFilter, isStatic, coveredBy) =>
109548
109673
  ...staticField(isStatic),
109549
109674
  ...coveredByField(coveredBy)
109550
109675
  })),
109551
- onFalse: () => fail$8(MutantTimeoutNotFinite.make({ mutantId: mutant.id }))
109676
+ onFalse: () => fail$9(MutantTimeoutNotFinite.make({ mutantId: mutant.id }))
109552
109677
  });
109553
109678
  };
109554
109679
  const toEarlyResultPlan = (mutant, isStatic, status, statusReason, coveredBy) => PlannedEarlyResultMutant.make({
@@ -109633,7 +109758,7 @@ const missingHitCountIds = (command) => openMutantsOf(command.mutants).flatMap((
109633
109758
  const plannedMutantsOf = (command) => command.mutants.reduce((planned, mutant) => flatMap$8(planned, (soFar) => map$12(decidePlanForMutant(mutant, command), (next) => [...soFar, next])), succeed$10([]));
109634
109759
  const decide$5 = (command) => match$8(fromUndefinedOr(missingHitCountIds(command)[0]), {
109635
109760
  onNone: () => plannedMutantsOf(command),
109636
- onSome: (first) => fail$8(CoveredMutantHitCountMissing.make({ missingIds: [first, ...missingHitCountIds(command).slice(1)] }))
109761
+ onSome: (first) => fail$9(CoveredMutantHitCountMissing.make({ missingIds: [first, ...missingHitCountIds(command).slice(1)] }))
109637
109762
  });
109638
109763
  const planMutantTests = Workflow_exports.make({
109639
109764
  command: MutantTestPlanCommand,
@@ -110275,7 +110400,7 @@ const catalogsOf = (command) => [command.stock, ...command.providers.map((provid
110275
110400
  }))];
110276
110401
  const planCatalogs = (command) => match$8(refusalOf(command), {
110277
110402
  onNone: () => succeed$10(MutatorCatalogsPlanned.make({ catalogs: [...catalogsOf(command)] })),
110278
- onSome: (refused) => fail$8(refused)
110403
+ onSome: (refused) => fail$9(refused)
110279
110404
  });
110280
110405
  const planMutatorCatalogs = Workflow_exports.make({
110281
110406
  command: PlanMutatorCatalogsCommand,
@@ -110321,14 +110446,14 @@ const reasonFor = (index, name) => match$1(index.declared.includes(name), {
110321
110446
  });
110322
110447
  const excludedRefusalOf = (index, command) => match$8(refusedNameIn(index.declared, command.excludedMutations), {
110323
110448
  onNone: () => succeed$10(void 0),
110324
- onSome: (name) => fail$8(MutatorSelectionRefused.make({
110449
+ onSome: (name) => fail$9(MutatorSelectionRefused.make({
110325
110450
  reason: "UnknownName",
110326
110451
  name
110327
110452
  }))
110328
110453
  });
110329
110454
  const optInRefusalOf = (index, command) => match$8(refusedNameIn(index.optIn, command.optInMutations), {
110330
110455
  onNone: () => succeed$10(void 0),
110331
- onSome: (name) => fail$8(MutatorSelectionRefused.make({
110456
+ onSome: (name) => fail$9(MutatorSelectionRefused.make({
110332
110457
  reason: reasonFor(index, name),
110333
110458
  name
110334
110459
  }))
@@ -111346,7 +111471,7 @@ const applyPrepare = fn(SpanTaxonomy_exports.Spans.prepareApply.name)(function*
111346
111471
  })));
111347
111472
  const admission = admitNonEmptyProject(NonEmptyProjectCommand.make({ fileCount: pipe(raw.project.files, size$3) }));
111348
111473
  const emptyAdmission = filter$7(getSuccess(admission), is$2(ProjectEmpty));
111349
- const emptyProjectGuard = getOrElse$1(map$13(emptyAdmission, () => fail$8(StageError.make({
111474
+ const emptyProjectGuard = getOrElse$1(map$13(emptyAdmission, () => fail$9(StageError.make({
111350
111475
  stage: "prepare",
111351
111476
  reason: "No input files found.",
111352
111477
  cause: PrepareError.make({
@@ -112563,7 +112688,7 @@ const selectShard = Workflow_exports.make({
112563
112688
  decision: SelectedShard,
112564
112689
  error: ShardUnknown,
112565
112690
  decide: (command) => match$8(fromUndefinedOr(command.plan.shards.find((candidate) => labelOf(candidate) === command.shard)), {
112566
- onNone: () => fail$8(ShardUnknown.make({
112691
+ onNone: () => fail$9(ShardUnknown.make({
112567
112692
  shard: command.shard,
112568
112693
  reason: `unknown shard ${command.shard}; plan has ${command.plan.shards.map(labelOf).join(", ")}`
112569
112694
  })),
@@ -112744,7 +112869,7 @@ const mergeShardReports = Workflow_exports.make({
112744
112869
  command: MergeShardReportsCommand,
112745
112870
  decision: MergedShardReports,
112746
112871
  error: Union([ShardReportGap, ShardReportOverlap]),
112747
- decide: (command) => value(completenessOf(command)).pipe(tag("ShardReportOverlap", (overlap) => fail$8(overlap)), tag("ShardReportGap", (gap) => fail$8(gap)), tag("ShardReportsComplete", () => succeed$10(MergedShardReports.make({ projects: mergedProjectsOf(command) }))), exhaustive)
112872
+ decide: (command) => value(completenessOf(command)).pipe(tag("ShardReportOverlap", (overlap) => fail$9(overlap)), tag("ShardReportGap", (gap) => fail$9(gap)), tag("ShardReportsComplete", () => succeed$10(MergedShardReports.make({ projects: mergedProjectsOf(command) }))), exhaustive)
112748
112873
  });
112749
112874
  //#endregion
112750
112875
  //#region src/shard/shard-merge.schema.ts
@@ -112772,6 +112897,19 @@ const rebuiltReportOf = (text) => flatMap$9(fromUndefinedOr(text), (present) =>
112772
112897
  onSuccess: (decision) => map$13(liftPredicate(decision, is$2(ReportFromStreamRebuilt)), (rebuilt) => rebuilt.report)
112773
112898
  }));
112774
112899
  const resultOfReport = (text) => reportFromStream(ReportFromStreamCommand.make({ text }));
112900
+ const decodeVerdictLine = decodeOption(fromJsonString(RunEvent_exports.VerdictReached));
112901
+ const budgetOfStream = (text) => map$13(last$1(match$8(fromUndefinedOr(text), {
112902
+ onNone: () => [],
112903
+ onSome: (present) => present.split("\n").flatMap((line) => toArray(decodeVerdictLine(line.trim())))
112904
+ })), (verdict) => verdict.budget);
112905
+ const shardBudgetOf = (budgets) => map$13(all$4(budgets), (present) => ({
112906
+ predictedSeconds: reduce$2(present, 0, (total, budget) => total + budget.predictedSeconds),
112907
+ actualSeconds: reduce$2(present, 0, (total, budget) => total + budget.actualSeconds)
112908
+ }));
112909
+ const mergedBudgetOf = (plan, shardBudgets) => map$13(all$4(shardBudgets), (present) => ({
112910
+ predictedSeconds: reduce$2(plan.shards, 0, (slowest, shard) => Math.max(slowest, shard.predictedSeconds)),
112911
+ actualSeconds: reduce$2(present, 0, (slowest, budget) => Math.max(slowest, budget.actualSeconds))
112912
+ }));
112775
112913
  const incrementalTextsOf = (dir) => gen(function* () {
112776
112914
  const candidates = [...yield* (yield* FileSystem).readDirectory(dir).pipe(orElseSucceed(() => []))].filter((name) => INCREMENTAL_PART_NAME.test(name)).sort();
112777
112915
  return (yield* forEach$1(candidates, (name) => readText(`${dir}/${name}`), { concurrency: 1 })).filter((text) => text !== void 0);
@@ -112796,11 +112934,15 @@ const mergeFiles = (reports) => reduce$2(reports.flatMap(({ project, report }) =
112796
112934
  const headReportOf = (reports) => head(reports);
112797
112935
  const schemaVersionOf = (reports) => getOrElse$1(map$13(headReportOf(reports), (first) => first.report.schemaVersion), () => DEFAULT_SCHEMA_VERSION);
112798
112936
  const thresholdsOf = (reports) => getOrElse$1(map$13(headReportOf(reports), (first) => first.report.thresholds), () => DEFAULT_THRESHOLDS);
112799
- const mergedReportOf = (reports) => ({
112937
+ const mergedReportOf = (reports, budget) => ({
112800
112938
  files: mergeFiles(reports),
112801
112939
  schemaVersion: schemaVersionOf(reports),
112802
112940
  thresholds: thresholdsOf(reports),
112803
- config: {}
112941
+ config: {},
112942
+ ...match$8(budget, {
112943
+ onNone: () => ({}),
112944
+ onSome: (present) => ({ budget: present })
112945
+ })
112804
112946
  });
112805
112947
  const mutantsOfReport = (report) => Object.values(report.files).flatMap((file) => file.mutants);
112806
112948
  const verdictsOf = (report) => mutantsOfReport(report).map((mutant) => ({
@@ -112821,7 +112963,8 @@ const reportedOf = (shard, project, report) => match$8(report, {
112821
112963
  });
112822
112964
  const collectProject = (input, path, dir, shard, project) => gen(function* () {
112823
112965
  const projectDir = path.join(path.resolve(input.basePath, dir), project.project);
112824
- const report = rebuiltReportOf(yield* readText(path.join(projectDir, STREAM_FILE$1)));
112966
+ const stream = yield* readText(path.join(projectDir, STREAM_FILE$1));
112967
+ const report = rebuiltReportOf(stream);
112825
112968
  const incrementalTexts = yield* incrementalTextsOf(projectDir);
112826
112969
  return {
112827
112970
  reported: reportedOf(shard, project.project, report),
@@ -112832,13 +112975,15 @@ const collectProject = (input, path, dir, shard, project) => gen(function* () {
112832
112975
  incremental: {
112833
112976
  project: project.project,
112834
112977
  texts: incrementalTexts
112835
- }
112978
+ },
112979
+ budget: budgetOfStream(stream)
112836
112980
  };
112837
112981
  });
112838
112982
  const collectShardReports = (input, path, dir, shard) => forEach$1(shard.projects, (project) => collectProject(input, path, dir, shard.index, project), { concurrency: 1 }).pipe(map$7((parts) => ({
112839
112983
  reports: parts.map((part) => part.reported),
112840
112984
  projectReports: getSomes(parts.map((part) => part.projectReport)),
112841
- incrementals: parts.map((part) => part.incremental)
112985
+ incrementals: parts.map((part) => part.incremental),
112986
+ shardBudgets: [shardBudgetOf(parts.map((part) => part.budget))]
112842
112987
  })));
112843
112988
  const collectProjectReports = (input, path) => forEach$1(input.shardDirs.map((dir, index) => ({
112844
112989
  dir,
@@ -112849,7 +112994,8 @@ const collectProjectReports = (input, path) => forEach$1(input.shardDirs.map((di
112849
112994
  }), { concurrency: 1 }).pipe(map$7((parts) => ({
112850
112995
  reports: parts.flatMap((part) => part.reports),
112851
112996
  projectReports: parts.flatMap((part) => part.projectReports),
112852
- incrementals: parts.flatMap((part) => part.incrementals)
112997
+ incrementals: parts.flatMap((part) => part.incrementals),
112998
+ shardBudgets: parts.flatMap((part) => part.shardBudgets)
112853
112999
  })));
112854
113000
  const shardsOf = (input) => input.plan.shards.map((shard) => ({
112855
113001
  index: shard.index,
@@ -112880,7 +113026,7 @@ const mergeShards = (input) => gen(function* () {
112880
113026
  })));
112881
113027
  const outDir = outputDirOf(input, path);
112882
113028
  yield* fs.makeDirectory(outDir, { recursive: true });
112883
- const json = yield* orDie(encodeEffect(fromJsonString(Unknown, { space: 2 }))(mergedReportOf(collected.projectReports)));
113029
+ const json = yield* orDie(encodeEffect(fromJsonString(Unknown, { space: 2 }))(mergedReportOf(collected.projectReports, mergedBudgetOf(input.plan, collected.shardBudgets))));
112884
113030
  yield* writeFileAtomic({
112885
113031
  fs,
112886
113032
  path