@systemfsoftware/stryker-js 0.1.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @systemfsoftware/stryker-js
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - The console log threshold is now scoped to the run that set it. Two runs in one
8
+ process no longer share it, so a run that lowers its own level can no longer
9
+ quieten another run happening alongside it.
10
+
11
+ `setEngineLogLevel` is removed. The level travels with the run.
12
+
13
+ - `runMutationTest` now requires the run-identity services to be provided by the caller; the effect names them in its requirements channel.
14
+
15
+ - The public Run subpath's shouldKeepTempDir now accepts any failure channel instead of only S.SchemaError; the runMutationTest signature and event surface are unchanged
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies:
20
+ - @systemfsoftware/effect-cell-types@6.0.0
21
+
22
+ ## 0.2.0
23
+
24
+ ### Minor Changes
25
+
26
+ - Plugin code can now ask for the module-loader service instead of touching the host module API: it exposes the same `createRequire`/`isBuiltin` surface as the host module module, and the Node engine supplies it automatically. Plugins that declare their environment through the engine's plugin declaration get the service without extra wiring; upgrades should move the engine and its plugins in the same release.
27
+
28
+ ### Patch Changes
29
+
30
+ - Refreshed builds on the platform-services dependency graph; the packages no longer reach for host builtins directly. No CLI flags or option names change.
31
+
3
32
  ## 0.1.1
4
33
 
5
34
  ### Patch Changes
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  The mutation-testing language — the plugin kinds, capability ports, and schemas
4
4
  a mutation run is built from, with no platform. The Node host that runs a
5
- mutation test lives in `@systemfsoftware/stryker-js-platform-node`.
5
+ mutation test lives in `@systemfsoftware/stryker-js-engine`.
6
6
 
7
7
  ## Install
8
8
 
@@ -1,4 +1,4 @@
1
- import { t as ExitClass } from "./ExitClass.schema-BmCUn2Sm.mjs";
1
+ import { r as ExitClass } from "./ExitClass.schema-BmOIK5zT.mjs";
2
2
  import * as Context from "effect/Context";
3
3
  import * as S from "effect/Schema";
4
4
  import * as schema from "mutation-testing-report-schema/api";
@@ -1,3 +1,3 @@
1
- import { n as EvaluatorService, r as EvaluatorFailed, t as Evaluator } from "./Evaluator-DLVXUcVj.mjs";
2
- import { t as ExitClass } from "./ExitClass.schema-BmCUn2Sm.mjs";
1
+ import { n as EvaluatorService, r as EvaluatorFailed, t as Evaluator } from "./Evaluator-RZBS4oeh.mjs";
2
+ import { r as ExitClass } from "./ExitClass.schema-BmOIK5zT.mjs";
3
3
  export { Evaluator, EvaluatorFailed, EvaluatorService, type ExitClass };
@@ -1,8 +1,9 @@
1
- import { t as ExitClass } from "./ExitClass.schema-BmCUn2Sm.mjs";
1
+ import { n as ClassifyExitDecision, r as ExitClass, t as ClassifyExitCommand } from "./ExitClass.schema-BmOIK5zT.mjs";
2
2
  //#region src/ExitClass.d.ts
3
3
  declare const EXIT_CODE: Record<ExitClass, number>;
4
4
  declare function verdictExitClass(score: number | null, breakingThreshold: number | null): ExitClass | null;
5
5
  declare function highestExitClass(pending: Iterable<ExitClass>): ExitClass | null;
6
6
  declare function resolveExitCode(pending: Iterable<ExitClass>, signal: number | null): number;
7
+ declare const classifyExit: (command: ClassifyExitCommand) => ClassifyExitDecision;
7
8
  //#endregion
8
- export { EXIT_CODE, ExitClass, highestExitClass, resolveExitCode, verdictExitClass };
9
+ export { EXIT_CODE, ExitClass, classifyExit, highestExitClass, resolveExitCode, verdictExitClass };
@@ -1,4 +1,5 @@
1
1
  import * as S from "effect/Schema";
2
+ import * as Match from "effect/Match";
2
3
  //#region src/ExitClass.schema.ts
3
4
  const ExitClass = S.Literals([
4
5
  "VerdictFail",
@@ -6,6 +7,16 @@ const ExitClass = S.Literals([
6
7
  "RuntimeError",
7
8
  "InternalError"
8
9
  ]);
10
+ S.TaggedClass()("ClassifyExitCommand", {
11
+ pending: S.Array(ExitClass),
12
+ signal: S.NullOr(S.Number),
13
+ score: S.NullOr(S.Number),
14
+ breakingThreshold: S.NullOr(S.Number)
15
+ });
16
+ var ClassifyExitDecision = class extends S.TaggedClass()("ClassifyExitDecision", {
17
+ highestClass: S.NullOr(ExitClass),
18
+ verdictClass: S.NullOr(ExitClass)
19
+ }) {};
9
20
  //#endregion
10
21
  //#region src/ExitClass.ts
11
22
  const EXIT_CODE = {
@@ -30,5 +41,30 @@ function resolveExitCode(pending, signal) {
30
41
  if (highest === null) return 0;
31
42
  return EXIT_CODE[highest];
32
43
  }
44
+ const deriveVerdict = (score, breakingThreshold) => {
45
+ if (score === null || breakingThreshold === null) return null;
46
+ if (score < breakingThreshold) return "VerdictFail";
47
+ return null;
48
+ };
49
+ const rank = (value) => Match.value(value).pipe(Match.when("InternalError", () => 4), Match.when("RuntimeError", () => 3), Match.when("ConfigError", () => 2), Match.when("VerdictFail", () => 1), Match.exhaustive);
50
+ const withVerdict = (pending, verdict) => {
51
+ if (verdict === null) return pending;
52
+ if (pending.includes(verdict)) return pending;
53
+ return [...pending, verdict];
54
+ };
55
+ const highestOf = (values) => values.reduce((acc, cur) => {
56
+ if (acc === null) return cur;
57
+ if (rank(cur) > rank(acc)) return cur;
58
+ return acc;
59
+ }, null);
60
+ const classifyExit = (command) => {
61
+ const verdictClass = deriveVerdict(command.score, command.breakingThreshold);
62
+ const pendingWithVerdict = withVerdict(command.pending, verdictClass);
63
+ const highestClass = highestOf(pendingWithVerdict);
64
+ return ClassifyExitDecision.make({
65
+ highestClass,
66
+ verdictClass
67
+ });
68
+ };
33
69
  //#endregion
34
- export { EXIT_CODE, ExitClass, highestExitClass, resolveExitCode, verdictExitClass };
70
+ export { EXIT_CODE, ExitClass, classifyExit, highestExitClass, resolveExitCode, verdictExitClass };
@@ -0,0 +1,18 @@
1
+ import * as S from "effect/Schema";
2
+ //#region src/ExitClass.schema.d.ts
3
+ declare const ExitClass: S.Literals<readonly ["VerdictFail", "ConfigError", "RuntimeError", "InternalError"]>;
4
+ type ExitClass = typeof ExitClass.Type;
5
+ declare const ClassifyExitCommand_base: S.Class<ClassifyExitCommand, S.TaggedStruct<"ClassifyExitCommand", {
6
+ readonly pending: S.$Array<S.Literals<readonly ["VerdictFail", "ConfigError", "RuntimeError", "InternalError"]>>;
7
+ readonly signal: S.NullOr<S.Number>;
8
+ readonly score: S.NullOr<S.Number>;
9
+ readonly breakingThreshold: S.NullOr<S.Number>;
10
+ }>, {}>;
11
+ declare class ClassifyExitCommand extends ClassifyExitCommand_base {}
12
+ declare const ClassifyExitDecision_base: S.Class<ClassifyExitDecision, S.TaggedStruct<"ClassifyExitDecision", {
13
+ readonly highestClass: S.NullOr<S.Literals<readonly ["VerdictFail", "ConfigError", "RuntimeError", "InternalError"]>>;
14
+ readonly verdictClass: S.NullOr<S.Literals<readonly ["VerdictFail", "ConfigError", "RuntimeError", "InternalError"]>>;
15
+ }>, {}>;
16
+ declare class ClassifyExitDecision extends ClassifyExitDecision_base {}
17
+ //#endregion
18
+ export { ClassifyExitDecision as n, ExitClass as r, ClassifyExitCommand as t };
@@ -0,0 +1,31 @@
1
+ import * as Context from "effect/Context";
2
+ //#region src/Module.d.ts
3
+ /**
4
+ * The subset of `node:module`'s `createRequire` result this port certifies: a
5
+ * require function bound to one path, plus its resolution. Calling it loads
6
+ * the specifier exactly as a module evaluated next to that path would.
7
+ */
8
+ interface ModuleRequire {
9
+ (request: string): unknown;
10
+ resolve(request: string, options?: {
11
+ readonly paths?: readonly string[];
12
+ }): string;
13
+ }
14
+ declare const Module_base: Context.ServiceClass<Module, "@systemfsoftware/stryker-js/Module", {
15
+ readonly createRequire: (filename: string | URL) => ModuleRequire;
16
+ readonly isBuiltin: (moduleName: string) => boolean;
17
+ }>;
18
+ /**
19
+ * Port over the host module loader, shaped as the subset of `node:module`
20
+ * feature code may use: `createRequire` and `isBuiltin`. Resolving a
21
+ * specifier against a project directory, importing a plugin, and asking
22
+ * whether a name is a builtin all go through this one tag; no feature module
23
+ * touches the host module API. The Node implementation ships in the
24
+ * composition-root package (`@systemfsoftware/stryker-js-cli`); tests that do
25
+ * not need real plugin resolution substitute a layer returning fixed paths.
26
+ *
27
+ * @since 2.0.0
28
+ */
29
+ declare class Module extends Module_base {}
30
+ //#endregion
31
+ export { ModuleRequire as n, Module as t };
@@ -0,0 +1,2 @@
1
+ import { n as ModuleRequire, t as Module } from "./Module-DHKEMAFI.mjs";
2
+ export { Module, ModuleRequire };
@@ -0,0 +1,16 @@
1
+ import * as Context from "effect/Context";
2
+ //#region src/Module.ts
3
+ /**
4
+ * Port over the host module loader, shaped as the subset of `node:module`
5
+ * feature code may use: `createRequire` and `isBuiltin`. Resolving a
6
+ * specifier against a project directory, importing a plugin, and asking
7
+ * whether a name is a builtin all go through this one tag; no feature module
8
+ * touches the host module API. The Node implementation ships in the
9
+ * composition-root package (`@systemfsoftware/stryker-js-cli`); tests that do
10
+ * not need real plugin resolution substitute a layer returning fixed paths.
11
+ *
12
+ * @since 2.0.0
13
+ */
14
+ var Module = class extends Context.Service()("@systemfsoftware/stryker-js/Module") {};
15
+ //#endregion
16
+ export { Module };
@@ -1,7 +1,8 @@
1
1
  import { n as Checker } from "./Checker-DYgIIEai.mjs";
2
2
  import { J as TestRunner } from "./Mutant-BPRJTF8f.mjs";
3
- import { t as Evaluator } from "./Evaluator-DLVXUcVj.mjs";
3
+ import { t as Evaluator } from "./Evaluator-RZBS4oeh.mjs";
4
4
  import { t as Ignorer } from "./Ignorer-BUY68FZQ.mjs";
5
+ import { t as Module } from "./Module-DHKEMAFI.mjs";
5
6
  import { c as Reporter } from "./Reporter-eZ3M7lO6.mjs";
6
7
  import * as Context from "effect/Context";
7
8
  import * as S from "effect/Schema";
@@ -118,7 +119,7 @@ interface PluginInterfaces {
118
119
  Ignore: Ignorer;
119
120
  Evaluator: Evaluator;
120
121
  }
121
- type PluginEnvironment = RunConfiguration | SandboxDirectory | FileSystem.FileSystem | Path.Path;
122
+ type PluginEnvironment = RunConfiguration | SandboxDirectory | FileSystem.FileSystem | Module | Path.Path;
122
123
  type AnyPluginContribution = { [K in PluginKind]: PluginContribution<K>; }[PluginKind];
123
124
  type ContributionOf<K extends PluginKind> = Extract<AnyPluginContribution, {
124
125
  readonly kind: K;
package/dist/Plugin.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as PluginEnvironment, c as RunConfiguration, d as declarePlugin, f as PluginContribution, i as MergedPluginServices, l as SandboxDirectory, m as Shadowing, n as ComposedPlugins, o as PluginInterfaces, p as PluginKind, r as ContributionOf, t as AnyPluginContribution, u as composePlugins } from "./Plugin-DypwaPHd.mjs";
1
+ import { a as PluginEnvironment, c as RunConfiguration, d as declarePlugin, f as PluginContribution, i as MergedPluginServices, l as SandboxDirectory, m as Shadowing, n as ComposedPlugins, o as PluginInterfaces, p as PluginKind, r as ContributionOf, t as AnyPluginContribution, u as composePlugins } from "./Plugin-DcDAIBQi.mjs";
2
2
  export { AnyPluginContribution, ComposedPlugins, ContributionOf, MergedPluginServices, PluginContribution, PluginEnvironment, PluginInterfaces, PluginKind, RunConfiguration, SandboxDirectory, Shadowing, composePlugins, declarePlugin };
@@ -2,10 +2,9 @@ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
2
  import * as Context from "effect/Context";
3
3
  import * as S from "effect/Schema";
4
4
  import * as Effect from "effect/Effect";
5
- import { Cell, Wire, Workflow } from "@systemfsoftware/effect-cell-types";
6
5
  import * as Exit from "effect/Exit";
7
- import { pipe } from "effect/Function";
8
6
  import * as Result from "effect/Result";
7
+ import { Wire } from "@systemfsoftware/effect-cell-types";
9
8
  //#region src/Run.schema.ts
10
9
  const RunPhase = S.Literals([
11
10
  "prepare",
@@ -137,8 +136,6 @@ var RunOutput = class extends S.TaggedClass()("RunOutput", {
137
136
  S.TaggedError()("RunDecodeError", { message: S.String });
138
137
  S.TaggedError()("RunReadError", { message: S.String });
139
138
  S.TaggedError()("RunWriteError", { message: S.String });
140
- //#endregion
141
- //#region src/Run.workflow.ts
142
139
  var PlanMutationRunCommand = class extends S.TaggedClass()("PlanMutationRunCommand", {
143
140
  configMutatePatterns: Wire.mint(S.Array(Wire.mint(S.String))),
144
141
  configMutatorNames: Wire.mint(S.Array(Wire.mint(S.String))),
@@ -149,27 +146,6 @@ var MutationRunPlan = class extends S.TaggedClass()("MutationRunPlan", {
149
146
  mutatePatterns: Wire.mint(S.Array(Wire.mint(S.String))),
150
147
  mutatorNames: Wire.mint(S.Array(Wire.mint(S.String)))
151
148
  }) {};
152
- S.TaggedError()("PlanMutationRunError", {
153
- message: S.String,
154
- detail: S.String
155
- });
156
- const selectMutatePatterns = (target, fallback) => {
157
- if (target.length > 0) return [...target];
158
- return [...fallback];
159
- };
160
- const selectMutatorNames = (available, fallback) => {
161
- if (available.length > 0) return [...available];
162
- return [...fallback];
163
- };
164
- const decidePlan = (command) => {
165
- const mutatePatterns = selectMutatePatterns(command.targetMutatePatterns, command.configMutatePatterns);
166
- const mutatorNames = selectMutatorNames(command.availableMutators, command.configMutatorNames);
167
- return Result.succeed(MutationRunPlan.make({
168
- mutatePatterns,
169
- mutatorNames
170
- }));
171
- };
172
- const planMutationRun = Workflow.make(PlanMutationRunCommand, (command) => decidePlan(command));
173
149
  //#endregion
174
150
  //#region src/Run.ts
175
151
  var Run_exports = /* @__PURE__ */ __exportAll({
@@ -189,37 +165,35 @@ var Run_exports = /* @__PURE__ */ __exportAll({
189
165
  RunPhase: () => RunPhase,
190
166
  RunStarted: () => RunStarted,
191
167
  VerdictReached: () => VerdictReached,
168
+ planMutationRun: () => planMutationRun,
192
169
  runMutationTest: () => runMutationTest,
193
170
  shouldKeepTempDir: () => shouldKeepTempDir
194
171
  });
195
- /**
196
- * Where a run's events go.
197
- *
198
- * The error channel carries `Cause.Done`, the graceful completion signal: a finished run
199
- * ends the queue, and `Stream.fromQueue` excludes `Done` from its own error channel, so the
200
- * consumer sees end-of-stream. Interrupting the queue instead would end it with an
201
- * interrupt cause, and joining the drain would then re-raise that into the caller and lose
202
- * the exit code the run had already decided.
203
- */
172
+ const firstNonEmpty = (preferred, fallback) => {
173
+ if (preferred.length > 0) return [...preferred];
174
+ return [...fallback];
175
+ };
176
+ const planMutationRun = (command) => MutationRunPlan.make({
177
+ mutatePatterns: firstNonEmpty(command.targetMutatePatterns, command.configMutatePatterns),
178
+ mutatorNames: firstNonEmpty(command.availableMutators, command.configMutatorNames)
179
+ });
204
180
  var RunEvents = class extends Context.Service()("~@systemfsoftware/stryker-js/RunEvents") {};
205
181
  var RunIdentity = class extends Context.Service()("~@systemfsoftware/stryker-js/RunIdentity") {};
206
- const mutationRunDescription = (io, services) => pipe(Cell.read((command) => Effect.provideContext(io.read(command), services)), Cell.decode((raw) => S.decodeUnknownResult(PlanMutationRunCommand)(raw)), Cell.decide(planMutationRun), Cell.encode((outcome) => Result.match(outcome, {
207
- onFailure: (error) => new RunOutput({
208
- verdictJson: JSON.stringify({ error: error.message }),
209
- exitCode: 1
210
- }),
211
- onSuccess: (plan) => new RunOutput({
182
+ const runMutationTest = (io, command) => Effect.gen(function* () {
183
+ const raw = yield* io.read(command);
184
+ const planCommand = yield* Result.match(S.decodeUnknownResult(PlanMutationRunCommand)(raw), {
185
+ onFailure: (error) => Effect.fail(error),
186
+ onSuccess: (decoded) => Effect.succeed(decoded)
187
+ });
188
+ const plan = planMutationRun(planCommand);
189
+ return yield* io.write(new RunOutput({
212
190
  verdictJson: JSON.stringify({
213
191
  mutate: plan.mutatePatterns,
214
- mutators: plan.mutatorNames
192
+ mutatorNames: plan.mutatorNames
215
193
  }),
216
194
  exitCode: 0
217
- })
218
- })), Cell.write((output) => Effect.provideContext(io.write(output), services)));
219
- const runMutationTest = (io, command) => Effect.gen(function* () {
220
- const services = yield* Effect.context();
221
- return yield* Cell.apply(mutationRunDescription(io, services), command);
195
+ }));
222
196
  });
223
197
  const shouldKeepTempDir = (exit, cleanTempDir) => Exit.isFailure(exit) && cleanTempDir !== "always";
224
198
  //#endregion
225
- export { RunPhase as _, shouldKeepTempDir as a, ManifestRendered as c, MutantTested as d, OutputMode as f, RunFailed as g, RunEvent as h, runMutationTest as i, ModeSignal as l, PlanKnown as m, RunIdentity as n, Heartbeat as o, PhaseEntered as p, Run_exports as r, HelpRendered as s, RunEvents as t, MutantStatus as u, RunStarted as v, VerdictReached as y };
199
+ export { RunFailed as _, runMutationTest as a, VerdictReached as b, HelpRendered as c, MutantStatus as d, MutantTested as f, RunEvent as g, PlanKnown as h, planMutationRun as i, ManifestRendered as l, PhaseEntered as m, RunIdentity as n, shouldKeepTempDir as o, OutputMode as p, Run_exports as r, Heartbeat as s, RunEvents as t, ModeSignal as u, RunPhase as v, RunStarted as y };
@@ -1,9 +1,8 @@
1
1
  import * as Context from "effect/Context";
2
2
  import * as S from "effect/Schema";
3
3
  import * as Effect from "effect/Effect";
4
- import { Wire, Workflow } from "@systemfsoftware/effect-cell-types";
5
4
  import * as Exit from "effect/Exit";
6
- import "effect/Result";
5
+ import { Wire } from "@systemfsoftware/effect-cell-types";
7
6
  import * as Cause from "effect/Cause";
8
7
  import * as Queue from "effect/Queue";
9
8
  //#region src/Run.schema.d.ts
@@ -146,26 +145,23 @@ declare const RunOutput_base: S.Class<RunOutput, S.TaggedStruct<"RunOutput", {
146
145
  readonly exitCode: S.Finite;
147
146
  }>, {}>;
148
147
  declare class RunOutput extends RunOutput_base {}
149
- //#endregion
150
- //#region src/Run.workflow.d.ts
151
- declare const PlanMutationRunError_base: S.Class<PlanMutationRunError, S.TaggedStruct<"PlanMutationRunError", {
152
- readonly message: S.String;
153
- readonly detail: S.String;
154
- }>, import("effect/Cause").YieldableError>;
155
- declare class PlanMutationRunError extends PlanMutationRunError_base {}
148
+ declare const PlanMutationRunCommand_base: S.Class<PlanMutationRunCommand, S.TaggedStruct<"PlanMutationRunCommand", {
149
+ readonly configMutatePatterns: S.$Array<S.String & Wire.Mark> & Wire.Mark;
150
+ readonly configMutatorNames: S.$Array<S.String & Wire.Mark> & Wire.Mark;
151
+ readonly targetMutatePatterns: S.$Array<S.String & Wire.Mark> & Wire.Mark;
152
+ readonly availableMutators: S.$Array<S.String & Wire.Mark> & Wire.Mark;
153
+ }>, {}>;
154
+ declare class PlanMutationRunCommand extends PlanMutationRunCommand_base {}
155
+ declare const MutationRunPlan_base: S.Class<MutationRunPlan, S.TaggedStruct<"MutationRunPlan", {
156
+ readonly mutatePatterns: S.$Array<S.String & Wire.Mark> & Wire.Mark;
157
+ readonly mutatorNames: S.$Array<S.String & Wire.Mark> & Wire.Mark;
158
+ }>, {}>;
159
+ declare class MutationRunPlan extends MutationRunPlan_base {}
156
160
  declare namespace Run_d_exports {
157
- export { Heartbeat, HelpRendered, Location, ManifestRendered, ModeSignal, MutantStatus, MutantTested, MutationRunIo, OutputMode, PhaseEntered, PlanKnown, Position, RunEvent, RunEvent as RunEventType, RunEvents, RunFailed, RunIdentity, RunIdentityShape, RunPhase, RunStarted, RunTerminalEvent, VerdictReached, runMutationTest, shouldKeepTempDir };
161
+ export { Heartbeat, HelpRendered, Location, ManifestRendered, ModeSignal, MutantStatus, MutantTested, MutationRunIo, OutputMode, PhaseEntered, PlanKnown, Position, RunEvent, RunEvent as RunEventType, RunEvents, RunFailed, RunIdentity, RunIdentityShape, RunPhase, RunStarted, RunTerminalEvent, VerdictReached, planMutationRun, runMutationTest, shouldKeepTempDir };
158
162
  }
163
+ declare const planMutationRun: (command: PlanMutationRunCommand) => MutationRunPlan;
159
164
  declare const RunEvents_base: Context.ServiceClass<RunEvents, "~@systemfsoftware/stryker-js/RunEvents", Queue.Queue<Heartbeat | HelpRendered | ManifestRendered | MutantTested | PhaseEntered | PlanKnown | RunFailed | RunStarted | VerdictReached, Cause.Done<void>>>;
160
- /**
161
- * Where a run's events go.
162
- *
163
- * The error channel carries `Cause.Done`, the graceful completion signal: a finished run
164
- * ends the queue, and `Stream.fromQueue` excludes `Done` from its own error channel, so the
165
- * consumer sees end-of-stream. Interrupting the queue instead would end it with an
166
- * interrupt cause, and joining the drain would then re-raise that into the caller and lose
167
- * the exit code the run had already decided.
168
- */
169
165
  declare class RunEvents extends RunEvents_base {}
170
166
  interface RunIdentityShape {
171
167
  readonly runId: string;
@@ -178,6 +174,6 @@ interface MutationRunIo {
178
174
  readonly write: (output: RunOutput) => Effect.Effect<void, S.SchemaError, RunIdentity>;
179
175
  }
180
176
  declare const runMutationTest: (io: MutationRunIo, command: RunCommand) => Effect.Effect<void, S.SchemaError, RunIdentity>;
181
- declare const shouldKeepTempDir: (exit: Exit.Exit<void, PlanMutationRunError | S.SchemaError>, cleanTempDir: 'always' | boolean) => boolean;
177
+ declare const shouldKeepTempDir: (exit: Exit.Exit<void, unknown>, cleanTempDir: 'always' | boolean) => boolean;
182
178
  //#endregion
183
- export { RunTerminalEvent as C, RunStarted as S, PlanKnown as _, Run_d_exports as a, RunFailed as b, Heartbeat as c, ManifestRendered as d, ModeSignal as f, PhaseEntered as g, OutputMode as h, RunIdentityShape as i, HelpRendered as l, MutantTested as m, RunEvents as n, runMutationTest as o, MutantStatus as p, RunIdentity as r, shouldKeepTempDir as s, MutationRunIo as t, Location as u, Position as v, VerdictReached as w, RunPhase as x, RunEvent as y };
179
+ export { RunStarted as C, RunPhase as S, VerdictReached as T, PhaseEntered as _, Run_d_exports as a, RunEvent as b, shouldKeepTempDir as c, Location as d, ManifestRendered as f, OutputMode as g, MutantTested as h, RunIdentityShape as i, Heartbeat as l, MutantStatus as m, RunEvents as n, planMutationRun as o, ModeSignal as p, RunIdentity as r, runMutationTest as s, MutationRunIo as t, HelpRendered as u, PlanKnown as v, RunTerminalEvent as w, RunFailed as x, Position as y };
package/dist/Run.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { C as RunTerminalEvent, S as RunStarted, _ as PlanKnown, b as RunFailed, c as Heartbeat, d as ManifestRendered, f as ModeSignal, g as PhaseEntered, h as OutputMode, i as RunIdentityShape, l as HelpRendered, m as MutantTested, n as RunEvents, o as runMutationTest, p as MutantStatus, r as RunIdentity, s as shouldKeepTempDir, t as MutationRunIo, u as Location, v as Position, w as VerdictReached, x as RunPhase, y as RunEvent } from "./Run-BudLsVwF.mjs";
2
- export { Heartbeat, HelpRendered, type Location, ManifestRendered, ModeSignal, MutantStatus, MutantTested, MutationRunIo, OutputMode, PhaseEntered, PlanKnown, type Position, RunEvent, type RunEvent as RunEventType, RunEvents, RunFailed, RunIdentity, RunIdentityShape, RunPhase, RunStarted, type RunTerminalEvent, VerdictReached, runMutationTest, shouldKeepTempDir };
1
+ import { C as RunStarted, S as RunPhase, T as VerdictReached, _ as PhaseEntered, b as RunEvent, c as shouldKeepTempDir, d as Location, f as ManifestRendered, g as OutputMode, h as MutantTested, i as RunIdentityShape, l as Heartbeat, m as MutantStatus, n as RunEvents, o as planMutationRun, p as ModeSignal, r as RunIdentity, s as runMutationTest, t as MutationRunIo, u as HelpRendered, v as PlanKnown, w as RunTerminalEvent, x as RunFailed, y as Position } from "./Run-BnmGGgWj.mjs";
2
+ export { Heartbeat, HelpRendered, type Location, ManifestRendered, ModeSignal, MutantStatus, MutantTested, MutationRunIo, OutputMode, PhaseEntered, PlanKnown, type Position, RunEvent, type RunEvent as RunEventType, RunEvents, RunFailed, RunIdentity, RunIdentityShape, RunPhase, RunStarted, type RunTerminalEvent, VerdictReached, planMutationRun, runMutationTest, shouldKeepTempDir };
package/dist/Run.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as RunPhase, a as shouldKeepTempDir, c as ManifestRendered, d as MutantTested, f as OutputMode, g as RunFailed, h as RunEvent, i as runMutationTest, l as ModeSignal, m as PlanKnown, n as RunIdentity, o as Heartbeat, p as PhaseEntered, s as HelpRendered, t as RunEvents, u as MutantStatus, v as RunStarted, y as VerdictReached } from "./Run-lXratlN7.mjs";
2
- export { Heartbeat, HelpRendered, ManifestRendered, ModeSignal, MutantStatus, MutantTested, OutputMode, PhaseEntered, PlanKnown, RunEvent, RunEvents, RunFailed, RunIdentity, RunPhase, RunStarted, VerdictReached, runMutationTest, shouldKeepTempDir };
1
+ import { _ as RunFailed, a as runMutationTest, b as VerdictReached, c as HelpRendered, d as MutantStatus, f as MutantTested, g as RunEvent, h as PlanKnown, i as planMutationRun, l as ManifestRendered, m as PhaseEntered, n as RunIdentity, o as shouldKeepTempDir, p as OutputMode, s as Heartbeat, t as RunEvents, u as ModeSignal, v as RunPhase, y as RunStarted } from "./Run-BcDo-hIC.mjs";
2
+ export { Heartbeat, HelpRendered, ManifestRendered, ModeSignal, MutantStatus, MutantTested, OutputMode, PhaseEntered, PlanKnown, RunEvent, RunEvents, RunFailed, RunIdentity, RunPhase, RunStarted, VerdictReached, planMutationRun, runMutationTest, shouldKeepTempDir };
@@ -103,12 +103,14 @@ const WarningOptions = openStruct({
103
103
  unserializableOptions: defaulted(Wire.mint(S.Boolean), true),
104
104
  slow: defaulted(Wire.mint(S.Boolean), true)
105
105
  });
106
+ const ConcurrencyCount = Wire.mint(Wire.mint(S.Finite).pipe(S.check(S.isGreaterThanOrEqualTo(1))));
107
+ const ConcurrencyPercent = Wire.mint(Wire.mint(S.String).pipe(S.check(S.isPattern(/^(100|[1-9]?[0-9])%$/))));
106
108
  const StrykerOptionsSchema = S.StructWithRest(S.Struct({
107
109
  allowConsoleColors: defaulted(Wire.mint(S.Boolean), true),
108
110
  buildCommand: S.optional(Wire.mint(S.String)),
109
111
  checkers: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), []),
110
112
  checkerNodeArgs: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), []),
111
- concurrency: S.optional(Wire.mint(S.Union([Wire.mint(Wire.mint(S.Finite).pipe(S.check(S.isGreaterThanOrEqualTo(1)))), Wire.mint(Wire.mint(S.String).pipe(S.check(S.isPattern(/^(100|[1-9]?[0-9])%$/))))]))),
113
+ concurrency: S.optional(Wire.mint(S.Union([ConcurrencyCount, ConcurrencyPercent]))),
112
114
  commandRunner: defaulted(CommandRunnerOptionsSchema, { command: "npm test" }),
113
115
  coverageAnalysis: defaulted(CoverageAnalysisMode, RENDERED_OPTION_DEFAULTS$1.coverageAnalysis),
114
116
  clearTextReporter: defaulted(ClearTextReporterOptions, {
package/dist/Schema.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as strykerReportBugUrl, c as PackageManager, i as strykerCoreSchema, l as ReportType, o as CoverageAnalysisMode, r as propertyPath, s as LogLevel, t as RENDERED_OPTION_DEFAULTS, u as StrykerOptionsSchema } from "./Schema-BAKDG_jC.mjs";
1
+ import { a as strykerReportBugUrl, c as PackageManager, i as strykerCoreSchema, l as ReportType, o as CoverageAnalysisMode, r as propertyPath, s as LogLevel, t as RENDERED_OPTION_DEFAULTS, u as StrykerOptionsSchema } from "./Schema-CdNkubPi.mjs";
2
2
  export { CoverageAnalysisMode, LogLevel, PackageManager, RENDERED_OPTION_DEFAULTS, ReportType, StrykerOptionsSchema, propertyPath, strykerCoreSchema, strykerReportBugUrl };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { i as Checker_d_exports } from "./Checker-DYgIIEai.mjs";
2
2
  import { Z as TestRunner_d_exports, v as Mutant_d_exports } from "./Mutant-BPRJTF8f.mjs";
3
3
  import { r as Ignorer_d_exports } from "./Ignorer-BUY68FZQ.mjs";
4
- import { s as Plugin_d_exports } from "./Plugin-DypwaPHd.mjs";
4
+ import { s as Plugin_d_exports } from "./Plugin-DcDAIBQi.mjs";
5
5
  import { u as Reporter_d_exports } from "./Reporter-eZ3M7lO6.mjs";
6
- import { a as Run_d_exports } from "./Run-BudLsVwF.mjs";
6
+ import { a as Run_d_exports } from "./Run-BnmGGgWj.mjs";
7
7
  import { a as Schema_d_exports } from "./Schema-CXKiLnTu.mjs";
8
8
  export { Checker_d_exports as Checker, Ignorer_d_exports as Ignorer, Mutant_d_exports as Mutant, Plugin_d_exports as Plugin, Reporter_d_exports as Reporter, Run_d_exports as Run, Schema_d_exports as Schema, TestRunner_d_exports as TestRunner };
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { t as Ignorer_exports } from "./Ignorer.mjs";
3
3
  import { t as Mutant_exports } from "./Mutant.mjs";
4
4
  import { t as Plugin_exports } from "./Plugin-Ceh1G8Dz.mjs";
5
5
  import { n as Reporter_exports } from "./Reporter-COVWW1my.mjs";
6
- import { r as Run_exports } from "./Run-lXratlN7.mjs";
7
- import { n as Schema_exports } from "./Schema-BAKDG_jC.mjs";
6
+ import { r as Run_exports } from "./Run-BcDo-hIC.mjs";
7
+ import { n as Schema_exports } from "./Schema-CdNkubPi.mjs";
8
8
  import { n as TestRunner_exports } from "./TestRunner-DC9U8Unb.mjs";
9
9
  export { Checker_exports as Checker, Ignorer_exports as Ignorer, Mutant_exports as Mutant, Plugin_exports as Plugin, Reporter_exports as Reporter, Run_exports as Run, Schema_exports as Schema, TestRunner_exports as TestRunner };
@@ -1,4 +1,4 @@
1
- import { c as RunConfiguration } from "./Plugin-DypwaPHd.mjs";
1
+ import { c as RunConfiguration } from "./Plugin-DcDAIBQi.mjs";
2
2
  //#region src/provided-options.d.ts
3
3
  /**
4
4
  * The run's options exactly as the `RunConfiguration` service hands them over.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-js",
3
- "version": "0.1.1",
3
+ "version": "1.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/systemfsoftware/systemfsoftware.git",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "effect": "^4.0.0-rc.112",
22
22
  "mutation-testing-report-schema": "3.7.3",
23
- "@systemfsoftware/effect-cell-types": "^5.0.2"
23
+ "@systemfsoftware/effect-cell-types": "^6.0.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@systemfsoftware/arethetypeswrong-cli": "^1.1.1",
@@ -31,10 +31,10 @@
31
31
  "tsdown": "^0.22.14",
32
32
  "typescript": "^7",
33
33
  "vitest": "^4",
34
- "@systemfsoftware/all": "^1.0.2",
35
- "@systemfsoftware/tsconfig": "^1.3.3",
36
34
  "@systemfsoftware/effect-schema-law": "^2.0.1",
37
35
  "@systemfsoftware/effect-schema-vite": "^2.0.2",
36
+ "@systemfsoftware/all": "^1.1.2",
37
+ "@systemfsoftware/tsconfig": "^1.3.3",
38
38
  "@systemfsoftware/vitest-config": "^0.1.0"
39
39
  },
40
40
  "publishConfig": {
@@ -47,6 +47,7 @@
47
47
  "./Evaluator": "./dist/Evaluator.mjs",
48
48
  "./ExitClass": "./dist/ExitClass.mjs",
49
49
  "./Ignorer": "./dist/Ignorer.mjs",
50
+ "./Module": "./dist/Module.mjs",
50
51
  "./Mutant": "./dist/Mutant.mjs",
51
52
  "./output-file": "./dist/output-file.mjs",
52
53
  "./Plugin": "./dist/Plugin.mjs",
@@ -1,6 +0,0 @@
1
- import * as S from "effect/Schema";
2
- //#region src/ExitClass.schema.d.ts
3
- declare const ExitClass: S.Literals<readonly ["VerdictFail", "ConfigError", "RuntimeError", "InternalError"]>;
4
- type ExitClass = typeof ExitClass.Type;
5
- //#endregion
6
- export { ExitClass as t };