@systemfsoftware/stryker-js 16.0.1 → 17.0.1

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.1";
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
  }));
@@ -107908,7 +108033,7 @@ const explainFileSkip = Workflow_exports.make({
107908
108033
  decide: (command) => value(skipKnownOrUnknownOf(explainedOf(command))).pipe(tag("SkipKnownExplained", (known) => succeed$10(known)), tag("SkipUnknownExplained", (unknown) => succeed$10(unknown)), exhaustive)
107909
108034
  });
107910
108035
  //#endregion
107911
- //#region src/run/instrument.cell.ts
108036
+ //#region src/run/instrument.ts
107912
108037
  const reportSkippedFiles = fn(SpanTaxonomy_exports.Spans.instrumentReportSkips.name)(function* (input) {
107913
108038
  const files = input.skipped.map((skip) => match$6(explainFileSkip(ExplainFileSkipCommand.make({
107914
108039
  extension: skip.extension,
@@ -107930,13 +108055,6 @@ const offerSkipsIfAny = fn(SpanTaxonomy_exports.Spans.instrumentOfferSkips.name)
107930
108055
  onFalse: () => reportSkippedFiles(input)
107931
108056
  });
107932
108057
  });
107933
- const sandboxDirectoriesOf = (input) => getOrElse$1(map$13(filter$7(some$1(input), () => input.command.options.inPlace), (inPlace) => ({
107934
- workingDirectory: inPlace.basePath,
107935
- backupDirectory: inPlace.command.temporaryDirectoryPath
107936
- })), () => ({
107937
- workingDirectory: input.command.temporaryDirectoryPath,
107938
- backupDirectory: ""
107939
- }));
107940
108058
  const mergeInstrumentedFile = (input) => {
107941
108059
  const files = fromIterable$7(input.project.files);
107942
108060
  set$4(files, input.file.name, input.file);
@@ -107951,20 +108069,6 @@ const mergeInstrumentedFile = (input) => {
107951
108069
  filesToMutate
107952
108070
  };
107953
108071
  };
107954
- const enteringInstrumentPhase = (raw, body) => withPhaseSpan(SpanTaxonomy_exports.Spans.instrumentPhase, { fileCount: raw.filesToMutate.length }, () => andThen$1(phaseEntered("instrument"), body));
107955
- const writeInstrument = (raw) => enteringInstrumentPhase(raw, as(offerSkipsIfAny({
107956
- skipped: raw.instrumentResult.skipped,
107957
- claimants: raw.prev.frameworkClaimants
107958
- }), {
107959
- ...raw.prev,
107960
- project: raw.instrumentedProject,
107961
- mutants: raw.instrumentResult.mutants,
107962
- sandbox: raw.sandbox,
107963
- concurrency: {
107964
- testRunners: raw.concurrency.testRunners,
107965
- checkers: raw.concurrency.checkers
107966
- }
107967
- }));
107968
108072
  const withInstrumentedFiles = (project, instrumented) => reduce$2([...instrumented], project, (current, { name, content }) => getOrElse$1(map$13(get$9(current.files, name), (existing) => mergeInstrumentedFile({
107969
108073
  project: current,
107970
108074
  file: {
@@ -107972,9 +108076,7 @@ const withInstrumentedFiles = (project, instrumented) => reduce$2([...instrument
107972
108076
  content
107973
108077
  }
107974
108078
  })), () => current));
107975
- const readInstrument = fn(SpanTaxonomy_exports.Spans.instrumentGather.name)(function* (command) {
107976
- yield* Scope;
107977
- const env = yield* RunEnvironment;
108079
+ const instrumentFiles = fnUntraced(function* (command) {
107978
108080
  const files = yield* ProjectFiles;
107979
108081
  const filesToMutate = yield* map$7(files.readAll(values$2(command.project.filesToMutate)), (readFiles) => readFiles.map(([file, content]) => ({
107980
108082
  content,
@@ -107996,7 +108098,39 @@ const readInstrument = fn(SpanTaxonomy_exports.Spans.instrumentGather.name)(func
107996
108098
  reason: "Instrumenter failed",
107997
108099
  cause
107998
108100
  })));
107999
- const instrumentedProject = withInstrumentedFiles(command.project, instrumentResult.files);
108101
+ return {
108102
+ filesToMutate,
108103
+ instrumentResult,
108104
+ instrumentedProject: withInstrumentedFiles(command.project, instrumentResult.files)
108105
+ };
108106
+ });
108107
+ const enteringInstrumentPhase = dual(2, (fileCount, body) => withPhaseSpan(SpanTaxonomy_exports.Spans.instrumentPhase, { fileCount }, () => andThen$1(phaseEntered("instrument"), body)));
108108
+ //#endregion
108109
+ //#region src/run/instrument.cell.ts
108110
+ const sandboxDirectoriesOf = (input) => getOrElse$1(map$13(filter$7(some$1(input), () => input.command.options.inPlace), (inPlace) => ({
108111
+ workingDirectory: inPlace.basePath,
108112
+ backupDirectory: inPlace.command.temporaryDirectoryPath
108113
+ })), () => ({
108114
+ workingDirectory: input.command.temporaryDirectoryPath,
108115
+ backupDirectory: ""
108116
+ }));
108117
+ const writeInstrument = (raw) => enteringInstrumentPhase(raw.filesToMutate.length, as(offerSkipsIfAny({
108118
+ skipped: raw.instrumentResult.skipped,
108119
+ claimants: raw.prev.frameworkClaimants
108120
+ }), {
108121
+ ...raw.prev,
108122
+ project: raw.instrumentedProject,
108123
+ mutants: raw.instrumentResult.mutants,
108124
+ sandbox: raw.sandbox,
108125
+ concurrency: {
108126
+ testRunners: raw.concurrency.testRunners,
108127
+ checkers: raw.concurrency.checkers
108128
+ }
108129
+ }));
108130
+ const readInstrument = fn(SpanTaxonomy_exports.Spans.instrumentGather.name)(function* (command) {
108131
+ yield* Scope;
108132
+ const env = yield* RunEnvironment;
108133
+ const { filesToMutate, instrumentResult, instrumentedProject } = yield* instrumentFiles(command);
108000
108134
  const directories = sandboxDirectoriesOf({
108001
108135
  command,
108002
108136
  basePath: env.basePath
@@ -108103,7 +108237,7 @@ const decide$10 = (command) => value({
108103
108237
  dryRunOnly: command.dryRunOnly,
108104
108238
  isZero: command.isZero,
108105
108239
  allowEmpty: command.allowEmpty
108106
- }).pipe(when({ invalid: true }, () => fail$8(MutationTestError.make({
108240
+ }).pipe(when({ invalid: true }, () => fail$9(MutationTestError.make({
108107
108241
  stage: "mutationTest",
108108
108242
  reason: "Invalid test count"
108109
108243
  }))), when({ dryRunOnly: true }, () => succeed$10(MutationTestDryRunOnly.make({}))), when({
@@ -108176,7 +108310,7 @@ const skippedRequested = (command, acknowledged) => liftPredicate(isReadonlyArra
108176
108310
  const contractBreach = (command, requested, submitted) => firstSomeOf([answeredUnrequested(command, submitted, requested), skippedRequested(command, acknowledgedIds(submitted, requested))]);
108177
108311
  const admit = (command, requested, submitted, decision) => match$8(contractBreach(command, requested, submitted), {
108178
108312
  onNone: () => succeed$10(decision),
108179
- onSome: (breach) => fail$8(breach)
108313
+ onSome: (breach) => fail$9(breach)
108180
108314
  });
108181
108315
  const idGroupsOf = (command) => getOrElse$1(() => [])(fromUndefinedOr(command.idGroups));
108182
108316
  const answersOf = (command) => getOrElse$1(() => ({}))(fromUndefinedOr(command.answers));
@@ -108285,7 +108419,7 @@ const lookupOf = (partitioned) => ({
108285
108419
  wireById: new Map(partitioned.wire.map((mutant) => [mutant.id, mutant])),
108286
108420
  undescribableById: new Map(partitioned.undescribable.map((mutant) => [mutant.id, mutant]))
108287
108421
  });
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)));
108422
+ 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
108423
  const selectedFromLookup = (plans, lookup) => {
108290
108424
  const [wire, undescribable] = separate(map$10(plans, (plan) => wireOrFallbackOf(plan.mutant, lookup)));
108291
108425
  return {
@@ -108979,7 +109113,7 @@ const closureAnalysisOf = (input) => option$1(analyzeImportClosure({
108979
109113
  rootDir: input.basePath,
108980
109114
  projectFiles: dedupe([...keys$2(input.project.files), ...input.project.testFiles]),
108981
109115
  testFiles: [...input.project.testFiles],
108982
- globalInputs: input.globalTestInputs.map((file) => originalFileFor(input.sandbox, file))
109116
+ globalInputs: input.globalTestInputs.map((file) => input.originalFileOf(file))
108983
109117
  }).pipe(tapCause((cause) => logWarning(`Import closure analysis failed; refusing to reuse prior verdicts: ${pretty(cause)}`))));
108984
109118
  const closureDigestsOf = (input) => map$7(closureAnalysisOf(input), (analysis) => match$8(analysis, {
108985
109119
  onNone: () => ({
@@ -109004,7 +109138,7 @@ const readIncrementalReuseCommand = fn(SpanTaxonomy_exports.Spans.incrementalReu
109004
109138
  previousRecords: [...previousRecords],
109005
109139
  closureDigestsByMutantId: closures.digests,
109006
109140
  closureAnalysisFailed: closures.failed,
109007
- verdictSemanticsVersion: 3,
109141
+ verdictSemanticsVersion: 4,
109008
109142
  mutantSetPolicy: input.options.mutator.mutantSetPolicy,
109009
109143
  runInputsDigest,
109010
109144
  force: input.force,
@@ -109548,7 +109682,7 @@ const toRunPlan = (mutant, command, netTime, testFilter, isStatic, coveredBy) =>
109548
109682
  ...staticField(isStatic),
109549
109683
  ...coveredByField(coveredBy)
109550
109684
  })),
109551
- onFalse: () => fail$8(MutantTimeoutNotFinite.make({ mutantId: mutant.id }))
109685
+ onFalse: () => fail$9(MutantTimeoutNotFinite.make({ mutantId: mutant.id }))
109552
109686
  });
109553
109687
  };
109554
109688
  const toEarlyResultPlan = (mutant, isStatic, status, statusReason, coveredBy) => PlannedEarlyResultMutant.make({
@@ -109633,7 +109767,7 @@ const missingHitCountIds = (command) => openMutantsOf(command.mutants).flatMap((
109633
109767
  const plannedMutantsOf = (command) => command.mutants.reduce((planned, mutant) => flatMap$8(planned, (soFar) => map$12(decidePlanForMutant(mutant, command), (next) => [...soFar, next])), succeed$10([]));
109634
109768
  const decide$5 = (command) => match$8(fromUndefinedOr(missingHitCountIds(command)[0]), {
109635
109769
  onNone: () => plannedMutantsOf(command),
109636
- onSome: (first) => fail$8(CoveredMutantHitCountMissing.make({ missingIds: [first, ...missingHitCountIds(command).slice(1)] }))
109770
+ onSome: (first) => fail$9(CoveredMutantHitCountMissing.make({ missingIds: [first, ...missingHitCountIds(command).slice(1)] }))
109637
109771
  });
109638
109772
  const planMutantTests = Workflow_exports.make({
109639
109773
  command: MutantTestPlanCommand,
@@ -110026,7 +110160,7 @@ const proceedPipeline = fnUntraced(function* (raw) {
110026
110160
  force: prev.options.force,
110027
110161
  options: prev.options,
110028
110162
  globalTestInputs: prev.dryRunResult.globalTestInputs ?? [],
110029
- sandbox: prev.sandbox
110163
+ originalFileOf: (file) => originalFileFor(prev.sandbox, file)
110030
110164
  });
110031
110165
  const rememberedResults = reuse.rememberedResults;
110032
110166
  yield* offer(progressQueue, RunEvent_exports.ReuseReported.make({
@@ -110181,6 +110315,156 @@ const mutationTestCell$1 = Sandwich_exports.named(SpanTaxonomy_exports.Spans.mut
110181
110315
  }))
110182
110316
  });
110183
110317
  //#endregion
110318
+ //#region src/reporter-wiring.service.ts
110319
+ const spawnPluginReporterFactory = fn(SpanTaxonomy_exports.Spans.reporterWiringSpawnPluginReporterFactory.name)(function* (name, loaded, projectBasePath, options) {
110320
+ const entry = yield* mapError$3(fromResult(resolveConfiguredPlugin(WorkerSpawnCommand.make({
110321
+ sources: loaded.pluginSources,
110322
+ kind: "Reporter",
110323
+ configured: ConfiguredPluginName.make({ name })
110324
+ }))), (missing) => StageError.make({
110325
+ stage: "prepare",
110326
+ reason: missing.reason,
110327
+ cause: PluginNotFoundError.make({ descriptor: missing.descriptor })
110328
+ }));
110329
+ const client = yield* spawnReporterWorker({
110330
+ entrypoint: entry.entrypoint,
110331
+ projectBasePath,
110332
+ execArgv: [],
110333
+ options,
110334
+ tempDirPrefix: "stryker-reporter-"
110335
+ }).pipe(mapError$3((cause) => StageError.make({
110336
+ stage: "prepare",
110337
+ reason: `Failed to start the reporter worker "${name}"`,
110338
+ cause
110339
+ })));
110340
+ return reporterWorkerFactory(client);
110341
+ });
110342
+ const selectReporterChoices = (names, choicesByName) => map$10(reduce$2(names, empty$15(), (chosen, name) => match$8(get$4(choicesByName, name.toLowerCase()), {
110343
+ onNone: () => chosen,
110344
+ onSome: (choice) => match$8(findFirst(chosen, ([key]) => key === name.toLowerCase()), {
110345
+ onNone: () => [...chosen, [name.toLowerCase(), choice]],
110346
+ onSome: () => chosen
110347
+ })
110348
+ })), ([, choice]) => choice);
110349
+ const reporterInputsOf = dual(5, (names, choicesByName, loaded, projectBasePath, options) => forEach$1(selectReporterChoices(names, choicesByName), (choice) => match$8(choice.builtinFactory, {
110350
+ onSome: (builtin) => succeed$5({
110351
+ name: choice.name,
110352
+ factory: builtin
110353
+ }),
110354
+ onNone: () => map$7(spawnPluginReporterFactory(choice.name, loaded, projectBasePath, options), (factory) => ({
110355
+ name: choice.name,
110356
+ factory
110357
+ }))
110358
+ }), { concurrency: 1 }));
110359
+ //#endregion
110360
+ //#region src/keep-temp-dir.workflow.ts
110361
+ const KeepTempDirTypeId = Symbol.for("@systemfsoftware/stryker-js/KeepTempDir");
110362
+ const CleanTempDirOption = Literals$3([
110363
+ "always",
110364
+ false,
110365
+ true
110366
+ ]);
110367
+ var TempDirKept = class extends TaggedClass()("TempDirKept", {}) {
110368
+ [KeepTempDirTypeId] = KeepTempDirTypeId;
110369
+ };
110370
+ var TempDirRemoved = class extends TaggedClass()("TempDirRemoved", {}) {
110371
+ [KeepTempDirTypeId] = KeepTempDirTypeId;
110372
+ };
110373
+ var KeepTempDirCommand = class extends TaggedClass()("KeepTempDirCommand", {
110374
+ cleanTempDir: CleanTempDirOption,
110375
+ failed: Boolean$6
110376
+ }) {
110377
+ static [Workflow_exports.InstrumentationBrand] = {};
110378
+ };
110379
+ const keptIff = (kept) => value(kept).pipe(when(true, () => TempDirKept.make({})), when(false, () => TempDirRemoved.make({})), exhaustive);
110380
+ const decide$2 = (command) => value(command.cleanTempDir).pipe(when(false, () => TempDirKept.make({})), when(true, () => keptIff(command.failed)), when("always", () => TempDirRemoved.make({})), exhaustive, succeed$10);
110381
+ const keepTempDir = Workflow_exports.make({
110382
+ command: KeepTempDirCommand,
110383
+ decision: Union([TempDirKept, TempDirRemoved]),
110384
+ error: Never,
110385
+ decide: decide$2
110386
+ });
110387
+ //#endregion
110388
+ //#region src/Sandbox.service.ts
110389
+ const removesTempDir = (exit, cleanTempDir) => match$6(keepTempDir(KeepTempDirCommand.make({
110390
+ cleanTempDir,
110391
+ failed: isFailure(exit)
110392
+ })), {
110393
+ onFailure: () => false,
110394
+ onSuccess: (decision) => value(decision).pipe(tag("TempDirRemoved", () => true), tag("TempDirKept", () => false), exhaustive)
110395
+ });
110396
+ const removeEmptyParentDirectory = fn(SpanTaxonomy_exports.Spans.sandboxRemoveEmptyParent.name)(function* (parent, fs) {
110397
+ const siblings = yield* fs.readDirectory(parent);
110398
+ yield* match$1(siblings.length === 0, {
110399
+ onTrue: () => fs.remove(parent, {
110400
+ recursive: true,
110401
+ force: true
110402
+ }),
110403
+ onFalse: () => void_$1
110404
+ });
110405
+ });
110406
+ const removeTempDirectory = fn(SpanTaxonomy_exports.Spans.sandboxRemoveTempDir.name)(function* (tmp, parent, fs) {
110407
+ yield* logDebug(`Deleting stryker temp directory ${tmp}`);
110408
+ yield* fs.remove(tmp, {
110409
+ recursive: true,
110410
+ force: true
110411
+ });
110412
+ const parentExists = yield* fs.exists(parent);
110413
+ yield* match$1(parentExists, {
110414
+ onTrue: () => removeEmptyParentDirectory(parent, fs),
110415
+ onFalse: () => void_$1
110416
+ });
110417
+ });
110418
+ const makeTemporaryDirectory = fn(SpanTaxonomy_exports.Spans.sandboxMakeTempDir.name)(function* (options) {
110419
+ const fs = yield* FileSystem;
110420
+ const parent = (yield* Path$1).resolve(options.tempDirName);
110421
+ yield* fs.makeDirectory(parent, { recursive: true });
110422
+ const prefix = match$1(options.inPlace, {
110423
+ onTrue: () => "backup-",
110424
+ onFalse: () => "sandbox-"
110425
+ });
110426
+ const tmp = yield* fs.makeTempDirectory({
110427
+ directory: parent,
110428
+ prefix
110429
+ });
110430
+ yield* logDebug(`Using temp directory "${tmp}"`);
110431
+ yield* addFinalizer((exit) => match$1(removesTempDir(exit, options.cleanTempDir), {
110432
+ onTrue: () => removeTempDirectory(tmp, parent, fs),
110433
+ onFalse: () => logDebug(`Keeping stryker temp directory ${tmp}`)
110434
+ }).pipe(orDie));
110435
+ return { path: tmp };
110436
+ });
110437
+ var TemporaryDirectory = class TemporaryDirectory extends Service$1()("@systemfsoftware/stryker-js/Sandbox.service/TemporaryDirectory") {
110438
+ static layer(options) {
110439
+ return effect(TemporaryDirectory, makeTemporaryDirectory(options));
110440
+ }
110441
+ };
110442
+ //#endregion
110443
+ //#region src/run/plan-prepare.workflow.ts
110444
+ const PrepareDecisionTypeId = Symbol.for("@systemfsoftware/stryker-js/PrepareDecision");
110445
+ var PrepareDecoded = class extends Class("PrepareDecoded")({
110446
+ mode: Literals$3(["human", "machine"]),
110447
+ reporters: ArraySchema(String$7),
110448
+ fileCount: Finite$3
110449
+ }) {
110450
+ static [Workflow_exports.InstrumentationBrand] = {
110451
+ mode: "stryker.prepare.mode",
110452
+ fileCount: "stryker.prepare.file_count"
110453
+ };
110454
+ };
110455
+ var HumanReporters$1 = class extends TaggedClass()("HumanReporters", { reporters: ArraySchema(String$7) }) {
110456
+ [PrepareDecisionTypeId] = PrepareDecisionTypeId;
110457
+ };
110458
+ var MachineReporters$1 = class extends TaggedClass()("MachineReporters", { reporters: ArraySchema(String$7) }) {
110459
+ [PrepareDecisionTypeId] = PrepareDecisionTypeId;
110460
+ };
110461
+ const planPrepare = Workflow_exports.make({
110462
+ command: PrepareDecoded,
110463
+ decision: Union([HumanReporters$1, MachineReporters$1]),
110464
+ error: Never,
110465
+ decide: (decoded) => value(decoded.mode).pipe(when("human", () => succeed$10(HumanReporters$1.make({ reporters: decoded.reporters }))), when("machine", () => succeed$10(MachineReporters$1.make({ reporters: decoded.reporters }))), exhaustive)
110466
+ });
110467
+ //#endregion
110184
110468
  //#region src/plan-mutator-catalogs.workflow.ts
110185
110469
  const STOCK_NAMESPACE = "stryker";
110186
110470
  const CatalogEntrySchema = Struct({
@@ -110275,7 +110559,7 @@ const catalogsOf = (command) => [command.stock, ...command.providers.map((provid
110275
110559
  }))];
110276
110560
  const planCatalogs = (command) => match$8(refusalOf(command), {
110277
110561
  onNone: () => succeed$10(MutatorCatalogsPlanned.make({ catalogs: [...catalogsOf(command)] })),
110278
- onSome: (refused) => fail$8(refused)
110562
+ onSome: (refused) => fail$9(refused)
110279
110563
  });
110280
110564
  const planMutatorCatalogs = Workflow_exports.make({
110281
110565
  command: PlanMutatorCatalogsCommand,
@@ -110321,19 +110605,19 @@ const reasonFor = (index, name) => match$1(index.declared.includes(name), {
110321
110605
  });
110322
110606
  const excludedRefusalOf = (index, command) => match$8(refusedNameIn(index.declared, command.excludedMutations), {
110323
110607
  onNone: () => succeed$10(void 0),
110324
- onSome: (name) => fail$8(MutatorSelectionRefused.make({
110608
+ onSome: (name) => fail$9(MutatorSelectionRefused.make({
110325
110609
  reason: "UnknownName",
110326
110610
  name
110327
110611
  }))
110328
110612
  });
110329
110613
  const optInRefusalOf = (index, command) => match$8(refusedNameIn(index.optIn, command.optInMutations), {
110330
110614
  onNone: () => succeed$10(void 0),
110331
- onSome: (name) => fail$8(MutatorSelectionRefused.make({
110615
+ onSome: (name) => fail$9(MutatorSelectionRefused.make({
110332
110616
  reason: reasonFor(index, name),
110333
110617
  name
110334
110618
  }))
110335
110619
  });
110336
- const decide$2 = (command) => {
110620
+ const decide$1 = (command) => {
110337
110621
  const index = indexOf(command.catalogs);
110338
110622
  return map$12(flatMap$8(excludedRefusalOf(index, command), () => optInRefusalOf(index, command)), () => MutatorSelectionDecoded.make({
110339
110623
  excludedMutations: [...command.excludedMutations],
@@ -110344,7 +110628,7 @@ const decodeMutatorSelection = Workflow_exports.make({
110344
110628
  command: DecodeMutatorSelectionCommand,
110345
110629
  decision: MutatorSelectionDecoded,
110346
110630
  error: MutatorSelectionRefused,
110347
- decide: decide$2
110631
+ decide: decide$1
110348
110632
  });
110349
110633
  //#endregion
110350
110634
  //#region src/framework-claimant.service.ts
@@ -110817,131 +111101,6 @@ const pluginUrlsFromOptions = (options) => [
110817
111101
  ...options.checkers.map((checker) => checker.plugin)
110818
111102
  ];
110819
111103
  //#endregion
110820
- //#region src/reporter-wiring.service.ts
110821
- const spawnPluginReporterFactory = fn(SpanTaxonomy_exports.Spans.reporterWiringSpawnPluginReporterFactory.name)(function* (name, loaded, projectBasePath, options) {
110822
- const entry = yield* mapError$3(fromResult(resolveConfiguredPlugin(WorkerSpawnCommand.make({
110823
- sources: loaded.pluginSources,
110824
- kind: "Reporter",
110825
- configured: ConfiguredPluginName.make({ name })
110826
- }))), (missing) => StageError.make({
110827
- stage: "prepare",
110828
- reason: missing.reason,
110829
- cause: PluginNotFoundError.make({ descriptor: missing.descriptor })
110830
- }));
110831
- const client = yield* spawnReporterWorker({
110832
- entrypoint: entry.entrypoint,
110833
- projectBasePath,
110834
- execArgv: [],
110835
- options,
110836
- tempDirPrefix: "stryker-reporter-"
110837
- }).pipe(mapError$3((cause) => StageError.make({
110838
- stage: "prepare",
110839
- reason: `Failed to start the reporter worker "${name}"`,
110840
- cause
110841
- })));
110842
- return reporterWorkerFactory(client);
110843
- });
110844
- const selectReporterChoices = (names, choicesByName) => map$10(reduce$2(names, empty$15(), (chosen, name) => match$8(get$4(choicesByName, name.toLowerCase()), {
110845
- onNone: () => chosen,
110846
- onSome: (choice) => match$8(findFirst(chosen, ([key]) => key === name.toLowerCase()), {
110847
- onNone: () => [...chosen, [name.toLowerCase(), choice]],
110848
- onSome: () => chosen
110849
- })
110850
- })), ([, choice]) => choice);
110851
- const reporterInputsOf = dual(5, (names, choicesByName, loaded, projectBasePath, options) => forEach$1(selectReporterChoices(names, choicesByName), (choice) => match$8(choice.builtinFactory, {
110852
- onSome: (builtin) => succeed$5({
110853
- name: choice.name,
110854
- factory: builtin
110855
- }),
110856
- onNone: () => map$7(spawnPluginReporterFactory(choice.name, loaded, projectBasePath, options), (factory) => ({
110857
- name: choice.name,
110858
- factory
110859
- }))
110860
- }), { concurrency: 1 }));
110861
- //#endregion
110862
- //#region src/keep-temp-dir.workflow.ts
110863
- const KeepTempDirTypeId = Symbol.for("@systemfsoftware/stryker-js/KeepTempDir");
110864
- const CleanTempDirOption = Literals$3([
110865
- "always",
110866
- false,
110867
- true
110868
- ]);
110869
- var TempDirKept = class extends TaggedClass()("TempDirKept", {}) {
110870
- [KeepTempDirTypeId] = KeepTempDirTypeId;
110871
- };
110872
- var TempDirRemoved = class extends TaggedClass()("TempDirRemoved", {}) {
110873
- [KeepTempDirTypeId] = KeepTempDirTypeId;
110874
- };
110875
- var KeepTempDirCommand = class extends TaggedClass()("KeepTempDirCommand", {
110876
- cleanTempDir: CleanTempDirOption,
110877
- failed: Boolean$6
110878
- }) {
110879
- static [Workflow_exports.InstrumentationBrand] = {};
110880
- };
110881
- const keptIff = (kept) => value(kept).pipe(when(true, () => TempDirKept.make({})), when(false, () => TempDirRemoved.make({})), exhaustive);
110882
- const decide$1 = (command) => value(command.cleanTempDir).pipe(when(false, () => TempDirKept.make({})), when(true, () => keptIff(command.failed)), when("always", () => TempDirRemoved.make({})), exhaustive, succeed$10);
110883
- const keepTempDir = Workflow_exports.make({
110884
- command: KeepTempDirCommand,
110885
- decision: Union([TempDirKept, TempDirRemoved]),
110886
- error: Never,
110887
- decide: decide$1
110888
- });
110889
- //#endregion
110890
- //#region src/Sandbox.service.ts
110891
- const removesTempDir = (exit, cleanTempDir) => match$6(keepTempDir(KeepTempDirCommand.make({
110892
- cleanTempDir,
110893
- failed: isFailure(exit)
110894
- })), {
110895
- onFailure: () => false,
110896
- onSuccess: (decision) => value(decision).pipe(tag("TempDirRemoved", () => true), tag("TempDirKept", () => false), exhaustive)
110897
- });
110898
- const removeEmptyParentDirectory = fn(SpanTaxonomy_exports.Spans.sandboxRemoveEmptyParent.name)(function* (parent, fs) {
110899
- const siblings = yield* fs.readDirectory(parent);
110900
- yield* match$1(siblings.length === 0, {
110901
- onTrue: () => fs.remove(parent, {
110902
- recursive: true,
110903
- force: true
110904
- }),
110905
- onFalse: () => void_$1
110906
- });
110907
- });
110908
- const removeTempDirectory = fn(SpanTaxonomy_exports.Spans.sandboxRemoveTempDir.name)(function* (tmp, parent, fs) {
110909
- yield* logDebug(`Deleting stryker temp directory ${tmp}`);
110910
- yield* fs.remove(tmp, {
110911
- recursive: true,
110912
- force: true
110913
- });
110914
- const parentExists = yield* fs.exists(parent);
110915
- yield* match$1(parentExists, {
110916
- onTrue: () => removeEmptyParentDirectory(parent, fs),
110917
- onFalse: () => void_$1
110918
- });
110919
- });
110920
- const makeTemporaryDirectory = fn(SpanTaxonomy_exports.Spans.sandboxMakeTempDir.name)(function* (options) {
110921
- const fs = yield* FileSystem;
110922
- const parent = (yield* Path$1).resolve(options.tempDirName);
110923
- yield* fs.makeDirectory(parent, { recursive: true });
110924
- const prefix = match$1(options.inPlace, {
110925
- onTrue: () => "backup-",
110926
- onFalse: () => "sandbox-"
110927
- });
110928
- const tmp = yield* fs.makeTempDirectory({
110929
- directory: parent,
110930
- prefix
110931
- });
110932
- yield* logDebug(`Using temp directory "${tmp}"`);
110933
- yield* addFinalizer((exit) => match$1(removesTempDir(exit, options.cleanTempDir), {
110934
- onTrue: () => removeTempDirectory(tmp, parent, fs),
110935
- onFalse: () => logDebug(`Keeping stryker temp directory ${tmp}`)
110936
- }).pipe(orDie));
110937
- return { path: tmp };
110938
- });
110939
- var TemporaryDirectory = class TemporaryDirectory extends Service$1()("@systemfsoftware/stryker-js/Sandbox.service/TemporaryDirectory") {
110940
- static layer(options) {
110941
- return effect(TemporaryDirectory, makeTemporaryDirectory(options));
110942
- }
110943
- };
110944
- //#endregion
110945
111104
  //#region src/run/admit-non-empty-project.workflow.ts
110946
111105
  const NonEmptyProjectTypeId = Symbol.for("@systemfsoftware/stryker-js/NonEmptyProjectDecision");
110947
111106
  var NonEmptyProjectCommand = class extends TaggedClass()("NonEmptyProjectCommand", { fileCount: Int$4 }) {
@@ -110964,31 +111123,6 @@ const admitNonEmptyProject = Workflow_exports.make({
110964
111123
  }))
110965
111124
  });
110966
111125
  //#endregion
110967
- //#region src/run/plan-prepare.workflow.ts
110968
- const PrepareDecisionTypeId = Symbol.for("@systemfsoftware/stryker-js/PrepareDecision");
110969
- var PrepareDecoded = class extends Class("PrepareDecoded")({
110970
- mode: Literals$3(["human", "machine"]),
110971
- reporters: ArraySchema(String$7),
110972
- fileCount: Finite$3
110973
- }) {
110974
- static [Workflow_exports.InstrumentationBrand] = {
110975
- mode: "stryker.prepare.mode",
110976
- fileCount: "stryker.prepare.file_count"
110977
- };
110978
- };
110979
- var HumanReporters$1 = class extends TaggedClass()("HumanReporters", { reporters: ArraySchema(String$7) }) {
110980
- [PrepareDecisionTypeId] = PrepareDecisionTypeId;
110981
- };
110982
- var MachineReporters$1 = class extends TaggedClass()("MachineReporters", { reporters: ArraySchema(String$7) }) {
110983
- [PrepareDecisionTypeId] = PrepareDecisionTypeId;
110984
- };
110985
- const planPrepare = Workflow_exports.make({
110986
- command: PrepareDecoded,
110987
- decision: Union([HumanReporters$1, MachineReporters$1]),
110988
- error: Never,
110989
- decide: (decoded) => value(decoded.mode).pipe(when("human", () => succeed$10(HumanReporters$1.make({ reporters: decoded.reporters }))), when("machine", () => succeed$10(MachineReporters$1.make({ reporters: decoded.reporters }))), exhaustive)
110990
- });
110991
- //#endregion
110992
111126
  //#region src/run/plan-reporters.workflow.ts
110993
111127
  const ReporterPlanTypeId = Symbol.for("@systemfsoftware/stryker-js/ReporterPlanDecision");
110994
111128
  const STREAM_REPORTER = StreamReporterSchema.literal;
@@ -111220,7 +111354,7 @@ const validateOptions = dual(2, (options, schema) => validateOptionsCell.run(Val
111220
111354
  schema
111221
111355
  })));
111222
111356
  //#endregion
111223
- //#region src/run/prepare.cell.ts
111357
+ //#region src/run/prepare.ts
111224
111358
  const announceSummary = fn(SpanTaxonomy_exports.Spans.prepareAnnounceSummary.name)(function* (input) {
111225
111359
  yield* value(input.env.resolvedMode.mode).pipe(when("human", () => match$1(input.env.allowConsoleColors, {
111226
111360
  onTrue: () => log(`${AnsiCode.fields.green.literal}${input.summary}${AnsiCode.fields.reset.literal}`),
@@ -111333,7 +111467,7 @@ const readPrepare = fn(SpanTaxonomy_exports.Spans.prepareGather.name)(function*
111333
111467
  frameworkClaimants
111334
111468
  };
111335
111469
  });
111336
- const applyPrepare = fn(SpanTaxonomy_exports.Spans.prepareApply.name)(function* (span, reporters, raw) {
111470
+ const admitPreparedProject = (raw) => gen(function* () {
111337
111471
  const mutateCount = pipe(raw.project.filesToMutate, size$3);
111338
111472
  yield* announceSummary({
111339
111473
  env: raw.env,
@@ -111346,7 +111480,7 @@ const applyPrepare = fn(SpanTaxonomy_exports.Spans.prepareApply.name)(function*
111346
111480
  })));
111347
111481
  const admission = admitNonEmptyProject(NonEmptyProjectCommand.make({ fileCount: pipe(raw.project.files, size$3) }));
111348
111482
  const emptyAdmission = filter$7(getSuccess(admission), is$2(ProjectEmpty));
111349
- const emptyProjectGuard = getOrElse$1(map$13(emptyAdmission, () => fail$8(StageError.make({
111483
+ const emptyProjectGuard = getOrElse$1(map$13(emptyAdmission, () => fail$9(StageError.make({
111350
111484
  stage: "prepare",
111351
111485
  reason: "No input files found.",
111352
111486
  cause: PrepareError.make({
@@ -111354,7 +111488,12 @@ const applyPrepare = fn(SpanTaxonomy_exports.Spans.prepareApply.name)(function*
111354
111488
  reason: "No input files found."
111355
111489
  })
111356
111490
  }))), () => succeed$10(void 0));
111357
- yield* fromResult(emptyProjectGuard);
111491
+ return yield* fromResult(emptyProjectGuard);
111492
+ });
111493
+ //#endregion
111494
+ //#region src/run/prepare.cell.ts
111495
+ const applyPrepare = fn(SpanTaxonomy_exports.Spans.prepareApply.name)(function* (span, reporters, raw) {
111496
+ yield* admitPreparedProject(raw);
111358
111497
  const temporaryDirectoryPath = yield* map$7(build(TemporaryDirectory.layer(raw.options)), (temporaryDirectory) => get$13(temporaryDirectory, TemporaryDirectory).path).pipe(mapError$3((cause) => StageError.make({
111359
111498
  stage: "prepare",
111360
111499
  reason: "Failed to create temporary directory",
@@ -111671,11 +111810,78 @@ const planShards = Workflow_exports.make({
111671
111810
  decide: (command) => succeed$10(shardsOf$1(command))
111672
111811
  });
111673
111812
  //#endregion
111813
+ //#region src/run/plan-instrument.cell.ts
111814
+ const readPlanInstrument = fn(SpanTaxonomy_exports.Spans.instrumentGather.name)(function* (command) {
111815
+ const { filesToMutate, instrumentResult, instrumentedProject } = yield* instrumentFiles(command);
111816
+ return {
111817
+ _tag: "InstrumentCommand",
111818
+ fileCount: filesToMutate.length,
111819
+ inPlace: command.options.inPlace,
111820
+ pluginCount: command.loadedPlugins.pluginModulePaths.length,
111821
+ prev: command,
111822
+ instrumentedProject,
111823
+ instrumentResult,
111824
+ mutants: instrumentResult.mutants
111825
+ };
111826
+ });
111827
+ const writePlanInstrument = (raw) => enteringInstrumentPhase(raw.fileCount, as(offerSkipsIfAny({
111828
+ skipped: raw.instrumentResult.skipped,
111829
+ claimants: raw.prev.frameworkClaimants
111830
+ }), {
111831
+ project: raw.instrumentedProject,
111832
+ mutants: raw.mutants,
111833
+ options: raw.prev.options
111834
+ }));
111835
+ const planInstrumentCell = Sandwich_exports.named(SpanTaxonomy_exports.Spans.instrument.name)(readPlanInstrument).decide(planInstrumentation).write({
111836
+ InPlaceInstrument: (_decision, raw) => writePlanInstrument(raw),
111837
+ EphemeralInstrument: (_decision, raw) => writePlanInstrument(raw),
111838
+ CommandRejected: ({ issue }) => fail$4(StageError.make({
111839
+ stage: "instrument",
111840
+ reason: issue
111841
+ }))
111842
+ });
111843
+ //#endregion
111844
+ //#region src/run/plan-prepare.cell.ts
111845
+ const writePrepareForInstrument = (raw) => withPhaseSpan(SpanTaxonomy_exports.Spans.preparePhase, {}, () => gen(function* () {
111846
+ yield* admitPreparedProject(raw);
111847
+ yield* offer(raw.queue, RunEvent_exports.PhaseEntered.make({
111848
+ phase: "prepare",
111849
+ elapsedMs: raw.now - raw.env.runStartedAt
111850
+ }));
111851
+ return {
111852
+ project: raw.project,
111853
+ loadedPlugins: raw.loaded,
111854
+ ignorers: raw.ignorers,
111855
+ mutatorCatalogs: raw.mutatorCatalogs,
111856
+ mutatorSelection: raw.mutatorSelection,
111857
+ formatRegistry: raw.formatRegistry,
111858
+ options: raw.options,
111859
+ frameworkClaimants: raw.frameworkClaimants
111860
+ };
111861
+ }));
111862
+ const prepareForInstrumentCell = Sandwich_exports.named(SpanTaxonomy_exports.Spans.prepare.name)(readPrepare).decide(planPrepare).write({
111863
+ HumanReporters: (_decision, raw) => writePrepareForInstrument(raw),
111864
+ MachineReporters: (_decision, raw) => writePrepareForInstrument(raw),
111865
+ CommandRejected: ({ issue }) => fail$4(StageError.make({
111866
+ stage: "prepare",
111867
+ reason: issue
111868
+ }))
111869
+ });
111870
+ //#endregion
111674
111871
  //#region src/plan-request.cell.ts
111675
111872
  const DEFAULT_MUTANT_COST_MS = 1e3;
111676
- const discoverStageCell$1 = Cell_exports.andThen(Cell_exports.andThen(Cell_exports.andThen(loadConfigCell, readProjectCell), prepareCell), Cell_exports.andThen(concurrencyCell, instrumentCell));
111677
- const decodeCostEntry = (decoded, mutantId) => flatMap$9(fromUndefinedOr(decoded.costs), (costs) => flatMap$9(get$12(costs, mutantId), (entry) => orElse$3(fromNullishOr(entry.actualMs), () => fromNullishOr(entry.predictedMs))));
111678
- const costFromReport = (texts, mutantId) => firstSomeOf(texts.map((text) => flatMap$9(decodeOption(fromJsonString(CostsFieldSchema))(text), (decoded) => decodeCostEntry(decoded, mutantId))));
111873
+ const planStageCell = Cell_exports.andThen(Cell_exports.andThen(Cell_exports.andThen(loadConfigCell, readProjectCell), prepareForInstrumentCell), planInstrumentCell);
111874
+ const namedCostsOf = (costs) => Object.fromEntries(Object.entries(costs).flatMap(([mutantId, entry]) => toArray(map$13(orElse$3(fromNullishOr(entry.actualMs), () => fromNullishOr(entry.predictedMs)), (costMs) => [mutantId, costMs]))));
111875
+ const reportCostsOf = (texts) => texts.reduce((accumulated, text) => match$8(decodeOption(fromJsonString(CostsFieldSchema))(text), {
111876
+ onNone: () => accumulated,
111877
+ onSome: (decoded) => match$8(fromUndefinedOr(decoded.costs), {
111878
+ onNone: () => accumulated,
111879
+ onSome: (costs) => ({
111880
+ ...namedCostsOf(costs),
111881
+ ...accumulated
111882
+ })
111883
+ })
111884
+ }), {});
111679
111885
  const decodeCoverage = (text) => flatMap$9(decodeOption(fromJsonString(ReportedDryRunCoverageSchema))(text), (report) => fromNullishOr(report.dryRunCoverage));
111680
111886
  const firstCoverageOf = (texts) => firstSomeOf(texts.map(decodeCoverage));
111681
111887
  const testsTimeOf = (tests) => tests.reduce((total, test) => total + test.timeSpentMs, 0);
@@ -111684,7 +111890,7 @@ const runsWholeSuite = (testCoverage, mutantId) => match$8(fromNullishOr(testCov
111684
111890
  onSome: (staticCoverage) => getOrElse$1(fromUndefinedOr(staticCoverage[mutantId]), () => 0) > 0
111685
111891
  });
111686
111892
  const coveringCostOf = (coverage, testCoverage, mutantId) => orElse$3(map$13(filter$7(map$13(get$9(testCoverage.testsByMutantId, mutantId), (tests) => testsTimeOf([...tests])), (millis) => millis > 0), (millis) => millis + coverage.timeOverheadMs), () => filter$7(some$1(testsTimeOf(coverage.tests) + coverage.timeOverheadMs), () => runsWholeSuite(testCoverage, mutantId)));
111687
- const costOf = (mutantId, texts, coverage, testCoverage) => getOrElse$1(orElse$3(costFromReport(texts, mutantId), () => flatMap$9(coverage, (present) => coveringCostOf(present, testCoverage, mutantId))), () => DEFAULT_MUTANT_COST_MS);
111893
+ const costOf = (mutantId, reportCosts, coverage, testCoverage) => getOrElse$1(orElse$3(get$12(reportCosts, mutantId), () => flatMap$9(coverage, (present) => coveringCostOf(present, testCoverage, mutantId))), () => DEFAULT_MUTANT_COST_MS);
111688
111894
  const emptyTestCoverage = () => ({
111689
111895
  testsByMutantId: empty$12(),
111690
111896
  testsById: empty$12(),
@@ -111706,7 +111912,7 @@ const planProject = (request, channel, labelBase, directory) => gen(function* ()
111706
111912
  basePath: project
111707
111913
  };
111708
111914
  const context = yield* build(RunEnvironment.stage(env, channel.environment.host.events));
111709
- const done = yield* Cell_exports.provideContext(discoverStageCell$1, context).run({
111915
+ const done = yield* Cell_exports.provideContext(planStageCell, context).run({
111710
111916
  cliOptions: { force: request.full },
111711
111917
  targetMutatePatterns: void 0
111712
111918
  });
@@ -111719,6 +111925,7 @@ const planProject = (request, channel, labelBase, directory) => gen(function* ()
111719
111925
  onNone: emptyTestCoverage,
111720
111926
  onSome: reusedTestCoverage
111721
111927
  });
111928
+ const reportCosts = reportCostsOf(texts);
111722
111929
  const mutants = (yield* readIncrementalReuse({
111723
111930
  project: done.project,
111724
111931
  currentMutants: [...done.mutants],
@@ -111727,10 +111934,10 @@ const planProject = (request, channel, labelBase, directory) => gen(function* ()
111727
111934
  force: request.full,
111728
111935
  options: done.options,
111729
111936
  globalTestInputs: map$13(coverage, (present) => [...present.globalTestInputs]).pipe(getOrElse$1(() => [])),
111730
- sandbox: done.sandbox
111937
+ originalFileOf: (file) => path.resolve(file)
111731
111938
  })).mutants.map((mutant) => ({
111732
111939
  id: mutant.id,
111733
- costMs: costOf(mutant.id, texts, coverage, testCoverage)
111940
+ costMs: costOf(mutant.id, reportCosts, coverage, testCoverage)
111734
111941
  }));
111735
111942
  return {
111736
111943
  label: labelOf$1(path, labelBase, project),
@@ -112563,7 +112770,7 @@ const selectShard = Workflow_exports.make({
112563
112770
  decision: SelectedShard,
112564
112771
  error: ShardUnknown,
112565
112772
  decide: (command) => match$8(fromUndefinedOr(command.plan.shards.find((candidate) => labelOf(candidate) === command.shard)), {
112566
- onNone: () => fail$8(ShardUnknown.make({
112773
+ onNone: () => fail$9(ShardUnknown.make({
112567
112774
  shard: command.shard,
112568
112775
  reason: `unknown shard ${command.shard}; plan has ${command.plan.shards.map(labelOf).join(", ")}`
112569
112776
  })),
@@ -112744,7 +112951,7 @@ const mergeShardReports = Workflow_exports.make({
112744
112951
  command: MergeShardReportsCommand,
112745
112952
  decision: MergedShardReports,
112746
112953
  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)
112954
+ 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
112955
  });
112749
112956
  //#endregion
112750
112957
  //#region src/shard/shard-merge.schema.ts
@@ -112772,6 +112979,19 @@ const rebuiltReportOf = (text) => flatMap$9(fromUndefinedOr(text), (present) =>
112772
112979
  onSuccess: (decision) => map$13(liftPredicate(decision, is$2(ReportFromStreamRebuilt)), (rebuilt) => rebuilt.report)
112773
112980
  }));
112774
112981
  const resultOfReport = (text) => reportFromStream(ReportFromStreamCommand.make({ text }));
112982
+ const decodeVerdictLine = decodeOption(fromJsonString(RunEvent_exports.VerdictReached));
112983
+ const budgetOfStream = (text) => map$13(last$1(match$8(fromUndefinedOr(text), {
112984
+ onNone: () => [],
112985
+ onSome: (present) => present.split("\n").flatMap((line) => toArray(decodeVerdictLine(line.trim())))
112986
+ })), (verdict) => verdict.budget);
112987
+ const shardBudgetOf = (budgets) => map$13(all$4(budgets), (present) => ({
112988
+ predictedSeconds: reduce$2(present, 0, (total, budget) => total + budget.predictedSeconds),
112989
+ actualSeconds: reduce$2(present, 0, (total, budget) => total + budget.actualSeconds)
112990
+ }));
112991
+ const mergedBudgetOf = (plan, shardBudgets) => map$13(all$4(shardBudgets), (present) => ({
112992
+ predictedSeconds: reduce$2(plan.shards, 0, (slowest, shard) => Math.max(slowest, shard.predictedSeconds)),
112993
+ actualSeconds: reduce$2(present, 0, (slowest, budget) => Math.max(slowest, budget.actualSeconds))
112994
+ }));
112775
112995
  const incrementalTextsOf = (dir) => gen(function* () {
112776
112996
  const candidates = [...yield* (yield* FileSystem).readDirectory(dir).pipe(orElseSucceed(() => []))].filter((name) => INCREMENTAL_PART_NAME.test(name)).sort();
112777
112997
  return (yield* forEach$1(candidates, (name) => readText(`${dir}/${name}`), { concurrency: 1 })).filter((text) => text !== void 0);
@@ -112796,11 +113016,15 @@ const mergeFiles = (reports) => reduce$2(reports.flatMap(({ project, report }) =
112796
113016
  const headReportOf = (reports) => head(reports);
112797
113017
  const schemaVersionOf = (reports) => getOrElse$1(map$13(headReportOf(reports), (first) => first.report.schemaVersion), () => DEFAULT_SCHEMA_VERSION);
112798
113018
  const thresholdsOf = (reports) => getOrElse$1(map$13(headReportOf(reports), (first) => first.report.thresholds), () => DEFAULT_THRESHOLDS);
112799
- const mergedReportOf = (reports) => ({
113019
+ const mergedReportOf = (reports, budget) => ({
112800
113020
  files: mergeFiles(reports),
112801
113021
  schemaVersion: schemaVersionOf(reports),
112802
113022
  thresholds: thresholdsOf(reports),
112803
- config: {}
113023
+ config: {},
113024
+ ...match$8(budget, {
113025
+ onNone: () => ({}),
113026
+ onSome: (present) => ({ budget: present })
113027
+ })
112804
113028
  });
112805
113029
  const mutantsOfReport = (report) => Object.values(report.files).flatMap((file) => file.mutants);
112806
113030
  const verdictsOf = (report) => mutantsOfReport(report).map((mutant) => ({
@@ -112821,7 +113045,8 @@ const reportedOf = (shard, project, report) => match$8(report, {
112821
113045
  });
112822
113046
  const collectProject = (input, path, dir, shard, project) => gen(function* () {
112823
113047
  const projectDir = path.join(path.resolve(input.basePath, dir), project.project);
112824
- const report = rebuiltReportOf(yield* readText(path.join(projectDir, STREAM_FILE$1)));
113048
+ const stream = yield* readText(path.join(projectDir, STREAM_FILE$1));
113049
+ const report = rebuiltReportOf(stream);
112825
113050
  const incrementalTexts = yield* incrementalTextsOf(projectDir);
112826
113051
  return {
112827
113052
  reported: reportedOf(shard, project.project, report),
@@ -112832,13 +113057,15 @@ const collectProject = (input, path, dir, shard, project) => gen(function* () {
112832
113057
  incremental: {
112833
113058
  project: project.project,
112834
113059
  texts: incrementalTexts
112835
- }
113060
+ },
113061
+ budget: budgetOfStream(stream)
112836
113062
  };
112837
113063
  });
112838
113064
  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
113065
  reports: parts.map((part) => part.reported),
112840
113066
  projectReports: getSomes(parts.map((part) => part.projectReport)),
112841
- incrementals: parts.map((part) => part.incremental)
113067
+ incrementals: parts.map((part) => part.incremental),
113068
+ shardBudgets: [shardBudgetOf(parts.map((part) => part.budget))]
112842
113069
  })));
112843
113070
  const collectProjectReports = (input, path) => forEach$1(input.shardDirs.map((dir, index) => ({
112844
113071
  dir,
@@ -112849,7 +113076,8 @@ const collectProjectReports = (input, path) => forEach$1(input.shardDirs.map((di
112849
113076
  }), { concurrency: 1 }).pipe(map$7((parts) => ({
112850
113077
  reports: parts.flatMap((part) => part.reports),
112851
113078
  projectReports: parts.flatMap((part) => part.projectReports),
112852
- incrementals: parts.flatMap((part) => part.incrementals)
113079
+ incrementals: parts.flatMap((part) => part.incrementals),
113080
+ shardBudgets: parts.flatMap((part) => part.shardBudgets)
112853
113081
  })));
112854
113082
  const shardsOf = (input) => input.plan.shards.map((shard) => ({
112855
113083
  index: shard.index,
@@ -112880,7 +113108,7 @@ const mergeShards = (input) => gen(function* () {
112880
113108
  })));
112881
113109
  const outDir = outputDirOf(input, path);
112882
113110
  yield* fs.makeDirectory(outDir, { recursive: true });
112883
- const json = yield* orDie(encodeEffect(fromJsonString(Unknown, { space: 2 }))(mergedReportOf(collected.projectReports)));
113111
+ const json = yield* orDie(encodeEffect(fromJsonString(Unknown, { space: 2 }))(mergedReportOf(collected.projectReports, mergedBudgetOf(input.plan, collected.shardBudgets))));
112884
113112
  yield* writeFileAtomic({
112885
113113
  fs,
112886
113114
  path