@systemfsoftware/stryker-js 0.2.0 → 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 +19 -0
- package/README.md +1 -1
- package/dist/{Evaluator-DLVXUcVj.d.mts → Evaluator-RZBS4oeh.d.mts} +1 -1
- package/dist/Evaluator.d.mts +2 -2
- package/dist/ExitClass.d.mts +3 -2
- package/dist/ExitClass.mjs +37 -1
- package/dist/ExitClass.schema-BmOIK5zT.d.mts +18 -0
- package/dist/{Module-DUBk7gl2.d.mts → Module-DHKEMAFI.d.mts} +3 -3
- package/dist/Module.d.mts +1 -1
- package/dist/Module.mjs +3 -3
- package/dist/{Plugin-HR2dbiT7.d.mts → Plugin-DcDAIBQi.d.mts} +2 -2
- package/dist/Plugin.d.mts +1 -1
- package/dist/{Run-lXratlN7.mjs → Run-BcDo-hIC.mjs} +21 -47
- package/dist/{Run-BudLsVwF.d.mts → Run-BnmGGgWj.d.mts} +17 -21
- package/dist/Run.d.mts +2 -2
- package/dist/Run.mjs +2 -2
- package/dist/{Schema-BAKDG_jC.mjs → Schema-CdNkubPi.mjs} +3 -1
- package/dist/Schema.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/provided-options.d.mts +1 -1
- package/package.json +4 -4
- package/dist/ExitClass.schema-BmCUn2Sm.d.mts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
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
|
+
|
|
3
22
|
## 0.2.0
|
|
4
23
|
|
|
5
24
|
### Minor 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-
|
|
5
|
+
mutation test lives in `@systemfsoftware/stryker-js-engine`.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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";
|
package/dist/Evaluator.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as EvaluatorService, r as EvaluatorFailed, t as Evaluator } from "./Evaluator-
|
|
2
|
-
import {
|
|
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 };
|
package/dist/ExitClass.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
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 };
|
package/dist/ExitClass.mjs
CHANGED
|
@@ -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 };
|
|
@@ -20,9 +20,9 @@ declare const Module_base: Context.ServiceClass<Module, "@systemfsoftware/stryke
|
|
|
20
20
|
* feature code may use: `createRequire` and `isBuiltin`. Resolving a
|
|
21
21
|
* specifier against a project directory, importing a plugin, and asking
|
|
22
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
|
|
24
|
-
* `@systemfsoftware/stryker-js-
|
|
25
|
-
* returning fixed paths.
|
|
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
26
|
*
|
|
27
27
|
* @since 2.0.0
|
|
28
28
|
*/
|
package/dist/Module.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ModuleRequire, t as Module } from "./Module-
|
|
1
|
+
import { n as ModuleRequire, t as Module } from "./Module-DHKEMAFI.mjs";
|
|
2
2
|
export { Module, ModuleRequire };
|
package/dist/Module.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import * as Context from "effect/Context";
|
|
|
5
5
|
* feature code may use: `createRequire` and `isBuiltin`. Resolving a
|
|
6
6
|
* specifier against a project directory, importing a plugin, and asking
|
|
7
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
|
|
9
|
-
* `@systemfsoftware/stryker-js-
|
|
10
|
-
* returning fixed paths.
|
|
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
11
|
*
|
|
12
12
|
* @since 2.0.0
|
|
13
13
|
*/
|
|
@@ -1,8 +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-
|
|
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-
|
|
5
|
+
import { t as Module } from "./Module-DHKEMAFI.mjs";
|
|
6
6
|
import { c as Reporter } from "./Reporter-eZ3M7lO6.mjs";
|
|
7
7
|
import * as Context from "effect/Context";
|
|
8
8
|
import * as S from "effect/Schema";
|
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-
|
|
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
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
|
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
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
154
|
-
}>,
|
|
155
|
-
declare class
|
|
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,
|
|
177
|
+
declare const shouldKeepTempDir: (exit: Exit.Exit<void, unknown>, cleanTempDir: 'always' | boolean) => boolean;
|
|
182
178
|
//#endregion
|
|
183
|
-
export {
|
|
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
|
|
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
|
|
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([
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
7
|
-
import { n as Schema_exports } from "./Schema-
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/stryker-js",
|
|
3
|
-
"version": "0.
|
|
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": "^
|
|
23
|
+
"@systemfsoftware/effect-cell-types": "^6.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@systemfsoftware/arethetypeswrong-cli": "^1.1.1",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"vitest": "^4",
|
|
34
34
|
"@systemfsoftware/effect-schema-law": "^2.0.1",
|
|
35
35
|
"@systemfsoftware/effect-schema-vite": "^2.0.2",
|
|
36
|
-
"@systemfsoftware/
|
|
36
|
+
"@systemfsoftware/all": "^1.1.2",
|
|
37
37
|
"@systemfsoftware/tsconfig": "^1.3.3",
|
|
38
|
-
"@systemfsoftware/
|
|
38
|
+
"@systemfsoftware/vitest-config": "^0.1.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public",
|
|
@@ -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 };
|