@systemfsoftware/stryker-js 12.1.0 → 13.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 +71 -0
- package/dist/Run.schema-Bj7b_FMA.mjs +269 -0
- package/dist/{Run.schema-BnUKGQjA.d.mts → Run.schema-BlvpjFjJ.d.mts} +139 -61
- package/dist/{RunEnvironment.service-BaTBH0mI.d.mts → RunEnvironment.service-BJAsZsdn.d.mts} +124 -64
- package/dist/config.d.mts +3 -9
- package/dist/config.mjs +1 -1
- package/dist/{Run.schema-BaK_pxuK.mjs → dist-BscHZmXN.mjs} +1176 -1361
- package/dist/events.d.mts +2 -2
- package/dist/events.mjs +2 -2
- package/dist/{index-CKd1sAni.d.mts → index-C09A80iv.d.mts} +1633 -1312
- package/dist/index.d.mts +169 -190
- package/dist/index.mjs +6 -5
- package/dist/main.mjs +30960 -27502
- package/dist/merge-config-DA_v1hGx.mjs +63 -0
- package/dist/{stryker-config.schema-VVxHqsAv.d.mts → merge-config-X_AxYxMY.d.mts} +9 -2
- package/dist/promises.d.mts +3 -3
- package/dist/promises.mjs +4 -7
- package/dist/{run-stages.cell-RwTUyNX9.mjs → run-stages.cell-BN__EOCk.mjs} +3315 -3255
- package/package.json +7 -8
- package/dist/merge-config-ByZJPeQZ.mjs +0 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js
|
|
2
2
|
|
|
3
|
+
## 13.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- A child process exit code is the POSIX status domain now: any value accepted as a `ChildExitCode` is an integer in `0..255`, and a value outside that range is refused. The out-of-memory exit codes are a named, exported domain instead of a private list, so classifying a worker exit depends on a declared value rather than a hidden one.
|
|
8
|
+
|
|
9
|
+
- The engine's file matching, reporter names, CLI command list, ANSI colours, report stream file name and planned-mutant failures are each declared once. `FileMatcher` keeps only its pattern and hidden-file flag: it no longer carries a `matches` method.
|
|
10
|
+
|
|
11
|
+
- The removed `RelativeNormalizedFileName` is replaced by the engine's own normalization, and a report's stream file name is the literal the engine writes.
|
|
12
|
+
- `AnsiColor` is the type of the colour codes rather than a schema, and `CliCommandSchema` plus the reporter-name schemas name the command list and the reporter names.
|
|
13
|
+
- A mutant whose computed timeout is not a finite number now fails planning with the `MutantTimeoutNotFinite` failure naming that mutant.
|
|
14
|
+
|
|
15
|
+
- Exit codes are one value: `Plugin.ExitCode`, an integer between 0 and 255. The machine stream's failure event, the command's run output, and the run conclusion all carry it, and a run conclusion's outcome is the closed set of run-outcome tags rather than free text.
|
|
16
|
+
|
|
17
|
+
`Plugin.ExitCodeFromClass` stays the single exit-class to baseline-code mapping; read a code through it instead of writing the number where an exit class has to become an exit code.
|
|
18
|
+
|
|
19
|
+
- Mutant ids are decimal index strings. Every schema that carried a mutant id as a plain string now decodes `Mutant.MutantId` and refuses anything else: the mutation report and its mutant results, reporter events (`mutationTestingPlanReady` plans, `mutantTested`), the machine run stream (`mutant` and `verdict`), the survivors prior report, and the mutant coverage keys produced by test runners.
|
|
20
|
+
|
|
21
|
+
Mutant ids are minted only as the mutant's canonical non-negative decimal index (`Mutant.MutantId`), including in the instrumenter's planned mutants, placement sites, and checker answers. Consume the new `Mutant.MutantId` schema instead of assuming an arbitrary non-empty string; ids such as `constructor` or `__proto__` no longer decode.
|
|
22
|
+
|
|
23
|
+
- A mutant's status is declared once, as the eight-value `Mutant.MutantStatus`, plus the named subsets a run partitions on: `Mutant.SurvivorStatus`, `Mutant.RememberedStatus`, `Mutant.EphemeralStatus`, and `Mutant.ActionableStatus`. Import the subset your decision matches instead of re-listing the statuses you accept.
|
|
24
|
+
|
|
25
|
+
Mutants are tagged structs now. A status reason decodes only together with a status, and the remembered-mutant and ignored-mutant rows carry the same narrowed status as the subset they were selected by.
|
|
26
|
+
|
|
27
|
+
- The CLI no longer checks the Node version at startup or prints an `UnsupportedNodeVersion` message. `engines.node` (`>=24.13.1`) is the only statement of support: on an older Node the CLI crashes on the first Node 24 API it calls.
|
|
28
|
+
|
|
29
|
+
- Human or machine output is declared once, as `OutputMode`, and the reason for that choice once, as `ModeSignal`. The run stream's start and verdict events, the resolved configuration environment, and the machine framer all decode those two schemas.
|
|
30
|
+
|
|
31
|
+
A caller that spelled a mode as a plain string union imports the schema's type instead; the duplicate literal lists are gone.
|
|
32
|
+
|
|
33
|
+
- A plugin load failure is one tagged union. The machine stream's failure event now carries that union — the missing peer, the unsupported peer version, the unrecognized peer, the invalid contribution, or the import that failed — instead of a bare tag string, and a framework refusal's reason is the shared peer-failure subset of the same vocabulary.
|
|
34
|
+
|
|
35
|
+
A consumer that compared the failure reason to a string reads the union's tag or its fields instead.
|
|
36
|
+
|
|
37
|
+
- A report-relative file name is one normalized value again: the canonical file-name brand whose decoder folds backslashes to forward slashes. The separate report file-name brands are gone, and the mutation report and mutation part names are schemas a consumer reads rather than strings it repeats.
|
|
38
|
+
|
|
39
|
+
- The machine stream's tested-mutant event is one declaration now. `RunEvent.RunMutantTested` is a codec whose type is `Reporter.MutantTested` and whose encoded form is the stream's `{"_tag":"mutant"}` line, so the stream carries the domain event and the boundary renames its tag and fields. The emitted stdout bytes and their order are unchanged.
|
|
40
|
+
|
|
41
|
+
Two published names moved with it: `RunEvent.RunMutantTested` no longer constructs (`RunMutantTested.make` is gone; build a `Reporter.MutantTested` instead), and `RunEvent.MetricsResultFromReport.fromFiles` is replaced by the function `RunEvent.metricsResultFromFiles`.
|
|
42
|
+
|
|
43
|
+
- Source locations are 1-based and validated end to end. `Mutant.Location`, `Mutant.Position`, `Mutant.Span`, `Mutant.OpenEndLocation`, `Mutant.ScriptOrigin`, and `Mutant.LineStarts` replace the former `LocationSchema`, `PositionSchema`, and `OpenEndLocationSchema`; a location whose end precedes its start, or a line or column below 1, no longer decodes.
|
|
44
|
+
|
|
45
|
+
- A mutant location always speaks the report contract, so a producer that minted 0-based coordinates or a bare number must switch to the new schemas.
|
|
46
|
+
- An embedded script's origin is a `ScriptOrigin` (1-based line plus a column shift), not a position.
|
|
47
|
+
- Incremental state from releases that stored the earlier column base is no longer matched: those mutants are re-tested, not reused, while the run rewrites the state.
|
|
48
|
+
|
|
49
|
+
- Test identifiers are one value: `TestRunner.TestId`, a non-empty branded string carrying the runner's `file#test name` form. Test runner results, report test definitions, a mutant's killers and coverers, per-test hit records, and the test-contribution evaluation all speak that one type instead of bare strings.
|
|
50
|
+
|
|
51
|
+
Mint one with `TestRunner.TestId.make(...)` where a runner derives a test id; the machine stream and mutation report schemas brand the ids they decode.
|
|
52
|
+
|
|
53
|
+
- Mutation score thresholds are declared once, as `Report.ThresholdsSchema`: `high`, `low`, and a `break` that is null when no breaking threshold is configured. The option file and the mutation report decode the same schema, and a pair whose `low` is above its `high` is refused with "a mutation score threshold pair has low at or below high".
|
|
54
|
+
|
|
55
|
+
The mutation report's thresholds now include `break`, so a consumer reads the breaking threshold from the report instead of recovering it from the embedded reporter configuration.
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- The TypeScript checker describes a tsconfig document through the schema that declares the keys it interprets, so an override round-trips the document it was given, and the mutant it cannot describe to a checker carries the canonical file-name brand. The plugin contract, configurations, reports, and exit codes are unchanged.
|
|
60
|
+
|
|
61
|
+
- Stages now run as cells over workflows, multi-item work runs as Effect streams, pools and worker transport use scoped Effect resources, and named operations are traced with Effect.fn. The Angular ignorer now declares @systemfsoftware/stryker-ignorer-kit as a runtime dependency.
|
|
62
|
+
|
|
63
|
+
- A mutant whose test run exceeds the wall-clock timeout is now reported as `Timeout` (reason `wall-clock-timeout`) and the run continues with the remaining mutants. The hung test-runner worker is killed and replaced instead of aborting the whole run with exit code 4.
|
|
64
|
+
|
|
65
|
+
- Updated dependencies:
|
|
66
|
+
- @systemfsoftware/stryker-js-vitest-runner@8.0.0
|
|
67
|
+
|
|
68
|
+
## 12.1.1
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- The `stryker.cli.run` trace span now records the failure text in its `stryker.run.error` attribute for every failed run. It was empty unless the run was interrupted, so a failed dry run, a failing checker, or a rejected argument left no reason in the exported trace.
|
|
73
|
+
|
|
3
74
|
## 12.1.0
|
|
4
75
|
|
|
5
76
|
### Minor Changes
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { a as Reporter_exports, d as Mutant_exports, i as Report_exports, r as Plugin_exports } from "./dist-BscHZmXN.mjs";
|
|
2
|
+
import * as Match from "effect/Match";
|
|
3
|
+
import * as S from "effect/Schema";
|
|
4
|
+
import { Schema, SchemaGetter } from "effect";
|
|
5
|
+
//#region src/output-mode.schema.ts
|
|
6
|
+
const OutputMode = S.Literals(["human", "machine"]);
|
|
7
|
+
const ModeSignal = S.Literals([
|
|
8
|
+
"flag",
|
|
9
|
+
"env",
|
|
10
|
+
"tty",
|
|
11
|
+
"agent",
|
|
12
|
+
"tool"
|
|
13
|
+
]);
|
|
14
|
+
S.Struct({
|
|
15
|
+
mode: OutputMode,
|
|
16
|
+
signal: ModeSignal,
|
|
17
|
+
stdoutIsTTY: S.Boolean
|
|
18
|
+
});
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/PluginsError.schema.ts
|
|
21
|
+
var PluginNotFoundError = class extends Schema.TaggedError()("PluginNotFoundError", { descriptor: Schema.String }) {
|
|
22
|
+
exitClass = "ConfigError";
|
|
23
|
+
};
|
|
24
|
+
const PluginLoadFailureReason = Schema.Union([
|
|
25
|
+
Schema.TaggedStruct("PeerMissing", { peer: Schema.String }),
|
|
26
|
+
Schema.TaggedStruct("PeerVersionUnsupported", {
|
|
27
|
+
peer: Schema.String,
|
|
28
|
+
detail: Schema.String
|
|
29
|
+
}),
|
|
30
|
+
Schema.TaggedStruct("PeerUnrecognized", { peer: Schema.String }),
|
|
31
|
+
Schema.TaggedStruct("InvalidContribution", { detail: Schema.String }),
|
|
32
|
+
Schema.TaggedStruct("ImportFailed", { cause: Schema.Unknown })
|
|
33
|
+
]);
|
|
34
|
+
const PeerFailureTag = Schema.Literals([
|
|
35
|
+
"PeerMissing",
|
|
36
|
+
"PeerVersionUnsupported",
|
|
37
|
+
"PeerUnrecognized"
|
|
38
|
+
]);
|
|
39
|
+
const FAILURE_EXIT_CLASS = {
|
|
40
|
+
PeerMissing: "ConfigError",
|
|
41
|
+
PeerVersionUnsupported: "ConfigError",
|
|
42
|
+
PeerUnrecognized: "ConfigError",
|
|
43
|
+
InvalidContribution: "ConfigError",
|
|
44
|
+
ImportFailed: "InternalError"
|
|
45
|
+
};
|
|
46
|
+
var PluginLoadRefusedError = class extends Schema.TaggedError()("PluginLoadRefusedError", {
|
|
47
|
+
descriptor: Schema.String,
|
|
48
|
+
reason: PluginLoadFailureReason
|
|
49
|
+
}) {
|
|
50
|
+
get exitClass() {
|
|
51
|
+
return FAILURE_EXIT_CLASS[this.reason._tag];
|
|
52
|
+
}
|
|
53
|
+
get message() {
|
|
54
|
+
return `Failed to load plugin "${this.descriptor}" (${this.reason._tag})`;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/reporting/stream-version.schema.ts
|
|
59
|
+
const StreamSchemaVersion = S.Literal("1.1");
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/run-event.schema.ts
|
|
62
|
+
const RunPhase = S.Literals([
|
|
63
|
+
"prepare",
|
|
64
|
+
"instrument",
|
|
65
|
+
"dry-run",
|
|
66
|
+
"mutation-test"
|
|
67
|
+
]);
|
|
68
|
+
const RunId = S.String.pipe(S.check(S.isPattern(/^[0-9A-HJKMNP-TV-Z]{26}$/)), S.brand("RunId"));
|
|
69
|
+
var RunStarted = class extends S.TaggedClass()("stream", {
|
|
70
|
+
schemaVersion: StreamSchemaVersion,
|
|
71
|
+
runId: RunId,
|
|
72
|
+
mode: OutputMode,
|
|
73
|
+
signal: ModeSignal
|
|
74
|
+
}) {};
|
|
75
|
+
var PhaseEntered = class extends S.TaggedClass()("phase", {
|
|
76
|
+
phase: RunPhase,
|
|
77
|
+
elapsedMs: Report_exports.NonNegativeFinite
|
|
78
|
+
}) {};
|
|
79
|
+
var PlanKnown = class extends S.TaggedClass()("plan", { total: Report_exports.NonNegativeInt }) {};
|
|
80
|
+
const RunMutantTested = S.TaggedStruct("mutant", {
|
|
81
|
+
id: S.String,
|
|
82
|
+
status: Mutant_exports.MutantStatusSchema,
|
|
83
|
+
file: S.String,
|
|
84
|
+
location: Mutant_exports.Location,
|
|
85
|
+
mutator: S.String,
|
|
86
|
+
replacement: S.NullOr(S.String),
|
|
87
|
+
completed: Report_exports.NonNegativeInt,
|
|
88
|
+
total: Report_exports.NonNegativeInt
|
|
89
|
+
}).pipe(S.decodeTo(Reporter_exports.MutantTested, {
|
|
90
|
+
decode: SchemaGetter.transform((line) => ({
|
|
91
|
+
_tag: "mutantTested",
|
|
92
|
+
id: line.id,
|
|
93
|
+
status: line.status,
|
|
94
|
+
fileName: line.file,
|
|
95
|
+
location: line.location,
|
|
96
|
+
mutatorName: line.mutator,
|
|
97
|
+
replacement: line.replacement,
|
|
98
|
+
completed: line.completed,
|
|
99
|
+
total: line.total
|
|
100
|
+
})),
|
|
101
|
+
encode: SchemaGetter.transform((tested) => ({
|
|
102
|
+
_tag: "mutant",
|
|
103
|
+
id: tested.id,
|
|
104
|
+
status: tested.status,
|
|
105
|
+
file: tested.fileName,
|
|
106
|
+
location: tested.location,
|
|
107
|
+
mutator: tested.mutatorName,
|
|
108
|
+
replacement: tested.replacement,
|
|
109
|
+
completed: tested.completed,
|
|
110
|
+
total: tested.total
|
|
111
|
+
}))
|
|
112
|
+
}));
|
|
113
|
+
var Heartbeat = class extends S.TaggedClass()("tick", {
|
|
114
|
+
elapsedMs: Report_exports.NonNegativeFinite,
|
|
115
|
+
completed: Report_exports.NonNegativeInt,
|
|
116
|
+
total: S.NullOr(Report_exports.NonNegativeInt)
|
|
117
|
+
}) {};
|
|
118
|
+
const VerdictMutant = S.Struct({
|
|
119
|
+
id: Mutant_exports.MutantId,
|
|
120
|
+
file: S.String,
|
|
121
|
+
location: Mutant_exports.Location,
|
|
122
|
+
mutator: S.String,
|
|
123
|
+
replacement: S.NullOr(S.String),
|
|
124
|
+
status: Mutant_exports.MutantStatusSchema
|
|
125
|
+
});
|
|
126
|
+
var VerdictReached = class extends S.TaggedClass()("verdict", {
|
|
127
|
+
schemaVersion: StreamSchemaVersion,
|
|
128
|
+
runId: RunId,
|
|
129
|
+
mode: OutputMode,
|
|
130
|
+
signal: ModeSignal,
|
|
131
|
+
score: S.NullOr(Report_exports.Percentage),
|
|
132
|
+
thresholds: Report_exports.ThresholdsSchema,
|
|
133
|
+
reportFile: S.NullOr(S.String),
|
|
134
|
+
counts: Report_exports.Metrics,
|
|
135
|
+
mutants: S.Array(VerdictMutant)
|
|
136
|
+
}) {};
|
|
137
|
+
const FrameworkContributionRow = S.Struct({
|
|
138
|
+
name: S.String,
|
|
139
|
+
formatId: S.String,
|
|
140
|
+
extensions: S.Array(S.String)
|
|
141
|
+
});
|
|
142
|
+
const FrameworkModuleRow = S.Struct({
|
|
143
|
+
moduleName: S.String,
|
|
144
|
+
contributions: S.Array(FrameworkContributionRow)
|
|
145
|
+
});
|
|
146
|
+
const FormatClaimShadowingRow = S.Struct({
|
|
147
|
+
extension: S.String,
|
|
148
|
+
winner: S.String,
|
|
149
|
+
loser: S.String
|
|
150
|
+
});
|
|
151
|
+
var PluginsReported = class extends S.TaggedClass()("plugins", {
|
|
152
|
+
modules: S.Array(FrameworkModuleRow),
|
|
153
|
+
shadowings: S.Array(FormatClaimShadowingRow)
|
|
154
|
+
}) {};
|
|
155
|
+
const FormatRegistryRow = S.Struct({
|
|
156
|
+
extension: S.String,
|
|
157
|
+
formatId: S.String,
|
|
158
|
+
ownerModule: S.String,
|
|
159
|
+
language: S.String
|
|
160
|
+
});
|
|
161
|
+
var FormatRegistryResolved = class extends S.TaggedClass()("formats", { rows: S.Array(FormatRegistryRow) }) {};
|
|
162
|
+
const SkippedFileRow = S.Struct({
|
|
163
|
+
file: S.String,
|
|
164
|
+
extension: S.String,
|
|
165
|
+
reason: S.String
|
|
166
|
+
});
|
|
167
|
+
var SkippedReported = class extends S.TaggedClass()("skipped", { files: S.Array(SkippedFileRow) }) {};
|
|
168
|
+
var RunFailed = class extends S.TaggedClass()("error", {
|
|
169
|
+
schemaVersion: StreamSchemaVersion,
|
|
170
|
+
code: Plugin_exports.ExitCode,
|
|
171
|
+
error: S.String,
|
|
172
|
+
remediation: S.String,
|
|
173
|
+
reason: S.NullOr(PluginLoadFailureReason)
|
|
174
|
+
}) {};
|
|
175
|
+
var HelpRendered = class extends S.TaggedClass()("help", {
|
|
176
|
+
schemaVersion: StreamSchemaVersion,
|
|
177
|
+
code: S.Literals([0]),
|
|
178
|
+
help: S.String
|
|
179
|
+
}) {};
|
|
180
|
+
const RunEvent = Object.assign(S.Union([
|
|
181
|
+
RunStarted,
|
|
182
|
+
PhaseEntered,
|
|
183
|
+
PlanKnown,
|
|
184
|
+
RunMutantTested,
|
|
185
|
+
Heartbeat,
|
|
186
|
+
PluginsReported,
|
|
187
|
+
FormatRegistryResolved,
|
|
188
|
+
SkippedReported,
|
|
189
|
+
VerdictReached,
|
|
190
|
+
RunFailed,
|
|
191
|
+
HelpRendered
|
|
192
|
+
]), { QUEUE_BOUND: 256 });
|
|
193
|
+
S.TaggedClass()("RunCommand", {
|
|
194
|
+
cliOptionsJson: S.String,
|
|
195
|
+
targetMutatePatterns: S.Array(S.String)
|
|
196
|
+
});
|
|
197
|
+
S.TaggedClass()("RunOutput", {
|
|
198
|
+
verdictJson: S.String,
|
|
199
|
+
exitCode: Plugin_exports.ExitCode
|
|
200
|
+
});
|
|
201
|
+
var RunDecodeError = class extends S.TaggedError()("RunDecodeError", { message: S.String }) {};
|
|
202
|
+
var RunReadError = class extends S.TaggedError()("RunReadError", { message: S.String }) {};
|
|
203
|
+
S.TaggedError()("RunWriteError", { message: S.String });
|
|
204
|
+
var PlanMutationRunCommand = class extends S.TaggedClass()("PlanMutationRunCommand", {
|
|
205
|
+
configMutatePatterns: S.Array(S.String),
|
|
206
|
+
configMutatorNames: S.Array(S.String),
|
|
207
|
+
targetMutatePatterns: S.Array(S.String),
|
|
208
|
+
availableMutators: S.Array(S.String)
|
|
209
|
+
}) {};
|
|
210
|
+
var MutationRunPlan = class extends S.TaggedClass()("MutationRunPlan", {
|
|
211
|
+
mutatePatterns: S.Array(S.String),
|
|
212
|
+
mutatorNames: S.Array(S.String)
|
|
213
|
+
}) {};
|
|
214
|
+
//#endregion
|
|
215
|
+
//#region src/Run.schema.ts
|
|
216
|
+
const TypeId = "~stryker/mutation-run/StageError";
|
|
217
|
+
var StageError = class extends S.TaggedError(TypeId)("StageError", {
|
|
218
|
+
stage: S.Literals([
|
|
219
|
+
"prepare",
|
|
220
|
+
"instrument",
|
|
221
|
+
"dryRun",
|
|
222
|
+
"dryRunNoTests",
|
|
223
|
+
"mutationTest"
|
|
224
|
+
]),
|
|
225
|
+
reason: S.String,
|
|
226
|
+
cause: S.optional(S.Defect()),
|
|
227
|
+
command: S.optional(S.String)
|
|
228
|
+
}) {
|
|
229
|
+
[TypeId] = TypeId;
|
|
230
|
+
get exitClass() {
|
|
231
|
+
return STAGE_PRESENTATION[this.stage].exitClass;
|
|
232
|
+
}
|
|
233
|
+
get message() {
|
|
234
|
+
const failure = `${STAGE_PRESENTATION[this.stage].label} failed: ${this.reason}`;
|
|
235
|
+
return Match.value(this.command).pipe(Match.when(Match.nonEmptyString, (present) => `${failure} (command: ${present})`), Match.orElse(() => failure));
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
const STAGE_PRESENTATION = {
|
|
239
|
+
prepare: {
|
|
240
|
+
label: "Prepare",
|
|
241
|
+
exitClass: "ConfigError"
|
|
242
|
+
},
|
|
243
|
+
instrument: {
|
|
244
|
+
label: "Instrument",
|
|
245
|
+
exitClass: "RuntimeError"
|
|
246
|
+
},
|
|
247
|
+
dryRun: {
|
|
248
|
+
label: "Dry run",
|
|
249
|
+
exitClass: "RuntimeError"
|
|
250
|
+
},
|
|
251
|
+
dryRunNoTests: {
|
|
252
|
+
label: "Dry run",
|
|
253
|
+
exitClass: "ConfigError"
|
|
254
|
+
},
|
|
255
|
+
mutationTest: {
|
|
256
|
+
label: "Mutation testing",
|
|
257
|
+
exitClass: "RuntimeError"
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
var PrepareError = class extends S.TaggedError()("PrepareError", {
|
|
261
|
+
stage: S.Literal("prepare"),
|
|
262
|
+
reason: S.String
|
|
263
|
+
}) {
|
|
264
|
+
get message() {
|
|
265
|
+
return this.reason;
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
//#endregion
|
|
269
|
+
export { PluginLoadRefusedError as A, SkippedFileRow as C, StreamSchemaVersion as D, VerdictReached as E, ModeSignal as M, OutputMode as N, PeerFailureTag as O, RunStarted as S, VerdictMutant as T, RunFailed as _, FormatRegistryRow as a, RunPhase as b, Heartbeat as c, PhaseEntered as d, PlanKnown as f, RunEvent as g, RunDecodeError as h, FormatRegistryResolved as i, PluginNotFoundError as j, PluginLoadFailureReason as k, HelpRendered as l, PluginsReported as m, StageError as n, FrameworkContributionRow as o, PlanMutationRunCommand as p, FormatClaimShadowingRow as r, FrameworkModuleRow as s, PrepareError as t, MutationRunPlan as u, RunId as v, SkippedReported as w, RunReadError as x, RunMutantTested as y };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { i as mod_d_exports$4, r as mod_d_exports$3 } from "./index-
|
|
1
|
+
import { a as mod_d_exports$5, i as mod_d_exports$4, r as mod_d_exports$3 } from "./index-C09A80iv.mjs";
|
|
2
2
|
import * as S from "effect/Schema";
|
|
3
|
+
import { Schema } from "effect";
|
|
3
4
|
//#region src/run-event.schema.d.ts
|
|
4
5
|
declare const RunPhase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
|
|
5
6
|
type RunPhase = typeof RunPhase.Type;
|
|
6
|
-
declare const
|
|
7
|
-
type
|
|
8
|
-
declare const ModeSignal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
|
|
9
|
-
type ModeSignal = typeof ModeSignal.Type;
|
|
7
|
+
declare const RunId: S.brand<S.String, "RunId">;
|
|
8
|
+
type RunId = typeof RunId.Type;
|
|
10
9
|
declare const RunStarted_base: S.Class<RunStarted, S.TaggedStruct<"stream", {
|
|
11
|
-
readonly schemaVersion: S.
|
|
12
|
-
readonly runId: S.String
|
|
10
|
+
readonly schemaVersion: S.Literal<"1.1">;
|
|
11
|
+
readonly runId: S.brand<S.String, "RunId">;
|
|
13
12
|
readonly mode: S.Literals<readonly ["human", "machine"]>;
|
|
14
13
|
readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
|
|
15
14
|
}>, {}>;
|
|
@@ -23,50 +22,69 @@ declare const PlanKnown_base: S.Class<PlanKnown, S.TaggedStruct<"plan", {
|
|
|
23
22
|
readonly total: S.Int;
|
|
24
23
|
}>, {}>;
|
|
25
24
|
declare class PlanKnown extends PlanKnown_base {}
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* The machine-stream line a tested mutant is published as. Its wire shape is a
|
|
27
|
+
* published contract: the `mutant` tag and the `file`/`mutator` keys must not
|
|
28
|
+
* change. The domain event it carries is `Reporter.MutantTested`, so the line is
|
|
29
|
+
* a codec at the boundary rather than a second declaration of the same event.
|
|
30
|
+
*/
|
|
31
|
+
interface RunMutantTested extends mod_d_exports$5.MutantTested {}
|
|
32
|
+
declare const MutantTestedWireSchema: S.TaggedStruct<"mutant", {
|
|
27
33
|
readonly id: S.String;
|
|
28
34
|
readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
|
|
29
35
|
readonly file: S.String;
|
|
30
|
-
readonly location: S.
|
|
31
|
-
readonly start:
|
|
32
|
-
readonly line:
|
|
33
|
-
readonly column:
|
|
34
|
-
}
|
|
35
|
-
readonly end:
|
|
36
|
-
readonly line:
|
|
37
|
-
readonly column:
|
|
38
|
-
}
|
|
36
|
+
readonly location: S.declare<{
|
|
37
|
+
readonly start: {
|
|
38
|
+
readonly line: number;
|
|
39
|
+
readonly column: number;
|
|
40
|
+
};
|
|
41
|
+
readonly end: {
|
|
42
|
+
readonly line: number;
|
|
43
|
+
readonly column: number;
|
|
44
|
+
};
|
|
45
|
+
}, {
|
|
46
|
+
readonly start: {
|
|
47
|
+
readonly line: number;
|
|
48
|
+
readonly column: number;
|
|
49
|
+
};
|
|
50
|
+
readonly end: {
|
|
51
|
+
readonly line: number;
|
|
52
|
+
readonly column: number;
|
|
53
|
+
};
|
|
39
54
|
}>;
|
|
40
55
|
readonly mutator: S.String;
|
|
41
56
|
readonly replacement: S.NullOr<S.String>;
|
|
42
57
|
readonly completed: S.Int;
|
|
43
58
|
readonly total: S.Int;
|
|
44
|
-
}
|
|
45
|
-
declare
|
|
59
|
+
}>;
|
|
60
|
+
declare const RunMutantTested: S.Codec<RunMutantTested, S.Schema.Type<typeof MutantTestedWireSchema>>;
|
|
46
61
|
declare const Heartbeat_base: S.Class<Heartbeat, S.TaggedStruct<"tick", {
|
|
47
62
|
readonly elapsedMs: S.Finite;
|
|
48
63
|
readonly completed: S.Int;
|
|
49
64
|
readonly total: S.NullOr<S.Int>;
|
|
50
65
|
}>, {}>;
|
|
51
66
|
declare class Heartbeat extends Heartbeat_base {}
|
|
52
|
-
declare const VerdictThresholdsValuesSchema: S.Struct<{
|
|
53
|
-
readonly high: S.Finite;
|
|
54
|
-
readonly low: S.Finite;
|
|
55
|
-
readonly break: S.NullOr<S.Finite>;
|
|
56
|
-
}>;
|
|
57
|
-
type VerdictThresholds = typeof VerdictThresholdsValuesSchema.Type;
|
|
58
67
|
declare const VerdictMutant: S.Struct<{
|
|
59
|
-
readonly id: S.String
|
|
68
|
+
readonly id: S.brand<S.String, "MutantId">;
|
|
60
69
|
readonly file: S.String;
|
|
61
|
-
readonly location: S.
|
|
62
|
-
readonly start:
|
|
63
|
-
readonly line:
|
|
64
|
-
readonly column:
|
|
65
|
-
}
|
|
66
|
-
readonly end:
|
|
67
|
-
readonly line:
|
|
68
|
-
readonly column:
|
|
69
|
-
}
|
|
70
|
+
readonly location: S.declare<{
|
|
71
|
+
readonly start: {
|
|
72
|
+
readonly line: number;
|
|
73
|
+
readonly column: number;
|
|
74
|
+
};
|
|
75
|
+
readonly end: {
|
|
76
|
+
readonly line: number;
|
|
77
|
+
readonly column: number;
|
|
78
|
+
};
|
|
79
|
+
}, {
|
|
80
|
+
readonly start: {
|
|
81
|
+
readonly line: number;
|
|
82
|
+
readonly column: number;
|
|
83
|
+
};
|
|
84
|
+
readonly end: {
|
|
85
|
+
readonly line: number;
|
|
86
|
+
readonly column: number;
|
|
87
|
+
};
|
|
70
88
|
}>;
|
|
71
89
|
readonly mutator: S.String;
|
|
72
90
|
readonly replacement: S.NullOr<S.String>;
|
|
@@ -75,12 +93,12 @@ declare const VerdictMutant: S.Struct<{
|
|
|
75
93
|
type VerdictMutant = typeof VerdictMutant.Type;
|
|
76
94
|
type VerdictCounts = mod_d_exports$4.Metrics;
|
|
77
95
|
declare const VerdictReached_base: S.Class<VerdictReached, S.TaggedStruct<"verdict", {
|
|
78
|
-
readonly schemaVersion: S.
|
|
79
|
-
readonly runId: S.String
|
|
96
|
+
readonly schemaVersion: S.Literal<"1.1">;
|
|
97
|
+
readonly runId: S.brand<S.String, "RunId">;
|
|
80
98
|
readonly mode: S.Literals<readonly ["human", "machine"]>;
|
|
81
99
|
readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
|
|
82
100
|
readonly score: S.NullOr<S.Finite>;
|
|
83
|
-
readonly thresholds: S.
|
|
101
|
+
readonly thresholds: S.declare<{
|
|
84
102
|
readonly high: number;
|
|
85
103
|
readonly low: number;
|
|
86
104
|
readonly break: number | null;
|
|
@@ -88,25 +106,30 @@ declare const VerdictReached_base: S.Class<VerdictReached, S.TaggedStruct<"verdi
|
|
|
88
106
|
readonly high: number;
|
|
89
107
|
readonly low: number;
|
|
90
108
|
readonly break: number | null;
|
|
91
|
-
}
|
|
92
|
-
readonly high: S.Finite;
|
|
93
|
-
readonly low: S.Finite;
|
|
94
|
-
readonly break: S.NullOr<S.Finite>;
|
|
95
|
-
}>, never, never>;
|
|
109
|
+
}>;
|
|
96
110
|
readonly reportFile: S.NullOr<S.String>;
|
|
97
111
|
readonly counts: typeof mod_d_exports$4.Metrics;
|
|
98
112
|
readonly mutants: S.$Array<S.Struct<{
|
|
99
|
-
readonly id: S.String
|
|
113
|
+
readonly id: S.brand<S.String, "MutantId">;
|
|
100
114
|
readonly file: S.String;
|
|
101
|
-
readonly location: S.
|
|
102
|
-
readonly start:
|
|
103
|
-
readonly line:
|
|
104
|
-
readonly column:
|
|
105
|
-
}
|
|
106
|
-
readonly end:
|
|
107
|
-
readonly line:
|
|
108
|
-
readonly column:
|
|
109
|
-
}
|
|
115
|
+
readonly location: S.declare<{
|
|
116
|
+
readonly start: {
|
|
117
|
+
readonly line: number;
|
|
118
|
+
readonly column: number;
|
|
119
|
+
};
|
|
120
|
+
readonly end: {
|
|
121
|
+
readonly line: number;
|
|
122
|
+
readonly column: number;
|
|
123
|
+
};
|
|
124
|
+
}, {
|
|
125
|
+
readonly start: {
|
|
126
|
+
readonly line: number;
|
|
127
|
+
readonly column: number;
|
|
128
|
+
};
|
|
129
|
+
readonly end: {
|
|
130
|
+
readonly line: number;
|
|
131
|
+
readonly column: number;
|
|
132
|
+
};
|
|
110
133
|
}>;
|
|
111
134
|
readonly mutator: S.String;
|
|
112
135
|
readonly replacement: S.NullOr<S.String>;
|
|
@@ -181,23 +204,51 @@ declare const SkippedReported_base: S.Class<SkippedReported, S.TaggedStruct<"ski
|
|
|
181
204
|
}>>;
|
|
182
205
|
}>, {}>;
|
|
183
206
|
declare class SkippedReported extends SkippedReported_base {}
|
|
184
|
-
declare const PluginFailureReason: S.Literals<readonly ["PeerMissing", "PeerVersionUnsupported", "PeerUnrecognized", "InvalidContribution", "ImportFailed"]>;
|
|
185
|
-
type PluginFailureReason = typeof PluginFailureReason.Type;
|
|
186
207
|
declare const RunFailed_base: S.Class<RunFailed, S.TaggedStruct<"error", {
|
|
187
|
-
readonly schemaVersion: S.
|
|
188
|
-
readonly code: S.
|
|
208
|
+
readonly schemaVersion: S.Literal<"1.1">;
|
|
209
|
+
readonly code: S.Int;
|
|
189
210
|
readonly error: S.String;
|
|
190
211
|
readonly remediation: S.String;
|
|
191
|
-
readonly reason: S.NullOr<S.
|
|
212
|
+
readonly reason: S.NullOr<S.Union<readonly [S.TaggedStruct<"PeerMissing", {
|
|
213
|
+
readonly peer: S.String;
|
|
214
|
+
}>, S.TaggedStruct<"PeerVersionUnsupported", {
|
|
215
|
+
readonly peer: S.String;
|
|
216
|
+
readonly detail: S.String;
|
|
217
|
+
}>, S.TaggedStruct<"PeerUnrecognized", {
|
|
218
|
+
readonly peer: S.String;
|
|
219
|
+
}>, S.TaggedStruct<"InvalidContribution", {
|
|
220
|
+
readonly detail: S.String;
|
|
221
|
+
}>, S.TaggedStruct<"ImportFailed", {
|
|
222
|
+
readonly cause: S.Unknown;
|
|
223
|
+
}>]>>;
|
|
192
224
|
}>, {}>;
|
|
193
225
|
declare class RunFailed extends RunFailed_base {}
|
|
194
226
|
declare const HelpRendered_base: S.Class<HelpRendered, S.TaggedStruct<"help", {
|
|
195
|
-
readonly schemaVersion: S.
|
|
227
|
+
readonly schemaVersion: S.Literal<"1.1">;
|
|
196
228
|
readonly code: S.Literals<readonly [0]>;
|
|
197
229
|
readonly help: S.String;
|
|
198
230
|
}>, {}>;
|
|
199
231
|
declare class HelpRendered extends HelpRendered_base {}
|
|
200
|
-
declare const RunEvent: S.Union<readonly [typeof RunStarted, typeof PhaseEntered, typeof PlanKnown,
|
|
232
|
+
declare const RunEvent: S.Union<readonly [typeof RunStarted, typeof PhaseEntered, typeof PlanKnown, S.Codec<RunMutantTested, {
|
|
233
|
+
readonly _tag: "mutant";
|
|
234
|
+
readonly id: string;
|
|
235
|
+
readonly status: "CompileError" | "Ignored" | "Killed" | "NoCoverage" | "Pending" | "RuntimeError" | "Survived" | "Timeout";
|
|
236
|
+
readonly file: string;
|
|
237
|
+
readonly location: {
|
|
238
|
+
readonly start: {
|
|
239
|
+
readonly line: number;
|
|
240
|
+
readonly column: number;
|
|
241
|
+
};
|
|
242
|
+
readonly end: {
|
|
243
|
+
readonly line: number;
|
|
244
|
+
readonly column: number;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
readonly mutator: string;
|
|
248
|
+
readonly replacement: string | null;
|
|
249
|
+
readonly completed: number;
|
|
250
|
+
readonly total: number;
|
|
251
|
+
}, never, never>, typeof Heartbeat, typeof PluginsReported, typeof FormatRegistryResolved, typeof SkippedReported, typeof VerdictReached, typeof RunFailed, typeof HelpRendered]> & {
|
|
201
252
|
QUEUE_BOUND: number;
|
|
202
253
|
};
|
|
203
254
|
type RunEvent = typeof RunEvent.Type;
|
|
@@ -223,6 +274,33 @@ declare const MutationRunPlan_base: S.Class<MutationRunPlan, S.TaggedStruct<"Mut
|
|
|
223
274
|
}>, {}>;
|
|
224
275
|
declare class MutationRunPlan extends MutationRunPlan_base {}
|
|
225
276
|
//#endregion
|
|
277
|
+
//#region src/output-mode.schema.d.ts
|
|
278
|
+
declare const OutputMode: S.Literals<readonly ["human", "machine"]>;
|
|
279
|
+
type OutputMode = typeof OutputMode.Type;
|
|
280
|
+
declare const ModeSignal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
|
|
281
|
+
type ModeSignal = typeof ModeSignal.Type;
|
|
282
|
+
declare const ResolvedMode: S.Struct<{
|
|
283
|
+
readonly mode: S.Literals<readonly ["human", "machine"]>;
|
|
284
|
+
readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
|
|
285
|
+
readonly stdoutIsTTY: S.Boolean;
|
|
286
|
+
}>;
|
|
287
|
+
type ResolvedMode = typeof ResolvedMode.Type;
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region src/PluginsError.schema.d.ts
|
|
290
|
+
declare const PluginLoadFailureReason: Schema.Union<readonly [Schema.TaggedStruct<"PeerMissing", {
|
|
291
|
+
readonly peer: Schema.String;
|
|
292
|
+
}>, Schema.TaggedStruct<"PeerVersionUnsupported", {
|
|
293
|
+
readonly peer: Schema.String;
|
|
294
|
+
readonly detail: Schema.String;
|
|
295
|
+
}>, Schema.TaggedStruct<"PeerUnrecognized", {
|
|
296
|
+
readonly peer: Schema.String;
|
|
297
|
+
}>, Schema.TaggedStruct<"InvalidContribution", {
|
|
298
|
+
readonly detail: Schema.String;
|
|
299
|
+
}>, Schema.TaggedStruct<"ImportFailed", {
|
|
300
|
+
readonly cause: Schema.Unknown;
|
|
301
|
+
}>]>;
|
|
302
|
+
type PluginLoadFailureReason = typeof PluginLoadFailureReason.Type;
|
|
303
|
+
//#endregion
|
|
226
304
|
//#region src/Run.schema.d.ts
|
|
227
305
|
declare const TypeId: '~stryker/mutation-run/StageError';
|
|
228
306
|
declare const StageError_base: S.Class<StageError, S.TaggedStruct<"StageError", {
|
|
@@ -244,4 +322,4 @@ declare class PrepareError extends PrepareError_base {
|
|
|
244
322
|
get message(): string;
|
|
245
323
|
}
|
|
246
324
|
//#endregion
|
|
247
|
-
export {
|
|
325
|
+
export { VerdictCounts as A, RunMutantTested as C, RunTerminalEvent as D, RunStarted as E, VerdictReached as M, SkippedFileRow as O, RunId as S, RunReadError as T, PlanMutationRunCommand as _, OutputMode as a, RunEvent as b, FormatRegistryResolved as c, FrameworkModuleRow as d, Heartbeat as f, PlanKnown as g, PhaseEntered as h, ModeSignal as i, VerdictMutant as j, SkippedReported as k, FormatRegistryRow as l, MutationRunPlan as m, StageError as n, ResolvedMode as o, HelpRendered as p, PluginLoadFailureReason as r, FormatClaimShadowingRow as s, PrepareError as t, FrameworkContributionRow as u, PluginsReported as v, RunPhase as w, RunFailed as x, RunDecodeError as y };
|