@systemfsoftware/stryker-js 3.0.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +10 -16
  3. package/dist/index.d.mts +1603 -8
  4. package/dist/index.mjs +1034 -9
  5. package/package.json +11 -8
  6. package/dist/Checker-A8o5B3Ub.d.mts +0 -40
  7. package/dist/Checker-Bq8NXD8d.mjs +0 -25
  8. package/dist/Checker.d.mts +0 -2
  9. package/dist/Checker.mjs +0 -2
  10. package/dist/Evaluator-CnAN8-pZ.d.mts +0 -19
  11. package/dist/Evaluator.d.mts +0 -3
  12. package/dist/Evaluator.mjs +0 -9
  13. package/dist/ExitClass.d.mts +0 -9
  14. package/dist/ExitClass.mjs +0 -59
  15. package/dist/ExitClass.schema-BmOIK5zT.d.mts +0 -18
  16. package/dist/Ignorer-BUY68FZQ.d.mts +0 -21
  17. package/dist/Ignorer.d.mts +0 -2
  18. package/dist/Ignorer.mjs +0 -7
  19. package/dist/Metrics.d.mts +0 -7
  20. package/dist/Metrics.mjs +0 -79
  21. package/dist/Metrics.schema-BaVd6rXs.d.mts +0 -50
  22. package/dist/Metrics.schema-DZdoc46X.mjs +0 -27
  23. package/dist/Module-DHKEMAFI.d.mts +0 -31
  24. package/dist/Module.d.mts +0 -2
  25. package/dist/Module.mjs +0 -16
  26. package/dist/Mutant-Ci25PsWA.d.mts +0 -351
  27. package/dist/Mutant.d.mts +0 -3
  28. package/dist/Mutant.mjs +0 -90
  29. package/dist/Mutant.schema-H3r0ho_R.mjs +0 -34
  30. package/dist/Plugin-BtItMchw.d.mts +0 -153
  31. package/dist/Plugin-DXFdJP1l.mjs +0 -105
  32. package/dist/Plugin.d.mts +0 -2
  33. package/dist/Plugin.mjs +0 -2
  34. package/dist/Report.d.mts +0 -2
  35. package/dist/Report.mjs +0 -98
  36. package/dist/Report.schema-_buHXdnZ.d.mts +0 -251
  37. package/dist/Reporter-BWTwlSJf.mjs +0 -25
  38. package/dist/Reporter-C7ysGxqX.d.mts +0 -16
  39. package/dist/Reporter.d.mts +0 -4
  40. package/dist/Reporter.mjs +0 -3
  41. package/dist/ReporterEvent.d.mts +0 -2
  42. package/dist/ReporterEvent.mjs +0 -57
  43. package/dist/ReporterEvent.schema-BhtyYCZo.d.mts +0 -189
  44. package/dist/Run-BUpNSmcM.d.mts +0 -172
  45. package/dist/Run.d.mts +0 -2
  46. package/dist/Run.mjs +0 -56
  47. package/dist/Run.schema-DZve3k2m.mjs +0 -138
  48. package/dist/Schema-4oCWQ0P0.d.mts +0 -158
  49. package/dist/Schema-CMKdWMUN.mjs +0 -244
  50. package/dist/Schema.d.mts +0 -2
  51. package/dist/Schema.mjs +0 -2
  52. package/dist/TestRunner.d.mts +0 -2
  53. package/dist/TestRunner.mjs +0 -57
  54. package/dist/TestRunner.schema-Dy0Wdro2.mjs +0 -119
  55. package/dist/output-file.d.mts +0 -8
  56. package/dist/output-file.mjs +0 -8
  57. package/dist/provided-options.d.mts +0 -16
  58. package/dist/provided-options.mjs +0 -1
  59. package/dist/rolldown-runtime-D7D4PA-g.mjs +0 -13
package/dist/index.d.mts CHANGED
@@ -1,8 +1,1603 @@
1
- import { i as Checker_d_exports } from "./Checker-A8o5B3Ub.mjs";
2
- import { X as TestRunner_d_exports, v as Mutant_d_exports } from "./Mutant-Ci25PsWA.mjs";
3
- import { r as Ignorer_d_exports } from "./Ignorer-BUY68FZQ.mjs";
4
- import { a as Schema_d_exports } from "./Schema-4oCWQ0P0.mjs";
5
- import { s as Plugin_d_exports } from "./Plugin-BtItMchw.mjs";
6
- import { n as Reporter_d_exports } from "./Reporter-C7ysGxqX.mjs";
7
- import { a as Run_d_exports } from "./Run-BUpNSmcM.mjs";
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 };
1
+ import * as Cause from 'effect/Cause';
2
+ import * as Context from 'effect/Context';
3
+ import * as Effect from 'effect/Effect';
4
+ import * as Exit from 'effect/Exit';
5
+ import * as FileSystem from 'effect/FileSystem';
6
+ import * as HashMap from 'effect/HashMap';
7
+ import * as Layer from 'effect/Layer';
8
+ import * as Option from 'effect/Option';
9
+ import * as Path from 'effect/Path';
10
+ import * as Queue from 'effect/Queue';
11
+ import * as S from 'effect/Schema';
12
+ import { StandardSchemaV1 } from 'effect/StandardSchema';
13
+ import { YieldableError } from 'effect/Cause';
14
+
15
+ export declare type AnyPluginContribution = { [K in PluginKind]: PluginContribution<K>; }[PluginKind];
16
+
17
+ export declare interface BaseTestResult {
18
+ readonly id: string;
19
+ readonly name: string;
20
+ readonly timeSpentMs: number;
21
+ readonly fileName?: string;
22
+ readonly startPosition?: Position;
23
+ }
24
+
25
+ export declare type BrandingInformation = typeof BrandingInformationSchema.Type;
26
+
27
+ export declare const BrandingInformationSchema: S.Struct<{
28
+ readonly homepageUrl: S.String;
29
+ readonly imageUrl: S.optional<S.String>;
30
+ }>;
31
+
32
+ export declare const calculateMetrics: (files: Readonly<Record<string, FileResult>>) => MetricsResult;
33
+
34
+ export declare const causeText: (cause: unknown, depth: number) => string | undefined;
35
+
36
+ export declare class Checker extends Checker_base {}
37
+
38
+ declare const Checker_base: Context.ServiceClass<Checker, "~@systemfsoftware/stryker-js/Checker", CheckerService>;
39
+
40
+ export declare class CheckerFailed extends CheckerFailed_base {}
41
+
42
+ declare const CheckerFailed_base: S.Class<CheckerFailed, S.TaggedStruct<"CheckerFailed", {
43
+ readonly cause: S.String;
44
+ readonly checkerName: S.String;
45
+ readonly mutantIds: S.$Array<S.String>;
46
+ }>, YieldableError>;
47
+
48
+ export declare interface CheckerService {
49
+ readonly init: Effect.Effect<void, CheckerFailed>;
50
+ readonly check: (mutants: readonly Mutant[]) => Effect.Effect<HashMap.HashMap<string, CheckResult>, CheckerFailed>;
51
+ readonly group: (mutants: readonly Mutant[]) => Effect.Effect<readonly (readonly string[])[], CheckerFailed>;
52
+ }
53
+
54
+ export declare type CheckResult = FailedCheckResult | PassedCheckResult;
55
+
56
+ export declare const CheckResultSchema: S.Union<readonly [S.Struct<{
57
+ readonly status: S.Literal<"passed">;
58
+ }>, S.Struct<{
59
+ readonly status: S.Literal<"compileError">;
60
+ readonly reason: S.String;
61
+ }>]>;
62
+
63
+ export declare const CheckStatus: S.Literals<readonly ["passed", "compileError"]>;
64
+
65
+ export declare type CheckStatus = typeof CheckStatus.Type;
66
+
67
+ export declare const classifyExit: (command: ClassifyExitCommand) => ClassifyExitDecision;
68
+
69
+ export declare class ClassifyExitCommand extends ClassifyExitCommand_base {}
70
+
71
+ declare const ClassifyExitCommand_base: S.Class<ClassifyExitCommand, S.TaggedStruct<"ClassifyExitCommand", {
72
+ readonly pending: S.$Array<S.Literals<readonly ["VerdictFail", "ConfigError", "RuntimeError", "InternalError"]>>;
73
+ readonly signal: S.NullOr<S.Number>;
74
+ readonly score: S.NullOr<S.Number>;
75
+ readonly breakingThreshold: S.NullOr<S.Number>;
76
+ }>, {}>;
77
+
78
+ export declare class ClassifyExitDecision extends ClassifyExitDecision_base {}
79
+
80
+ declare const ClassifyExitDecision_base: S.Class<ClassifyExitDecision, S.TaggedStruct<"ClassifyExitDecision", {
81
+ readonly highestClass: S.NullOr<S.Literals<readonly ["VerdictFail", "ConfigError", "RuntimeError", "InternalError"]>>;
82
+ readonly verdictClass: S.NullOr<S.Literals<readonly ["VerdictFail", "ConfigError", "RuntimeError", "InternalError"]>>;
83
+ }>, {}>;
84
+
85
+ export declare type CommandRunnerOptions = S.Schema.Type<typeof CommandRunnerOptionsSchema>;
86
+
87
+ export declare const CommandRunnerOptionsSchema: S.StructWithRest<S.Struct<{
88
+ readonly command: S.withDecodingDefaultKey<S.String, never>;
89
+ }>, readonly [S.$Record<S.String, S.Unknown>]>;
90
+
91
+ export declare interface CompleteDryRunResult {
92
+ readonly tests: readonly TestResult[];
93
+ readonly mutantCoverage?: MutantCoverage;
94
+ readonly status: 'complete';
95
+ }
96
+
97
+ export declare interface ComposedPlugins {
98
+ readonly layer: Option.Option<Layer.Layer<MergedPluginServices, never, PluginEnvironment>>;
99
+ readonly reporterFactories: readonly SelectedReporterFactory[];
100
+ readonly shadowings: readonly Shadowing[];
101
+ }
102
+
103
+ export declare function composePlugins(contributions: readonly AnyPluginContribution[]): ComposedPlugins;
104
+
105
+ export declare type ContributionOf<K extends PluginKind> = Extract<AnyPluginContribution, {
106
+ readonly kind: K;
107
+ }>;
108
+
109
+ export declare const countMutants: (mutants: readonly MutantResult[]) => Metrics;
110
+
111
+ export declare interface Coverage {
112
+ readonly static: CoverageData;
113
+ readonly perTest: CoveragePerTestId;
114
+ }
115
+
116
+ export declare type CoverageAnalysis = 'off' | 'all' | 'perTest';
117
+
118
+ declare const CoverageAnalysisMode: S.Literals<readonly ["off", "all", "perTest"]>;
119
+
120
+ declare type CoverageAnalysisMode = typeof CoverageAnalysisMode.Type;
121
+ export { CoverageAnalysisMode }
122
+ export { CoverageAnalysisMode as CoverageAnalysisModeType }
123
+
124
+ export declare const CoverageAnalysisSchema: S.Literals<readonly ["off", "all", "perTest"]>;
125
+
126
+ export declare type CoverageData = Record<string, number>;
127
+
128
+ export declare type CoveragePerTestId = Record<string, CoverageData>;
129
+
130
+ export declare function declarePlugin(kind: 'Reporter', name: string, make: ReporterFactory): PluginContribution<'Reporter'>;
131
+
132
+ export declare function declarePlugin<K extends PluginLayerKind>(kind: K, name: string, layer: Layer.Layer<PluginInterfaces[K], never, PluginEnvironment>): PluginContribution<K>;
133
+
134
+ /**
135
+ * Every option optional, all the way down, and mutable: this is the type a
136
+ * caller CONSTRUCTS by assignment, so `readonly` is stripped. The decoded
137
+ * `StrykerOptions` keeps it - that side is read, never built.
138
+ */
139
+ export declare type DeepOptional<T> = { -readonly [P in keyof T]?: T[P] extends Record<string, unknown> ? DeepOptional<T[P]> | undefined : T[P]; };
140
+
141
+ export declare type Dependencies = typeof DependenciesSchema.Type;
142
+
143
+ export declare const DependenciesSchema: S.$Record<S.String, S.String>;
144
+
145
+ export declare class DryRunCompleted extends DryRunCompleted_base {}
146
+
147
+ declare const DryRunCompleted_base: S.Class<DryRunCompleted, S.TaggedStruct<"dryRunCompleted", {
148
+ readonly timing: S.Struct<{
149
+ readonly net: S.Finite;
150
+ readonly overhead: S.Finite;
151
+ }>;
152
+ readonly capabilities: S.Struct<{
153
+ readonly reloadEnvironment: S.Boolean;
154
+ }>;
155
+ readonly testCount: S.Finite;
156
+ readonly tests: S.$Array<S.Union<readonly [S.Struct<{
157
+ readonly id: S.String;
158
+ readonly name: S.String;
159
+ readonly timeSpentMs: S.Finite;
160
+ readonly fileName: S.optionalKey<S.String>;
161
+ readonly startPosition: S.optionalKey<S.Struct<{
162
+ readonly line: S.Finite;
163
+ readonly column: S.Finite;
164
+ }>>;
165
+ readonly status: S.Literal<"failed">;
166
+ readonly failureMessage: S.String;
167
+ }>, S.Struct<{
168
+ readonly id: S.String;
169
+ readonly name: S.String;
170
+ readonly timeSpentMs: S.Finite;
171
+ readonly fileName: S.optionalKey<S.String>;
172
+ readonly startPosition: S.optionalKey<S.Struct<{
173
+ readonly line: S.Finite;
174
+ readonly column: S.Finite;
175
+ }>>;
176
+ readonly status: S.Literal<"skipped">;
177
+ }>, S.Struct<{
178
+ readonly id: S.String;
179
+ readonly name: S.String;
180
+ readonly timeSpentMs: S.Finite;
181
+ readonly fileName: S.optionalKey<S.String>;
182
+ readonly startPosition: S.optionalKey<S.Struct<{
183
+ readonly line: S.Finite;
184
+ readonly column: S.Finite;
185
+ }>>;
186
+ readonly status: S.Literal<"success">;
187
+ }>]>>;
188
+ }>, {}>;
189
+
190
+ export declare interface DryRunOptions extends RunOptions {
191
+ readonly coverageAnalysis: CoverageAnalysis;
192
+ readonly files?: readonly string[];
193
+ readonly testFiles?: readonly string[];
194
+ }
195
+
196
+ export declare const DryRunOptionsSchema: S.Struct<{
197
+ readonly timeout: S.Finite;
198
+ readonly disableBail: S.Boolean;
199
+ readonly coverageAnalysis: S.Literals<readonly ["off", "all", "perTest"]>;
200
+ readonly files: S.optionalKey<S.$Array<S.String>>;
201
+ readonly testFiles: S.optionalKey<S.$Array<S.String>>;
202
+ }>;
203
+
204
+ export declare type DryRunResult = CompleteDryRunResult | ErrorDryRunResult | TimeoutDryRunResult;
205
+
206
+ export declare const DryRunResultSchema: S.Union<readonly [S.Struct<{
207
+ readonly status: S.Literal<"complete">;
208
+ readonly tests: S.$Array<S.Union<readonly [S.Struct<{
209
+ readonly id: S.String;
210
+ readonly name: S.String;
211
+ readonly timeSpentMs: S.Finite;
212
+ readonly fileName: S.optionalKey<S.String>;
213
+ readonly startPosition: S.optionalKey<S.Struct<{
214
+ readonly line: S.Finite;
215
+ readonly column: S.Finite;
216
+ }>>;
217
+ readonly status: S.Literal<"failed">;
218
+ readonly failureMessage: S.String;
219
+ }>, S.Struct<{
220
+ readonly id: S.String;
221
+ readonly name: S.String;
222
+ readonly timeSpentMs: S.Finite;
223
+ readonly fileName: S.optionalKey<S.String>;
224
+ readonly startPosition: S.optionalKey<S.Struct<{
225
+ readonly line: S.Finite;
226
+ readonly column: S.Finite;
227
+ }>>;
228
+ readonly status: S.Literal<"skipped">;
229
+ }>, S.Struct<{
230
+ readonly id: S.String;
231
+ readonly name: S.String;
232
+ readonly timeSpentMs: S.Finite;
233
+ readonly fileName: S.optionalKey<S.String>;
234
+ readonly startPosition: S.optionalKey<S.Struct<{
235
+ readonly line: S.Finite;
236
+ readonly column: S.Finite;
237
+ }>>;
238
+ readonly status: S.Literal<"success">;
239
+ }>]>>;
240
+ readonly mutantCoverage: S.optionalKey<S.Struct<{
241
+ readonly perTest: S.$Record<S.String, S.$Record<S.String, S.Finite>>;
242
+ readonly static: S.$Record<S.String, S.Finite>;
243
+ }>>;
244
+ }>, S.Struct<{
245
+ readonly status: S.Literal<"timeout">;
246
+ readonly reason: S.optionalKey<S.String>;
247
+ }>, S.Struct<{
248
+ readonly status: S.Literal<"error">;
249
+ readonly errorMessage: S.String;
250
+ }>]>;
251
+
252
+ export declare const DryRunStatus: S.Literals<readonly ["complete", "error", "timeout"]>;
253
+
254
+ export declare type DryRunStatus = typeof DryRunStatus.Type;
255
+
256
+ export declare interface EarlyResultPlan {
257
+ readonly plan: 'EarlyResult';
258
+ readonly mutant: Mutant;
259
+ }
260
+
261
+ export declare interface ErrnoException extends Error {
262
+ code?: string;
263
+ errno?: number;
264
+ path?: string;
265
+ syscall?: string;
266
+ }
267
+
268
+ export declare const ERROR_CODES: Readonly<{
269
+ NoSuchFileOrDirectory: 'ENOENT';
270
+ }>;
271
+
272
+ export declare interface ErrorDryRunResult {
273
+ readonly status: 'error';
274
+ readonly errorMessage: string;
275
+ }
276
+
277
+ export declare interface ErrorMutantRunResult {
278
+ readonly status: 'error';
279
+ readonly errorMessage: string;
280
+ }
281
+
282
+ export declare function errorToString(error: unknown): string;
283
+
284
+ export declare class Evaluator extends Evaluator_base {}
285
+
286
+ declare const Evaluator_base: Context.ServiceClass<Evaluator, "~@systemfsoftware/stryker-js/Evaluator", EvaluatorService>;
287
+
288
+ export declare class EvaluatorFailed extends EvaluatorFailed_base {}
289
+
290
+ declare const EvaluatorFailed_base: S.Class<EvaluatorFailed, S.TaggedStruct<"EvaluatorFailed", {
291
+ readonly cause: S.Unknown;
292
+ }>, YieldableError>;
293
+
294
+ export declare interface EvaluatorService {
295
+ readonly evaluate: (report: MutationTestResult) => Effect.Effect<ExitClass | null, EvaluatorFailed>;
296
+ }
297
+
298
+ export declare const EXIT_CODE: Record<ExitClass, number>;
299
+
300
+ export declare const ExitClass: S.Literals<readonly ["VerdictFail", "ConfigError", "RuntimeError", "InternalError"]>;
301
+
302
+ export declare type ExitClass = typeof ExitClass.Type;
303
+
304
+ export declare interface FailedCheckResult {
305
+ readonly reason: string;
306
+ readonly status: 'compileError';
307
+ }
308
+
309
+ export declare interface FailedTestResult extends BaseTestResult {
310
+ readonly status: 'failed';
311
+ readonly failureMessage: string;
312
+ }
313
+
314
+ export declare interface FileDescription {
315
+ readonly mutate: MutateDescription;
316
+ }
317
+
318
+ export declare type FileDescriptions = Record<string, FileDescription>;
319
+
320
+ export declare type FileResult = typeof FileResultSchema.Type;
321
+
322
+ export declare type FileResultDictionary = typeof FileResultDictionarySchema.Type;
323
+
324
+ export declare const FileResultDictionarySchema: S.$Record<S.String, S.Struct<{
325
+ readonly language: S.String;
326
+ readonly source: S.String;
327
+ readonly mutants: S.$Array<S.Struct<{
328
+ readonly id: S.String;
329
+ readonly mutatorName: S.String;
330
+ readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
331
+ readonly location: S.Struct<{
332
+ readonly start: S.Struct<{
333
+ readonly line: S.Finite;
334
+ readonly column: S.Finite;
335
+ }>;
336
+ readonly end: S.Struct<{
337
+ readonly line: S.Finite;
338
+ readonly column: S.Finite;
339
+ }>;
340
+ }>;
341
+ readonly replacement: S.optional<S.String>;
342
+ readonly description: S.optional<S.String>;
343
+ readonly statusReason: S.optional<S.String>;
344
+ readonly static: S.optional<S.Boolean>;
345
+ readonly coveredBy: S.optional<S.$Array<S.String>>;
346
+ readonly killedBy: S.optional<S.$Array<S.String>>;
347
+ readonly testsCompleted: S.optional<S.Finite>;
348
+ readonly duration: S.optional<S.Finite>;
349
+ }>>;
350
+ }>>;
351
+
352
+ export declare const FileResultSchema: S.Struct<{
353
+ readonly language: S.String;
354
+ readonly source: S.String;
355
+ readonly mutants: S.$Array<S.Struct<{
356
+ readonly id: S.String;
357
+ readonly mutatorName: S.String;
358
+ readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
359
+ readonly location: S.Struct<{
360
+ readonly start: S.Struct<{
361
+ readonly line: S.Finite;
362
+ readonly column: S.Finite;
363
+ }>;
364
+ readonly end: S.Struct<{
365
+ readonly line: S.Finite;
366
+ readonly column: S.Finite;
367
+ }>;
368
+ }>;
369
+ readonly replacement: S.optional<S.String>;
370
+ readonly description: S.optional<S.String>;
371
+ readonly statusReason: S.optional<S.String>;
372
+ readonly static: S.optional<S.Boolean>;
373
+ readonly coveredBy: S.optional<S.$Array<S.String>>;
374
+ readonly killedBy: S.optional<S.$Array<S.String>>;
375
+ readonly testsCompleted: S.optional<S.Finite>;
376
+ readonly duration: S.optional<S.Finite>;
377
+ }>>;
378
+ }>;
379
+
380
+ export declare type FrameworkInformation = typeof FrameworkInformationSchema.Type;
381
+
382
+ export declare const FrameworkInformationSchema: S.Struct<{
383
+ readonly name: S.String;
384
+ readonly version: S.optional<S.String>;
385
+ readonly branding: S.optional<S.Struct<{
386
+ readonly homepageUrl: S.String;
387
+ readonly imageUrl: S.optional<S.String>;
388
+ }>>;
389
+ readonly dependencies: S.optional<S.$Record<S.String, S.String>>;
390
+ }>;
391
+
392
+ export declare class Heartbeat extends Heartbeat_base {}
393
+
394
+ declare const Heartbeat_base: S.Class<Heartbeat, S.TaggedStruct<"tick", {
395
+ readonly elapsedMs: S.Finite;
396
+ readonly completed: S.Finite;
397
+ readonly total: S.NullOr<S.Finite>;
398
+ }>, {}>;
399
+
400
+ export declare class HelpRendered extends HelpRendered_base {}
401
+
402
+ declare const HelpRendered_base: S.Class<HelpRendered, S.TaggedStruct<"help", {
403
+ readonly schemaVersion: S.String;
404
+ readonly code: S.Literals<readonly [0]>;
405
+ readonly help: S.String;
406
+ }>, {}>;
407
+
408
+ export declare function highestExitClass(pending: Iterable<ExitClass>): ExitClass | null;
409
+
410
+ export declare class Ignorer extends Ignorer_base {}
411
+
412
+ declare const Ignorer_base: Context.ServiceClass<Ignorer, "~@systemfsoftware/stryker-js/Ignorer", IgnorerService>;
413
+
414
+ export declare interface IgnorerService {
415
+ readonly shouldIgnore: (path: NodePath) => Option.Option<string>;
416
+ }
417
+
418
+ export declare const INSTRUMENTER_CONSTANTS: Readonly<{
419
+ NAMESPACE: '__stryker__';
420
+ MUTATION_COVERAGE_OBJECT: 'mutantCoverage';
421
+ ACTIVE_MUTANT: 'activeMutant';
422
+ CURRENT_TEST_ID: 'currentTestId';
423
+ HIT_COUNT: 'hitCount';
424
+ HIT_LIMIT: 'hitLimit';
425
+ ACTIVE_MUTANT_ENV_VARIABLE: '__STRYKER_ACTIVE_MUTANT__';
426
+ }>;
427
+
428
+ export declare interface InstrumenterContext {
429
+ activeMutant?: string;
430
+ currentTestId?: string;
431
+ mutantCoverage?: MutantCoverage;
432
+ hitCount?: number;
433
+ hitLimit?: number;
434
+ }
435
+
436
+ export declare function isErrnoException(error: unknown): error is ErrnoException;
437
+
438
+ export declare const isMutant: (value: unknown) => value is Mutant;
439
+
440
+ export declare interface KilledMutantRunResult {
441
+ readonly status: 'killed';
442
+ readonly killedBy: readonly string[];
443
+ readonly failureMessage: string;
444
+ readonly nrOfTests: number;
445
+ }
446
+
447
+ /**
448
+ * Known keys filters out the index signature from the keys of a type
449
+ * @see https://stackoverflow.com/questions/51465182/typescript-remove-index-signature-using-mapped-types
450
+ */
451
+ export declare type KnownKeys<T> = keyof { [P in keyof T as string extends P ? never : number extends P ? never : P]: T[P]; };
452
+
453
+ export declare type Location = typeof LocationSchema.Type;
454
+
455
+ export declare const LocationSchema: S.Struct<{
456
+ readonly start: S.Struct<{
457
+ readonly line: S.Finite;
458
+ readonly column: S.Finite;
459
+ }>;
460
+ readonly end: S.Struct<{
461
+ readonly line: S.Finite;
462
+ readonly column: S.Finite;
463
+ }>;
464
+ }>;
465
+
466
+ declare const LogLevel: S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>;
467
+
468
+ /** The generated module exported these as TypeScript types; consumers still name them that way. */
469
+ declare type LogLevel = typeof LogLevel.Type;
470
+ export { LogLevel }
471
+ export { LogLevel as LogLevelType }
472
+
473
+ export declare type MergedPluginServices = Checker & Ignorer & TestRunner;
474
+
475
+ export declare type Metrics = typeof MetricsSchema.Type;
476
+
477
+ export declare interface MetricsResult {
478
+ readonly name: string;
479
+ readonly metrics: Metrics;
480
+ readonly childResults: readonly MetricsResult[];
481
+ }
482
+
483
+ export declare const MetricsResultSchema: S.Struct<{
484
+ readonly name: S.String;
485
+ readonly metrics: S.Struct<{
486
+ readonly pending: S.Finite;
487
+ readonly killed: S.Finite;
488
+ readonly timeout: S.Finite;
489
+ readonly survived: S.Finite;
490
+ readonly noCoverage: S.Finite;
491
+ readonly runtimeErrors: S.Finite;
492
+ readonly compileErrors: S.Finite;
493
+ readonly ignored: S.Finite;
494
+ readonly totalDetected: S.Finite;
495
+ readonly totalUndetected: S.Finite;
496
+ readonly totalInvalid: S.Finite;
497
+ readonly totalValid: S.Finite;
498
+ readonly totalMutants: S.Finite;
499
+ readonly totalCovered: S.Finite;
500
+ readonly mutationScore: S.Finite;
501
+ readonly mutationScoreBasedOnCoveredCode: S.Finite;
502
+ }>;
503
+ readonly childResults: S.$Array<S.suspend<S.Codec<MetricsResult, MetricsResult, never, never>>>;
504
+ }>;
505
+
506
+ export declare const MetricsSchema: S.Struct<{
507
+ readonly pending: S.Finite;
508
+ readonly killed: S.Finite;
509
+ readonly timeout: S.Finite;
510
+ readonly survived: S.Finite;
511
+ readonly noCoverage: S.Finite;
512
+ readonly runtimeErrors: S.Finite;
513
+ readonly compileErrors: S.Finite;
514
+ readonly ignored: S.Finite;
515
+ readonly totalDetected: S.Finite;
516
+ readonly totalUndetected: S.Finite;
517
+ readonly totalInvalid: S.Finite;
518
+ readonly totalValid: S.Finite;
519
+ readonly totalMutants: S.Finite;
520
+ readonly totalCovered: S.Finite;
521
+ readonly mutationScore: S.Finite;
522
+ readonly mutationScoreBasedOnCoveredCode: S.Finite;
523
+ }>;
524
+
525
+ export declare const ModeSignal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
526
+
527
+ export declare type ModeSignal = typeof ModeSignal.Type;
528
+
529
+ /**
530
+ * Port over the host module loader, shaped as the subset of `node:module`
531
+ * feature code may use: `createRequire` and `isBuiltin`. Resolving a
532
+ * specifier against a project directory, importing a plugin, and asking
533
+ * whether a name is a builtin all go through this one tag; no feature module
534
+ * touches the host module API. The Node implementation ships in the
535
+ * composition-root package (`@systemfsoftware/stryker-js-cli`); tests that do
536
+ * not need real plugin resolution substitute a layer returning fixed paths.
537
+ *
538
+ * @since 2.0.0
539
+ */
540
+ export declare class Module extends Module_base {}
541
+
542
+ declare const Module_base: Context.ServiceClass<Module, "@systemfsoftware/stryker-js/Module", {
543
+ readonly createRequire: (filename: string | URL) => ModuleRequire;
544
+ readonly isBuiltin: (moduleName: string) => boolean;
545
+ }>;
546
+
547
+ /**
548
+ * The subset of `node:module`'s `createRequire` result this port certifies: a
549
+ * require function bound to one path, plus its resolution. Calling it loads
550
+ * the specifier exactly as a module evaluated next to that path would.
551
+ */
552
+ export declare interface ModuleRequire {
553
+ (request: string): unknown;
554
+ resolve(request: string, options?: {
555
+ readonly paths?: readonly string[];
556
+ }): string;
557
+ }
558
+
559
+ export declare class Mutant extends Mutant_base {}
560
+
561
+ declare const Mutant_base: S.Class<Mutant, S.TaggedStruct<"Mutant", {
562
+ readonly id: S.NonEmptyString;
563
+ readonly fileName: S.NonEmptyString;
564
+ readonly mutatorName: S.NonEmptyString;
565
+ readonly replacement: S.String;
566
+ readonly location: S.Struct<{
567
+ readonly start: S.Struct<{
568
+ readonly line: S.Finite;
569
+ readonly column: S.Finite;
570
+ }>;
571
+ readonly end: S.Struct<{
572
+ readonly line: S.Finite;
573
+ readonly column: S.Finite;
574
+ }>;
575
+ }>;
576
+ readonly status: S.optional<S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>>;
577
+ readonly statusReason: S.optional<S.String>;
578
+ readonly coveredBy: S.optional<S.$Array<S.String>>;
579
+ readonly static: S.optional<S.Boolean>;
580
+ readonly testsCompleted: S.optional<S.Finite>;
581
+ readonly description: S.optional<S.String>;
582
+ }>, {}>;
583
+
584
+ export declare type MutantActivation = 'runtime' | 'static';
585
+
586
+ export declare const MutantActivationSchema: S.Literals<readonly ["runtime", "static"]>;
587
+
588
+ export declare interface MutantCoverage {
589
+ readonly perTest: Record<string, Record<string, number>>;
590
+ readonly static: Record<string, number>;
591
+ }
592
+
593
+ export declare const MutantCoverageSchema: S.Struct<{
594
+ readonly perTest: S.$Record<S.String, S.$Record<S.String, S.Finite>>;
595
+ readonly static: S.$Record<S.String, S.Finite>;
596
+ }>;
597
+
598
+ export declare type MutantResult = typeof MutantResultSchema.Type;
599
+
600
+ export declare const MutantResultSchema: S.Struct<{
601
+ readonly id: S.String;
602
+ readonly mutatorName: S.String;
603
+ readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
604
+ readonly location: S.Struct<{
605
+ readonly start: S.Struct<{
606
+ readonly line: S.Finite;
607
+ readonly column: S.Finite;
608
+ }>;
609
+ readonly end: S.Struct<{
610
+ readonly line: S.Finite;
611
+ readonly column: S.Finite;
612
+ }>;
613
+ }>;
614
+ readonly replacement: S.optional<S.String>;
615
+ readonly description: S.optional<S.String>;
616
+ readonly statusReason: S.optional<S.String>;
617
+ readonly static: S.optional<S.Boolean>;
618
+ readonly coveredBy: S.optional<S.$Array<S.String>>;
619
+ readonly killedBy: S.optional<S.$Array<S.String>>;
620
+ readonly testsCompleted: S.optional<S.Finite>;
621
+ readonly duration: S.optional<S.Finite>;
622
+ }>;
623
+
624
+ export declare interface MutantRunOptions extends RunOptions {
625
+ readonly testFilter?: readonly string[];
626
+ readonly hitLimit?: number;
627
+ readonly activeMutant: Mutant;
628
+ readonly sandboxFileName: string;
629
+ readonly mutantActivation: MutantActivation;
630
+ readonly reloadEnvironment: boolean;
631
+ }
632
+
633
+ export declare const MutantRunOptionsSchema: S.Struct<{
634
+ readonly timeout: S.Finite;
635
+ readonly disableBail: S.Boolean;
636
+ readonly activeMutant: typeof Mutant;
637
+ readonly sandboxFileName: S.String;
638
+ readonly mutantActivation: S.Literals<readonly ["runtime", "static"]>;
639
+ readonly reloadEnvironment: S.Boolean;
640
+ readonly testFilter: S.optionalKey<S.$Array<S.String>>;
641
+ readonly hitLimit: S.optionalKey<S.Finite>;
642
+ }>;
643
+
644
+ export declare type MutantRunPlan = RunPlan;
645
+
646
+ export declare type MutantRunResult = ErrorMutantRunResult | KilledMutantRunResult | SurvivedMutantRunResult | TimeoutMutantRunResult;
647
+
648
+ export declare const MutantRunResultSchema: S.Union<readonly [S.Struct<{
649
+ readonly status: S.Literal<"killed">;
650
+ readonly killedBy: S.$Array<S.String>;
651
+ readonly failureMessage: S.String;
652
+ readonly nrOfTests: S.Finite;
653
+ }>, S.Struct<{
654
+ readonly status: S.Literal<"survived">;
655
+ readonly nrOfTests: S.Finite;
656
+ }>, S.Struct<{
657
+ readonly status: S.Literal<"timeout">;
658
+ readonly reason: S.optionalKey<S.String>;
659
+ }>, S.Struct<{
660
+ readonly status: S.Literal<"error">;
661
+ readonly errorMessage: S.String;
662
+ }>]>;
663
+
664
+ export declare const MutantRunStatus: S.Literals<readonly ["killed", "survived", "timeout", "error"]>;
665
+
666
+ export declare type MutantRunStatus = typeof MutantRunStatus.Type;
667
+
668
+ export declare type MutantStatus = typeof MutantStatusSchema.Type;
669
+
670
+ export declare const MutantStatusSchema: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
671
+
672
+ export declare type MutantTestCoverage = Mutant & {
673
+ readonly coveredBy: ReadonlyArray<string> | undefined;
674
+ readonly static: boolean | undefined;
675
+ };
676
+
677
+ export declare class MutantTested extends MutantTested_base {}
678
+
679
+ declare const MutantTested_base: S.Class<MutantTested, S.TaggedStruct<"mutantTested", {
680
+ readonly id: S.String;
681
+ readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
682
+ readonly file: S.String;
683
+ readonly location: S.Struct<{
684
+ readonly start: S.Struct<{
685
+ readonly line: S.Finite;
686
+ readonly column: S.Finite;
687
+ }>;
688
+ readonly end: S.Struct<{
689
+ readonly line: S.Finite;
690
+ readonly column: S.Finite;
691
+ }>;
692
+ }>;
693
+ readonly mutator: S.String;
694
+ readonly replacement: S.NullOr<S.String>;
695
+ readonly completed: S.Finite;
696
+ readonly total: S.Finite;
697
+ }>, {}>;
698
+
699
+ export declare type MutateDescription = ReadonlyArray<MutationRange> | boolean;
700
+
701
+ export declare interface MutationRange {
702
+ readonly start: Position;
703
+ readonly end: Position;
704
+ }
705
+
706
+ export declare interface MutationRunIo {
707
+ readonly read: (command: RunCommand) => Effect.Effect<unknown, S.SchemaError, RunIdentity>;
708
+ readonly write: (output: RunOutput) => Effect.Effect<void, S.SchemaError, RunIdentity>;
709
+ }
710
+
711
+ export declare class MutationRunPlan extends MutationRunPlan_base {}
712
+
713
+ declare const MutationRunPlan_base: S.Class<MutationRunPlan, S.TaggedStruct<"MutationRunPlan", {
714
+ readonly mutatePatterns: S.$Array<S.String>;
715
+ readonly mutatorNames: S.$Array<S.String>;
716
+ }>, {}>;
717
+
718
+ export declare type MutationScoreThresholds = typeof MutationScoreThresholdsSchema.Type;
719
+
720
+ export declare const MutationScoreThresholdsSchema: S.Struct<{
721
+ readonly high: S.withDecodingDefaultKey<S.Finite, never>;
722
+ readonly low: S.withDecodingDefaultKey<S.Finite, never>;
723
+ readonly break: S.withDecodingDefaultKey<S.NullOr<S.Finite>, never>;
724
+ }>;
725
+
726
+ export declare class MutationTestingPlanReady extends MutationTestingPlanReady_base {}
727
+
728
+ declare const MutationTestingPlanReady_base: S.Class<MutationTestingPlanReady, S.TaggedStruct<"mutationTestingPlanReady", {
729
+ readonly total: S.Finite;
730
+ readonly plans: S.$Array<S.Struct<{
731
+ readonly mutantId: S.String;
732
+ readonly plan: S.Literals<readonly ["EarlyResult", "Run"]>;
733
+ readonly netTime: S.Finite;
734
+ readonly reloadEnvironment: S.Boolean;
735
+ }>>;
736
+ }>, {}>;
737
+
738
+ export declare class MutationTestReportReady extends MutationTestReportReady_base {}
739
+
740
+ declare const MutationTestReportReady_base: S.Class<MutationTestReportReady, S.TaggedStruct<"mutationTestReportReady", {
741
+ readonly report: S.Struct<{
742
+ readonly schemaVersion: S.String;
743
+ readonly files: S.$Record<S.String, S.Struct<{
744
+ readonly language: S.String;
745
+ readonly source: S.String;
746
+ readonly mutants: S.$Array<S.Struct<{
747
+ readonly id: S.String;
748
+ readonly mutatorName: S.String;
749
+ readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
750
+ readonly location: S.Struct<{
751
+ readonly start: S.Struct<{
752
+ readonly line: S.Finite;
753
+ readonly column: S.Finite;
754
+ }>;
755
+ readonly end: S.Struct<{
756
+ readonly line: S.Finite;
757
+ readonly column: S.Finite;
758
+ }>;
759
+ }>;
760
+ readonly replacement: S.optional<S.String>;
761
+ readonly description: S.optional<S.String>;
762
+ readonly statusReason: S.optional<S.String>;
763
+ readonly static: S.optional<S.Boolean>;
764
+ readonly coveredBy: S.optional<S.$Array<S.String>>;
765
+ readonly killedBy: S.optional<S.$Array<S.String>>;
766
+ readonly testsCompleted: S.optional<S.Finite>;
767
+ readonly duration: S.optional<S.Finite>;
768
+ }>>;
769
+ }>>;
770
+ readonly thresholds: S.Struct<{
771
+ readonly high: S.Finite;
772
+ readonly low: S.Finite;
773
+ }>;
774
+ readonly config: S.optional<S.$Record<S.String, S.Unknown>>;
775
+ readonly testFiles: S.optional<S.$Record<S.String, S.Struct<{
776
+ readonly source: S.optional<S.String>;
777
+ readonly tests: S.$Array<S.Struct<{
778
+ readonly id: S.String;
779
+ readonly name: S.String;
780
+ readonly location: S.optional<S.Struct<{
781
+ readonly start: S.Struct<{
782
+ readonly line: S.Finite;
783
+ readonly column: S.Finite;
784
+ }>;
785
+ readonly end: S.optional<S.Struct<{
786
+ readonly line: S.Finite;
787
+ readonly column: S.Finite;
788
+ }>>;
789
+ }>>;
790
+ }>>;
791
+ }>>>;
792
+ readonly projectRoot: S.optional<S.String>;
793
+ readonly framework: S.optional<S.Struct<{
794
+ readonly name: S.String;
795
+ readonly version: S.optional<S.String>;
796
+ readonly branding: S.optional<S.Struct<{
797
+ readonly homepageUrl: S.String;
798
+ readonly imageUrl: S.optional<S.String>;
799
+ }>>;
800
+ readonly dependencies: S.optional<S.$Record<S.String, S.String>>;
801
+ }>>;
802
+ }>;
803
+ readonly metrics: S.Struct<{
804
+ readonly name: S.String;
805
+ readonly metrics: S.Struct<{
806
+ readonly pending: S.Finite;
807
+ readonly killed: S.Finite;
808
+ readonly timeout: S.Finite;
809
+ readonly survived: S.Finite;
810
+ readonly noCoverage: S.Finite;
811
+ readonly runtimeErrors: S.Finite;
812
+ readonly compileErrors: S.Finite;
813
+ readonly ignored: S.Finite;
814
+ readonly totalDetected: S.Finite;
815
+ readonly totalUndetected: S.Finite;
816
+ readonly totalInvalid: S.Finite;
817
+ readonly totalValid: S.Finite;
818
+ readonly totalMutants: S.Finite;
819
+ readonly totalCovered: S.Finite;
820
+ readonly mutationScore: S.Finite;
821
+ readonly mutationScoreBasedOnCoveredCode: S.Finite;
822
+ }>;
823
+ readonly childResults: S.$Array<S.suspend<S.Codec<MetricsResult, MetricsResult, never, never>>>;
824
+ }>;
825
+ }>, {}>;
826
+
827
+ export declare type MutationTestResult = typeof MutationTestResultSchema.Type;
828
+
829
+ export declare const MutationTestResultSchema: S.Struct<{
830
+ readonly schemaVersion: S.String;
831
+ readonly files: S.$Record<S.String, S.Struct<{
832
+ readonly language: S.String;
833
+ readonly source: S.String;
834
+ readonly mutants: S.$Array<S.Struct<{
835
+ readonly id: S.String;
836
+ readonly mutatorName: S.String;
837
+ readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
838
+ readonly location: S.Struct<{
839
+ readonly start: S.Struct<{
840
+ readonly line: S.Finite;
841
+ readonly column: S.Finite;
842
+ }>;
843
+ readonly end: S.Struct<{
844
+ readonly line: S.Finite;
845
+ readonly column: S.Finite;
846
+ }>;
847
+ }>;
848
+ readonly replacement: S.optional<S.String>;
849
+ readonly description: S.optional<S.String>;
850
+ readonly statusReason: S.optional<S.String>;
851
+ readonly static: S.optional<S.Boolean>;
852
+ readonly coveredBy: S.optional<S.$Array<S.String>>;
853
+ readonly killedBy: S.optional<S.$Array<S.String>>;
854
+ readonly testsCompleted: S.optional<S.Finite>;
855
+ readonly duration: S.optional<S.Finite>;
856
+ }>>;
857
+ }>>;
858
+ readonly thresholds: S.Struct<{
859
+ readonly high: S.Finite;
860
+ readonly low: S.Finite;
861
+ }>;
862
+ readonly config: S.optional<S.$Record<S.String, S.Unknown>>;
863
+ readonly testFiles: S.optional<S.$Record<S.String, S.Struct<{
864
+ readonly source: S.optional<S.String>;
865
+ readonly tests: S.$Array<S.Struct<{
866
+ readonly id: S.String;
867
+ readonly name: S.String;
868
+ readonly location: S.optional<S.Struct<{
869
+ readonly start: S.Struct<{
870
+ readonly line: S.Finite;
871
+ readonly column: S.Finite;
872
+ }>;
873
+ readonly end: S.optional<S.Struct<{
874
+ readonly line: S.Finite;
875
+ readonly column: S.Finite;
876
+ }>>;
877
+ }>>;
878
+ }>>;
879
+ }>>>;
880
+ readonly projectRoot: S.optional<S.String>;
881
+ readonly framework: S.optional<S.Struct<{
882
+ readonly name: S.String;
883
+ readonly version: S.optional<S.String>;
884
+ readonly branding: S.optional<S.Struct<{
885
+ readonly homepageUrl: S.String;
886
+ readonly imageUrl: S.optional<S.String>;
887
+ }>>;
888
+ readonly dependencies: S.optional<S.$Record<S.String, S.String>>;
889
+ }>>;
890
+ }>;
891
+
892
+ export declare interface NodePath {
893
+ readonly node: unknown;
894
+ readonly parentPath?: NodePath | null;
895
+ isObjectExpression(): boolean;
896
+ isCallExpression(): boolean;
897
+ isClassProperty(): boolean;
898
+ isClassPrivateProperty(): boolean;
899
+ isClassAccessorProperty(): boolean;
900
+ }
901
+
902
+ export declare function normalizeFileName(fileName: string): string;
903
+
904
+ export declare type OnlyObject<T> = Exclude<T, Primitive>;
905
+
906
+ export declare type OpenEndLocation = typeof OpenEndLocationSchema.Type;
907
+
908
+ export declare const OpenEndLocationSchema: S.Struct<{
909
+ readonly start: S.Struct<{
910
+ readonly line: S.Finite;
911
+ readonly column: S.Finite;
912
+ }>;
913
+ readonly end: S.optional<S.Struct<{
914
+ readonly line: S.Finite;
915
+ readonly column: S.Finite;
916
+ }>>;
917
+ }>;
918
+
919
+ export declare const OutputMode: S.Literals<readonly ["human", "machine"]>;
920
+
921
+ export declare type OutputMode = typeof OutputMode.Type;
922
+
923
+ declare const PackageManager: S.Literals<readonly ["npm", "yarn", "pnpm"]>;
924
+
925
+ declare type PackageManager = typeof PackageManager.Type;
926
+ export { PackageManager }
927
+ export { PackageManager as PackageManagerType }
928
+
929
+ /**
930
+ * The deep-partial input type: when configuring Stryker, every option is
931
+ * optional, including deep properties like `dashboard.project`.
932
+ */
933
+ export declare type PartialStrykerOptions = DeepOptional<StrykerOptions>;
934
+
935
+ export declare interface PassedCheckResult {
936
+ readonly status: 'passed';
937
+ }
938
+
939
+ export declare class PhaseEntered extends PhaseEntered_base {}
940
+
941
+ declare const PhaseEntered_base: S.Class<PhaseEntered, S.TaggedStruct<"phase", {
942
+ readonly phase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
943
+ readonly elapsedMs: S.Finite;
944
+ }>, {}>;
945
+
946
+ export declare class PlanKnown extends PlanKnown_base {}
947
+
948
+ declare const PlanKnown_base: S.Class<PlanKnown, S.TaggedStruct<"plan", {
949
+ readonly total: S.Finite;
950
+ }>, {}>;
951
+
952
+ export declare const planMutationRun: (command: PlanMutationRunCommand) => MutationRunPlan;
953
+
954
+ export declare class PlanMutationRunCommand extends PlanMutationRunCommand_base {}
955
+
956
+ declare const PlanMutationRunCommand_base: S.Class<PlanMutationRunCommand, S.TaggedStruct<"PlanMutationRunCommand", {
957
+ readonly configMutatePatterns: S.$Array<S.String>;
958
+ readonly configMutatorNames: S.$Array<S.String>;
959
+ readonly targetMutatePatterns: S.$Array<S.String>;
960
+ readonly availableMutators: S.$Array<S.String>;
961
+ }>, {}>;
962
+
963
+ export declare type PluginContribution<K extends PluginKind = PluginKind> = K extends 'Reporter' ? PluginReporterContribution : PluginLayerContribution<Extract<K, PluginLayerKind>>;
964
+
965
+ export declare type PluginEnvironment = RunConfiguration | SandboxDirectory | FileSystem.FileSystem | Module | Path.Path;
966
+
967
+ export declare interface PluginInterfaces {
968
+ Checker: Checker;
969
+ TestRunner: TestRunner;
970
+ Ignore: Ignorer;
971
+ Evaluator: Evaluator;
972
+ }
973
+
974
+ export declare const PluginKind: S.Literals<readonly ["Checker", "TestRunner", "Reporter", "Ignore", "Evaluator"]>;
975
+
976
+ export declare type PluginKind = typeof PluginKind.Type;
977
+
978
+ export declare class PluginLayerContribution<K extends PluginLayerKind = PluginLayerKind> extends PluginLayerContribution_base {
979
+ readonly kind: K;
980
+ readonly name: string;
981
+ readonly layer: Layer.Layer<PluginInterfaces[K], never, PluginEnvironment>;
982
+ }
983
+
984
+ declare const PluginLayerContribution_base: S.Class<PluginLayerContribution<"Checker" | "Evaluator" | "Ignore" | "TestRunner">, S.TaggedStruct<"PluginContribution", {
985
+ readonly kind: S.Literals<readonly ["Checker", "TestRunner", "Ignore", "Evaluator"]>;
986
+ readonly name: S.String;
987
+ readonly layer: S.Unknown;
988
+ }>, {}>;
989
+
990
+ export declare const PluginLayerKind: S.Literals<readonly ["Checker", "TestRunner", "Ignore", "Evaluator"]>;
991
+
992
+ export declare type PluginLayerKind = typeof PluginLayerKind.Type;
993
+
994
+ export declare class PluginReporterContribution extends PluginReporterContribution_base {
995
+ readonly kind: 'Reporter';
996
+ readonly name: string;
997
+ readonly make: ReporterFactory;
998
+ }
999
+
1000
+ declare const PluginReporterContribution_base: S.Class<PluginReporterContribution, S.TaggedStruct<"PluginContribution", {
1001
+ readonly kind: S.Literals<readonly ["Checker", "TestRunner", "Reporter", "Ignore", "Evaluator"]>;
1002
+ readonly name: S.String;
1003
+ readonly make: S.Unknown;
1004
+ }>, {}>;
1005
+
1006
+ export declare type Position = typeof PositionSchema.Type;
1007
+
1008
+ export declare const PositionSchema: S.Struct<{
1009
+ readonly line: S.Finite;
1010
+ readonly column: S.Finite;
1011
+ }>;
1012
+
1013
+ export declare type Primitive = boolean | number | string | null | undefined;
1014
+
1015
+ /**
1016
+ * Given a base type, allows type safe access to the name of a property.
1017
+ * @param prop - The property name
1018
+ */
1019
+ export declare function propertyPath<T>(): PropertyPathOverloads<T>;
1020
+
1021
+ export declare interface PropertyPathOverloads<T> {
1022
+ (key: KnownKeys<T>): string;
1023
+ <TProp1 extends KnownKeys<T>>(key: TProp1, key2: KnownKeys<OnlyObject<T[TProp1]>>): string;
1024
+ <TProp1 extends KnownKeys<T>, TProp2 extends KnownKeys<OnlyObject<T[TProp1]>>>(key: TProp1, key2: TProp2, key3: KnownKeys<OnlyObject<OnlyObject<T[TProp1]>[TProp2]>>): string;
1025
+ }
1026
+
1027
+ /**
1028
+ * The four option defaults a human reads about in help text.
1029
+ *
1030
+ * `Schema.schema.ts` declares every default, and a CLI that wants to
1031
+ * name one in a `--help` description must read it from here rather than type
1032
+ * the literal a second time: a restated default drifts the moment the schema
1033
+ * moves, and no gate compares a help string against a schema annotation.
1034
+ *
1035
+ * Only these four are here because only these four are rendered. A default
1036
+ * nobody prints has one declaration site already, which is the schema.
1037
+ */
1038
+ export declare const RENDERED_OPTION_DEFAULTS: {
1039
+ readonly coverageAnalysis: 'perTest';
1040
+ readonly fileLogLevel: 'off';
1041
+ readonly logLevel: 'info';
1042
+ readonly tempDirName: '.stryker-tmp';
1043
+ };
1044
+
1045
+ export declare type ReporterEvent = DryRunCompleted | MutationTestingPlanReady | MutantTested | MutationTestReportReady;
1046
+
1047
+ export declare const ReporterEventKind: S.Literals<readonly ["dryRunCompleted", "mutationTestingPlanReady", "mutantTested", "mutationTestReportReady"]>;
1048
+
1049
+ export declare type ReporterEventKind = typeof ReporterEventKind.Type;
1050
+
1051
+ export declare const ReporterEventSchema: StandardSchemaV1<unknown, ReporterEvent>;
1052
+
1053
+ export declare const ReporterEventUnion: S.Union<readonly [typeof DryRunCompleted, typeof MutationTestingPlanReady, typeof MutantTested, typeof MutationTestReportReady]>;
1054
+
1055
+ export declare type ReporterFactory = (options: StrykerOptions, init: ReporterInit) => (events: AsyncIterable<ReporterEvent>) => Promise<void>;
1056
+
1057
+ export declare class ReporterFailed extends ReporterFailed_base {}
1058
+
1059
+ declare const ReporterFailed_base: S.Class<ReporterFailed, S.TaggedStruct<"ReporterFailed", {
1060
+ readonly cause: S.String;
1061
+ readonly event: S.Literals<readonly ["dryRunCompleted", "mutationTestingPlanReady", "mutantTested", "mutationTestReportReady"]>;
1062
+ readonly reporterName: S.String;
1063
+ }>, YieldableError>;
1064
+
1065
+ export declare interface ReporterInit {
1066
+ readonly traceparent?: string | undefined;
1067
+ readonly tracestate?: string | undefined;
1068
+ }
1069
+
1070
+ export declare type ReporterPlanDescriptor = typeof ReporterPlanDescriptorSchema.Type;
1071
+
1072
+ export declare const ReporterPlanDescriptorSchema: S.Struct<{
1073
+ readonly mutantId: S.String;
1074
+ readonly plan: S.Literals<readonly ["EarlyResult", "Run"]>;
1075
+ readonly netTime: S.Finite;
1076
+ readonly reloadEnvironment: S.Boolean;
1077
+ }>;
1078
+
1079
+ export declare const ReporterPlanKind: S.Literals<readonly ["EarlyResult", "Run"]>;
1080
+
1081
+ export declare const ReportTypeType: S.Literals<readonly ["full", "mutationScore"]>;
1082
+
1083
+ export declare type ReportTypeType = typeof ReportTypeType.Type;
1084
+
1085
+ export declare function resolveExitCode(pending: Iterable<ExitClass>, signal: number | null): number;
1086
+
1087
+ export declare class RunCommand extends RunCommand_base {}
1088
+
1089
+ declare const RunCommand_base: S.Class<RunCommand, S.TaggedStruct<"RunCommand", {
1090
+ readonly cliOptionsJson: S.String;
1091
+ readonly targetMutatePatterns: S.$Array<S.String>;
1092
+ }>, {}>;
1093
+
1094
+ export declare class RunConfiguration extends RunConfiguration_base {}
1095
+
1096
+ declare const RunConfiguration_base: Context.ServiceClass<RunConfiguration, "~@systemfsoftware/stryker-js/RunConfiguration", {
1097
+ readonly [x: string]: unknown;
1098
+ readonly allowConsoleColors: boolean;
1099
+ readonly buildCommand?: string | undefined;
1100
+ readonly checkers: readonly string[];
1101
+ readonly checkerNodeArgs: readonly string[];
1102
+ readonly concurrency?: string | number | undefined;
1103
+ readonly commandRunner: {
1104
+ readonly [x: string]: unknown;
1105
+ readonly command: string;
1106
+ };
1107
+ readonly coverageAnalysis: "all" | "off" | "perTest";
1108
+ readonly clearTextReporter: {
1109
+ readonly [x: string]: unknown;
1110
+ readonly allowColor: boolean;
1111
+ readonly allowEmojis: boolean;
1112
+ readonly logTests: boolean;
1113
+ readonly maxTestsToLog: number;
1114
+ readonly reportTests: boolean;
1115
+ readonly reportMutants: boolean;
1116
+ readonly reportScoreTable: boolean;
1117
+ readonly skipFull: boolean;
1118
+ };
1119
+ readonly dryRunOnly: boolean;
1120
+ readonly ignorePatterns: readonly string[];
1121
+ readonly ignoreStatic: boolean;
1122
+ readonly incremental: boolean;
1123
+ readonly incrementalFile: string;
1124
+ readonly progressStreamFile: string;
1125
+ readonly force: boolean;
1126
+ readonly fileLogLevel: "debug" | "error" | "fatal" | "info" | "off" | "trace" | "warn";
1127
+ readonly inPlace: boolean;
1128
+ readonly logLevel: "debug" | "error" | "fatal" | "info" | "off" | "trace" | "warn";
1129
+ readonly maxConcurrentTestRunners: number;
1130
+ readonly maxTestRunnerReuse: number;
1131
+ readonly mutate: readonly string[];
1132
+ readonly mutator: {
1133
+ readonly excludedMutations: readonly string[];
1134
+ };
1135
+ readonly packageManager?: "npm" | "pnpm" | "yarn" | undefined;
1136
+ readonly plugins: readonly string[];
1137
+ readonly appendPlugins: readonly string[];
1138
+ readonly reporters: readonly string[];
1139
+ readonly htmlReporter: {
1140
+ readonly fileName: string;
1141
+ };
1142
+ readonly jsonReporter: {
1143
+ readonly fileName: string;
1144
+ };
1145
+ readonly disableTypeChecks: string | boolean;
1146
+ readonly symlinkNodeModules: boolean;
1147
+ readonly tempDirName: string;
1148
+ readonly cleanTempDir: "always" | boolean;
1149
+ readonly testRunner: string;
1150
+ readonly testRunnerNodeArgs: readonly string[];
1151
+ readonly thresholds: {
1152
+ readonly high: number;
1153
+ readonly low: number;
1154
+ readonly break: number | null;
1155
+ };
1156
+ readonly timeoutFactor: number;
1157
+ readonly timeoutMS: number;
1158
+ readonly dryRunTimeoutMinutes: number;
1159
+ readonly tsconfigFile: string;
1160
+ readonly warnings: boolean | {
1161
+ readonly [x: string]: unknown;
1162
+ readonly unknownOptions: boolean;
1163
+ readonly preprocessorErrors: boolean;
1164
+ readonly unserializableOptions: boolean;
1165
+ readonly slow: boolean;
1166
+ };
1167
+ readonly disableBail: boolean;
1168
+ readonly allowEmpty: boolean;
1169
+ readonly ignorers: readonly string[];
1170
+ readonly testFiles: readonly string[];
1171
+ }>;
1172
+
1173
+ declare const RunEvent: S.Union<readonly [typeof RunStarted, typeof PhaseEntered, typeof PlanKnown, typeof RunMutantTested, typeof Heartbeat, typeof VerdictReached, typeof RunFailed, typeof HelpRendered]>;
1174
+
1175
+ declare type RunEvent = typeof RunEvent.Type;
1176
+ export { RunEvent }
1177
+ export { RunEvent as RunEventType }
1178
+
1179
+ export declare class RunEvents extends RunEvents_base {}
1180
+
1181
+ declare const RunEvents_base: Context.ServiceClass<RunEvents, "~@systemfsoftware/stryker-js/RunEvents", Queue.Queue<Heartbeat | HelpRendered | PhaseEntered | PlanKnown | RunFailed | RunMutantTested | RunStarted | VerdictReached, Cause.Done<void>>>;
1182
+
1183
+ export declare class RunFailed extends RunFailed_base {}
1184
+
1185
+ declare const RunFailed_base: S.Class<RunFailed, S.TaggedStruct<"error", {
1186
+ readonly schemaVersion: S.String;
1187
+ readonly code: S.Finite;
1188
+ readonly error: S.String;
1189
+ readonly remediation: S.String;
1190
+ }>, {}>;
1191
+
1192
+ export declare class RunIdentity extends RunIdentity_base {}
1193
+
1194
+ declare const RunIdentity_base: Context.ServiceClass<RunIdentity, "~@systemfsoftware/stryker-js/RunIdentity", RunIdentityShape>;
1195
+
1196
+ export declare interface RunIdentityShape {
1197
+ readonly runId: string;
1198
+ readonly basePath: string;
1199
+ }
1200
+
1201
+ export declare type RunMutantResult = Mutant & {
1202
+ readonly status: MutantStatus;
1203
+ readonly statusReason?: string | undefined;
1204
+ readonly testsCompleted?: number | undefined;
1205
+ readonly killedBy?: readonly string[] | undefined;
1206
+ readonly coveredBy?: readonly string[] | undefined;
1207
+ readonly static?: boolean | undefined;
1208
+ };
1209
+
1210
+ export declare class RunMutantTested extends RunMutantTested_base {}
1211
+
1212
+ declare const RunMutantTested_base: S.Class<RunMutantTested, S.TaggedStruct<"mutant", {
1213
+ readonly id: S.String;
1214
+ readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
1215
+ readonly file: S.String;
1216
+ readonly location: S.Struct<{
1217
+ readonly start: S.Struct<{
1218
+ readonly line: S.Finite;
1219
+ readonly column: S.Finite;
1220
+ }>;
1221
+ readonly end: S.Struct<{
1222
+ readonly line: S.Finite;
1223
+ readonly column: S.Finite;
1224
+ }>;
1225
+ }>;
1226
+ readonly mutator: S.String;
1227
+ readonly replacement: S.NullOr<S.String>;
1228
+ readonly completed: S.Finite;
1229
+ readonly total: S.Finite;
1230
+ }>, {}>;
1231
+
1232
+ export declare const runMutationTest: (io: MutationRunIo, command: RunCommand) => Effect.Effect<void, S.SchemaError, RunIdentity>;
1233
+
1234
+ export declare interface RunOptions {
1235
+ readonly timeout: number;
1236
+ readonly disableBail: boolean;
1237
+ }
1238
+
1239
+ export declare class RunOutput extends RunOutput_base {}
1240
+
1241
+ declare const RunOutput_base: S.Class<RunOutput, S.TaggedStruct<"RunOutput", {
1242
+ readonly verdictJson: S.String;
1243
+ readonly exitCode: S.Finite;
1244
+ }>, {}>;
1245
+
1246
+ export declare const RunPhase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
1247
+
1248
+ export declare type RunPhase = typeof RunPhase.Type;
1249
+
1250
+ export declare interface RunPlan {
1251
+ readonly plan: 'Run';
1252
+ readonly mutant: Mutant;
1253
+ readonly runOptions: MutantRunOptions;
1254
+ readonly netTime: number;
1255
+ }
1256
+
1257
+ export declare class RunStarted extends RunStarted_base {}
1258
+
1259
+ declare const RunStarted_base: S.Class<RunStarted, S.TaggedStruct<"stream", {
1260
+ readonly schemaVersion: S.String;
1261
+ readonly runId: S.String;
1262
+ readonly mode: S.Literals<readonly ["human", "machine"]>;
1263
+ readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
1264
+ }>, {}>;
1265
+
1266
+ export declare type RunTerminalEvent = VerdictReached | RunFailed | HelpRendered;
1267
+
1268
+ export declare type RunTiming = typeof RunTimingSchema.Type;
1269
+
1270
+ export declare const RunTimingSchema: S.Struct<{
1271
+ readonly net: S.Finite;
1272
+ readonly overhead: S.Finite;
1273
+ }>;
1274
+
1275
+ export declare class SandboxDirectory extends SandboxDirectory_base {}
1276
+
1277
+ declare const SandboxDirectory_base: Context.ServiceClass<SandboxDirectory, "~@systemfsoftware/stryker-js/SandboxDirectory", string>;
1278
+
1279
+ export declare interface SelectedReporterFactory {
1280
+ readonly name: string;
1281
+ readonly make: ReporterFactory;
1282
+ }
1283
+
1284
+ export declare class Shadowing extends Shadowing_base {}
1285
+
1286
+ declare const Shadowing_base: S.Class<Shadowing, S.TaggedStruct<"Shadowing", {
1287
+ readonly kind: S.String;
1288
+ readonly name: S.String;
1289
+ readonly shadowedIndex: S.Finite;
1290
+ readonly winnerIndex: S.Finite;
1291
+ }>, {}>;
1292
+
1293
+ export declare const shouldKeepTempDir: (exit: Exit.Exit<void, unknown>, cleanTempDir: 'always' | boolean) => boolean;
1294
+
1295
+ export declare interface SkippedTestResult extends BaseTestResult {
1296
+ readonly status: 'skipped';
1297
+ }
1298
+
1299
+ /**
1300
+ * The JSON Schema document derived from `StrykerOptionsSchema`, self-contained.
1301
+ *
1302
+ * It lives beside the schema module rather than inside it because it is a *use*
1303
+ * of that schema, not a declaration of one: `S.toJsonSchemaDocument` consumes a
1304
+ * schema and returns a plain document. Keeping uses out of a `*.schema.ts` is
1305
+ * what lets a tool read every exported schema in a package and trust that each
1306
+ * one is a schema - the generated law suite does exactly that, and a document
1307
+ * handed to `toEncoded` takes the whole suite down with it.
1308
+ */
1309
+ export declare const strykerCoreSchema: Record<string, unknown>;
1310
+
1311
+ /** The decoded type: every defaulted option is present. */
1312
+ export declare type StrykerOptions = S.Schema.Type<typeof StrykerOptionsSchema>;
1313
+
1314
+ export declare const StrykerOptionsSchema: S.StructWithRest<S.Struct<{
1315
+ readonly allowConsoleColors: S.withDecodingDefaultKey<S.Boolean, never>;
1316
+ readonly buildCommand: S.optional<S.String>;
1317
+ readonly checkers: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
1318
+ readonly checkerNodeArgs: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
1319
+ readonly concurrency: S.optional<S.Union<readonly [S.Finite, S.String]>>;
1320
+ readonly commandRunner: S.withDecodingDefaultKey<S.StructWithRest<S.Struct<{
1321
+ readonly command: S.withDecodingDefaultKey<S.String, never>;
1322
+ }>, readonly [S.$Record<S.String, S.Unknown>]>, never>;
1323
+ readonly coverageAnalysis: S.withDecodingDefaultKey<S.Literals<readonly ["off", "all", "perTest"]>, never>;
1324
+ readonly clearTextReporter: S.withDecodingDefaultKey<S.StructWithRest<S.Struct<{
1325
+ readonly allowColor: S.withDecodingDefaultKey<S.Boolean, never>;
1326
+ readonly allowEmojis: S.withDecodingDefaultKey<S.Boolean, never>;
1327
+ readonly logTests: S.withDecodingDefaultKey<S.Boolean, never>;
1328
+ readonly maxTestsToLog: S.withDecodingDefaultKey<S.Finite, never>;
1329
+ readonly reportTests: S.withDecodingDefaultKey<S.Boolean, never>;
1330
+ readonly reportMutants: S.withDecodingDefaultKey<S.Boolean, never>;
1331
+ readonly reportScoreTable: S.withDecodingDefaultKey<S.Boolean, never>;
1332
+ readonly skipFull: S.withDecodingDefaultKey<S.Boolean, never>;
1333
+ }>, readonly [S.$Record<S.String, S.Unknown>]>, never>;
1334
+ readonly dryRunOnly: S.withDecodingDefaultKey<S.Boolean, never>;
1335
+ readonly ignorePatterns: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
1336
+ readonly ignoreStatic: S.withDecodingDefaultKey<S.Boolean, never>;
1337
+ readonly incremental: S.withDecodingDefaultKey<S.Boolean, never>;
1338
+ readonly incrementalFile: S.withDecodingDefaultKey<S.String, never>;
1339
+ readonly progressStreamFile: S.withDecodingDefaultKey<S.String, never>;
1340
+ readonly force: S.withDecodingDefaultKey<S.Boolean, never>;
1341
+ readonly fileLogLevel: S.withDecodingDefaultKey<S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>, never>;
1342
+ readonly inPlace: S.withDecodingDefaultKey<S.Boolean, never>;
1343
+ readonly logLevel: S.withDecodingDefaultKey<S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>, never>;
1344
+ readonly maxConcurrentTestRunners: S.withDecodingDefaultKey<S.Finite, never>;
1345
+ readonly maxTestRunnerReuse: S.withDecodingDefaultKey<S.Finite, never>;
1346
+ readonly mutate: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
1347
+ readonly mutator: S.withDecodingDefaultKey<S.Struct<{
1348
+ readonly excludedMutations: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
1349
+ }>, never>;
1350
+ readonly packageManager: S.optional<S.Literals<readonly ["npm", "yarn", "pnpm"]>>;
1351
+ readonly plugins: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
1352
+ readonly appendPlugins: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
1353
+ readonly reporters: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
1354
+ readonly htmlReporter: S.withDecodingDefaultKey<S.Struct<{
1355
+ readonly fileName: S.withDecodingDefaultKey<S.String, never>;
1356
+ }>, never>;
1357
+ readonly jsonReporter: S.withDecodingDefaultKey<S.Struct<{
1358
+ readonly fileName: S.withDecodingDefaultKey<S.String, never>;
1359
+ }>, never>;
1360
+ readonly disableTypeChecks: S.withDecodingDefaultKey<S.Union<readonly [S.Boolean, S.String]>, never>;
1361
+ readonly symlinkNodeModules: S.withDecodingDefaultKey<S.Boolean, never>;
1362
+ readonly tempDirName: S.withDecodingDefaultKey<S.String, never>;
1363
+ readonly cleanTempDir: S.withDecodingDefaultKey<S.Literals<readonly ["always", false, true]>, never>;
1364
+ readonly testRunner: S.withDecodingDefaultKey<S.String, never>;
1365
+ readonly testRunnerNodeArgs: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
1366
+ readonly thresholds: S.withDecodingDefaultKey<S.Struct<{
1367
+ readonly high: S.withDecodingDefaultKey<S.Finite, never>;
1368
+ readonly low: S.withDecodingDefaultKey<S.Finite, never>;
1369
+ readonly break: S.withDecodingDefaultKey<S.NullOr<S.Finite>, never>;
1370
+ }>, never>;
1371
+ readonly timeoutFactor: S.withDecodingDefaultKey<S.Finite, never>;
1372
+ readonly timeoutMS: S.withDecodingDefaultKey<S.Finite, never>;
1373
+ readonly dryRunTimeoutMinutes: S.withDecodingDefaultKey<S.Finite, never>;
1374
+ readonly tsconfigFile: S.withDecodingDefaultKey<S.String, never>;
1375
+ readonly warnings: S.withDecodingDefaultKey<S.Union<readonly [S.Boolean, S.StructWithRest<S.Struct<{
1376
+ readonly unknownOptions: S.withDecodingDefaultKey<S.Boolean, never>;
1377
+ readonly preprocessorErrors: S.withDecodingDefaultKey<S.Boolean, never>;
1378
+ readonly unserializableOptions: S.withDecodingDefaultKey<S.Boolean, never>;
1379
+ readonly slow: S.withDecodingDefaultKey<S.Boolean, never>;
1380
+ }>, readonly [S.$Record<S.String, S.Unknown>]>]>, never>;
1381
+ readonly disableBail: S.withDecodingDefaultKey<S.Boolean, never>;
1382
+ readonly allowEmpty: S.withDecodingDefaultKey<S.Boolean, never>;
1383
+ readonly ignorers: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
1384
+ readonly testFiles: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
1385
+ }>, readonly [S.$Record<S.String, S.Unknown>]>;
1386
+
1387
+ /**
1388
+ * Creates a URL to the page where a consumer can report a bug against this
1389
+ * project.
1390
+ *
1391
+ * The tracker is ours. The ported original addressed the upstream StrykerJS
1392
+ * repository, along with its label and issue-template parameters, so every bug
1393
+ * a consumer filed from a Stryker run arrived at a project that does not own
1394
+ * this code (`REPO-O1`) and prefilled a template that does not exist here.
1395
+ *
1396
+ * @param titleSuggestion - The title to be prefilled in.
1397
+ */
1398
+ export declare function strykerReportBugUrl(titleSuggestion: string): string;
1399
+
1400
+ export declare interface SuccessTestResult extends BaseTestResult {
1401
+ readonly status: 'success';
1402
+ }
1403
+
1404
+ export declare interface SurvivedMutantRunResult {
1405
+ readonly status: 'survived';
1406
+ readonly nrOfTests: number;
1407
+ }
1408
+
1409
+ export declare type TestDefinition = typeof TestDefinitionSchema.Type;
1410
+
1411
+ export declare const TestDefinitionSchema: S.Struct<{
1412
+ readonly id: S.String;
1413
+ readonly name: S.String;
1414
+ readonly location: S.optional<S.Struct<{
1415
+ readonly start: S.Struct<{
1416
+ readonly line: S.Finite;
1417
+ readonly column: S.Finite;
1418
+ }>;
1419
+ readonly end: S.optional<S.Struct<{
1420
+ readonly line: S.Finite;
1421
+ readonly column: S.Finite;
1422
+ }>>;
1423
+ }>>;
1424
+ }>;
1425
+
1426
+ export declare type TestFile = typeof TestFileSchema.Type;
1427
+
1428
+ export declare type TestFileDefinitionDictionary = typeof TestFileDefinitionDictionarySchema.Type;
1429
+
1430
+ export declare const TestFileDefinitionDictionarySchema: S.$Record<S.String, S.Struct<{
1431
+ readonly source: S.optional<S.String>;
1432
+ readonly tests: S.$Array<S.Struct<{
1433
+ readonly id: S.String;
1434
+ readonly name: S.String;
1435
+ readonly location: S.optional<S.Struct<{
1436
+ readonly start: S.Struct<{
1437
+ readonly line: S.Finite;
1438
+ readonly column: S.Finite;
1439
+ }>;
1440
+ readonly end: S.optional<S.Struct<{
1441
+ readonly line: S.Finite;
1442
+ readonly column: S.Finite;
1443
+ }>>;
1444
+ }>>;
1445
+ }>>;
1446
+ }>>;
1447
+
1448
+ export declare const TestFileSchema: S.Struct<{
1449
+ readonly source: S.optional<S.String>;
1450
+ readonly tests: S.$Array<S.Struct<{
1451
+ readonly id: S.String;
1452
+ readonly name: S.String;
1453
+ readonly location: S.optional<S.Struct<{
1454
+ readonly start: S.Struct<{
1455
+ readonly line: S.Finite;
1456
+ readonly column: S.Finite;
1457
+ }>;
1458
+ readonly end: S.optional<S.Struct<{
1459
+ readonly line: S.Finite;
1460
+ readonly column: S.Finite;
1461
+ }>>;
1462
+ }>>;
1463
+ }>>;
1464
+ }>;
1465
+
1466
+ export declare function testFilesProvided(options: {
1467
+ readonly testFiles?: readonly string[];
1468
+ }): boolean;
1469
+
1470
+ export declare type TestPlan = EarlyResultPlan | RunPlan;
1471
+
1472
+ export declare type TestResult = FailedTestResult | SkippedTestResult | SuccessTestResult;
1473
+
1474
+ export declare const TestResultSchema: S.Union<readonly [S.Struct<{
1475
+ readonly id: S.String;
1476
+ readonly name: S.String;
1477
+ readonly timeSpentMs: S.Finite;
1478
+ readonly fileName: S.optionalKey<S.String>;
1479
+ readonly startPosition: S.optionalKey<S.Struct<{
1480
+ readonly line: S.Finite;
1481
+ readonly column: S.Finite;
1482
+ }>>;
1483
+ readonly status: S.Literal<"failed">;
1484
+ readonly failureMessage: S.String;
1485
+ }>, S.Struct<{
1486
+ readonly id: S.String;
1487
+ readonly name: S.String;
1488
+ readonly timeSpentMs: S.Finite;
1489
+ readonly fileName: S.optionalKey<S.String>;
1490
+ readonly startPosition: S.optionalKey<S.Struct<{
1491
+ readonly line: S.Finite;
1492
+ readonly column: S.Finite;
1493
+ }>>;
1494
+ readonly status: S.Literal<"skipped">;
1495
+ }>, S.Struct<{
1496
+ readonly id: S.String;
1497
+ readonly name: S.String;
1498
+ readonly timeSpentMs: S.Finite;
1499
+ readonly fileName: S.optionalKey<S.String>;
1500
+ readonly startPosition: S.optionalKey<S.Struct<{
1501
+ readonly line: S.Finite;
1502
+ readonly column: S.Finite;
1503
+ }>>;
1504
+ readonly status: S.Literal<"success">;
1505
+ }>]>;
1506
+
1507
+ export declare class TestRunner extends TestRunner_base {}
1508
+
1509
+ declare const TestRunner_base: Context.ServiceClass<TestRunner, "~@systemfsoftware/stryker-js/TestRunner", TestRunnerService>;
1510
+
1511
+ export declare interface TestRunnerCapabilities {
1512
+ readonly reloadEnvironment: boolean;
1513
+ }
1514
+
1515
+ export declare const TestRunnerCapabilitiesSchema: S.Struct<{
1516
+ readonly reloadEnvironment: S.Boolean;
1517
+ }>;
1518
+
1519
+ export declare class TestRunnerFailed extends TestRunnerFailed_base {}
1520
+
1521
+ declare const TestRunnerFailed_base: S.Class<TestRunnerFailed, S.TaggedStruct<"TestRunnerFailed", {
1522
+ readonly cause: S.String;
1523
+ readonly phase: S.Literals<readonly ["capabilities", "dispose", "dryRun", "init", "mutantRun"]>;
1524
+ readonly runnerName: S.String;
1525
+ }>, YieldableError>;
1526
+
1527
+ export declare interface TestRunnerService {
1528
+ readonly capabilities: Effect.Effect<TestRunnerCapabilities, TestRunnerFailed>;
1529
+ readonly init: Effect.Effect<void, TestRunnerFailed>;
1530
+ readonly dryRun: (options: DryRunOptions) => Effect.Effect<DryRunResult, TestRunnerFailed>;
1531
+ readonly mutantRun: (options: MutantRunOptions) => Effect.Effect<MutantRunResult, TestRunnerFailed>;
1532
+ readonly dispose: Effect.Effect<void, TestRunnerFailed>;
1533
+ }
1534
+
1535
+ export declare const TestStatus: S.Literals<readonly ["success", "failed", "skipped"]>;
1536
+
1537
+ export declare type TestStatus = typeof TestStatus.Type;
1538
+
1539
+ export declare type Thresholds = typeof ThresholdsSchema.Type;
1540
+
1541
+ export declare const ThresholdsSchema: S.Struct<{
1542
+ readonly high: S.Finite;
1543
+ readonly low: S.Finite;
1544
+ }>;
1545
+
1546
+ export declare interface TimeoutDryRunResult {
1547
+ readonly status: 'timeout';
1548
+ readonly reason?: string;
1549
+ }
1550
+
1551
+ export declare interface TimeoutMutantRunResult {
1552
+ readonly status: 'timeout';
1553
+ readonly reason?: string;
1554
+ }
1555
+
1556
+ export declare function toMutantRunResult(dryRunResult: DryRunResult, reportAllKillers: boolean): MutantRunResult;
1557
+
1558
+ export declare function verdictExitClass(score: number | null, breakingThreshold: number | null): ExitClass | null;
1559
+
1560
+ export declare class VerdictReached extends VerdictReached_base {}
1561
+
1562
+ declare const VerdictReached_base: S.Class<VerdictReached, S.TaggedStruct<"verdict", {
1563
+ readonly schemaVersion: S.String;
1564
+ readonly runId: S.String;
1565
+ readonly mode: S.Literals<readonly ["human", "machine"]>;
1566
+ readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
1567
+ readonly score: S.NullOr<S.Finite>;
1568
+ readonly thresholds: S.Struct<{
1569
+ readonly high: S.Finite;
1570
+ readonly low: S.Finite;
1571
+ readonly break: S.NullOr<S.Finite>;
1572
+ }>;
1573
+ readonly reportFile: S.NullOr<S.String>;
1574
+ readonly counts: S.Struct<{
1575
+ readonly killed: S.Finite;
1576
+ readonly timeout: S.Finite;
1577
+ readonly survived: S.Finite;
1578
+ readonly noCoverage: S.Finite;
1579
+ readonly runtimeErrors: S.Finite;
1580
+ readonly compileErrors: S.Finite;
1581
+ readonly ignored: S.Finite;
1582
+ readonly pending: S.Finite;
1583
+ }>;
1584
+ readonly mutants: S.$Array<S.Struct<{
1585
+ readonly id: S.String;
1586
+ readonly file: S.String;
1587
+ readonly location: S.Struct<{
1588
+ readonly start: S.Struct<{
1589
+ readonly line: S.Finite;
1590
+ readonly column: S.Finite;
1591
+ }>;
1592
+ readonly end: S.Struct<{
1593
+ readonly line: S.Finite;
1594
+ readonly column: S.Finite;
1595
+ }>;
1596
+ }>;
1597
+ readonly mutator: S.String;
1598
+ readonly replacement: S.NullOr<S.String>;
1599
+ readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
1600
+ }>>;
1601
+ }>, {}>;
1602
+
1603
+ export { }