@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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as Predicate from "effect/Predicate";
|
|
2
|
+
import * as Record from "effect/Record";
|
|
3
|
+
//#region src/config/merge-config.ts
|
|
4
|
+
const usable = (value, key) => key !== "__proto__" && value !== void 0;
|
|
5
|
+
const combineNested = (left, right) => {
|
|
6
|
+
if (Predicate.isObject(right)) return mergeRecords(left, right);
|
|
7
|
+
return right;
|
|
8
|
+
};
|
|
9
|
+
const combine = (left, right) => {
|
|
10
|
+
if (Predicate.isObject(left)) return combineNested(left, right);
|
|
11
|
+
return right;
|
|
12
|
+
};
|
|
13
|
+
const mergeRecords = (base, overrides) => Record.union(base, Record.filter(overrides, usable), combine);
|
|
14
|
+
const mergeConfig = (defaults, overrides) => mergeRecords(defaults, overrides);
|
|
15
|
+
//#endregion
|
|
16
|
+
export { mergeConfig as t };
|
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
import { r as ResolvedMode } from "./output-mode-CfGHDpi5.mjs";
|
|
2
|
+
import { t as LoadedPlugins } from "./Plugins-sA_9VKus.mjs";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as FileSystem from "effect/FileSystem";
|
|
5
|
+
import * as Path from "effect/Path";
|
|
6
|
+
import * as Stdio from "effect/Stdio";
|
|
7
|
+
import { Cell } from "@systemfsoftware/effect-cell-types";
|
|
8
|
+
import { CompleteDryRunResult, DryRunResult, ExitClass, MetricsResult, MutationTestResult, PartialStrykerOptions, ReporterFactory, ReporterRpcs, StrykerOptions, TestResult, TestRunnerCapabilities } from "@systemfsoftware/stryker-js-plugin-interface";
|
|
9
|
+
import * as Context from "effect/Context";
|
|
10
|
+
import * as Layer from "effect/Layer";
|
|
11
|
+
import * as Queue from "effect/Queue";
|
|
12
|
+
import "effect/Result";
|
|
13
|
+
import * as S from "effect/Schema";
|
|
14
|
+
import { CoverageData, FileDescription, FileDescriptions, Mutant, MutantStatus, MutateDescription, RunMutantResult } from "@systemfsoftware/stryker-js-instrumenter/mutants";
|
|
15
|
+
import * as Cause from "effect/Cause";
|
|
16
|
+
import * as Scope from "effect/Scope";
|
|
17
|
+
import * as Duration from "effect/Duration";
|
|
18
|
+
import * as MutableHashMap from "effect/MutableHashMap";
|
|
19
|
+
import * as MutableHashSet from "effect/MutableHashSet";
|
|
20
|
+
import { Schema } from "effect";
|
|
21
|
+
import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner";
|
|
22
|
+
import * as RpcClient from "effect/unstable/rpc/RpcClient";
|
|
23
|
+
import * as Schedule from "effect/Schedule";
|
|
24
|
+
import "@systemfsoftware/stryker-js-instrumenter";
|
|
25
|
+
import { PlatformError } from "effect/PlatformError";
|
|
26
|
+
import * as Rpc from "effect/unstable/rpc/Rpc";
|
|
27
|
+
import { RpcClientError } from "effect/unstable/rpc/RpcClientError";
|
|
28
|
+
import * as RpcGroup from "effect/unstable/rpc/RpcGroup";
|
|
29
|
+
import * as Socket from "effect/unstable/socket/Socket";
|
|
30
|
+
import { Ignorer } from "@systemfsoftware/stryker-ignorer-interface";
|
|
31
|
+
//#region src/Worker.schema.d.ts
|
|
32
|
+
declare const ChildProcessCrashedError_base: Schema.Class<ChildProcessCrashedError, Schema.TaggedStruct<"ChildProcessCrashedError", {
|
|
33
|
+
readonly pid: Schema.Int;
|
|
34
|
+
readonly exit: Schema.Union<readonly [Schema.Struct<{
|
|
35
|
+
readonly _tag: Schema.Literals<readonly ["Code"]>;
|
|
36
|
+
readonly code: Schema.Int;
|
|
37
|
+
}>, Schema.Struct<{
|
|
38
|
+
readonly _tag: Schema.Literals<readonly ["Signal"]>;
|
|
39
|
+
readonly signal: Schema.String;
|
|
40
|
+
}>]>;
|
|
41
|
+
readonly cause: Schema.optional<Schema.String>;
|
|
42
|
+
}>, import("effect/Cause").YieldableError>;
|
|
43
|
+
/**
|
|
44
|
+
* The child process hosting a worker ended when it was not supposed to.
|
|
45
|
+
*/
|
|
46
|
+
declare class ChildProcessCrashedError extends ChildProcessCrashedError_base {
|
|
47
|
+
readonly exitClass: 'InternalError';
|
|
48
|
+
}
|
|
49
|
+
declare const OutOfMemoryError_base: Schema.Class<OutOfMemoryError, Schema.TaggedStruct<"OutOfMemoryError", {
|
|
50
|
+
readonly pid: Schema.Int;
|
|
51
|
+
readonly exitCode: Schema.Int;
|
|
52
|
+
}>, import("effect/Cause").YieldableError>;
|
|
53
|
+
declare class OutOfMemoryError extends OutOfMemoryError_base {
|
|
54
|
+
readonly exitClass: 'RuntimeError';
|
|
55
|
+
}
|
|
56
|
+
declare const WorkerBootTimeoutError_base: Schema.Class<WorkerBootTimeoutError, Schema.TaggedStruct<"WorkerBootTimeoutError", {
|
|
57
|
+
readonly pid: Schema.Int;
|
|
58
|
+
}>, import("effect/Cause").YieldableError>;
|
|
59
|
+
declare class WorkerBootTimeoutError extends WorkerBootTimeoutError_base {
|
|
60
|
+
readonly exitClass: 'InternalError';
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/WorkerLauncher.d.ts
|
|
64
|
+
declare const connectRetry: Schedule.Schedule<import("effect/Duration").Duration, unknown, never, never>;
|
|
65
|
+
type WorkerExit = ChildProcessCrashedError | OutOfMemoryError;
|
|
66
|
+
interface SpawnedSocketWorker {
|
|
67
|
+
readonly pid: number;
|
|
68
|
+
readonly clientLayer: Layer.Layer<RpcClient.Protocol, Socket.SocketError>;
|
|
69
|
+
readonly exited: Effect.Effect<never, WorkerExit>;
|
|
70
|
+
}
|
|
71
|
+
interface WorkerSpawnParams {
|
|
72
|
+
readonly entrypoint: string;
|
|
73
|
+
readonly workingDirectory: string;
|
|
74
|
+
readonly execArgv: readonly string[];
|
|
75
|
+
readonly optionsJson: string;
|
|
76
|
+
readonly tempDirPrefix: string;
|
|
77
|
+
readonly env?: Readonly<Record<string, string>> | undefined;
|
|
78
|
+
}
|
|
79
|
+
interface WorkerLauncherShape {
|
|
80
|
+
readonly spawn: (params: WorkerSpawnParams) => Effect.Effect<SpawnedSocketWorker, ChildProcessCrashedError, Scope.Scope>;
|
|
81
|
+
}
|
|
82
|
+
declare const WorkerLauncher_base: Context.ServiceClass<WorkerLauncher, "@systemfsoftware/stryker-js/WorkerLauncher", WorkerLauncherShape>;
|
|
83
|
+
declare class WorkerLauncher extends WorkerLauncher_base {}
|
|
84
|
+
type WorkerBootError = WorkerExit | WorkerBootTimeoutError;
|
|
85
|
+
interface WorkerClientParams<Rpcs extends Rpc.Any> extends WorkerSpawnParams {
|
|
86
|
+
readonly rpcs: RpcGroup.RpcGroup<Rpcs>;
|
|
87
|
+
}
|
|
88
|
+
declare const makeWorkerClient: <Rpcs extends Rpc.Any>(params: WorkerClientParams<Rpcs>) => Effect.Effect<RpcClient.RpcClient<Rpcs, RpcClientError>, WorkerBootError, Scope.Scope | WorkerLauncher>;
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/RunEvent.schema.d.ts
|
|
91
|
+
declare const RunPhase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
|
|
92
|
+
type RunPhase = typeof RunPhase.Type;
|
|
93
|
+
declare const RunStarted_base: S.Class<RunStarted, S.TaggedStruct<"stream", {
|
|
94
|
+
readonly schemaVersion: S.String;
|
|
95
|
+
readonly runId: S.String;
|
|
96
|
+
readonly mode: S.Literals<readonly ["human", "machine"]>;
|
|
97
|
+
readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
|
|
98
|
+
}>, {}>;
|
|
99
|
+
declare class RunStarted extends RunStarted_base {}
|
|
100
|
+
declare const PhaseEntered_base: S.Class<PhaseEntered, S.TaggedStruct<"phase", {
|
|
101
|
+
readonly phase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
|
|
102
|
+
readonly elapsedMs: S.Finite;
|
|
103
|
+
}>, {}>;
|
|
104
|
+
declare class PhaseEntered extends PhaseEntered_base {}
|
|
105
|
+
declare const PlanKnown_base: S.Class<PlanKnown, S.TaggedStruct<"plan", {
|
|
106
|
+
readonly total: S.Finite;
|
|
107
|
+
}>, {}>;
|
|
108
|
+
declare class PlanKnown extends PlanKnown_base {}
|
|
109
|
+
declare const RunMutantTested_base: S.Class<RunMutantTested, S.TaggedStruct<"mutant", {
|
|
110
|
+
readonly id: S.String;
|
|
111
|
+
readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
|
|
112
|
+
readonly file: S.String;
|
|
113
|
+
readonly location: S.Struct<{
|
|
114
|
+
readonly start: S.Struct<{
|
|
115
|
+
readonly line: S.Finite;
|
|
116
|
+
readonly column: S.Finite;
|
|
117
|
+
}>;
|
|
118
|
+
readonly end: S.Struct<{
|
|
119
|
+
readonly line: S.Finite;
|
|
120
|
+
readonly column: S.Finite;
|
|
121
|
+
}>;
|
|
122
|
+
}>;
|
|
123
|
+
readonly mutator: S.String;
|
|
124
|
+
readonly replacement: S.NullOr<S.String>;
|
|
125
|
+
readonly completed: S.Finite;
|
|
126
|
+
readonly total: S.Finite;
|
|
127
|
+
}>, {}>;
|
|
128
|
+
declare class RunMutantTested extends RunMutantTested_base {}
|
|
129
|
+
declare const Heartbeat_base: S.Class<Heartbeat, S.TaggedStruct<"tick", {
|
|
130
|
+
readonly elapsedMs: S.Finite;
|
|
131
|
+
readonly completed: S.Finite;
|
|
132
|
+
readonly total: S.NullOr<S.Finite>;
|
|
133
|
+
}>, {}>;
|
|
134
|
+
declare class Heartbeat extends Heartbeat_base {}
|
|
135
|
+
declare const VerdictReached_base: S.Class<VerdictReached, S.TaggedStruct<"verdict", {
|
|
136
|
+
readonly schemaVersion: S.String;
|
|
137
|
+
readonly runId: S.String;
|
|
138
|
+
readonly mode: S.Literals<readonly ["human", "machine"]>;
|
|
139
|
+
readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
|
|
140
|
+
readonly score: S.NullOr<S.Finite>;
|
|
141
|
+
readonly thresholds: S.Struct<{
|
|
142
|
+
readonly high: S.Finite;
|
|
143
|
+
readonly low: S.Finite;
|
|
144
|
+
readonly break: S.NullOr<S.Finite>;
|
|
145
|
+
}>;
|
|
146
|
+
readonly reportFile: S.NullOr<S.String>;
|
|
147
|
+
readonly counts: S.Struct<{
|
|
148
|
+
readonly killed: S.Finite;
|
|
149
|
+
readonly timeout: S.Finite;
|
|
150
|
+
readonly survived: S.Finite;
|
|
151
|
+
readonly noCoverage: S.Finite;
|
|
152
|
+
readonly runtimeErrors: S.Finite;
|
|
153
|
+
readonly compileErrors: S.Finite;
|
|
154
|
+
readonly ignored: S.Finite;
|
|
155
|
+
readonly pending: S.Finite;
|
|
156
|
+
}>;
|
|
157
|
+
readonly mutants: S.$Array<S.Struct<{
|
|
158
|
+
readonly id: S.String;
|
|
159
|
+
readonly file: S.String;
|
|
160
|
+
readonly location: S.Struct<{
|
|
161
|
+
readonly start: S.Struct<{
|
|
162
|
+
readonly line: S.Finite;
|
|
163
|
+
readonly column: S.Finite;
|
|
164
|
+
}>;
|
|
165
|
+
readonly end: S.Struct<{
|
|
166
|
+
readonly line: S.Finite;
|
|
167
|
+
readonly column: S.Finite;
|
|
168
|
+
}>;
|
|
169
|
+
}>;
|
|
170
|
+
readonly mutator: S.String;
|
|
171
|
+
readonly replacement: S.NullOr<S.String>;
|
|
172
|
+
readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
|
|
173
|
+
}>>;
|
|
174
|
+
}>, {}>;
|
|
175
|
+
declare class VerdictReached extends VerdictReached_base {}
|
|
176
|
+
declare const RunFailed_base: S.Class<RunFailed, S.TaggedStruct<"error", {
|
|
177
|
+
readonly schemaVersion: S.String;
|
|
178
|
+
readonly code: S.Finite;
|
|
179
|
+
readonly error: S.String;
|
|
180
|
+
readonly remediation: S.String;
|
|
181
|
+
}>, {}>;
|
|
182
|
+
declare class RunFailed extends RunFailed_base {}
|
|
183
|
+
declare const HelpRendered_base: S.Class<HelpRendered, S.TaggedStruct<"help", {
|
|
184
|
+
readonly schemaVersion: S.String;
|
|
185
|
+
readonly code: S.Literals<readonly [0]>;
|
|
186
|
+
readonly help: S.String;
|
|
187
|
+
}>, {}>;
|
|
188
|
+
declare class HelpRendered extends HelpRendered_base {}
|
|
189
|
+
declare const RunEvent: S.Union<readonly [typeof RunStarted, typeof PhaseEntered, typeof PlanKnown, typeof RunMutantTested, typeof Heartbeat, typeof VerdictReached, typeof RunFailed, typeof HelpRendered]>;
|
|
190
|
+
type RunEvent = typeof RunEvent.Type;
|
|
191
|
+
type RunTerminalEvent = VerdictReached | RunFailed | HelpRendered;
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region src/RunEvents.d.ts
|
|
194
|
+
declare const RunEvents_base: Context.ServiceClass<RunEvents, "@systemfsoftware/stryker-js/RunEvents", Queue.Queue<Heartbeat | HelpRendered | PhaseEntered | PlanKnown | RunFailed | RunMutantTested | RunStarted | VerdictReached, Cause.Done<void>>>;
|
|
195
|
+
declare class RunEvents extends RunEvents_base {}
|
|
196
|
+
interface RunIdentityShape {
|
|
197
|
+
readonly runId: string;
|
|
198
|
+
readonly basePath: string;
|
|
199
|
+
}
|
|
200
|
+
declare const RunIdentity_base: Context.ServiceClass<RunIdentity, "@systemfsoftware/stryker-js/RunEvents/RunIdentity", RunIdentityShape>;
|
|
201
|
+
declare class RunIdentity extends RunIdentity_base {}
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region src/Mutants.d.ts
|
|
204
|
+
interface TestCoverage {
|
|
205
|
+
readonly testsByMutantId: MutableHashMap.MutableHashMap<string, MutableHashSet.MutableHashSet<TestResult>>;
|
|
206
|
+
readonly testsById: MutableHashMap.MutableHashMap<string, TestResult>;
|
|
207
|
+
readonly staticCoverage: CoverageData | undefined;
|
|
208
|
+
readonly hitsByMutantId: MutableHashMap.MutableHashMap<string, number>;
|
|
209
|
+
}
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/Worker.d.ts
|
|
212
|
+
interface IdGeneratorShape {
|
|
213
|
+
readonly next: Effect.Effect<number>;
|
|
214
|
+
}
|
|
215
|
+
declare const IdGenerator_base: Context.ServiceClass<IdGenerator, "@systemfsoftware/stryker-js/Worker/IdGenerator", IdGeneratorShape>;
|
|
216
|
+
declare class IdGenerator extends IdGenerator_base {}
|
|
217
|
+
declare const classifyWorkerExit: (pid: number, exitCode: number) => ChildProcessCrashedError | OutOfMemoryError;
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/Config.schema.d.ts
|
|
220
|
+
declare const ConfigDocumentSchema: S.$Record<S.String, S.Unknown>;
|
|
221
|
+
declare const ImportedModuleSchema: S.Struct<{
|
|
222
|
+
readonly default: S.optional<S.Unknown>;
|
|
223
|
+
}>;
|
|
224
|
+
declare const ConfigFileNotFoundError_base: S.Class<ConfigFileNotFoundError, S.TaggedStruct<"ConfigFileNotFoundError", {
|
|
225
|
+
readonly file: S.String;
|
|
226
|
+
}>, import("effect/Cause").YieldableError>;
|
|
227
|
+
declare class ConfigFileNotFoundError extends ConfigFileNotFoundError_base {
|
|
228
|
+
readonly exitClass: 'ConfigError';
|
|
229
|
+
}
|
|
230
|
+
declare const ConfigFileUnsupportedError_base: S.Class<ConfigFileUnsupportedError, S.TaggedStruct<"ConfigFileUnsupportedError", {
|
|
231
|
+
readonly file: S.String;
|
|
232
|
+
readonly hint: S.String;
|
|
233
|
+
}>, import("effect/Cause").YieldableError>;
|
|
234
|
+
declare class ConfigFileUnsupportedError extends ConfigFileUnsupportedError_base {
|
|
235
|
+
readonly exitClass: 'ConfigError';
|
|
236
|
+
get message(): string;
|
|
237
|
+
}
|
|
238
|
+
declare const ConfigFileUnreadableError_base: S.Class<ConfigFileUnreadableError, S.TaggedStruct<"ConfigFileUnreadableError", {
|
|
239
|
+
readonly file: S.String;
|
|
240
|
+
readonly cause: S.Unknown;
|
|
241
|
+
}>, import("effect/Cause").YieldableError>;
|
|
242
|
+
declare class ConfigFileUnreadableError extends ConfigFileUnreadableError_base {
|
|
243
|
+
readonly exitClass: 'ConfigError';
|
|
244
|
+
}
|
|
245
|
+
declare const ConfigFileInvalidError_base: S.Class<ConfigFileInvalidError, S.TaggedStruct<"ConfigFileInvalidError", {
|
|
246
|
+
readonly file: S.String;
|
|
247
|
+
readonly cause: S.Unknown;
|
|
248
|
+
}>, import("effect/Cause").YieldableError>;
|
|
249
|
+
declare class ConfigFileInvalidError extends ConfigFileInvalidError_base {
|
|
250
|
+
readonly exitClass: 'ConfigError';
|
|
251
|
+
}
|
|
252
|
+
declare const ConfigError_base: S.Class<ConfigError, S.TaggedStruct<"ConfigError", {
|
|
253
|
+
readonly message: S.String;
|
|
254
|
+
}>, import("effect/Cause").YieldableError>;
|
|
255
|
+
declare class ConfigError extends ConfigError_base {
|
|
256
|
+
readonly exitClass: 'ConfigError';
|
|
257
|
+
}
|
|
258
|
+
declare const ReadConfigCommand_base: S.Class<ReadConfigCommand, S.TaggedStruct<"ReadConfigCommand", {
|
|
259
|
+
readonly cliOptions: S.$Record<S.String, S.Unknown>;
|
|
260
|
+
readonly basePath: S.String;
|
|
261
|
+
}>, {}>;
|
|
262
|
+
declare class ReadConfigCommand extends ReadConfigCommand_base {}
|
|
263
|
+
declare const MergeCommand_base: S.Class<MergeCommand, S.TaggedStruct<"MergeCommand", {
|
|
264
|
+
readonly base: S.$Record<S.String, S.Unknown>;
|
|
265
|
+
readonly overrides: S.$Record<S.String, S.Unknown>;
|
|
266
|
+
}>, {}>;
|
|
267
|
+
declare class MergeCommand extends MergeCommand_base {}
|
|
268
|
+
declare const MergeResult_base: S.Class<MergeResult, S.TaggedStruct<"MergeResult", {
|
|
269
|
+
readonly merged: S.$Record<S.String, S.Unknown>;
|
|
270
|
+
}>, {}>;
|
|
271
|
+
declare class MergeResult extends MergeResult_base {}
|
|
272
|
+
declare const survivorsPriorReport: S.optionalKey<S.String>;
|
|
273
|
+
declare const extendsPropertySchema: S.optionalKey<S.String>;
|
|
274
|
+
declare const forkOptionsSchema: S.StructWithRest<S.Struct<{
|
|
275
|
+
readonly allowConsoleColors: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
276
|
+
readonly buildCommand: S.optional<S.String>;
|
|
277
|
+
readonly checkers: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
|
|
278
|
+
readonly checkerNodeArgs: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
|
|
279
|
+
readonly concurrency: S.optional<S.Union<readonly [S.Finite, S.String]>>;
|
|
280
|
+
readonly commandRunner: S.withDecodingDefaultKey<S.StructWithRest<S.Struct<{
|
|
281
|
+
readonly command: S.withDecodingDefaultKey<S.String, never>;
|
|
282
|
+
}>, readonly [S.$Record<S.String, S.Unknown>]>, never>;
|
|
283
|
+
readonly coverageAnalysis: S.withDecodingDefaultKey<S.Literals<readonly ["off", "all", "perTest"]>, never>;
|
|
284
|
+
readonly clearTextReporter: S.withDecodingDefaultKey<S.StructWithRest<S.Struct<{
|
|
285
|
+
readonly allowColor: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
286
|
+
readonly allowEmojis: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
287
|
+
readonly logTests: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
288
|
+
readonly maxTestsToLog: S.withDecodingDefaultKey<S.Finite, never>;
|
|
289
|
+
readonly reportTests: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
290
|
+
readonly reportMutants: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
291
|
+
readonly reportScoreTable: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
292
|
+
readonly skipFull: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
293
|
+
}>, readonly [S.$Record<S.String, S.Unknown>]>, never>;
|
|
294
|
+
readonly dryRunOnly: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
295
|
+
readonly ignorePatterns: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
|
|
296
|
+
readonly ignoreStatic: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
297
|
+
readonly incremental: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
298
|
+
readonly incrementalFile: S.withDecodingDefaultKey<S.String, never>;
|
|
299
|
+
readonly progressStreamFile: S.withDecodingDefaultKey<S.String, never>;
|
|
300
|
+
readonly force: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
301
|
+
readonly fileLogLevel: S.withDecodingDefaultKey<S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>, never>;
|
|
302
|
+
readonly inPlace: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
303
|
+
readonly logLevel: S.withDecodingDefaultKey<S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>, never>;
|
|
304
|
+
readonly maxConcurrentTestRunners: S.withDecodingDefaultKey<S.Finite, never>;
|
|
305
|
+
readonly maxTestRunnerReuse: S.withDecodingDefaultKey<S.Finite, never>;
|
|
306
|
+
readonly mutate: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
|
|
307
|
+
readonly mutator: S.withDecodingDefaultKey<S.Struct<{
|
|
308
|
+
readonly excludedMutations: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
|
|
309
|
+
}>, never>;
|
|
310
|
+
readonly packageManager: S.optional<S.Literals<readonly ["npm", "yarn", "pnpm"]>>;
|
|
311
|
+
readonly plugins: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
|
|
312
|
+
readonly appendPlugins: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
|
|
313
|
+
readonly reporters: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
|
|
314
|
+
readonly htmlReporter: S.withDecodingDefaultKey<S.Struct<{
|
|
315
|
+
readonly fileName: S.withDecodingDefaultKey<S.String, never>;
|
|
316
|
+
}>, never>;
|
|
317
|
+
readonly jsonReporter: S.withDecodingDefaultKey<S.Struct<{
|
|
318
|
+
readonly fileName: S.withDecodingDefaultKey<S.String, never>;
|
|
319
|
+
}>, never>;
|
|
320
|
+
readonly disableTypeChecks: S.withDecodingDefaultKey<S.Union<readonly [S.Boolean, S.String]>, never>;
|
|
321
|
+
readonly symlinkNodeModules: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
322
|
+
readonly tempDirName: S.withDecodingDefaultKey<S.String, never>;
|
|
323
|
+
readonly cleanTempDir: S.withDecodingDefaultKey<S.Literals<readonly ["always", false, true]>, never>;
|
|
324
|
+
readonly testRunner: S.withDecodingDefaultKey<S.String, never>;
|
|
325
|
+
readonly testRunnerNodeArgs: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
|
|
326
|
+
readonly thresholds: S.withDecodingDefaultKey<S.Struct<{
|
|
327
|
+
readonly high: S.withDecodingDefaultKey<S.Finite, never>;
|
|
328
|
+
readonly low: S.withDecodingDefaultKey<S.Finite, never>;
|
|
329
|
+
readonly break: S.withDecodingDefaultKey<S.NullOr<S.Finite>, never>;
|
|
330
|
+
}>, never>;
|
|
331
|
+
readonly timeoutFactor: S.withDecodingDefaultKey<S.Finite, never>;
|
|
332
|
+
readonly timeoutMS: S.withDecodingDefaultKey<S.Finite, never>;
|
|
333
|
+
readonly dryRunTimeoutMinutes: S.withDecodingDefaultKey<S.Finite, never>;
|
|
334
|
+
readonly tsconfigFile: S.withDecodingDefaultKey<S.String, never>;
|
|
335
|
+
readonly warnings: S.withDecodingDefaultKey<S.Union<readonly [S.Boolean, S.StructWithRest<S.Struct<{
|
|
336
|
+
readonly unknownOptions: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
337
|
+
readonly preprocessorErrors: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
338
|
+
readonly unserializableOptions: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
339
|
+
readonly slow: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
340
|
+
}>, readonly [S.$Record<S.String, S.Unknown>]>]>, never>;
|
|
341
|
+
readonly disableBail: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
342
|
+
readonly allowEmpty: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
343
|
+
readonly ignorers: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
|
|
344
|
+
readonly testFiles: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
|
|
345
|
+
readonly survivorsPriorReport: S.optionalKey<S.String>;
|
|
346
|
+
readonly extends: S.optionalKey<S.String>;
|
|
347
|
+
}>, readonly [S.$Record<S.String, S.Unknown>]>;
|
|
348
|
+
//#endregion
|
|
349
|
+
//#region src/ReporterStream.d.ts
|
|
350
|
+
declare const ReporterStageTypeId: unique symbol;
|
|
351
|
+
/**
|
|
352
|
+
* An attached reporter stage, opaque at the engine boundary: the published
|
|
353
|
+
* phase types carry this handle so the attachment machinery (queues, fibers,
|
|
354
|
+
* the state latch) never reaches an adopter's compiler. Constructed only by
|
|
355
|
+
* `attachReporterFactories`.
|
|
356
|
+
*/
|
|
357
|
+
interface ReporterStage {
|
|
358
|
+
readonly [ReporterStageTypeId]: typeof ReporterStageTypeId;
|
|
359
|
+
}
|
|
360
|
+
declare const REPORTER_EVENT_BATCH_BOUND = 128;
|
|
361
|
+
type ReporterWorkerClient = RpcClient.RpcClient<RpcGroup.Rpcs<typeof ReporterRpcs>, RpcClientError>;
|
|
362
|
+
declare const reporterWorkerFactory: (client: ReporterWorkerClient) => ReporterFactory;
|
|
363
|
+
interface SpawnReporterWorkerParams {
|
|
364
|
+
readonly entrypoint: string;
|
|
365
|
+
readonly projectBasePath: string;
|
|
366
|
+
readonly execArgv: readonly string[];
|
|
367
|
+
readonly options: StrykerOptions;
|
|
368
|
+
readonly tempDirPrefix: string;
|
|
369
|
+
}
|
|
370
|
+
declare const spawnReporterWorker: (params: SpawnReporterWorkerParams) => Effect.Effect<ReporterWorkerClient, WorkerBootError, Scope.Scope | WorkerLauncher>;
|
|
371
|
+
//#endregion
|
|
372
|
+
//#region src/IncrementalReport.schema.d.ts
|
|
373
|
+
declare const IncrementalReportSchema: S.StructWithRest<S.Struct<{
|
|
374
|
+
readonly schemaVersion: S.String;
|
|
375
|
+
readonly thresholds: S.Struct<{
|
|
376
|
+
readonly high: S.Finite;
|
|
377
|
+
readonly low: S.Finite;
|
|
378
|
+
}>;
|
|
379
|
+
readonly files: S.$Record<S.String, S.Struct<{
|
|
380
|
+
readonly language: S.String;
|
|
381
|
+
readonly source: S.String;
|
|
382
|
+
readonly mutants: S.$Array<S.Struct<{
|
|
383
|
+
readonly id: S.String;
|
|
384
|
+
readonly mutatorName: S.String;
|
|
385
|
+
readonly replacement: S.String;
|
|
386
|
+
readonly location: S.Struct<{
|
|
387
|
+
readonly start: S.Struct<{
|
|
388
|
+
readonly line: S.Finite;
|
|
389
|
+
readonly column: S.Finite;
|
|
390
|
+
}>;
|
|
391
|
+
readonly end: S.Struct<{
|
|
392
|
+
readonly line: S.Finite;
|
|
393
|
+
readonly column: S.Finite;
|
|
394
|
+
}>;
|
|
395
|
+
}>;
|
|
396
|
+
readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "Timeout", "CompileError", "RuntimeError", "Ignored", "Pending"]>;
|
|
397
|
+
readonly killedBy: S.optional<S.$Array<S.String>>;
|
|
398
|
+
readonly coveredBy: S.optional<S.$Array<S.String>>;
|
|
399
|
+
readonly static: S.optional<S.Boolean>;
|
|
400
|
+
readonly statusReason: S.optional<S.String>;
|
|
401
|
+
readonly testsCompleted: S.optional<S.Finite>;
|
|
402
|
+
readonly description: S.optional<S.String>;
|
|
403
|
+
readonly duration: S.optional<S.Finite>;
|
|
404
|
+
}>>;
|
|
405
|
+
}>>;
|
|
406
|
+
readonly testFiles: S.optional<S.$Record<S.String, S.Struct<{
|
|
407
|
+
readonly source: S.optional<S.String>;
|
|
408
|
+
readonly tests: S.$Array<S.Struct<{
|
|
409
|
+
readonly id: S.String;
|
|
410
|
+
readonly name: S.String;
|
|
411
|
+
readonly location: S.optional<S.Struct<{
|
|
412
|
+
readonly start: S.Struct<{
|
|
413
|
+
readonly line: S.Finite;
|
|
414
|
+
readonly column: S.Finite;
|
|
415
|
+
}>;
|
|
416
|
+
readonly end: S.optional<S.Struct<{
|
|
417
|
+
readonly line: S.Finite;
|
|
418
|
+
readonly column: S.Finite;
|
|
419
|
+
}>>;
|
|
420
|
+
}>>;
|
|
421
|
+
}>>;
|
|
422
|
+
}>>>;
|
|
423
|
+
}>, readonly [S.$Record<S.String, S.Unknown>]>;
|
|
424
|
+
//#endregion
|
|
425
|
+
//#region src/Project.d.ts
|
|
426
|
+
interface ProjectFile extends FileDescription {
|
|
427
|
+
readonly name: string;
|
|
428
|
+
readonly mutate: MutateDescription;
|
|
429
|
+
readonly content: string | undefined;
|
|
430
|
+
readonly originalContent: string | undefined;
|
|
431
|
+
}
|
|
432
|
+
interface Project {
|
|
433
|
+
readonly fileDescriptions: FileDescriptions;
|
|
434
|
+
readonly incrementalReport: MutationTestResult | undefined;
|
|
435
|
+
readonly testFiles: readonly string[];
|
|
436
|
+
readonly files: MutableHashMap.MutableHashMap<string, ProjectFile>;
|
|
437
|
+
readonly filesToMutate: MutableHashMap.MutableHashMap<string, ProjectFile>;
|
|
438
|
+
}
|
|
439
|
+
//#endregion
|
|
440
|
+
//#region src/stryker-error.schema.d.ts
|
|
441
|
+
declare const StrykerError_base: Schema.Class<StrykerError, Schema.TaggedStruct<"StrykerError", {
|
|
442
|
+
readonly message: Schema.String;
|
|
443
|
+
readonly cause: Schema.optional<Schema.Unknown>;
|
|
444
|
+
}>, import("effect/Cause").YieldableError>;
|
|
445
|
+
declare class StrykerError extends StrykerError_base {}
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region src/Sandbox.d.ts
|
|
448
|
+
interface SandboxHandle {
|
|
449
|
+
readonly workingDirectory: string;
|
|
450
|
+
readonly sandboxFileFor: (fileName: string) => string;
|
|
451
|
+
readonly originalFileFor: (sandboxFileName: string) => string;
|
|
452
|
+
}
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region src/run/RunEnvironment.d.ts
|
|
455
|
+
interface RunEnvironmentShape {
|
|
456
|
+
readonly runId: string;
|
|
457
|
+
readonly resolvedMode: ResolvedMode;
|
|
458
|
+
readonly runStartedAt: number;
|
|
459
|
+
readonly basePath: string;
|
|
460
|
+
readonly builtinReporters: Readonly<Record<string, ReporterFactory>>;
|
|
461
|
+
readonly allowConsoleColors: boolean;
|
|
462
|
+
}
|
|
463
|
+
declare const RunEnvironment_base: Context.ServiceClass<RunEnvironment, "@systemfsoftware/stryker-js/run/RunEnvironment", RunEnvironmentShape>;
|
|
464
|
+
declare class RunEnvironment extends RunEnvironment_base {}
|
|
465
|
+
//#endregion
|
|
466
|
+
//#region src/run/prepare.cell.d.ts
|
|
467
|
+
interface PrepareDone {
|
|
468
|
+
readonly project: Project;
|
|
469
|
+
readonly loadedPlugins: LoadedPlugins;
|
|
470
|
+
readonly ignorers: readonly Ignorer[];
|
|
471
|
+
readonly options: StrykerOptions;
|
|
472
|
+
readonly temporaryDirectoryPath: string;
|
|
473
|
+
readonly reporterStage: ReporterStage;
|
|
474
|
+
}
|
|
475
|
+
interface PrepareExecutorArgs {
|
|
476
|
+
cliOptions: PartialStrykerOptions;
|
|
477
|
+
targetMutatePatterns: string[] | undefined;
|
|
478
|
+
}
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region src/run/instrument.cell.d.ts
|
|
481
|
+
interface InstrumentDone extends PrepareDone {
|
|
482
|
+
readonly mutants: readonly Mutant[];
|
|
483
|
+
readonly sandbox: SandboxHandle;
|
|
484
|
+
readonly concurrency: {
|
|
485
|
+
readonly testRunners: number;
|
|
486
|
+
readonly checkers: number;
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
//#endregion
|
|
490
|
+
//#region src/run/dry-run.cell.d.ts
|
|
491
|
+
interface DryRunDone extends InstrumentDone {
|
|
492
|
+
readonly dryRunResult: CompleteDryRunResult;
|
|
493
|
+
readonly testCoverage: TestCoverage;
|
|
494
|
+
readonly timeOverhead: Duration.Duration;
|
|
495
|
+
}
|
|
496
|
+
//#endregion
|
|
497
|
+
//#region src/run/StageServices.d.ts
|
|
498
|
+
type StageServices = ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem | IdGenerator | Path.Path | RunEnvironment | RunEvents | Scope.Scope | Stdio.Stdio | WorkerLauncher;
|
|
499
|
+
type EnginePorts = ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem | Path.Path | Stdio.Stdio | WorkerLauncher;
|
|
500
|
+
type RunStageServices = RunEnvironment | RunEvents | IdGenerator | Scope.Scope;
|
|
501
|
+
type WiredRunLayer = Layer.Layer<RunStageServices | EnginePorts, never, never>;
|
|
502
|
+
//#endregion
|
|
503
|
+
//#region src/run/mutation-test.cell.d.ts
|
|
504
|
+
interface MutationTestDone {
|
|
505
|
+
readonly results: readonly RunMutantResult[];
|
|
506
|
+
readonly verdict: ExitClass | null;
|
|
507
|
+
}
|
|
508
|
+
//#endregion
|
|
509
|
+
export { WorkerLauncherShape as $, forkOptionsSchema as A, PlanKnown as B, ConfigFileUnreadableError as C, MergeResult as D, MergeCommand as E, RunIdentity as F, RunStarted as G, RunFailed as H, RunIdentityShape as I, SpawnedSocketWorker as J, RunTerminalEvent as K, Heartbeat as L, IdGeneratorShape as M, classifyWorkerExit as N, ReadConfigCommand as O, RunEvents as P, WorkerLauncher as Q, HelpRendered as R, ConfigFileNotFoundError as S, ImportedModuleSchema as T, RunMutantTested as U, RunEvent as V, RunPhase as W, WorkerClientParams as X, WorkerBootError as Y, WorkerExit as Z, reporterWorkerFactory as _, WiredRunLayer as a, WorkerBootTimeoutError as at, ConfigError as b, PrepareDone as c, RunEnvironmentShape as d, WorkerSpawnParams as et, StrykerError as f, SpawnReporterWorkerParams as g, ReporterWorkerClient as h, StageServices as i, OutOfMemoryError as it, survivorsPriorReport as j, extendsPropertySchema as k, PrepareExecutorArgs as l, REPORTER_EVENT_BATCH_BOUND as m, EnginePorts as n, makeWorkerClient as nt, DryRunDone as o, IncrementalReportSchema as p, VerdictReached as q, RunStageServices as r, ChildProcessCrashedError as rt, InstrumentDone as s, MutationTestDone as t, connectRetry as tt, RunEnvironment as u, spawnReporterWorker as v, ConfigFileUnsupportedError as w, ConfigFileInvalidError as x, ConfigDocumentSchema as y, PhaseEntered as z };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/output-mode.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Mode type vocabulary shared with the CLI package. Runtime resolution
|
|
4
|
+
* (`resolveMode`) and gate functions (`isProgressEnabled`, `isColorEnabled`)
|
|
5
|
+
* live in the CLI; the `ResolvedMode` fields (`mode`, `signal`,
|
|
6
|
+
* `stdoutIsTTY`) ride along in `VerdictEnvelope` (`verdict-envelope.ts`),
|
|
7
|
+
* so the types stay where the data does.
|
|
8
|
+
*/
|
|
9
|
+
type OutputMode = 'human' | 'machine';
|
|
10
|
+
type ModeSignal = 'flag' | 'env' | 'tty' | 'agent' | 'tool';
|
|
11
|
+
interface ResolvedMode {
|
|
12
|
+
readonly mode: OutputMode;
|
|
13
|
+
readonly signal: ModeSignal;
|
|
14
|
+
readonly stdoutIsTTY: boolean;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { OutputMode as n, ResolvedMode as r, ModeSignal as t };
|
|
Binary file
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import * as HashMap from 'effect/HashMap';
|
|
3
|
+
import { Ignorer } from '@systemfsoftware/stryker-ignorer-interface';
|
|
4
|
+
import * as Path from 'effect/Path';
|
|
5
|
+
import { Schema } from 'effect';
|
|
6
|
+
import { WorkerPluginKind } from '@systemfsoftware/stryker-js-plugin-interface';
|
|
7
|
+
import { WorkerPluginSpawn } from '@systemfsoftware/stryker-js-plugin-interface';
|
|
8
|
+
import { YieldableError } from 'effect/Cause';
|
|
9
|
+
|
|
10
|
+
declare type AnyPluginDescriptor = AnyWorkerPluginDescriptor | EvaluatorPluginDescriptor;
|
|
11
|
+
|
|
12
|
+
declare type AnyWorkerPluginDescriptor = { [K in WorkerPluginKind]: WorkerPluginDescriptor<K>; }[WorkerPluginKind];
|
|
13
|
+
|
|
14
|
+
declare type AnyWorkerPluginSource = { [K in WorkerPluginKind]: WorkerPluginSource<K>; }[WorkerPluginKind];
|
|
15
|
+
|
|
16
|
+
export declare function create<K extends PluginKind>(pluginsByKind: HashMap.HashMap<PluginKind, readonly AnyPluginDescriptor[]>, kind: K, name: string): Effect.Effect<PluginDescriptorOf<K>, PluginNotFoundError>;
|
|
17
|
+
|
|
18
|
+
export declare function createAll<K extends PluginKind>(pluginsByKind: HashMap.HashMap<PluginKind, readonly AnyPluginDescriptor[]>, kind: K): Effect.Effect<readonly PluginDescriptorOf<K>[]>;
|
|
19
|
+
|
|
20
|
+
declare interface EvaluatorPluginDescriptor {
|
|
21
|
+
readonly kind: 'Evaluator';
|
|
22
|
+
readonly name: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare interface EvaluatorPluginSource {
|
|
26
|
+
readonly kind: 'Evaluator';
|
|
27
|
+
readonly name: string;
|
|
28
|
+
readonly modulePath: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export declare interface LoadedPlugins {
|
|
32
|
+
readonly schemaContributions: readonly Record<string, unknown>[];
|
|
33
|
+
readonly pluginsByKind: HashMap.HashMap<PluginKind, readonly PluginDescriptor[]>;
|
|
34
|
+
readonly pluginModulePaths: readonly string[];
|
|
35
|
+
readonly pluginSources: readonly PluginSource[];
|
|
36
|
+
readonly ignorers: readonly Ignorer[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export declare function loadPlugins(pluginDescriptors: readonly string[]): Effect.Effect<LoadedPlugins, PluginLoadFailedError, Path.Path>;
|
|
40
|
+
|
|
41
|
+
export declare type PluginDescriptor<K extends PluginKind = PluginKind> = PluginDescriptorOf<K>;
|
|
42
|
+
|
|
43
|
+
export declare type PluginDescriptorOf<K extends PluginKind> = Extract<AnyPluginDescriptor, {
|
|
44
|
+
readonly kind: K;
|
|
45
|
+
}>;
|
|
46
|
+
|
|
47
|
+
export declare type PluginKind = WorkerPluginKind | 'Evaluator';
|
|
48
|
+
|
|
49
|
+
export declare interface PluginLoaderEntryLike {
|
|
50
|
+
readonly moduleName: string;
|
|
51
|
+
readonly plugins: readonly PluginDescriptor[] | undefined;
|
|
52
|
+
readonly schemaContribution: Record<string, unknown> | undefined;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export declare class PluginLoadFailedError extends PluginLoadFailedError_base {
|
|
56
|
+
readonly exitClass: 'InternalError';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
declare const PluginLoadFailedError_base: Schema.Class<PluginLoadFailedError, Schema.TaggedStruct<"PluginLoadFailedError", {
|
|
60
|
+
readonly descriptor: Schema.String;
|
|
61
|
+
readonly cause: Schema.Unknown;
|
|
62
|
+
}>, YieldableError>;
|
|
63
|
+
|
|
64
|
+
export declare interface PluginLoadPlan {
|
|
65
|
+
readonly schemaContributions: readonly Record<string, unknown>[];
|
|
66
|
+
readonly pluginsByKind: HashMap.HashMap<PluginKind, readonly PluginDescriptor[]>;
|
|
67
|
+
readonly pluginModulePaths: readonly string[];
|
|
68
|
+
readonly pluginSources: readonly PluginSource[];
|
|
69
|
+
readonly shadowings: readonly {
|
|
70
|
+
readonly kind: PluginKind;
|
|
71
|
+
readonly name: string;
|
|
72
|
+
readonly shadowedIndex: number;
|
|
73
|
+
readonly winnerIndex: number;
|
|
74
|
+
}[];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export declare class PluginNotFoundError extends PluginNotFoundError_base {
|
|
78
|
+
readonly exitClass: 'ConfigError';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare const PluginNotFoundError_base: Schema.Class<PluginNotFoundError, Schema.TaggedStruct<"PluginNotFoundError", {
|
|
82
|
+
readonly descriptor: Schema.String;
|
|
83
|
+
}>, YieldableError>;
|
|
84
|
+
|
|
85
|
+
export declare type PluginSource = AnyWorkerPluginSource | EvaluatorPluginSource;
|
|
86
|
+
|
|
87
|
+
export declare const resolvePluginWorkerEntry: (params: {
|
|
88
|
+
readonly loaded: Pick<LoadedPlugins, 'pluginSources'>;
|
|
89
|
+
readonly kind: WorkerPluginKind;
|
|
90
|
+
readonly name: string;
|
|
91
|
+
}) => Effect.Effect<WorkerPluginSpawn, PluginNotFoundError>;
|
|
92
|
+
|
|
93
|
+
declare interface WorkerPluginDescriptor<K extends WorkerPluginKind = WorkerPluginKind> {
|
|
94
|
+
readonly kind: K;
|
|
95
|
+
readonly name: string;
|
|
96
|
+
readonly workerEntry: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare interface WorkerPluginSource<K extends WorkerPluginKind = WorkerPluginKind> {
|
|
100
|
+
readonly kind: K;
|
|
101
|
+
readonly name: string;
|
|
102
|
+
readonly modulePath: string;
|
|
103
|
+
readonly workerEntry: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export { }
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as loadPlugins, i as createAll, n as resolvePluginWorkerEntry, o as PluginLoadFailedError, r as create, s as PluginNotFoundError } from "./plugin-worker-entry-DNu0SHO8.mjs";
|
|
2
|
+
export { PluginLoadFailedError, PluginNotFoundError, create, createAll, loadPlugins, resolvePluginWorkerEntry };
|