@systemfsoftware/stryker-js 9.0.0 → 10.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.
Files changed (28) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/Run.schema-BBKIZ81u.d.mts +165 -0
  3. package/dist/Run.schema-C0Cxsfe9.mjs +8746 -0
  4. package/dist/config.d.mts +2 -1
  5. package/dist/events.d.mts +2 -0
  6. package/dist/events.mjs +2 -0
  7. package/dist/{getMachineId-bsd-C6bLIaiv.mjs → getMachineId-bsd-DGLFi8Ia.mjs} +1 -1
  8. package/dist/{getMachineId-bsd-CXSiHDga.mjs → getMachineId-bsd-YZILidse.mjs} +1 -1
  9. package/dist/{getMachineId-darwin-DPZ0kdKD.mjs → getMachineId-darwin-B_CgClId.mjs} +1 -1
  10. package/dist/{getMachineId-darwin-D3cIKeqx.mjs → getMachineId-darwin-Bfwczd9V.mjs} +1 -1
  11. package/dist/{getMachineId-linux-Ci8OVJU0.mjs → getMachineId-linux-CPAE174r.mjs} +1 -1
  12. package/dist/{getMachineId-linux-CQwLSlZk.mjs → getMachineId-linux-DprzjpT3.mjs} +1 -1
  13. package/dist/{getMachineId-unsupported-PX0hnW6X.mjs → getMachineId-unsupported-Ce9f061A.mjs} +1 -1
  14. package/dist/{getMachineId-unsupported-_ExL3Avl.mjs → getMachineId-unsupported-j7fStyPQ.mjs} +1 -1
  15. package/dist/{getMachineId-win-D9Tb0p7w.mjs → getMachineId-win-DETv1PQd.mjs} +1 -1
  16. package/dist/{getMachineId-win-BCsS9pC_.mjs → getMachineId-win-ZJtT3h1l.mjs} +1 -1
  17. package/dist/{output-mode-CE6VNHfH.d.mts → index-DnAm4mSL.d.mts} +52 -93
  18. package/dist/index.d.mts +88 -78
  19. package/dist/index.mjs +3 -2
  20. package/dist/main.mjs +11105 -10791
  21. package/dist/{mutation-test.cell-BTa-up9u.d.mts → mutation-test.cell-m9T-X2Qx.d.mts} +11 -126
  22. package/dist/output-mode-CfGHDpi5.d.mts +17 -0
  23. package/dist/promises.d.mts +2 -2
  24. package/dist/promises.mjs +1 -1
  25. package/dist/src-Bu4i-Lt2.mjs +6600 -0
  26. package/dist/{wasm-Dr7kZatW.mjs → wasm-Dg4JcQ2d.mjs} +1 -1
  27. package/package.json +8 -4
  28. package/dist/src-BQuaL-fB.mjs +0 -15629
@@ -1,44 +1,32 @@
1
- import { $ as TestResult, Et as RunMutantResult, L as PartialStrykerOptions, P as MutationTestResult, St as MutateDescription, U as ReporterFactory, Y as StrykerOptions, b as ExitClass, ct as WorkerPluginKind, dt as FileDescription, f as CompleteDryRunResult, ft as FileDescriptions, ht as Mutant, q as ReporterRpcs, r as ResolvedMode, ut as CoverageData } from "./output-mode-CE6VNHfH.mjs";
1
+ import { B as ReporterFactory, Ct as RunMutantResult, K as StrykerOptions, P as PartialStrykerOptions, W as ReporterRpcs, X as TestResult, _ as ExitClass, at as WorkerPluginKind, ct as FileDescription, ft as Mutant, j as MutationTestResult, l as CompleteDryRunResult, lt as FileDescriptions, st as CoverageData, yt as MutateDescription } from "./index-DnAm4mSL.mjs";
2
+ import { r as ResolvedMode } from "./output-mode-CfGHDpi5.mjs";
3
+ import { _ as RunStarted, c as PhaseEntered, i as HelpRendered, l as PlanKnown, m as RunMutantTested, p as RunFailed, r as Heartbeat, x as VerdictReached } from "./Run.schema-BBKIZ81u.mjs";
2
4
  import * as Effect$1 from "effect/Effect";
3
5
  import * as FileSystem from "effect/FileSystem";
4
6
  import * as Path from "effect/Path";
5
7
  import * as Stdio from "effect/Stdio";
6
- import { Cell } from "@systemfsoftware/effect-cell-types";
7
- import * as S from "effect/Schema";
8
- import "effect/Option";
9
- import { Schema } from "effect";
10
8
  import * as Context from "effect/Context";
11
- import * as Rpc from "effect/unstable/rpc/Rpc";
12
- import * as RpcGroup from "effect/unstable/rpc/RpcGroup";
13
9
  import * as Layer from "effect/Layer";
10
+ import "effect/Option";
14
11
  import * as Queue from "effect/Queue";
15
12
  import "effect/Result";
16
- import * as Cause from "effect/Cause";
13
+ import * as S from "effect/Schema";
14
+ import { Cell } from "@systemfsoftware/effect-cell-types";
15
+ import { Schema } from "effect";
16
+ import * as Rpc from "effect/unstable/rpc/Rpc";
17
+ import * as RpcGroup from "effect/unstable/rpc/RpcGroup";
17
18
  import * as Scope from "effect/Scope";
18
19
  import * as EffectDuration from "effect/Duration";
19
20
  import * as MutableHashMap from "effect/MutableHashMap";
20
21
  import * as MutableHashSet from "effect/MutableHashSet";
21
22
  import * as HashMap from "effect/HashMap";
23
+ import * as Cause from "effect/Cause";
22
24
  import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner";
23
25
  import * as RpcClient from "effect/unstable/rpc/RpcClient";
24
26
  import * as Schedule from "effect/Schedule";
25
27
  import { PlatformError } from "effect/PlatformError";
26
28
  import { RpcClientError } from "effect/unstable/rpc/RpcClientError";
27
29
  import * as Socket from "effect/unstable/socket/Socket";
28
- //#region src/Run.schema.d.ts
29
- declare const TypeId: '~stryker/mutation-run/StageError';
30
- declare const StageError_base: S.Class<StageError, S.TaggedStruct<"StageError", {
31
- readonly stage: S.Literals<readonly ["prepare", "instrument", "dryRun", "dryRunNoTests", "mutationTest"]>;
32
- readonly reason: S.String;
33
- readonly cause: S.optional<S.Defect>;
34
- readonly command: S.optional<S.String>;
35
- }>, import("effect/Cause").YieldableError>;
36
- declare class StageError extends StageError_base {
37
- readonly [TypeId]: "~stryker/mutation-run/StageError";
38
- get exitClass(): ExitClass;
39
- get message(): string;
40
- }
41
- //#endregion
42
30
  //#region src/Worker.schema.d.ts
43
31
  declare const ChildProcessCrashedError_base: Schema.Class<ChildProcessCrashedError, Schema.TaggedStruct<"ChildProcessCrashedError", {
44
32
  readonly pid: Schema.Int;
@@ -98,109 +86,6 @@ interface WorkerClientParams<Rpcs extends Rpc.Any> extends WorkerSpawnParams {
98
86
  }
99
87
  declare const makeWorkerClient: <Rpcs extends Rpc.Any>(params: WorkerClientParams<Rpcs>) => Effect$1.Effect<RpcClient.RpcClient<Rpcs, RpcClientError>, WorkerBootError, Scope.Scope | WorkerLauncher>;
100
88
  //#endregion
101
- //#region src/RunEvent.schema.d.ts
102
- declare const RunPhase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
103
- type RunPhase = typeof RunPhase.Type;
104
- declare const RunStarted_base: S.Class<RunStarted, S.TaggedStruct<"stream", {
105
- readonly schemaVersion: S.String;
106
- readonly runId: S.String;
107
- readonly mode: S.Literals<readonly ["human", "machine"]>;
108
- readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
109
- }>, {}>;
110
- declare class RunStarted extends RunStarted_base {}
111
- declare const PhaseEntered_base: S.Class<PhaseEntered, S.TaggedStruct<"phase", {
112
- readonly phase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
113
- readonly elapsedMs: S.Finite;
114
- }>, {}>;
115
- declare class PhaseEntered extends PhaseEntered_base {}
116
- declare const PlanKnown_base: S.Class<PlanKnown, S.TaggedStruct<"plan", {
117
- readonly total: S.Finite;
118
- }>, {}>;
119
- declare class PlanKnown extends PlanKnown_base {}
120
- declare const RunMutantTested_base: S.Class<RunMutantTested, S.TaggedStruct<"mutant", {
121
- readonly id: S.String;
122
- readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
123
- readonly file: S.String;
124
- readonly location: S.Struct<{
125
- readonly start: S.Struct<{
126
- readonly line: S.Finite;
127
- readonly column: S.Finite;
128
- }>;
129
- readonly end: S.Struct<{
130
- readonly line: S.Finite;
131
- readonly column: S.Finite;
132
- }>;
133
- }>;
134
- readonly mutator: S.String;
135
- readonly replacement: S.NullOr<S.String>;
136
- readonly completed: S.Finite;
137
- readonly total: S.Finite;
138
- }>, {}>;
139
- declare class RunMutantTested extends RunMutantTested_base {}
140
- declare const Heartbeat_base: S.Class<Heartbeat, S.TaggedStruct<"tick", {
141
- readonly elapsedMs: S.Finite;
142
- readonly completed: S.Finite;
143
- readonly total: S.NullOr<S.Finite>;
144
- }>, {}>;
145
- declare class Heartbeat extends Heartbeat_base {}
146
- declare const VerdictReached_base: S.Class<VerdictReached, S.TaggedStruct<"verdict", {
147
- readonly schemaVersion: S.String;
148
- readonly runId: S.String;
149
- readonly mode: S.Literals<readonly ["human", "machine"]>;
150
- readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
151
- readonly score: S.NullOr<S.Finite>;
152
- readonly thresholds: S.Struct<{
153
- readonly high: S.Finite;
154
- readonly low: S.Finite;
155
- readonly break: S.NullOr<S.Finite>;
156
- }>;
157
- readonly reportFile: S.NullOr<S.String>;
158
- readonly counts: S.Struct<{
159
- readonly killed: S.Finite;
160
- readonly timeout: S.Finite;
161
- readonly survived: S.Finite;
162
- readonly noCoverage: S.Finite;
163
- readonly runtimeErrors: S.Finite;
164
- readonly compileErrors: S.Finite;
165
- readonly ignored: S.Finite;
166
- readonly pending: S.Finite;
167
- }>;
168
- readonly mutants: S.$Array<S.Struct<{
169
- readonly id: S.String;
170
- readonly file: S.String;
171
- readonly location: S.Struct<{
172
- readonly start: S.Struct<{
173
- readonly line: S.Finite;
174
- readonly column: S.Finite;
175
- }>;
176
- readonly end: S.Struct<{
177
- readonly line: S.Finite;
178
- readonly column: S.Finite;
179
- }>;
180
- }>;
181
- readonly mutator: S.String;
182
- readonly replacement: S.NullOr<S.String>;
183
- readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
184
- }>>;
185
- }>, {}>;
186
- declare class VerdictReached extends VerdictReached_base {}
187
- declare const RunFailed_base: S.Class<RunFailed, S.TaggedStruct<"error", {
188
- readonly schemaVersion: S.String;
189
- readonly code: S.Finite;
190
- readonly error: S.String;
191
- readonly remediation: S.String;
192
- }>, {}>;
193
- declare class RunFailed extends RunFailed_base {}
194
- declare const HelpRendered_base: S.Class<HelpRendered, S.TaggedStruct<"help", {
195
- readonly schemaVersion: S.String;
196
- readonly code: S.Literals<readonly [0]>;
197
- readonly help: S.String;
198
- }>, {}>;
199
- declare class HelpRendered extends HelpRendered_base {}
200
- declare const RunEvent: S.Union<readonly [typeof RunStarted, typeof PhaseEntered, typeof PlanKnown, typeof RunMutantTested, typeof Heartbeat, typeof VerdictReached, typeof RunFailed, typeof HelpRendered]>;
201
- type RunEvent = typeof RunEvent.Type;
202
- type RunTerminalEvent = VerdictReached | RunFailed | HelpRendered;
203
- //#endregion
204
89
  //#region src/RunEvents.d.ts
205
90
  declare const RunEvents_base: Context.ServiceClass<RunEvents, "@systemfsoftware/stryker-js/RunEvents", Queue.Queue<Heartbeat | HelpRendered | PhaseEntered | PlanKnown | RunFailed | RunMutantTested | RunStarted | VerdictReached, Cause.Done<void>>>;
206
91
  declare class RunEvents extends RunEvents_base {}
@@ -1861,4 +1746,4 @@ interface MutationTestDone {
1861
1746
  readonly verdict: ExitClass | null;
1862
1747
  }
1863
1748
  //#endregion
1864
- export { PluginKind as $, ExtendsStepDocument as A, makeWorkerClient as At, MergeResult as B, ConfigError as C, WorkerBootError as Ct, ConfigFileUnsupportedError as D, WorkerLauncherShape as Dt, ConfigFileUnreadableError as E, WorkerLauncher as Et, ExtendsStepResolve as F, AnyPluginDescriptor as G, extendsPropertySchema as H, ExtendsStepState as I, EvaluatorPluginDescriptor as J, AnyWorkerPluginDescriptor as K, ExtendsStepStateSchema as L, ExtendsStepDone as M, OutOfMemoryError as Mt, ExtendsStepRead as N, WorkerBootTimeoutError as Nt, ExtendsRefusalReason as O, WorkerSpawnParams as Ot, ExtendsStepRefused as P, StageError as Pt, PluginDescriptorOf as Q, ImportedModuleSchema as R, ConfigDocumentSchema as S, SpawnedSocketWorker as St, ConfigFileNotFoundError as T, WorkerExit as Tt, forkOptionsSchema as U, ReadConfigCommand as V, survivorsPriorReport as W, LoadedPlugins as X, EvaluatorPluginSource as Y, PluginDescriptor as Z, ReporterStage as _, RunMutantTested as _t, WiredRunLayer as a, IdGeneratorShape as at, reporterWorkerFactory as b, RunTerminalEvent as bt, PrepareDone as c, RunEvents as ct, RunEnvironmentShape as d, Heartbeat as dt, PluginSource as et, SandboxHandle as f, HelpRendered as ft, REPORTER_EVENT_BATCH_BOUND as g, RunFailed as gt, ProjectFile as h, RunEvent as ht, StageServices as i, IdGenerator as it, ExtendsStepDocumentSchema as j, ChildProcessCrashedError as jt, ExtendsStepDecision as k, connectRetry as kt, PrepareExecutorArgs as l, RunIdentity as lt, Project as m, PlanKnown as mt, EnginePorts as n, WorkerPluginSource as nt, DryRunDone as o, classifyWorkerExit as ot, StrykerError as p, PhaseEntered as pt, AnyWorkerPluginSource as q, RunStageServices as r, Ignorer as rt, InstrumentDone as s, TestCoverage as st, MutationTestDone as t, WorkerPluginDescriptor as tt, RunEnvironment as u, RunIdentityShape as ut, ReporterWorkerClient as v, RunPhase as vt, ConfigFileInvalidError as w, WorkerClientParams as wt, spawnReporterWorker as x, VerdictReached as xt, SpawnReporterWorkerParams as y, RunStarted as yt, MergeCommand as z };
1749
+ export { PluginKind as $, ExtendsStepDocument as A, MergeResult as B, ConfigError as C, ConfigFileUnsupportedError as D, ConfigFileUnreadableError as E, ExtendsStepResolve as F, AnyPluginDescriptor as G, extendsPropertySchema as H, ExtendsStepState as I, EvaluatorPluginDescriptor as J, AnyWorkerPluginDescriptor as K, ExtendsStepStateSchema as L, ExtendsStepDone as M, ExtendsStepRead as N, ExtendsRefusalReason as O, ExtendsStepRefused as P, PluginDescriptorOf as Q, ImportedModuleSchema as R, ConfigDocumentSchema as S, WorkerBootTimeoutError as St, ConfigFileNotFoundError as T, forkOptionsSchema as U, ReadConfigCommand as V, survivorsPriorReport as W, LoadedPlugins as X, EvaluatorPluginSource as Y, PluginDescriptor as Z, ReporterStage as _, WorkerSpawnParams as _t, WiredRunLayer as a, IdGeneratorShape as at, reporterWorkerFactory as b, ChildProcessCrashedError as bt, PrepareDone as c, RunEvents as ct, RunEnvironmentShape as d, SpawnedSocketWorker as dt, PluginSource as et, SandboxHandle as f, WorkerBootError as ft, REPORTER_EVENT_BATCH_BOUND as g, WorkerLauncherShape as gt, ProjectFile as h, WorkerLauncher as ht, StageServices as i, IdGenerator as it, ExtendsStepDocumentSchema as j, ExtendsStepDecision as k, PrepareExecutorArgs as l, RunIdentity as lt, Project as m, WorkerExit as mt, EnginePorts as n, WorkerPluginSource as nt, DryRunDone as o, classifyWorkerExit as ot, StrykerError as p, WorkerClientParams as pt, AnyWorkerPluginSource as q, RunStageServices as r, Ignorer as rt, InstrumentDone as s, TestCoverage as st, MutationTestDone as t, WorkerPluginDescriptor as tt, RunEnvironment as u, RunIdentityShape as ut, ReporterWorkerClient as v, connectRetry as vt, ConfigFileInvalidError as w, spawnReporterWorker as x, OutOfMemoryError as xt, SpawnReporterWorkerParams as y, makeWorkerClient as yt, MergeCommand as z };
@@ -0,0 +1,17 @@
1
+ //#region src/output-mode.d.ts
2
+ /**
3
+ * Mode type vocabulary shared with the CLI package. Runtime resolution
4
+ * (`resolveMode`) and gate functions (`isProgressEnabled`, `isColorEnabled`)
5
+ * live in the CLI; the `ResolvedMode` fields (`mode`, `signal`,
6
+ * `stdoutIsTTY`) ride along in `VerdictEnvelope` (`verdict-envelope.ts`),
7
+ * so the types stay where the data does.
8
+ */
9
+ type OutputMode = 'human' | 'machine';
10
+ type ModeSignal = 'flag' | 'env' | 'tty' | 'agent' | 'tool';
11
+ interface ResolvedMode {
12
+ readonly mode: OutputMode;
13
+ readonly signal: ModeSignal;
14
+ readonly stdoutIsTTY: boolean;
15
+ }
16
+ //#endregion
17
+ export { OutputMode as n, ResolvedMode as r, ModeSignal as t };
@@ -1,5 +1,5 @@
1
- import { L as PartialStrykerOptions } from "./output-mode-CE6VNHfH.mjs";
2
- import { t as MutationTestDone } from "./mutation-test.cell-BTa-up9u.mjs";
1
+ import { P as PartialStrykerOptions } from "./index-DnAm4mSL.mjs";
2
+ import { t as MutationTestDone } from "./mutation-test.cell-m9T-X2Qx.mjs";
3
3
  //#region src/promises/index.d.ts
4
4
  export declare const run: (options: PartialStrykerOptions, targetMutatePatterns?: readonly string[]) => Promise<MutationTestDone>;
5
5
  //#endregion
package/dist/promises.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as strykerCell } from "./src-BQuaL-fB.mjs";
1
+ import { t as strykerCell } from "./src-Bu4i-Lt2.mjs";
2
2
  import * as Layer from "effect/Layer";
3
3
  import * as NodeFileSystem from "@effect/platform-node-shared/NodeFileSystem";
4
4
  import * as NodePath from "@effect/platform-node-shared/NodePath";