@systemfsoftware/stryker-js 14.0.0 → 15.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.
@@ -1,4 +1,4 @@
1
- import { i as mod_d_exports$5 } from "./index-C5FRZ4Ni.mjs";
1
+ import { i as mod_d_exports$5 } from "./index-Cf9G6kA8.mjs";
2
2
  import * as S from "effect/Schema";
3
3
  //#region src/config/stryker-config.schema.d.ts
4
4
  type StrykerConfig = mod_d_exports$5.PartialStrykerOptions;
@@ -7,9 +7,9 @@ import * as Context from "effect/Context";
7
7
  import { Effect, Schema, SchemaGetter, SchemaIssue, SchemaTransformation } from "effect";
8
8
  import * as Effect$1 from "effect/Effect";
9
9
  import * as Boolean$1 from "effect/Boolean";
10
- import * as Rpc from "effect/unstable/rpc/Rpc";
11
- import * as RpcGroup from "effect/unstable/rpc/RpcGroup";
12
- import * as RpcMiddleware from "effect/unstable/rpc/RpcMiddleware";
10
+ import * as Rpc from "effect/rpc/Rpc";
11
+ import * as RpcGroup from "effect/rpc/RpcGroup";
12
+ import * as RpcMiddleware from "effect/rpc/RpcMiddleware";
13
13
  import * as Match$1 from "effect/Match";
14
14
  import { dual } from "effect/Function";
15
15
  import * as Record$1 from "effect/Record";
@@ -102,10 +102,10 @@ const ActionableStatusSchema = S.Literals([
102
102
  "Timeout",
103
103
  "RuntimeError"
104
104
  ]);
105
- const MutantId = S.String.check(S.isPattern(/^[0-9a-f]{16}$/, { expected: "a 16-character lowercase hexadecimal mutant id" })).pipe(S.brand("MutantId"));
106
- const MutatorNameGrammar = S.String.check(S.isPattern(/^(?:[a-z][a-z0-9]*(?:-[a-z0-9]+)*\/)?[A-Z][A-Za-z0-9]*$/, { expected: "a PascalCase mutator name, optionally prefixed by a lowercase kebab-case namespace and a slash" }));
105
+ const MutantId = S.String.check(S.isPattern(/^[0-9a-f]{16}$/u, { expected: "a 16-character lowercase hexadecimal mutant id" })).pipe(S.brand("MutantId"));
106
+ const MutatorNameGrammar = S.String.check(S.isPattern(/^(?:[a-z][a-z0-9]*(?:-[a-z0-9]+)*\/)?[A-Z][A-Za-z0-9]*$/u, { expected: "a PascalCase mutator name, optionally prefixed by a lowercase kebab-case namespace and a slash" }));
107
107
  const MutatorName = MutatorNameGrammar.pipe(S.brand("MutatorName"));
108
- const CanonicalFileName = S.String.pipe(S.decodeTo(S.String.pipe(S.check(S.isPattern(/^[^\\]+$/)), S.brand("CanonicalFileName")), {
108
+ const CanonicalFileName = S.String.pipe(S.decodeTo(S.String.pipe(S.check(S.isPattern(/^[^\\]+$/u)), S.brand("CanonicalFileName")), {
109
109
  decode: SchemaGetter$1.transform((fileName) => fileName.replace(/\\/g, "/")),
110
110
  encode: SchemaGetter$1.transform((canonical) => canonical)
111
111
  }));
@@ -215,9 +215,9 @@ const IgnoreRuleId = S.Literals(RULE_IDS);
215
215
  const SEPARATOR = ": ";
216
216
  const asLiteralPattern = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
217
217
  const REASON_SOURCE = `^(?:${RULE_IDS.map(asLiteralPattern).join("|")})${SEPARATOR}[\\s\\S]*$`;
218
- const IgnoreStatusReasonText = S.String.check(S.isPattern(new RegExp(REASON_SOURCE), { arbitraryConstraint: { patterns: [{
218
+ const IgnoreStatusReasonText = S.String.check(S.isPattern(new RegExp(REASON_SOURCE, "u"), { arbitraryConstraint: { patterns: [{
219
219
  source: REASON_SOURCE,
220
- flags: ""
220
+ flags: "u"
221
221
  }] } }));
222
222
  const ReasonPartsSchema = S.Struct({
223
223
  ruleId: IgnoreRuleId,
@@ -234,7 +234,7 @@ const IgnoreStatusReason = IgnoreStatusReasonText.pipe(S.decodeTo(ReasonPartsSch
234
234
  decode: partsOf$1,
235
235
  encode: textOf$1
236
236
  })));
237
- const Id = S.String.check(S.isPattern(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, { expected: "a lowercase kebab-case catalog entry id" })).pipe(S.brand("MutatorCatalogId"));
237
+ const Id = S.String.check(S.isPattern(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u, { expected: "a lowercase kebab-case catalog entry id" })).pipe(S.brand("MutatorCatalogId"));
238
238
  const Tier = S.Literals(["default", "optIn"]);
239
239
  const Definition = S.NonEmptyString;
240
240
  /**
@@ -257,7 +257,7 @@ const carriesASnippet = S.makeFilter((entry) => {
257
257
  return entry.examples.find((example) => example.before.length === 0) === void 0 ? void 0 : `mutator catalog entry "${entry.id}" carries an example with an empty before`;
258
258
  });
259
259
  const Entry = EntryShape.check(carriesExamples, carriesASnippet);
260
- const Provider = S.String.check(S.isPattern(/^(?:stryker|[a-z][a-z0-9]*(?:-[a-z0-9]+)*)$/, { expected: "the stock provider \"stryker\" or a lowercase kebab-case plugin namespace" })).pipe(S.brand("MutatorProvider"));
260
+ const Provider = S.String.check(S.isPattern(/^(?:stryker|[a-z][a-z0-9]*(?:-[a-z0-9]+)*)$/u, { expected: "the stock provider \"stryker\" or a lowercase kebab-case plugin namespace" })).pipe(S.brand("MutatorProvider"));
261
261
  const CatalogShape = S.Struct({
262
262
  provider: Provider,
263
263
  entries: S.NonEmptyArray(Entry)
@@ -544,7 +544,7 @@ const WarningOptions = openStruct({
544
544
  slow: defaulted(S.Boolean, true)
545
545
  });
546
546
  const ConcurrencyCount = S.Int.pipe(S.check(S.isGreaterThanOrEqualTo(1)));
547
- const ConcurrencyPercent = S.String.pipe(S.check(S.isPattern(/^(100|[1-9]?[0-9])%$/)));
547
+ const ConcurrencyPercent = S.String.pipe(S.check(S.isPattern(/^(100|[1-9]?[0-9])%$/u)));
548
548
  const pluginSpecifierArbitrary = S.link()(S.Literals([
549
549
  "file:///project/node_modules/@systemfsoftware/stryker-js-angular/index.mjs",
550
550
  "file:///home/user/project/plugins/custom-plugin.mjs",
@@ -929,7 +929,7 @@ const MutationTestResult = S.StructWithRest(S.Struct({
929
929
  "2.0",
930
930
  "2.0.0"
931
931
  ]
932
- }).check(S.isPattern(/* @__PURE__ */ new RegExp("^([1-2])(\\.(([1-9]\\d*)|0)){0,2}$")).annotate({ "expected": "a string matching the RegExp ^([1-2])(\\.(([1-9]\\d*)|0)){0,2}$" })),
932
+ }).check(S.isPattern(/* @__PURE__ */ new RegExp("^([1-2])(\\.(([1-9]\\d*)|0)){0,2}$", "u")).annotate({ "expected": "a string matching the RegExp ^([1-2])(\\.(([1-9]\\d*)|0)){0,2}$" })),
933
933
  "files": FileResultDictionary,
934
934
  "testFiles": S.optionalKey(TestFileDefinitionDictionary),
935
935
  "thresholds": Thresholds,
@@ -1107,9 +1107,9 @@ var ReporterFailed = class extends S.TaggedError()("ReporterFailed", {
1107
1107
  };
1108
1108
  const TraceparentHeader = S.Literal("traceparent");
1109
1109
  const TracestateHeader = S.Literal("tracestate");
1110
- const VERSION = S.String.pipe(S.check(S.isPattern(/^([0-9a-e][0-9a-f]|[0-9a-f][0-9a-e])$/)));
1111
- const TRACE_ID = S.String.pipe(S.check(S.isPattern(/^[0-9a-f]*[1-9a-f][0-9a-f]*$/)), S.check(S.isLengthBetween(32, 32)));
1112
- const SPAN_ID = S.String.pipe(S.check(S.isPattern(/^[0-9a-f]*[1-9a-f][0-9a-f]*$/)), S.check(S.isLengthBetween(16, 16)));
1110
+ const VERSION = S.String.pipe(S.check(S.isPattern(/^([0-9a-e][0-9a-f]|[0-9a-f][0-9a-e])$/u)));
1111
+ const TRACE_ID = S.String.pipe(S.check(S.isPattern(/^[0-9a-f]*[1-9a-f][0-9a-f]*$/u)), S.check(S.isBetweenLength(32, 32)));
1112
+ const SPAN_ID = S.String.pipe(S.check(S.isPattern(/^[0-9a-f]*[1-9a-f][0-9a-f]*$/u)), S.check(S.isBetweenLength(16, 16)));
1113
1113
  const TraceContextPartsSchema = S.Struct({
1114
1114
  version: VERSION,
1115
1115
  traceId: TRACE_ID,
@@ -1173,7 +1173,7 @@ const Traceparent = S.String.pipe(S.decodeTo(TraceparentPartsSchema, SchemaTrans
1173
1173
  })));
1174
1174
  const TRACESTATE_MEMBER = "[a-z][_0-9a-z\\-*/]{0,255}=[\\x20-\\x2b\\x2d-\\x3c\\x3e-\\x7e]{0,255}";
1175
1175
  const TRACESTATE_OWS = "[ \\t]*";
1176
- const TRACESTATE = new RegExp(`^${TRACESTATE_MEMBER}(${TRACESTATE_OWS},${TRACESTATE_OWS}${TRACESTATE_MEMBER}){0,31}$`);
1176
+ const TRACESTATE = new RegExp(`^${TRACESTATE_MEMBER}(${TRACESTATE_OWS},${TRACESTATE_OWS}${TRACESTATE_MEMBER}){0,31}$`, "u");
1177
1177
  const Tracestate = S.String.pipe(S.check(S.isPattern(TRACESTATE, { expected: "a W3C tracestate: comma-separated key=value members" })));
1178
1178
  const WorkerPluginKind = S.Literals([
1179
1179
  "TestRunner",
@@ -1222,7 +1222,7 @@ const BoundaryErrorSchema = S.Union([
1222
1222
  CheckerFailed,
1223
1223
  ReporterFailed
1224
1224
  ]);
1225
- const WorkerEntryUrl = S.String.check(S.isPattern(/^file:\/\//, { expected: "a file: URL of the worker program" }));
1225
+ const WorkerEntryUrl = S.String.check(S.isPattern(/^file:\/\//u, { expected: "a file: URL of the worker program" }));
1226
1226
  const WorkerPluginSpawnSchema = S.Struct({
1227
1227
  kind: WorkerPluginKind,
1228
1228
  entrypoint: WorkerEntryUrl
@@ -1358,7 +1358,7 @@ var Reporter_exports = /* @__PURE__ */ __exportAll({
1358
1358
  const HitLimitReasonPrefix = S.Literal("Hit limit reached");
1359
1359
  const WallClockTimeoutReason = S.Literal("wall-clock-timeout");
1360
1360
  const HIT_LIMIT_REASON_PREFIX = HitLimitReasonPrefix.literal;
1361
- const HitLimitReasonText = S.String.check(S.isStartsWith(HIT_LIMIT_REASON_PREFIX, { arbitraryConstraint: {
1361
+ const HitLimitReasonText = S.String.check(S.isStartingWith(HIT_LIMIT_REASON_PREFIX, { arbitraryConstraint: {
1362
1362
  patterns: [{
1363
1363
  source: `^${HIT_LIMIT_REASON_PREFIX}[\\s\\S]*$`,
1364
1364
  flags: ""
@@ -1,5 +1,5 @@
1
- import { i as mod_d_exports$5 } from "./index-C5FRZ4Ni.mjs";
2
- import { l as MutationTestDone } from "./RunEnvironment.service-C8nNTyKa.mjs";
1
+ import { i as mod_d_exports$5 } from "./index-Cf9G6kA8.mjs";
2
+ import { l as MutationTestDone } from "./RunEnvironment.service-B1bsWOQ9.mjs";
3
3
  //#region src/drivers/promise.d.ts
4
4
  export declare const run: ((targetMutatePatterns?: readonly string[]) => (options: mod_d_exports$5.PartialStrykerOptions) => Promise<MutationTestDone>) & ((options: mod_d_exports$5.PartialStrykerOptions, targetMutatePatterns?: readonly string[]) => Promise<MutationTestDone>);
5
5
  //#endregion
package/dist/promises.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { C as nodePlatformLayer, t as strykerCell } from "./run-stages-CGUzIzPZ.mjs";
1
+ import { C as nodePlatformLayer, t as strykerCell } from "./run-stages-DdVQINP9.mjs";
2
2
  import * as Effect from "effect/Effect";
3
3
  import { dual } from "effect/Function";
4
4
  //#region src/drivers/promise.ts
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll$4 } from "./rolldown-runtime-8H4AJuhK.mjs";
2
- import { a as MutatorCatalog_exports, c as Plugin_exports, d as TestRunner_exports, f as Trace_exports$1, i as Mutant_exports, l as Report_exports, n as mergeConfigs, o as MutatorProvider_exports, r as Checker_exports, s as Options_exports, t as mergeConfig, u as Reporter_exports } from "./merge-config-DCQE_2cC.mjs";
2
+ import { a as MutatorCatalog_exports, c as Plugin_exports, d as TestRunner_exports, f as Trace_exports$1, i as Mutant_exports, l as Report_exports, n as mergeConfigs, o as MutatorProvider_exports, r as Checker_exports, s as Options_exports, t as mergeConfig, u as Reporter_exports } from "./merge-config-zsGl1aWc.mjs";
3
3
  import { n as StageError, t as PrepareError } from "./Run.schema-DuaneDGd.mjs";
4
4
  import { Blueprint, Cell, Handle, Sandwich, Workflow } from "@systemfsoftware/effect-cell-types";
5
5
  import * as S from "effect/Schema";
@@ -11,7 +11,7 @@ import * as Context from "effect/Context";
11
11
  import { Boolean as Boolean$1, Match, Option, Predicate, Record, Schema, SchemaGetter, SchemaTransformation } from "effect";
12
12
  import * as Effect$1 from "effect/Effect";
13
13
  import * as Boolean$1$1 from "effect/Boolean";
14
- import * as RpcMiddleware from "effect/unstable/rpc/RpcMiddleware";
14
+ import * as RpcMiddleware from "effect/rpc/RpcMiddleware";
15
15
  import * as Arr from "effect/Array";
16
16
  import * as Match$1 from "effect/Match";
17
17
  import * as Result from "effect/Result";
@@ -28,25 +28,24 @@ import * as Path from "effect/Path";
28
28
  import * as Stream from "effect/Stream";
29
29
  import * as Config from "effect/Config";
30
30
  import * as Clock from "effect/Clock";
31
- import * as Exit from "effect/Exit";
32
31
  import * as Layer from "effect/Layer";
33
32
  import * as Queue from "effect/Queue";
34
33
  import * as Scope from "effect/Scope";
35
34
  import * as HashMap from "effect/HashMap";
36
35
  import * as MutableHashMap from "effect/MutableHashMap";
37
36
  import * as api from "@opentelemetry/api";
37
+ import * as Headers from "effect/http/Headers";
38
38
  import * as Tracer from "effect/Tracer";
39
- import * as Headers from "effect/unstable/http/Headers";
40
- import * as RpcSerialization from "effect/unstable/rpc/RpcSerialization";
41
- import * as RpcServer from "effect/unstable/rpc/RpcServer";
42
- import * as SocketServer from "effect/unstable/socket/SocketServer";
39
+ import * as RpcSerialization from "effect/rpc/RpcSerialization";
40
+ import * as RpcServer from "effect/rpc/RpcServer";
41
+ import * as SocketServer from "effect/socket/SocketServer";
43
42
  import * as Duration from "effect/Duration";
43
+ import * as Exit from "effect/Exit";
44
44
  import * as Fiber from "effect/Fiber";
45
45
  import * as HashSet from "effect/HashSet";
46
46
  import * as PubSub from "effect/PubSub";
47
47
  import * as SynchronizedRef from "effect/SynchronizedRef";
48
- import * as Schedule from "effect/Schedule";
49
- import * as RpcClient from "effect/unstable/rpc/RpcClient";
48
+ import * as RpcClient from "effect/rpc/RpcClient";
50
49
  import * as DateTime from "effect/DateTime";
51
50
  import * as Ref from "effect/Ref";
52
51
  import * as Sink from "effect/Sink";
@@ -58,11 +57,12 @@ import { NodeFileSystem, NodePath, NodeSocket, NodeStdio } from "@effect/platfor
58
57
  import * as NodeChildProcessSpawner from "@effect/platform-node-shared/NodeChildProcessSpawner";
59
58
  import * as NodeCrypto from "@effect/platform-node-shared/NodeCrypto";
60
59
  import * as Crypto from "effect/Crypto";
61
- import * as ChildProcess from "effect/unstable/process/ChildProcess";
62
- import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner";
60
+ import * as ChildProcess from "effect/process/ChildProcess";
61
+ import * as ChildProcessSpawner from "effect/process/ChildProcessSpawner";
62
+ import * as Deferred from "effect/Deferred";
63
63
  import * as FiberSet from "effect/FiberSet";
64
- import { RpcClientError } from "effect/unstable/rpc/RpcClientError";
65
- import * as Socket from "effect/unstable/socket/Socket";
64
+ import { RpcClientError } from "effect/rpc/RpcClientError";
65
+ import * as Socket from "effect/socket/Socket";
66
66
  import * as Equivalence from "effect/Equivalence";
67
67
  import { badArgument } from "effect/PlatformError";
68
68
  import * as MutableHashSet from "effect/MutableHashSet";
@@ -192,7 +192,7 @@ const RunPhase = S.Literals([
192
192
  "dry-run",
193
193
  "mutation-test"
194
194
  ]);
195
- const RunId = S.String.pipe(S.check(S.isPattern(/^[0-9A-HJKMNP-TV-Z]{26}$/)), S.brand("RunId"));
195
+ const RunId = S.String.pipe(S.check(S.isPattern(/^[0-9A-HJKMNP-TV-Z]{26}$/u)), S.brand("RunId"));
196
196
  var RunStarted = class extends S.TaggedClass()("stream", {
197
197
  schemaVersion: StreamSchemaVersion,
198
198
  runId: RunId,
@@ -443,8 +443,8 @@ var RunEvent_exports = /* @__PURE__ */ __exportAll$3({
443
443
  VerdictReached: () => VerdictReached,
444
444
  VerdictThresholds: () => VerdictThresholds
445
445
  });
446
- const SpanName = S.String.check(S.isPattern(/^[A-Za-z][A-Za-z0-9_-]*(?:\.[A-Za-z][A-Za-z0-9_-]*)*$/, { expected: "a dot-separated span name whose segments start with a letter, such as \"stryker.checker.check\"" })).pipe(S.brand("SpanName"));
447
- const SpanAttributeKey = S.String.check(S.isPattern(/^[A-Za-z][A-Za-z0-9_.-]*$/, { expected: "an attribute key starting with a letter, such as \"stryker.checker.name\"" })).pipe(S.brand("SpanAttributeKey"));
446
+ const SpanName = S.String.check(S.isPattern(/^[A-Za-z][A-Za-z0-9_-]*(?:\.[A-Za-z][A-Za-z0-9_-]*)*$/u, { expected: "a dot-separated span name whose segments start with a letter, such as \"stryker.checker.check\"" })).pipe(S.brand("SpanName"));
447
+ const SpanAttributeKey = S.String.check(S.isPattern(/^[A-Za-z][A-Za-z0-9_.-]*$/u, { expected: "an attribute key starting with a letter, such as \"stryker.checker.name\"" })).pipe(S.brand("SpanAttributeKey"));
448
448
  const SpanAttributeText = S.String;
449
449
  const SpanAttributeCount = S.Finite;
450
450
  const SpanRunStatus = S.Literals([
@@ -1959,7 +1959,7 @@ const wireRecordOf = (mutant) => Result.mapError(S.decodeResult(CheckerMutantFro
1959
1959
  reason: error.message
1960
1960
  }));
1961
1961
  const partitionMutantsForWire = (plans) => {
1962
- const [undescribable, wire] = Arr.separate(Arr.map(plans, (plan) => wireRecordOf(plan.mutant)));
1962
+ const [wire, undescribable] = Arr.separate(Arr.map(plans, (plan) => wireRecordOf(plan.mutant)));
1963
1963
  return {
1964
1964
  wire,
1965
1965
  undescribable
@@ -1977,7 +1977,7 @@ const lookupOf = (partitioned) => ({
1977
1977
  });
1978
1978
  const wireOrFallbackOf = (mutant, lookup) => Option$1.getOrElse(Option$1.map(Option$1.fromUndefinedOr(lookup.wireById.get(mutant.id)), Result.succeed), () => Option$1.getOrElse(Option$1.map(Option$1.fromUndefinedOr(lookup.undescribableById.get(mutant.id)), Result.fail), () => wireRecordOf(mutant)));
1979
1979
  const selectedFromLookup = (plans, lookup) => {
1980
- const [undescribable, wire] = Arr.separate(Arr.map(plans, (plan) => wireOrFallbackOf(plan.mutant, lookup)));
1980
+ const [wire, undescribable] = Arr.separate(Arr.map(plans, (plan) => wireOrFallbackOf(plan.mutant, lookup)));
1981
1981
  return {
1982
1982
  wire,
1983
1983
  undescribable
@@ -4717,8 +4717,8 @@ var ErrorText_exports = /* @__PURE__ */ __exportAll$2({
4717
4717
  causeTextOf: () => causeTextOf,
4718
4718
  errorTextOf: () => errorTextOf$2
4719
4719
  });
4720
- const MutatorNameSchema = S.String.pipe(S.check(S.isPattern(/^(?:[a-z][a-z0-9]*(?:-[a-z0-9]+)*\/)?[a-zA-Z][a-zA-Z0-9]*(?: [a-zA-Z][a-zA-Z0-9]*)*$/)));
4721
- const DirectiveReasonSchema = S.String.pipe(S.check(S.isPattern(/^\S(?:[^\r\n\u2028\u2029]*\S)?$/)));
4720
+ const MutatorNameSchema = S.String.pipe(S.check(S.isPattern(/^(?:[a-z][a-z0-9]*(?:-[a-z0-9]+)*\/)?[a-zA-Z][a-zA-Z0-9]*(?: [a-zA-Z][a-zA-Z0-9]*)*$/u)));
4721
+ const DirectiveReasonSchema = S.String.pipe(S.check(S.isPattern(/^\S(?:[^\r\n\u2028\u2029]*\S)?$/u)));
4722
4722
  const DirectiveSchema = S.Struct({
4723
4723
  action: S.Literals(["disable", "restore"]),
4724
4724
  scope: S.Literals(["next-line", "block"]),
@@ -10741,7 +10741,7 @@ var WorkerLauncher = class extends Context.Service()("@systemfsoftware/stryker-j
10741
10741
  //#endregion
10742
10742
  //#region src/worker-client.blueprint.ts
10743
10743
  const TypeId$10 = Symbol.for("~systemfsoftware/stryker-js/WorkerClient");
10744
- const connectRetry = Schedule.max([Schedule.spaced(50), Schedule.recurs(100)]);
10744
+ const WORKER_BOOT_TIMEOUT = Duration.seconds(30);
10745
10745
  const WorkerClients = () => Blueprint.make()(TypeId$10).steps({
10746
10746
  steps: {},
10747
10747
  targets: { scoped: Effect$1.fnUntraced(function* (params) {
@@ -10755,7 +10755,11 @@ const WorkerClients = () => Blueprint.make()(TypeId$10).steps({
10755
10755
  tempDirPrefix: params.tempDirPrefix,
10756
10756
  env: params.env
10757
10757
  });
10758
- const protocol = yield* worker.pipe(clientLayer, Layer.build, Effect$1.retry(connectRetry), Effect$1.raceFirst(worker.exited), Effect$1.catchTag("SocketError", () => Effect$1.fail(WorkerBootTimeoutError.make({ pid: worker.pid }))));
10758
+ const bootTimedOut = () => Effect$1.fail(WorkerBootTimeoutError.make({ pid: worker.pid }));
10759
+ const protocol = yield* worker.pipe(clientLayer, Layer.build, Effect$1.raceFirst(worker.exited), Effect$1.timeoutOrElse({
10760
+ duration: WORKER_BOOT_TIMEOUT,
10761
+ orElse: bootTimedOut
10762
+ }), Effect$1.catchTag("SocketError", bootTimedOut));
10759
10763
  const traceContext = yield* Layer.build(Trace_exports.layerTraceContextClient);
10760
10764
  return yield* RpcClient.make(params.rpcs).pipe(Effect$1.provideContext(Context.merge(protocol, traceContext)));
10761
10765
  }) }
@@ -11225,7 +11229,7 @@ const strykerOutputFilesOf = (options) => [
11225
11229
  ];
11226
11230
  //#endregion
11227
11231
  //#region package.json
11228
- var version = "14.0.0";
11232
+ var version = "15.0.1";
11229
11233
  //#endregion
11230
11234
  //#region src/stryker-package.schema.ts
11231
11235
  var StrykerPackage = class extends S.Class("StrykerPackage")({
@@ -11406,7 +11410,7 @@ const mapRunResult = (mutant, result) => Match$1.value(result).pipe(Match$1.disc
11406
11410
  })), Match$1.discriminator("status")("timeout", (timedOut) => reportMutant(mutant, "Timeout", reasonedOutcomeOf(timedOut.reason))), Match$1.discriminator("status")("survived", (survived) => reportMutant(mutant, "Survived", { testsCompleted: survived.nrOfTests })), Match$1.exhaustive);
11407
11411
  const uniqueNames = (names) => Arr.dedupe(Arr.filter(names, (name) => name !== void 0));
11408
11412
  const partitionByFile = (files, fileNames) => {
11409
- const [missing, present] = Arr.separate(Arr.map(fileNames, (fileName) => Option$1.match(MutableHashMap.get(files, fileName), {
11413
+ const [present, missing] = Arr.separate(Arr.map(fileNames, (fileName) => Option$1.match(MutableHashMap.get(files, fileName), {
11410
11414
  onNone: () => Result.fail(fileName),
11411
11415
  onSome: (file) => Result.succeed(file)
11412
11416
  })));
@@ -13142,7 +13146,7 @@ const stageLayerOf = (env, events) => {
13142
13146
  const eventsLayer = Match$1.value(events).pipe(Match$1.when(void 0, () => Layer.effect(RunEvents, Queue.bounded(RunEvent_exports.RunEvent.QUEUE_BOUND))), Match$1.orElse((queue) => Layer.succeed(RunEvents, queue)));
13143
13147
  const stageLayer = Layer.mergeAll(Layer.succeed(RunEnvironment, env), eventsLayer, PhaseClock.layer(env.runStartedAt), IdGenerator.layer, ProjectFiles.layer, Layer.effect(Scope.Scope, Effect$1.gen(function* () {
13144
13148
  const stageScope = yield* Scope.make();
13145
- yield* Effect$1.addFinalizer(() => Scope.close(stageScope, Exit.void));
13149
+ yield* Effect$1.addFinalizer((exit) => Scope.close(stageScope, exit));
13146
13150
  return stageScope;
13147
13151
  })));
13148
13152
  return Layer.mergeAll(stageLayer, MutationReporting.layer.pipe(Layer.provide(stageLayer)), Reporter.layer.pipe(Layer.provide(ReporterOutput.layer), Layer.provide(stageLayer)));
@@ -13728,11 +13732,13 @@ const failInFlightRequests = Effect$1.fn(SpanTaxonomy_exports.Spans.workerProtoc
13728
13732
  const makeWorkerProtocol = Effect$1.fn(SpanTaxonomy_exports.Spans.workerProtocolMake.name)(function* (socket) {
13729
13733
  const responseHandlers = yield* Ref.make(HashMap.empty());
13730
13734
  const liveConnections = yield* FiberSet.make();
13735
+ const connected = yield* Deferred.make();
13731
13736
  const hooks = Layer.succeed(RpcClient.ConnectionHooks, {
13732
- onConnect: FiberSet.run(liveConnections, Effect$1.never.pipe(Effect$1.onInterrupt(() => failInFlightRequests(responseHandlers)))).pipe(Effect$1.asVoid),
13737
+ onConnect: Deferred.succeed(connected, void 0).pipe(Effect$1.andThen(FiberSet.run(liveConnections, Effect$1.never.pipe(Effect$1.onInterrupt(() => failInFlightRequests(responseHandlers))))), Effect$1.asVoid),
13733
13738
  onDisconnect: FiberSet.clear(liveConnections)
13734
13739
  });
13735
13740
  const protocol = yield* RpcClient.layerProtocolSocket({ retryTransientErrors: true }).pipe(Layer.provide(Layer.mergeAll(socket, RpcSerialization.layerNdjson, hooks)), Layer.build, Effect$1.map(Context.get(RpcClient.Protocol)));
13741
+ yield* Deferred.await(connected);
13736
13742
  return RpcClient.Protocol.of({
13737
13743
  ...protocol,
13738
13744
  run: (clientId, handler) => Ref.update(responseHandlers, HashMap.set(clientId, handler)).pipe(Effect$1.andThen(protocol.run(clientId, handler)))
@@ -13745,6 +13751,7 @@ const WorkerProtocol = Blueprint.make()(TypeId$9).steps({
13745
13751
  const layerWorkerProtocol = (socket) => WorkerProtocol.of({ socket }).layer;
13746
13752
  //#endregion
13747
13753
  //#region src/drivers/node.ts
13754
+ const WORKER_TERMINATION_GRACE = Duration.seconds(5);
13748
13755
  const restrictToOwnerOrWarn = (fs, file) => fs.chmod(file, 384).pipe(Effect$1.tapError((cause) => Effect$1.logWarning(`Could not restrict "${file}" to its owner; the worker directory's own mode still protects it.`).pipe(Effect$1.annotateLogs("cause", cause))), Effect$1.catchTag("PlatformError", () => Effect$1.void));
13749
13756
  const nodeWorkerLauncherLayer = (childEnv) => Layer.effect(WorkerLauncher, Effect$1.gen(function* () {
13750
13757
  const crypto = yield* Crypto.Crypto;
@@ -13768,7 +13775,8 @@ const nodeWorkerLauncherLayer = (childEnv) => Layer.effect(WorkerLauncher, Effec
13768
13775
  ...childEnv,
13769
13776
  ...params.env
13770
13777
  },
13771
- stderr: "inherit"
13778
+ stderr: "inherit",
13779
+ forceKillAfter: WORKER_TERMINATION_GRACE
13772
13780
  }).pipe(Effect$1.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner));
13773
13781
  const clientLayer = layerWorkerProtocol(NodeSocket.layerNet({ path: socketPath }));
13774
13782
  const exited = handle.exitCode.pipe(Effect$1.orDie, Effect$1.flatMap((exitCode) => Result.match(classifyWorkerExit(ClassifyWorkerExitCommand.make({
@@ -19707,13 +19715,11 @@ const reporterInputsOf = dual(5, (names, choicesByName, loaded, projectBasePath,
19707
19715
  //#endregion
19708
19716
  //#region src/keep-temp-dir.workflow.ts
19709
19717
  const KeepTempDirTypeId = Symbol.for("@systemfsoftware/stryker-js/KeepTempDir");
19710
- var KeepTempDirAlways = class extends S.TaggedClass()("KeepTempDirAlways", {}) {
19711
- [KeepTempDirTypeId] = KeepTempDirTypeId;
19712
- };
19713
- var KeepTempDirOnFailure = class extends S.TaggedClass()("KeepTempDirOnFailure", { failed: S.Boolean }) {
19714
- [KeepTempDirTypeId] = KeepTempDirTypeId;
19715
- };
19716
- const KeepTempDirOption = S.Union([KeepTempDirAlways, KeepTempDirOnFailure]);
19718
+ const CleanTempDirOption = S.Literals([
19719
+ "always",
19720
+ false,
19721
+ true
19722
+ ]);
19717
19723
  var TempDirKept = class extends S.TaggedClass()("TempDirKept", {}) {
19718
19724
  [KeepTempDirTypeId] = KeepTempDirTypeId;
19719
19725
  };
@@ -19721,13 +19727,13 @@ var TempDirRemoved = class extends S.TaggedClass()("TempDirRemoved", {}) {
19721
19727
  [KeepTempDirTypeId] = KeepTempDirTypeId;
19722
19728
  };
19723
19729
  var KeepTempDirCommand = class extends S.TaggedClass()("KeepTempDirCommand", {
19724
- cleanTempDir: KeepTempDirOption,
19730
+ cleanTempDir: CleanTempDirOption,
19725
19731
  failed: S.Boolean
19726
19732
  }) {
19727
19733
  static [Workflow.InstrumentationBrand] = {};
19728
19734
  };
19729
- const keepOf = (failed) => Match$1.value(failed).pipe(Match$1.when(true, () => TempDirKept.make({})), Match$1.when(false, () => TempDirRemoved.make({})), Match$1.exhaustive, Result.succeed);
19730
- const decide = (command) => Match$1.value(command.cleanTempDir).pipe(Match$1.tag("KeepTempDirAlways", () => Result.succeed(TempDirRemoved.make({}))), Match$1.tag("KeepTempDirOnFailure", (option) => keepOf(option.failed)), Match$1.exhaustive);
19735
+ const keptIff = (kept) => Match$1.value(kept).pipe(Match$1.when(true, () => TempDirKept.make({})), Match$1.when(false, () => TempDirRemoved.make({})), Match$1.exhaustive);
19736
+ const decide = (command) => Match$1.value(command.cleanTempDir).pipe(Match$1.when(false, () => TempDirKept.make({})), Match$1.when(true, () => keptIff(command.failed)), Match$1.when("always", () => TempDirRemoved.make({})), Match$1.exhaustive, Result.succeed);
19731
19737
  const keepTempDir = Workflow.make({
19732
19738
  command: KeepTempDirCommand,
19733
19739
  decision: S.Union([TempDirKept, TempDirRemoved]),
@@ -19736,11 +19742,10 @@ const keepTempDir = Workflow.make({
19736
19742
  });
19737
19743
  //#endregion
19738
19744
  //#region src/Sandbox.service.ts
19739
- const keepTempDirCommand = (exit, cleanTempDir) => KeepTempDirCommand.make({
19740
- cleanTempDir: Match$1.value(cleanTempDir).pipe(Match$1.when("always", () => KeepTempDirAlways.make({})), Match$1.orElse((onFailure) => KeepTempDirOnFailure.make({ failed: onFailure }))),
19745
+ const removesTempDir = (exit, cleanTempDir) => Result.match(keepTempDir(KeepTempDirCommand.make({
19746
+ cleanTempDir,
19741
19747
  failed: Exit.isFailure(exit)
19742
- });
19743
- const removesTempDir = (exit, cleanTempDir) => Result.match(keepTempDir(keepTempDirCommand(exit, cleanTempDir)), {
19748
+ })), {
19744
19749
  onFailure: () => false,
19745
19750
  onSuccess: (decision) => Match$1.value(decision).pipe(Match$1.tag("TempDirRemoved", () => true), Match$1.tag("TempDirKept", () => false), Match$1.exhaustive)
19746
19751
  });
@@ -19781,7 +19786,7 @@ const makeTemporaryDirectory = Effect$1.fn(SpanTaxonomy_exports.Spans.sandboxMak
19781
19786
  yield* Effect$1.logDebug(`Using temp directory "${tmp}"`);
19782
19787
  yield* Effect$1.addFinalizer((exit) => Boolean$1.match(removesTempDir(exit, options.cleanTempDir), {
19783
19788
  onTrue: () => removeTempDirectory(tmp, parent, fs),
19784
- onFalse: () => Effect$1.logDebug("Not removing the temp dir because an error occurred")
19789
+ onFalse: () => Effect$1.logDebug(`Keeping stryker temp directory ${tmp}`)
19785
19790
  }).pipe(Effect$1.orDie));
19786
19791
  return { path: tmp };
19787
19792
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-js",
3
- "version": "14.0.0",
3
+ "version": "15.0.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
@@ -23,20 +23,20 @@
23
23
  "node": ">=24.13.1"
24
24
  },
25
25
  "dependencies": {
26
- "@effect/opentelemetry": "4.0.0-rc.117",
27
- "@effect/platform-node": "4.0.0-rc.117",
28
- "@effect/platform-node-shared": "4.0.0-rc.117",
26
+ "@effect/opentelemetry": "^4.0.0",
27
+ "@effect/platform-node": "^4.0.0",
28
+ "@effect/platform-node-shared": "^4.0.0",
29
29
  "@noble/hashes": "^2",
30
30
  "@opentelemetry/api": "^1.9.0",
31
31
  "@opentelemetry/exporter-metrics-otlp-http": "^0.222.0",
32
32
  "@opentelemetry/exporter-trace-otlp-http": "^0.222.0",
33
33
  "@opentelemetry/sdk-metrics": "^2.11.0",
34
34
  "@opentelemetry/sdk-trace-base": "^2.2.0",
35
- "@systemfsoftware/effect-cell-types": "^11.0.0",
36
- "@systemfsoftware/stryker-js-vm-runner": "npm:@systemfsoftware/stryker-js-vitest-runner@^8.0.2"
35
+ "@systemfsoftware/effect-cell-types": "^12.0.0",
36
+ "@systemfsoftware/stryker-js-vm-runner": "npm:@systemfsoftware/stryker-js-vitest-runner@^8.0.3"
37
37
  },
38
38
  "peerDependencies": {
39
- "effect": "4.0.0-rc.117"
39
+ "effect": "^4.0.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@effect/tsgo": "^0.45.0",
@@ -44,18 +44,17 @@
44
44
  "@oxc-parser/binding-wasm32-wasi": "^0.150.0",
45
45
  "@std/jsonc": "npm:@jsr/std__jsonc@^1",
46
46
  "@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
47
- "@systemfsoftware/differential-spec": "^0.6.1",
48
- "@systemfsoftware/effect-gherkin-spec": "^6.0.1",
49
- "@systemfsoftware/effect-schema-law": "^4.0.1",
50
- "@systemfsoftware/effect-schema-vite": "^2.3.0",
51
- "@systemfsoftware/oxlint-config-recommended": "^3.4.0",
47
+ "@systemfsoftware/differential-spec": "^1.0.0",
48
+ "@systemfsoftware/effect-gherkin-spec": "^7.0.0",
49
+ "@systemfsoftware/effect-schema-law": "^5.0.0",
50
+ "@systemfsoftware/oxlint-config-recommended": "^4.0.0",
52
51
  "@systemfsoftware/stryker-ignorer-effect-schema-declarations": "latest",
53
52
  "@systemfsoftware/stryker-ignorer-in-source-vitest-block": "latest",
54
53
  "@systemfsoftware/stryker-js": "latest",
55
54
  "@systemfsoftware/stryker-js-typescript-checker": "latest",
56
55
  "@systemfsoftware/stryker-js-vitest-runner": "latest",
57
56
  "@systemfsoftware/tsconfig": "^2.0.1",
58
- "@systemfsoftware/vitest": "^0.3.0",
57
+ "@systemfsoftware/vitest": "^1.0.0",
59
58
  "@types/node": "^24",
60
59
  "@vitest/browser-playwright": "^5",
61
60
  "@vitest/coverage-v8": "^5",
@@ -72,15 +71,15 @@
72
71
  "typescript": "^7",
73
72
  "vitest": "^5",
74
73
  "@systemfsoftware/stryker-config": "^0.1.0",
75
- "@systemfsoftware/stryker-framework-interface": "^0.0.0",
76
74
  "@systemfsoftware/stryker-ignorer-interface": "^0.1.1",
77
- "@systemfsoftware/stryker-js-instrumenter": "^11.0.0",
78
- "@systemfsoftware/stryker-js-plugin-interface": "^11.1.0",
79
- "@systemfsoftware/stryker-js-cli-contract": "^0.1.0",
80
- "@systemfsoftware/stryker-js-html-reporter": "^5.0.5",
81
- "@systemfsoftware/vitest-config": "^0.1.0",
75
+ "@systemfsoftware/stryker-js-instrumenter": "^12.0.0",
76
+ "@systemfsoftware/stryker-js-cli-contract": "^0.2.0",
77
+ "@systemfsoftware/stryker-framework-interface": "^0.0.0",
78
+ "@systemfsoftware/stryker-js-plugin-interface": "^12.0.0",
79
+ "@systemfsoftware/stryker-js-plugin-runtime": "^7.0.0",
82
80
  "@systemfsoftware/tsdown-config": "^0.1.0",
83
- "@systemfsoftware/stryker-js-plugin-runtime": "^6.0.5"
81
+ "@systemfsoftware/vitest-config": "^0.1.0",
82
+ "@systemfsoftware/stryker-js-html-reporter": "^6.0.0"
84
83
  },
85
84
  "publishConfig": {
86
85
  "access": "public",
@@ -112,7 +111,7 @@
112
111
  },
113
112
  "scripts": {
114
113
  "clean": "rimraf dist",
115
- "build": "pnpm run typecheck && rimraf dist && tsdown --config tsdown.bin.config.ts && tsdown --config tsdown.config.ts",
114
+ "build": "pnpm run typecheck && tsdown",
116
115
  "typecheck": "tsc -b",
117
116
  "test": "vitest run",
118
117
  "mutation": "stryker run",