@systemfsoftware/stryker-js-mutation-run 1.2.5
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/LICENSE +212 -0
- package/README.md +38 -0
- package/dist/checker-C4tGiXtZ.mjs +588 -0
- package/dist/checker-resource-DTYEKXdg.d.mts +108 -0
- package/dist/checker-worker.d.mts +16 -0
- package/dist/checker-worker.mjs +2 -0
- package/dist/child-process-proxy-worker-lx1M5Mz3.mjs +567 -0
- package/dist/child-process-proxy-worker-main.d.mts +1 -0
- package/dist/child-process-proxy-worker-main.mjs +6 -0
- package/dist/child-process-test-runner-worker-BTWRYb8V.mjs +50 -0
- package/dist/child-process-test-runner-worker.d.mts +16 -0
- package/dist/child-process-test-runner-worker.mjs +2 -0
- package/dist/config/base.d.mts +21 -0
- package/dist/config/base.mjs +47 -0
- package/dist/config/config-resolution.d.mts +80 -0
- package/dist/config/config-resolution.mjs +2 -0
- package/dist/config/fork-schema.d.mts +5 -0
- package/dist/config/fork-schema.mjs +2 -0
- package/dist/errors-BkjxkY_S.d.mts +6 -0
- package/dist/errors.d.mts +2 -0
- package/dist/errors.mjs +10 -0
- package/dist/exit-classification.d.mts +28 -0
- package/dist/exit-classification.mjs +39 -0
- package/dist/fork-schema-BHuTbRBR.mjs +62 -0
- package/dist/incremental-differ-DDVwtXBn.d.mts +72 -0
- package/dist/incremental-differ-DY8AA09Q.mjs +579 -0
- package/dist/index-CyOSz6LC.d.mts +104 -0
- package/dist/index.d.mts +87 -0
- package/dist/index.mjs +1885 -0
- package/dist/mutants/incremental-differ.d.mts +2 -0
- package/dist/mutants/incremental-differ.mjs +2 -0
- package/dist/output-mode-CfGHDpi5.d.mts +17 -0
- package/dist/output-mode.d.mts +2 -0
- package/dist/output-mode.mjs +1 -0
- package/dist/plugins-Nx86IJQW.mjs +1618 -0
- package/dist/plugins.d.mts +2 -0
- package/dist/plugins.mjs +2 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/dist/run-event-CzRz9Gtk.d.mts +121 -0
- package/dist/run-event.d.mts +2 -0
- package/dist/run-event.mjs +1 -0
- package/dist/stryker-package-CTcsIZ4S.mjs +23 -0
- package/dist/stryker-package.d.mts +7 -0
- package/dist/stryker-package.mjs +2 -0
- package/dist/timer-BMrE1SQ3.d.mts +20 -0
- package/dist/timer.d.mts +2 -0
- package/dist/timer.mjs +48 -0
- package/dist/verdict-envelope-BWc61mHm.mjs +229 -0
- package/dist/verdict-envelope-CKLZPjxC.d.mts +94 -0
- package/dist/verdict-envelope.d.mts +2 -0
- package/dist/verdict-envelope.mjs +2 -0
- package/package.json +102 -0
- package/schema/stryker-schema.json +903 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { c as progressEnabled, d as resolvedMode, f as runEventSink, i as clearTextEnabled, l as reporterOverride, m as runStartedAt, o as loggingServerAddress, p as runId, s as loggingSink, u as reporterPluginModules } from "./index-CyOSz6LC.mjs";
|
|
2
|
+
import { n as LoggingServerAddress, r as LoggingBackend } from "./checker-resource-DTYEKXdg.mjs";
|
|
3
|
+
import { r as ResolvedMode } from "./output-mode-CfGHDpi5.mjs";
|
|
4
|
+
import { c as RunEventSink } from "./run-event-CzRz9Gtk.mjs";
|
|
5
|
+
import "./incremental-differ-DDVwtXBn.mjs";
|
|
6
|
+
import { FileDescriptions, Mutant, MutantResult, MutantStatus, PartialStrykerOptions, StrykerOptions } from "@systemfsoftware/stryker-js-plugin-api/core";
|
|
7
|
+
import { BaseContext, Injector, PluginContext, commonTokens } from "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
8
|
+
import { Disposable, Injector as Injector$1, createInjector } from "typed-inject";
|
|
9
|
+
import { I, requireResolve } from "@stryker-mutator/util";
|
|
10
|
+
import { Logger } from "@systemfsoftware/stryker-js-plugin-api/logging";
|
|
11
|
+
import "rxjs";
|
|
12
|
+
import "@stryker-mutator/instrumenter";
|
|
13
|
+
import "mutation-testing-report-schema";
|
|
14
|
+
import { CompleteDryRunResult, MutantRunResult, TestRunner } from "@systemfsoftware/stryker-js-plugin-api/test-runner";
|
|
15
|
+
import { execaCommand } from "execa";
|
|
16
|
+
import { Reporter } from "@systemfsoftware/stryker-js-plugin-api/report";
|
|
17
|
+
import { CheckResult } from "@systemfsoftware/stryker-js-plugin-api/check";
|
|
18
|
+
//#region src/run-stages/1-prepare-executor.d.ts
|
|
19
|
+
interface PrepareExecutorContext extends BaseContext {
|
|
20
|
+
[loggingServerAddress]: LoggingServerAddress;
|
|
21
|
+
/** Always provided; `undefined` is the absence of an override. */
|
|
22
|
+
[reporterOverride]?: Reporter | undefined;
|
|
23
|
+
[reporterPluginModules]: string[];
|
|
24
|
+
[runEventSink]: RunEventSink;
|
|
25
|
+
[runId]: string;
|
|
26
|
+
[resolvedMode]: ResolvedMode;
|
|
27
|
+
[progressEnabled]: boolean;
|
|
28
|
+
[clearTextEnabled]: boolean;
|
|
29
|
+
[runStartedAt]: number;
|
|
30
|
+
}
|
|
31
|
+
interface PrepareExecutorArgs {
|
|
32
|
+
cliOptions: PartialStrykerOptions;
|
|
33
|
+
targetMutatePatterns: string[] | undefined;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/stryker.d.ts
|
|
37
|
+
type MutationRunContext = PrepareExecutorContext & {
|
|
38
|
+
[loggingSink]: LoggingBackend;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* What the host (the CLI composition root) resolved once and hands to core
|
|
42
|
+
* alongside the cli options: the log descriptor and its colour flag, the
|
|
43
|
+
* run-event sink, and the run's identity and timing. Core receives these as
|
|
44
|
+
* data — it never probes the terminal — and an unwired host is a compile
|
|
45
|
+
* error, never a silent no-op (R2).
|
|
46
|
+
*/
|
|
47
|
+
interface StrykerHostOptions {
|
|
48
|
+
/** The writable the logging backend writes to (stderr in machine mode, stdout otherwise). */
|
|
49
|
+
readonly loggerConsoleOut: NodeJS.WriteStream;
|
|
50
|
+
readonly showColors: boolean;
|
|
51
|
+
readonly runEventSink: RunEventSink;
|
|
52
|
+
/** The run id shared with the stream header and the verdict envelope. */
|
|
53
|
+
readonly runId: string;
|
|
54
|
+
/** The mode resolved once at the edge, and the signal that decided it. */
|
|
55
|
+
readonly resolvedMode: ResolvedMode;
|
|
56
|
+
readonly progressEnabled: boolean;
|
|
57
|
+
readonly clearTextEnabled: boolean;
|
|
58
|
+
/** The run's clock zero: `elapsedMs` values measure from here. */
|
|
59
|
+
readonly runStartedAt: number;
|
|
60
|
+
/** The module specifiers whose `strykerPlugins` the run loads, resolved by the host (U4). */
|
|
61
|
+
readonly reporterPluginModules: string[];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The main Stryker class.
|
|
65
|
+
* It provides a single `runMutationTest()` function which runs mutation testing:
|
|
66
|
+
*/
|
|
67
|
+
declare class Stryker {
|
|
68
|
+
private readonly cliOptions;
|
|
69
|
+
private readonly hostOptions;
|
|
70
|
+
private readonly injectorFactory;
|
|
71
|
+
/**
|
|
72
|
+
* @class
|
|
73
|
+
* @param cliOptions The cli options.
|
|
74
|
+
* @param hostOptions What the host resolved for this run, see {@link StrykerHostOptions}.
|
|
75
|
+
* @param injectorFactory The injector factory, for testing purposes only
|
|
76
|
+
*/
|
|
77
|
+
constructor(cliOptions: PartialStrykerOptions, hostOptions: StrykerHostOptions, injectorFactory?: typeof createInjector);
|
|
78
|
+
runMutationTest(): Promise<MutantResult[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Does the actual mutation testing.
|
|
81
|
+
* Note: this is a public static method, so it can be reused from `StrykerServer`
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
static run(mutationRunInjector: Injector$1<MutationRunContext>, args: PrepareExecutorArgs): Promise<MutantResult[]>;
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
export { Stryker, Stryker as default, type StrykerHostOptions };
|