@systemfsoftware/stryker-js 3.0.2 → 5.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 +101 -0
- package/LICENSE +3 -15
- package/README.md +69 -21
- package/dist/Plugins-sA_9VKus.d.mts +96 -0
- package/dist/builtin-reporters-wAuKFSsd.mjs +672 -0
- package/dist/builtin-reporters.d.mts +14 -0
- package/dist/builtin-reporters.mjs +2 -0
- package/dist/compiler-Bq9Nelu8.mjs +48406 -0
- package/dist/config.d.mts +11 -0
- package/dist/config.mjs +7 -0
- package/dist/dist-B3nT7z4G.mjs +5155 -0
- package/dist/execAsync-CfPZgJSD.mjs +10 -0
- package/dist/execAsync-DdCu5QLN.mjs +10 -0
- package/dist/getMachineId-bsd-C6bLIaiv.mjs +27 -0
- package/dist/getMachineId-bsd-CXSiHDga.mjs +27 -0
- package/dist/getMachineId-darwin-D3cIKeqx.mjs +24 -0
- package/dist/getMachineId-darwin-DPZ0kdKD.mjs +24 -0
- package/dist/getMachineId-linux-CQwLSlZk.mjs +20 -0
- package/dist/getMachineId-linux-Ci8OVJU0.mjs +20 -0
- package/dist/getMachineId-unsupported-PX0hnW6X.mjs +15 -0
- package/dist/getMachineId-unsupported-_ExL3Avl.mjs +15 -0
- package/dist/getMachineId-win-BCsS9pC_.mjs +26 -0
- package/dist/getMachineId-win-D9Tb0p7w.mjs +26 -0
- package/dist/index.d.mts +1009 -8
- package/dist/index.mjs +3 -9
- package/dist/main.mjs +104333 -0
- package/dist/merge-config-BrrNQWje.mjs +16 -0
- package/dist/mutation-test.cell-RmF-sBUm.d.mts +509 -0
- package/dist/output-mode-CfGHDpi5.d.mts +17 -0
- package/dist/parser.wasm32-wasi.wasm +0 -0
- package/dist/plugin-loader.d.mts +106 -0
- package/dist/plugin-loader.mjs +2 -0
- package/dist/plugin-worker-entry-DNu0SHO8.mjs +1413 -0
- package/dist/promises.d.mts +5 -0
- package/dist/promises.mjs +14 -0
- package/dist/rolldown-runtime-Dr7-SnC6.mjs +45 -0
- package/dist/src-Bzh7ykDp.mjs +4724 -0
- package/dist/stryker-config-BlfHxS7n.d.mts +14 -0
- package/dist/wasm-Dr7kZatW.mjs +13017 -0
- package/package.json +81 -38
- package/dist/Checker-A8o5B3Ub.d.mts +0 -40
- package/dist/Checker-Bq8NXD8d.mjs +0 -25
- package/dist/Checker.d.mts +0 -2
- package/dist/Checker.mjs +0 -2
- package/dist/Evaluator-CnAN8-pZ.d.mts +0 -19
- package/dist/Evaluator.d.mts +0 -3
- package/dist/Evaluator.mjs +0 -9
- package/dist/ExitClass.d.mts +0 -9
- package/dist/ExitClass.mjs +0 -59
- package/dist/ExitClass.schema-BmOIK5zT.d.mts +0 -18
- package/dist/Ignorer-BUY68FZQ.d.mts +0 -21
- package/dist/Ignorer.d.mts +0 -2
- package/dist/Ignorer.mjs +0 -7
- package/dist/Metrics.d.mts +0 -7
- package/dist/Metrics.mjs +0 -79
- package/dist/Metrics.schema-BaVd6rXs.d.mts +0 -50
- package/dist/Metrics.schema-DZdoc46X.mjs +0 -27
- package/dist/Module-DHKEMAFI.d.mts +0 -31
- package/dist/Module.d.mts +0 -2
- package/dist/Module.mjs +0 -16
- package/dist/Mutant-Ci25PsWA.d.mts +0 -351
- package/dist/Mutant.d.mts +0 -3
- package/dist/Mutant.mjs +0 -90
- package/dist/Mutant.schema-H3r0ho_R.mjs +0 -34
- package/dist/Plugin-BtItMchw.d.mts +0 -153
- package/dist/Plugin-DXFdJP1l.mjs +0 -105
- package/dist/Plugin.d.mts +0 -2
- package/dist/Plugin.mjs +0 -2
- package/dist/Report.d.mts +0 -2
- package/dist/Report.mjs +0 -98
- package/dist/Report.schema-_buHXdnZ.d.mts +0 -251
- package/dist/Reporter-BWTwlSJf.mjs +0 -25
- package/dist/Reporter-C7ysGxqX.d.mts +0 -16
- package/dist/Reporter.d.mts +0 -4
- package/dist/Reporter.mjs +0 -3
- package/dist/ReporterEvent.d.mts +0 -2
- package/dist/ReporterEvent.mjs +0 -57
- package/dist/ReporterEvent.schema-BhtyYCZo.d.mts +0 -189
- package/dist/Run-BUpNSmcM.d.mts +0 -172
- package/dist/Run.d.mts +0 -2
- package/dist/Run.mjs +0 -56
- package/dist/Run.schema-DZve3k2m.mjs +0 -138
- package/dist/Schema-4oCWQ0P0.d.mts +0 -158
- package/dist/Schema-CMKdWMUN.mjs +0 -244
- package/dist/Schema.d.mts +0 -2
- package/dist/Schema.mjs +0 -2
- package/dist/TestRunner.d.mts +0 -2
- package/dist/TestRunner.mjs +0 -57
- package/dist/TestRunner.schema-Dy0Wdro2.mjs +0 -119
- package/dist/output-file.d.mts +0 -8
- package/dist/output-file.mjs +0 -8
- package/dist/provided-options.d.mts +0 -16
- package/dist/provided-options.mjs +0 -1
- package/dist/rolldown-runtime-D7D4PA-g.mjs +0 -13
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { n as MetricsResult } from "./Metrics.schema-BaVd6rXs.mjs";
|
|
2
|
-
import { m as StrykerOptions } from "./Schema-4oCWQ0P0.mjs";
|
|
3
|
-
import * as S from "effect/Schema";
|
|
4
|
-
import { StandardSchemaV1 } from "effect/StandardSchema";
|
|
5
|
-
//#region src/ReporterEvent.schema.d.ts
|
|
6
|
-
declare const ReporterEventKind: S.Literals<readonly ["dryRunCompleted", "mutationTestingPlanReady", "mutantTested", "mutationTestReportReady"]>;
|
|
7
|
-
type ReporterEventKind = typeof ReporterEventKind.Type;
|
|
8
|
-
declare const RunTimingSchema: S.Struct<{
|
|
9
|
-
readonly net: S.Finite;
|
|
10
|
-
readonly overhead: S.Finite;
|
|
11
|
-
}>;
|
|
12
|
-
type RunTiming = typeof RunTimingSchema.Type;
|
|
13
|
-
declare const ReporterPlanDescriptorSchema: S.Struct<{
|
|
14
|
-
readonly mutantId: S.String;
|
|
15
|
-
readonly plan: S.Literals<readonly ["EarlyResult", "Run"]>;
|
|
16
|
-
readonly netTime: S.Finite;
|
|
17
|
-
readonly reloadEnvironment: S.Boolean;
|
|
18
|
-
}>;
|
|
19
|
-
type ReporterPlanDescriptor = typeof ReporterPlanDescriptorSchema.Type;
|
|
20
|
-
declare const DryRunCompleted_base: S.Class<DryRunCompleted, S.TaggedStruct<"dryRunCompleted", {
|
|
21
|
-
readonly timing: S.Struct<{
|
|
22
|
-
readonly net: S.Finite;
|
|
23
|
-
readonly overhead: S.Finite;
|
|
24
|
-
}>;
|
|
25
|
-
readonly capabilities: S.Struct<{
|
|
26
|
-
readonly reloadEnvironment: S.Boolean;
|
|
27
|
-
}>;
|
|
28
|
-
readonly testCount: S.Finite;
|
|
29
|
-
readonly tests: S.$Array<S.Union<readonly [S.Struct<{
|
|
30
|
-
readonly id: S.String;
|
|
31
|
-
readonly name: S.String;
|
|
32
|
-
readonly timeSpentMs: S.Finite;
|
|
33
|
-
readonly fileName: S.optionalKey<S.String>;
|
|
34
|
-
readonly startPosition: S.optionalKey<S.Struct<{
|
|
35
|
-
readonly line: S.Finite;
|
|
36
|
-
readonly column: S.Finite;
|
|
37
|
-
}>>;
|
|
38
|
-
readonly status: S.Literal<"failed">;
|
|
39
|
-
readonly failureMessage: S.String;
|
|
40
|
-
}>, S.Struct<{
|
|
41
|
-
readonly id: S.String;
|
|
42
|
-
readonly name: S.String;
|
|
43
|
-
readonly timeSpentMs: S.Finite;
|
|
44
|
-
readonly fileName: S.optionalKey<S.String>;
|
|
45
|
-
readonly startPosition: S.optionalKey<S.Struct<{
|
|
46
|
-
readonly line: S.Finite;
|
|
47
|
-
readonly column: S.Finite;
|
|
48
|
-
}>>;
|
|
49
|
-
readonly status: S.Literal<"skipped">;
|
|
50
|
-
}>, S.Struct<{
|
|
51
|
-
readonly id: S.String;
|
|
52
|
-
readonly name: S.String;
|
|
53
|
-
readonly timeSpentMs: S.Finite;
|
|
54
|
-
readonly fileName: S.optionalKey<S.String>;
|
|
55
|
-
readonly startPosition: S.optionalKey<S.Struct<{
|
|
56
|
-
readonly line: S.Finite;
|
|
57
|
-
readonly column: S.Finite;
|
|
58
|
-
}>>;
|
|
59
|
-
readonly status: S.Literal<"success">;
|
|
60
|
-
}>]>>;
|
|
61
|
-
}>, {}>;
|
|
62
|
-
declare class DryRunCompleted extends DryRunCompleted_base {}
|
|
63
|
-
declare const MutationTestingPlanReady_base: S.Class<MutationTestingPlanReady, S.TaggedStruct<"mutationTestingPlanReady", {
|
|
64
|
-
readonly total: S.Finite;
|
|
65
|
-
readonly plans: S.$Array<S.Struct<{
|
|
66
|
-
readonly mutantId: S.String;
|
|
67
|
-
readonly plan: S.Literals<readonly ["EarlyResult", "Run"]>;
|
|
68
|
-
readonly netTime: S.Finite;
|
|
69
|
-
readonly reloadEnvironment: S.Boolean;
|
|
70
|
-
}>>;
|
|
71
|
-
}>, {}>;
|
|
72
|
-
declare class MutationTestingPlanReady extends MutationTestingPlanReady_base {}
|
|
73
|
-
declare const MutantTested_base: S.Class<MutantTested, S.TaggedStruct<"mutantTested", {
|
|
74
|
-
readonly id: S.String;
|
|
75
|
-
readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "Timeout", "CompileError", "RuntimeError", "Ignored", "Pending"]>;
|
|
76
|
-
readonly file: S.String;
|
|
77
|
-
readonly location: S.Struct<{
|
|
78
|
-
readonly start: S.Struct<{
|
|
79
|
-
readonly line: S.Finite;
|
|
80
|
-
readonly column: S.Finite;
|
|
81
|
-
}>;
|
|
82
|
-
readonly end: S.Struct<{
|
|
83
|
-
readonly line: S.Finite;
|
|
84
|
-
readonly column: S.Finite;
|
|
85
|
-
}>;
|
|
86
|
-
}>;
|
|
87
|
-
readonly mutator: S.String;
|
|
88
|
-
readonly replacement: S.NullOr<S.String>;
|
|
89
|
-
readonly completed: S.Finite;
|
|
90
|
-
readonly total: S.Finite;
|
|
91
|
-
}>, {}>;
|
|
92
|
-
declare class MutantTested extends MutantTested_base {}
|
|
93
|
-
declare const MutationTestReportReady_base: S.Class<MutationTestReportReady, S.TaggedStruct<"mutationTestReportReady", {
|
|
94
|
-
readonly report: S.Struct<{
|
|
95
|
-
readonly schemaVersion: S.String;
|
|
96
|
-
readonly files: S.$Record<S.String, S.Struct<{
|
|
97
|
-
readonly language: S.String;
|
|
98
|
-
readonly source: S.String;
|
|
99
|
-
readonly mutants: S.$Array<S.Struct<{
|
|
100
|
-
readonly id: S.String;
|
|
101
|
-
readonly mutatorName: S.String;
|
|
102
|
-
readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
|
|
103
|
-
readonly location: S.Struct<{
|
|
104
|
-
readonly start: S.Struct<{
|
|
105
|
-
readonly line: S.Finite;
|
|
106
|
-
readonly column: S.Finite;
|
|
107
|
-
}>;
|
|
108
|
-
readonly end: S.Struct<{
|
|
109
|
-
readonly line: S.Finite;
|
|
110
|
-
readonly column: S.Finite;
|
|
111
|
-
}>;
|
|
112
|
-
}>;
|
|
113
|
-
readonly replacement: S.optional<S.String>;
|
|
114
|
-
readonly description: S.optional<S.String>;
|
|
115
|
-
readonly statusReason: S.optional<S.String>;
|
|
116
|
-
readonly static: S.optional<S.Boolean>;
|
|
117
|
-
readonly coveredBy: S.optional<S.$Array<S.String>>;
|
|
118
|
-
readonly killedBy: S.optional<S.$Array<S.String>>;
|
|
119
|
-
readonly testsCompleted: S.optional<S.Finite>;
|
|
120
|
-
readonly duration: S.optional<S.Finite>;
|
|
121
|
-
}>>;
|
|
122
|
-
}>>;
|
|
123
|
-
readonly thresholds: S.Struct<{
|
|
124
|
-
readonly high: S.Finite;
|
|
125
|
-
readonly low: S.Finite;
|
|
126
|
-
}>;
|
|
127
|
-
readonly config: S.optional<S.$Record<S.String, S.Unknown>>;
|
|
128
|
-
readonly testFiles: S.optional<S.$Record<S.String, S.Struct<{
|
|
129
|
-
readonly source: S.optional<S.String>;
|
|
130
|
-
readonly tests: S.$Array<S.Struct<{
|
|
131
|
-
readonly id: S.String;
|
|
132
|
-
readonly name: S.String;
|
|
133
|
-
readonly location: S.optional<S.Struct<{
|
|
134
|
-
readonly start: S.Struct<{
|
|
135
|
-
readonly line: S.Finite;
|
|
136
|
-
readonly column: S.Finite;
|
|
137
|
-
}>;
|
|
138
|
-
readonly end: S.optional<S.Struct<{
|
|
139
|
-
readonly line: S.Finite;
|
|
140
|
-
readonly column: S.Finite;
|
|
141
|
-
}>>;
|
|
142
|
-
}>>;
|
|
143
|
-
}>>;
|
|
144
|
-
}>>>;
|
|
145
|
-
readonly projectRoot: S.optional<S.String>;
|
|
146
|
-
readonly framework: S.optional<S.Struct<{
|
|
147
|
-
readonly name: S.String;
|
|
148
|
-
readonly version: S.optional<S.String>;
|
|
149
|
-
readonly branding: S.optional<S.Struct<{
|
|
150
|
-
readonly homepageUrl: S.String;
|
|
151
|
-
readonly imageUrl: S.optional<S.String>;
|
|
152
|
-
}>>;
|
|
153
|
-
readonly dependencies: S.optional<S.$Record<S.String, S.String>>;
|
|
154
|
-
}>>;
|
|
155
|
-
}>;
|
|
156
|
-
readonly metrics: S.Struct<{
|
|
157
|
-
readonly name: S.String;
|
|
158
|
-
readonly metrics: S.Struct<{
|
|
159
|
-
readonly pending: S.Finite;
|
|
160
|
-
readonly killed: S.Finite;
|
|
161
|
-
readonly timeout: S.Finite;
|
|
162
|
-
readonly survived: S.Finite;
|
|
163
|
-
readonly noCoverage: S.Finite;
|
|
164
|
-
readonly runtimeErrors: S.Finite;
|
|
165
|
-
readonly compileErrors: S.Finite;
|
|
166
|
-
readonly ignored: S.Finite;
|
|
167
|
-
readonly totalDetected: S.Finite;
|
|
168
|
-
readonly totalUndetected: S.Finite;
|
|
169
|
-
readonly totalInvalid: S.Finite;
|
|
170
|
-
readonly totalValid: S.Finite;
|
|
171
|
-
readonly totalMutants: S.Finite;
|
|
172
|
-
readonly totalCovered: S.Finite;
|
|
173
|
-
readonly mutationScore: S.Finite;
|
|
174
|
-
readonly mutationScoreBasedOnCoveredCode: S.Finite;
|
|
175
|
-
}>;
|
|
176
|
-
readonly childResults: S.$Array<S.suspend<S.Codec<MetricsResult, MetricsResult, never, never>>>;
|
|
177
|
-
}>;
|
|
178
|
-
}>, {}>;
|
|
179
|
-
declare class MutationTestReportReady extends MutationTestReportReady_base {}
|
|
180
|
-
declare const ReporterEventUnion: S.Union<readonly [typeof DryRunCompleted, typeof MutationTestingPlanReady, typeof MutantTested, typeof MutationTestReportReady]>;
|
|
181
|
-
type ReporterEvent = DryRunCompleted | MutationTestingPlanReady | MutantTested | MutationTestReportReady;
|
|
182
|
-
declare const ReporterEventSchema: StandardSchemaV1<unknown, ReporterEvent>;
|
|
183
|
-
interface ReporterInit {
|
|
184
|
-
readonly traceparent?: string | undefined;
|
|
185
|
-
readonly tracestate?: string | undefined;
|
|
186
|
-
}
|
|
187
|
-
type ReporterFactory = (options: StrykerOptions, init: ReporterInit) => (events: AsyncIterable<ReporterEvent>) => Promise<void>;
|
|
188
|
-
//#endregion
|
|
189
|
-
export { ReporterEvent as a, ReporterEventUnion as c, ReporterPlanDescriptor as d, RunTiming as f, MutationTestingPlanReady as i, ReporterFactory as l, MutantTested as n, ReporterEventKind as o, MutationTestReportReady as r, ReporterEventSchema as s, DryRunCompleted as t, ReporterInit as u };
|
package/dist/Run-BUpNSmcM.d.mts
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as S from "effect/Schema";
|
|
3
|
-
import * as Effect from "effect/Effect";
|
|
4
|
-
import * as Exit from "effect/Exit";
|
|
5
|
-
import * as Cause from "effect/Cause";
|
|
6
|
-
import * as Queue from "effect/Queue";
|
|
7
|
-
//#region src/Run.schema.d.ts
|
|
8
|
-
declare const RunPhase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
|
|
9
|
-
type RunPhase = typeof RunPhase.Type;
|
|
10
|
-
declare const OutputMode: S.Literals<readonly ["human", "machine"]>;
|
|
11
|
-
type OutputMode = typeof OutputMode.Type;
|
|
12
|
-
declare const ModeSignal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
|
|
13
|
-
type ModeSignal = typeof ModeSignal.Type;
|
|
14
|
-
declare const MutantStatus: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "Timeout", "CompileError", "RuntimeError", "Ignored", "Pending"]>;
|
|
15
|
-
type MutantStatus = typeof MutantStatus.Type;
|
|
16
|
-
declare const Position: S.Struct<{
|
|
17
|
-
readonly line: S.Finite;
|
|
18
|
-
readonly column: S.Finite;
|
|
19
|
-
}>;
|
|
20
|
-
declare const Location: S.Struct<{
|
|
21
|
-
readonly start: S.Struct<{
|
|
22
|
-
readonly line: S.Finite;
|
|
23
|
-
readonly column: S.Finite;
|
|
24
|
-
}>;
|
|
25
|
-
readonly end: S.Struct<{
|
|
26
|
-
readonly line: S.Finite;
|
|
27
|
-
readonly column: S.Finite;
|
|
28
|
-
}>;
|
|
29
|
-
}>;
|
|
30
|
-
type Location = typeof Location.Type;
|
|
31
|
-
type Position = typeof Position.Type;
|
|
32
|
-
declare const RunStarted_base: S.Class<RunStarted, S.TaggedStruct<"stream", {
|
|
33
|
-
readonly schemaVersion: S.String;
|
|
34
|
-
readonly runId: S.String;
|
|
35
|
-
readonly mode: S.Literals<readonly ["human", "machine"]>;
|
|
36
|
-
readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
|
|
37
|
-
}>, {}>;
|
|
38
|
-
declare class RunStarted extends RunStarted_base {}
|
|
39
|
-
declare const PhaseEntered_base: S.Class<PhaseEntered, S.TaggedStruct<"phase", {
|
|
40
|
-
readonly phase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
|
|
41
|
-
readonly elapsedMs: S.Finite;
|
|
42
|
-
}>, {}>;
|
|
43
|
-
declare class PhaseEntered extends PhaseEntered_base {}
|
|
44
|
-
declare const PlanKnown_base: S.Class<PlanKnown, S.TaggedStruct<"plan", {
|
|
45
|
-
readonly total: S.Finite;
|
|
46
|
-
}>, {}>;
|
|
47
|
-
declare class PlanKnown extends PlanKnown_base {}
|
|
48
|
-
declare const MutantTested_base: S.Class<MutantTested, S.TaggedStruct<"mutant", {
|
|
49
|
-
readonly id: S.String;
|
|
50
|
-
readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "Timeout", "CompileError", "RuntimeError", "Ignored", "Pending"]>;
|
|
51
|
-
readonly file: S.String;
|
|
52
|
-
readonly location: S.Struct<{
|
|
53
|
-
readonly start: S.Struct<{
|
|
54
|
-
readonly line: S.Finite;
|
|
55
|
-
readonly column: S.Finite;
|
|
56
|
-
}>;
|
|
57
|
-
readonly end: S.Struct<{
|
|
58
|
-
readonly line: S.Finite;
|
|
59
|
-
readonly column: S.Finite;
|
|
60
|
-
}>;
|
|
61
|
-
}>;
|
|
62
|
-
readonly mutator: S.String;
|
|
63
|
-
readonly replacement: S.NullOr<S.String>;
|
|
64
|
-
readonly completed: S.Finite;
|
|
65
|
-
readonly total: S.Finite;
|
|
66
|
-
}>, {}>;
|
|
67
|
-
declare class MutantTested extends MutantTested_base {}
|
|
68
|
-
declare const Heartbeat_base: S.Class<Heartbeat, S.TaggedStruct<"tick", {
|
|
69
|
-
readonly elapsedMs: S.Finite;
|
|
70
|
-
readonly completed: S.Finite;
|
|
71
|
-
readonly total: S.NullOr<S.Finite>;
|
|
72
|
-
}>, {}>;
|
|
73
|
-
declare class Heartbeat extends Heartbeat_base {}
|
|
74
|
-
declare const VerdictReached_base: S.Class<VerdictReached, S.TaggedStruct<"verdict", {
|
|
75
|
-
readonly schemaVersion: S.String;
|
|
76
|
-
readonly runId: S.String;
|
|
77
|
-
readonly mode: S.Literals<readonly ["human", "machine"]>;
|
|
78
|
-
readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
|
|
79
|
-
readonly score: S.NullOr<S.Finite>;
|
|
80
|
-
readonly thresholds: S.Struct<{
|
|
81
|
-
readonly high: S.Finite;
|
|
82
|
-
readonly low: S.Finite;
|
|
83
|
-
readonly break: S.NullOr<S.Finite>;
|
|
84
|
-
}>;
|
|
85
|
-
readonly reportFile: S.NullOr<S.String>;
|
|
86
|
-
readonly counts: S.Struct<{
|
|
87
|
-
readonly killed: S.Finite;
|
|
88
|
-
readonly timeout: S.Finite;
|
|
89
|
-
readonly survived: S.Finite;
|
|
90
|
-
readonly noCoverage: S.Finite;
|
|
91
|
-
readonly runtimeErrors: S.Finite;
|
|
92
|
-
readonly compileErrors: S.Finite;
|
|
93
|
-
readonly ignored: S.Finite;
|
|
94
|
-
readonly pending: S.Finite;
|
|
95
|
-
}>;
|
|
96
|
-
readonly mutants: S.$Array<S.Struct<{
|
|
97
|
-
readonly id: S.String;
|
|
98
|
-
readonly file: S.String;
|
|
99
|
-
readonly location: S.Struct<{
|
|
100
|
-
readonly start: S.Struct<{
|
|
101
|
-
readonly line: S.Finite;
|
|
102
|
-
readonly column: S.Finite;
|
|
103
|
-
}>;
|
|
104
|
-
readonly end: S.Struct<{
|
|
105
|
-
readonly line: S.Finite;
|
|
106
|
-
readonly column: S.Finite;
|
|
107
|
-
}>;
|
|
108
|
-
}>;
|
|
109
|
-
readonly mutator: S.String;
|
|
110
|
-
readonly replacement: S.NullOr<S.String>;
|
|
111
|
-
readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "Timeout", "CompileError", "RuntimeError", "Ignored", "Pending"]>;
|
|
112
|
-
}>>;
|
|
113
|
-
}>, {}>;
|
|
114
|
-
declare class VerdictReached extends VerdictReached_base {}
|
|
115
|
-
declare const RunFailed_base: S.Class<RunFailed, S.TaggedStruct<"error", {
|
|
116
|
-
readonly schemaVersion: S.String;
|
|
117
|
-
readonly code: S.Finite;
|
|
118
|
-
readonly error: S.String;
|
|
119
|
-
readonly remediation: S.String;
|
|
120
|
-
}>, {}>;
|
|
121
|
-
declare class RunFailed extends RunFailed_base {}
|
|
122
|
-
declare const HelpRendered_base: S.Class<HelpRendered, S.TaggedStruct<"help", {
|
|
123
|
-
readonly schemaVersion: S.String;
|
|
124
|
-
readonly code: S.Literals<readonly [0]>;
|
|
125
|
-
readonly help: S.String;
|
|
126
|
-
}>, {}>;
|
|
127
|
-
declare class HelpRendered extends HelpRendered_base {}
|
|
128
|
-
declare const RunEvent: S.Union<readonly [typeof RunStarted, typeof PhaseEntered, typeof PlanKnown, typeof MutantTested, typeof Heartbeat, typeof VerdictReached, typeof RunFailed, typeof HelpRendered]>;
|
|
129
|
-
type RunEvent = typeof RunEvent.Type;
|
|
130
|
-
type RunTerminalEvent = VerdictReached | RunFailed | HelpRendered;
|
|
131
|
-
declare const RunCommand_base: S.Class<RunCommand, S.TaggedStruct<"RunCommand", {
|
|
132
|
-
readonly cliOptionsJson: S.String;
|
|
133
|
-
readonly targetMutatePatterns: S.$Array<S.String>;
|
|
134
|
-
}>, {}>;
|
|
135
|
-
declare class RunCommand extends RunCommand_base {}
|
|
136
|
-
declare const RunOutput_base: S.Class<RunOutput, S.TaggedStruct<"RunOutput", {
|
|
137
|
-
readonly verdictJson: S.String;
|
|
138
|
-
readonly exitCode: S.Finite;
|
|
139
|
-
}>, {}>;
|
|
140
|
-
declare class RunOutput extends RunOutput_base {}
|
|
141
|
-
declare const PlanMutationRunCommand_base: S.Class<PlanMutationRunCommand, S.TaggedStruct<"PlanMutationRunCommand", {
|
|
142
|
-
readonly configMutatePatterns: S.$Array<S.String>;
|
|
143
|
-
readonly configMutatorNames: S.$Array<S.String>;
|
|
144
|
-
readonly targetMutatePatterns: S.$Array<S.String>;
|
|
145
|
-
readonly availableMutators: S.$Array<S.String>;
|
|
146
|
-
}>, {}>;
|
|
147
|
-
declare class PlanMutationRunCommand extends PlanMutationRunCommand_base {}
|
|
148
|
-
declare const MutationRunPlan_base: S.Class<MutationRunPlan, S.TaggedStruct<"MutationRunPlan", {
|
|
149
|
-
readonly mutatePatterns: S.$Array<S.String>;
|
|
150
|
-
readonly mutatorNames: S.$Array<S.String>;
|
|
151
|
-
}>, {}>;
|
|
152
|
-
declare class MutationRunPlan extends MutationRunPlan_base {}
|
|
153
|
-
declare namespace Run_d_exports {
|
|
154
|
-
export { Heartbeat, HelpRendered, Location, ModeSignal, MutantStatus, MutantTested, MutationRunIo, OutputMode, PhaseEntered, PlanKnown, Position, RunEvent, RunEvent as RunEventType, RunEvents, RunFailed, RunIdentity, RunIdentityShape, RunPhase, RunStarted, RunTerminalEvent, VerdictReached, planMutationRun, runMutationTest, shouldKeepTempDir };
|
|
155
|
-
}
|
|
156
|
-
declare const planMutationRun: (command: PlanMutationRunCommand) => MutationRunPlan;
|
|
157
|
-
declare const RunEvents_base: Context.ServiceClass<RunEvents, "~@systemfsoftware/stryker-js/RunEvents", Queue.Queue<Heartbeat | HelpRendered | MutantTested | PhaseEntered | PlanKnown | RunFailed | RunStarted | VerdictReached, Cause.Done<void>>>;
|
|
158
|
-
declare class RunEvents extends RunEvents_base {}
|
|
159
|
-
interface RunIdentityShape {
|
|
160
|
-
readonly runId: string;
|
|
161
|
-
readonly basePath: string;
|
|
162
|
-
}
|
|
163
|
-
declare const RunIdentity_base: Context.ServiceClass<RunIdentity, "~@systemfsoftware/stryker-js/RunIdentity", RunIdentityShape>;
|
|
164
|
-
declare class RunIdentity extends RunIdentity_base {}
|
|
165
|
-
interface MutationRunIo {
|
|
166
|
-
readonly read: (command: RunCommand) => Effect.Effect<unknown, S.SchemaError, RunIdentity>;
|
|
167
|
-
readonly write: (output: RunOutput) => Effect.Effect<void, S.SchemaError, RunIdentity>;
|
|
168
|
-
}
|
|
169
|
-
declare const runMutationTest: (io: MutationRunIo, command: RunCommand) => Effect.Effect<void, S.SchemaError, RunIdentity>;
|
|
170
|
-
declare const shouldKeepTempDir: (exit: Exit.Exit<void, unknown>, cleanTempDir: 'always' | boolean) => boolean;
|
|
171
|
-
//#endregion
|
|
172
|
-
export { RunTerminalEvent as C, RunStarted as S, PlanKnown as _, Run_d_exports as a, RunFailed as b, shouldKeepTempDir as c, Location as d, ModeSignal as f, PhaseEntered as g, OutputMode as h, RunIdentityShape as i, Heartbeat as l, MutantTested as m, RunEvents as n, planMutationRun as o, MutantStatus as p, RunIdentity as r, runMutationTest as s, MutationRunIo as t, HelpRendered as u, Position as v, VerdictReached as w, RunPhase as x, RunEvent as y };
|
package/dist/Run.d.mts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { C as RunTerminalEvent, S as RunStarted, _ as PlanKnown, b as RunFailed, c as shouldKeepTempDir, d as Location, f as ModeSignal, g as PhaseEntered, h as OutputMode, i as RunIdentityShape, l as Heartbeat, m as MutantTested, n as RunEvents, o as planMutationRun, p as MutantStatus, r as RunIdentity, s as runMutationTest, t as MutationRunIo, u as HelpRendered, v as Position, w as VerdictReached, x as RunPhase, y as RunEvent } from "./Run-BUpNSmcM.mjs";
|
|
2
|
-
export { Heartbeat, HelpRendered, type Location, 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
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import { a as MutantTested, c as PhaseEntered, d as RunEvent, f as RunFailed, g as VerdictReached, h as RunStarted, i as MutantStatus, l as PlanKnown, m as RunPhase, n as HelpRendered, o as MutationRunPlan, p as RunOutput, r as ModeSignal, s as OutputMode, t as Heartbeat, u as PlanMutationRunCommand } from "./Run.schema-DZve3k2m.mjs";
|
|
3
|
-
import * as Context from "effect/Context";
|
|
4
|
-
import * as S from "effect/Schema";
|
|
5
|
-
import * as Effect from "effect/Effect";
|
|
6
|
-
import * as Exit from "effect/Exit";
|
|
7
|
-
import * as Result from "effect/Result";
|
|
8
|
-
//#region src/Run.ts
|
|
9
|
-
var Run_exports = /* @__PURE__ */ __exportAll({
|
|
10
|
-
Heartbeat: () => Heartbeat,
|
|
11
|
-
HelpRendered: () => HelpRendered,
|
|
12
|
-
ModeSignal: () => ModeSignal,
|
|
13
|
-
MutantStatus: () => MutantStatus,
|
|
14
|
-
MutantTested: () => MutantTested,
|
|
15
|
-
OutputMode: () => OutputMode,
|
|
16
|
-
PhaseEntered: () => PhaseEntered,
|
|
17
|
-
PlanKnown: () => PlanKnown,
|
|
18
|
-
RunEvent: () => RunEvent,
|
|
19
|
-
RunEvents: () => RunEvents,
|
|
20
|
-
RunFailed: () => RunFailed,
|
|
21
|
-
RunIdentity: () => RunIdentity,
|
|
22
|
-
RunPhase: () => RunPhase,
|
|
23
|
-
RunStarted: () => RunStarted,
|
|
24
|
-
VerdictReached: () => VerdictReached,
|
|
25
|
-
planMutationRun: () => planMutationRun,
|
|
26
|
-
runMutationTest: () => runMutationTest,
|
|
27
|
-
shouldKeepTempDir: () => shouldKeepTempDir
|
|
28
|
-
});
|
|
29
|
-
const firstNonEmpty = (preferred, fallback) => {
|
|
30
|
-
if (preferred.length > 0) return [...preferred];
|
|
31
|
-
return [...fallback];
|
|
32
|
-
};
|
|
33
|
-
const planMutationRun = (command) => MutationRunPlan.make({
|
|
34
|
-
mutatePatterns: firstNonEmpty(command.targetMutatePatterns, command.configMutatePatterns),
|
|
35
|
-
mutatorNames: firstNonEmpty(command.availableMutators, command.configMutatorNames)
|
|
36
|
-
});
|
|
37
|
-
var RunEvents = class extends Context.Service()("~@systemfsoftware/stryker-js/RunEvents") {};
|
|
38
|
-
var RunIdentity = class extends Context.Service()("~@systemfsoftware/stryker-js/RunIdentity") {};
|
|
39
|
-
const runMutationTest = (io, command) => Effect.gen(function* () {
|
|
40
|
-
const raw = yield* io.read(command);
|
|
41
|
-
const planCommand = yield* Result.match(S.decodeUnknownResult(PlanMutationRunCommand)(raw), {
|
|
42
|
-
onFailure: (error) => Effect.fail(error),
|
|
43
|
-
onSuccess: (decoded) => Effect.succeed(decoded)
|
|
44
|
-
});
|
|
45
|
-
const plan = planMutationRun(planCommand);
|
|
46
|
-
return yield* io.write(new RunOutput({
|
|
47
|
-
verdictJson: JSON.stringify({
|
|
48
|
-
mutate: plan.mutatePatterns,
|
|
49
|
-
mutatorNames: plan.mutatorNames
|
|
50
|
-
}),
|
|
51
|
-
exitCode: 0
|
|
52
|
-
}));
|
|
53
|
-
});
|
|
54
|
-
const shouldKeepTempDir = (exit, cleanTempDir) => Exit.isFailure(exit) && cleanTempDir !== "always";
|
|
55
|
-
//#endregion
|
|
56
|
-
export { Heartbeat, HelpRendered, ModeSignal, MutantStatus, MutantTested, OutputMode, PhaseEntered, PlanKnown, RunEvent, RunEvents, RunFailed, RunIdentity, RunPhase, RunStarted, VerdictReached, planMutationRun, runMutationTest, shouldKeepTempDir, Run_exports as t };
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import * as S from "effect/Schema";
|
|
2
|
-
//#region src/Run.schema.ts
|
|
3
|
-
const RunPhase = S.Literals([
|
|
4
|
-
"prepare",
|
|
5
|
-
"instrument",
|
|
6
|
-
"dry-run",
|
|
7
|
-
"mutation-test"
|
|
8
|
-
]);
|
|
9
|
-
const OutputMode = S.Literals(["human", "machine"]);
|
|
10
|
-
const ModeSignal = S.Literals([
|
|
11
|
-
"flag",
|
|
12
|
-
"env",
|
|
13
|
-
"tty",
|
|
14
|
-
"agent",
|
|
15
|
-
"tool"
|
|
16
|
-
]);
|
|
17
|
-
const MutantStatus = S.Literals([
|
|
18
|
-
"Killed",
|
|
19
|
-
"Survived",
|
|
20
|
-
"NoCoverage",
|
|
21
|
-
"Timeout",
|
|
22
|
-
"CompileError",
|
|
23
|
-
"RuntimeError",
|
|
24
|
-
"Ignored",
|
|
25
|
-
"Pending"
|
|
26
|
-
]);
|
|
27
|
-
const Position = S.Struct({
|
|
28
|
-
line: S.Finite,
|
|
29
|
-
column: S.Finite
|
|
30
|
-
});
|
|
31
|
-
const Location = S.Struct({
|
|
32
|
-
start: Position,
|
|
33
|
-
end: Position
|
|
34
|
-
});
|
|
35
|
-
var RunStarted = class extends S.TaggedClass()("stream", {
|
|
36
|
-
schemaVersion: S.String,
|
|
37
|
-
runId: S.String,
|
|
38
|
-
mode: OutputMode,
|
|
39
|
-
signal: ModeSignal
|
|
40
|
-
}) {};
|
|
41
|
-
var PhaseEntered = class extends S.TaggedClass()("phase", {
|
|
42
|
-
phase: RunPhase,
|
|
43
|
-
elapsedMs: S.Finite
|
|
44
|
-
}) {};
|
|
45
|
-
var PlanKnown = class extends S.TaggedClass()("plan", { total: S.Finite }) {};
|
|
46
|
-
var MutantTested = class extends S.TaggedClass()("mutant", {
|
|
47
|
-
id: S.String,
|
|
48
|
-
status: MutantStatus,
|
|
49
|
-
file: S.String,
|
|
50
|
-
location: Location,
|
|
51
|
-
mutator: S.String,
|
|
52
|
-
replacement: S.NullOr(S.String),
|
|
53
|
-
completed: S.Finite,
|
|
54
|
-
total: S.Finite
|
|
55
|
-
}) {};
|
|
56
|
-
var Heartbeat = class extends S.TaggedClass()("tick", {
|
|
57
|
-
elapsedMs: S.Finite,
|
|
58
|
-
completed: S.Finite,
|
|
59
|
-
total: S.NullOr(S.Finite)
|
|
60
|
-
}) {};
|
|
61
|
-
const VerdictThresholds = S.Struct({
|
|
62
|
-
high: S.Finite,
|
|
63
|
-
low: S.Finite,
|
|
64
|
-
break: S.NullOr(S.Finite)
|
|
65
|
-
});
|
|
66
|
-
const VerdictMutant = S.Struct({
|
|
67
|
-
id: S.String,
|
|
68
|
-
file: S.String,
|
|
69
|
-
location: Location,
|
|
70
|
-
mutator: S.String,
|
|
71
|
-
replacement: S.NullOr(S.String),
|
|
72
|
-
status: MutantStatus
|
|
73
|
-
});
|
|
74
|
-
const VerdictCounts = S.Struct({
|
|
75
|
-
killed: S.Finite,
|
|
76
|
-
timeout: S.Finite,
|
|
77
|
-
survived: S.Finite,
|
|
78
|
-
noCoverage: S.Finite,
|
|
79
|
-
runtimeErrors: S.Finite,
|
|
80
|
-
compileErrors: S.Finite,
|
|
81
|
-
ignored: S.Finite,
|
|
82
|
-
pending: S.Finite
|
|
83
|
-
});
|
|
84
|
-
var VerdictReached = class extends S.TaggedClass()("verdict", {
|
|
85
|
-
schemaVersion: S.String,
|
|
86
|
-
runId: S.String,
|
|
87
|
-
mode: OutputMode,
|
|
88
|
-
signal: ModeSignal,
|
|
89
|
-
score: S.NullOr(S.Finite),
|
|
90
|
-
thresholds: VerdictThresholds,
|
|
91
|
-
reportFile: S.NullOr(S.String),
|
|
92
|
-
counts: VerdictCounts,
|
|
93
|
-
mutants: S.Array(VerdictMutant)
|
|
94
|
-
}) {};
|
|
95
|
-
var RunFailed = class extends S.TaggedClass()("error", {
|
|
96
|
-
schemaVersion: S.String,
|
|
97
|
-
code: S.Finite,
|
|
98
|
-
error: S.String,
|
|
99
|
-
remediation: S.String
|
|
100
|
-
}) {};
|
|
101
|
-
var HelpRendered = class extends S.TaggedClass()("help", {
|
|
102
|
-
schemaVersion: S.String,
|
|
103
|
-
code: S.Literals([0]),
|
|
104
|
-
help: S.String
|
|
105
|
-
}) {};
|
|
106
|
-
const RunEvent = S.Union([
|
|
107
|
-
RunStarted,
|
|
108
|
-
PhaseEntered,
|
|
109
|
-
PlanKnown,
|
|
110
|
-
MutantTested,
|
|
111
|
-
Heartbeat,
|
|
112
|
-
VerdictReached,
|
|
113
|
-
RunFailed,
|
|
114
|
-
HelpRendered
|
|
115
|
-
]);
|
|
116
|
-
S.TaggedClass()("RunCommand", {
|
|
117
|
-
cliOptionsJson: S.String,
|
|
118
|
-
targetMutatePatterns: S.Array(S.String)
|
|
119
|
-
});
|
|
120
|
-
var RunOutput = class extends S.TaggedClass()("RunOutput", {
|
|
121
|
-
verdictJson: S.String,
|
|
122
|
-
exitCode: S.Finite
|
|
123
|
-
}) {};
|
|
124
|
-
S.TaggedError()("RunDecodeError", { message: S.String });
|
|
125
|
-
S.TaggedError()("RunReadError", { message: S.String });
|
|
126
|
-
S.TaggedError()("RunWriteError", { message: S.String });
|
|
127
|
-
var PlanMutationRunCommand = class extends S.TaggedClass()("PlanMutationRunCommand", {
|
|
128
|
-
configMutatePatterns: S.Array(S.String),
|
|
129
|
-
configMutatorNames: S.Array(S.String),
|
|
130
|
-
targetMutatePatterns: S.Array(S.String),
|
|
131
|
-
availableMutators: S.Array(S.String)
|
|
132
|
-
}) {};
|
|
133
|
-
var MutationRunPlan = class extends S.TaggedClass()("MutationRunPlan", {
|
|
134
|
-
mutatePatterns: S.Array(S.String),
|
|
135
|
-
mutatorNames: S.Array(S.String)
|
|
136
|
-
}) {};
|
|
137
|
-
//#endregion
|
|
138
|
-
export { MutantTested as a, PhaseEntered as c, RunEvent as d, RunFailed as f, VerdictReached as g, RunStarted as h, MutantStatus as i, PlanKnown as l, RunPhase as m, HelpRendered as n, MutationRunPlan as o, RunOutput as p, ModeSignal as r, OutputMode as s, Heartbeat as t, PlanMutationRunCommand as u };
|