@systemfsoftware/stryker-js 2.0.0 → 3.0.1

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 (48) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/{Checker-DYgIIEai.d.mts → Checker-A8o5B3Ub.d.mts} +1 -1
  3. package/dist/Checker.d.mts +1 -1
  4. package/dist/{Evaluator-RZBS4oeh.d.mts → Evaluator-CnAN8-pZ.d.mts} +2 -2
  5. package/dist/Evaluator.d.mts +1 -1
  6. package/dist/ExitClass.d.mts +1 -1
  7. package/dist/ExitClass.mjs +20 -31
  8. package/dist/Metrics.d.mts +7 -0
  9. package/dist/Metrics.mjs +79 -0
  10. package/dist/Metrics.schema-BaVd6rXs.d.mts +50 -0
  11. package/dist/Metrics.schema-DZdoc46X.mjs +27 -0
  12. package/dist/{Mutant-BPRJTF8f.d.mts → Mutant-Ci25PsWA.d.mts} +6 -6
  13. package/dist/Mutant.d.mts +3 -2
  14. package/dist/Mutant.mjs +54 -78
  15. package/dist/{Mutant.schema-BTWhFTk4.mjs → Mutant.schema-H3r0ho_R.mjs} +3 -3
  16. package/dist/{Plugin-DcDAIBQi.d.mts → Plugin-BtItMchw.d.mts} +31 -13
  17. package/dist/Plugin-DXFdJP1l.mjs +105 -0
  18. package/dist/Plugin.d.mts +2 -2
  19. package/dist/Plugin.mjs +2 -2
  20. package/dist/Report.d.mts +2 -0
  21. package/dist/Report.mjs +98 -0
  22. package/dist/Report.schema-_buHXdnZ.d.mts +251 -0
  23. package/dist/Reporter-BWTwlSJf.mjs +25 -0
  24. package/dist/Reporter-C7ysGxqX.d.mts +16 -0
  25. package/dist/Reporter.d.mts +4 -2
  26. package/dist/Reporter.mjs +3 -2
  27. package/dist/ReporterEvent.d.mts +2 -0
  28. package/dist/ReporterEvent.mjs +57 -0
  29. package/dist/ReporterEvent.schema-BhtyYCZo.d.mts +189 -0
  30. package/dist/{Run-BnmGGgWj.d.mts → Run-BUpNSmcM.d.mts} +82 -89
  31. package/dist/Run.d.mts +2 -2
  32. package/dist/Run.mjs +56 -2
  33. package/dist/Run.schema-DZve3k2m.mjs +138 -0
  34. package/dist/{Schema-CXKiLnTu.d.mts → Schema-4oCWQ0P0.d.mts} +63 -64
  35. package/dist/{Schema-CdNkubPi.mjs → Schema-CMKdWMUN.mjs} +55 -57
  36. package/dist/Schema.d.mts +1 -1
  37. package/dist/Schema.mjs +1 -1
  38. package/dist/TestRunner.d.mts +1 -1
  39. package/dist/TestRunner.mjs +57 -2
  40. package/dist/{TestRunner-DC9U8Unb.mjs → TestRunner.schema-Dy0Wdro2.mjs} +2 -64
  41. package/dist/index.d.mts +6 -6
  42. package/dist/index.mjs +5 -5
  43. package/dist/provided-options.d.mts +1 -1
  44. package/package.json +10 -7
  45. package/dist/Plugin-Ceh1G8Dz.mjs +0 -117
  46. package/dist/Reporter-COVWW1my.mjs +0 -33
  47. package/dist/Reporter-eZ3M7lO6.d.mts +0 -83
  48. package/dist/Run-BcDo-hIC.mjs +0 -199
@@ -0,0 +1,138 @@
1
+ import * as S from "effect/Schema";
2
+ //#region src/Run.schema.ts
3
+ const RunPhase = S.Literals([
4
+ "prepare",
5
+ "instrument",
6
+ "dry-run",
7
+ "mutation-test"
8
+ ]);
9
+ const OutputMode = S.Literals(["human", "machine"]);
10
+ const ModeSignal = S.Literals([
11
+ "flag",
12
+ "env",
13
+ "tty",
14
+ "agent",
15
+ "tool"
16
+ ]);
17
+ const MutantStatus = S.Literals([
18
+ "Killed",
19
+ "Survived",
20
+ "NoCoverage",
21
+ "Timeout",
22
+ "CompileError",
23
+ "RuntimeError",
24
+ "Ignored",
25
+ "Pending"
26
+ ]);
27
+ const Position = S.Struct({
28
+ line: S.Finite,
29
+ column: S.Finite
30
+ });
31
+ const Location = S.Struct({
32
+ start: Position,
33
+ end: Position
34
+ });
35
+ var RunStarted = class extends S.TaggedClass()("stream", {
36
+ schemaVersion: S.String,
37
+ runId: S.String,
38
+ mode: OutputMode,
39
+ signal: ModeSignal
40
+ }) {};
41
+ var PhaseEntered = class extends S.TaggedClass()("phase", {
42
+ phase: RunPhase,
43
+ elapsedMs: S.Finite
44
+ }) {};
45
+ var PlanKnown = class extends S.TaggedClass()("plan", { total: S.Finite }) {};
46
+ var MutantTested = class extends S.TaggedClass()("mutant", {
47
+ id: S.String,
48
+ status: MutantStatus,
49
+ file: S.String,
50
+ location: Location,
51
+ mutator: S.String,
52
+ replacement: S.NullOr(S.String),
53
+ completed: S.Finite,
54
+ total: S.Finite
55
+ }) {};
56
+ var Heartbeat = class extends S.TaggedClass()("tick", {
57
+ elapsedMs: S.Finite,
58
+ completed: S.Finite,
59
+ total: S.NullOr(S.Finite)
60
+ }) {};
61
+ const VerdictThresholds = S.Struct({
62
+ high: S.Finite,
63
+ low: S.Finite,
64
+ break: S.NullOr(S.Finite)
65
+ });
66
+ const VerdictMutant = S.Struct({
67
+ id: S.String,
68
+ file: S.String,
69
+ location: Location,
70
+ mutator: S.String,
71
+ replacement: S.NullOr(S.String),
72
+ status: MutantStatus
73
+ });
74
+ const VerdictCounts = S.Struct({
75
+ killed: S.Finite,
76
+ timeout: S.Finite,
77
+ survived: S.Finite,
78
+ noCoverage: S.Finite,
79
+ runtimeErrors: S.Finite,
80
+ compileErrors: S.Finite,
81
+ ignored: S.Finite,
82
+ pending: S.Finite
83
+ });
84
+ var VerdictReached = class extends S.TaggedClass()("verdict", {
85
+ schemaVersion: S.String,
86
+ runId: S.String,
87
+ mode: OutputMode,
88
+ signal: ModeSignal,
89
+ score: S.NullOr(S.Finite),
90
+ thresholds: VerdictThresholds,
91
+ reportFile: S.NullOr(S.String),
92
+ counts: VerdictCounts,
93
+ mutants: S.Array(VerdictMutant)
94
+ }) {};
95
+ var RunFailed = class extends S.TaggedClass()("error", {
96
+ schemaVersion: S.String,
97
+ code: S.Finite,
98
+ error: S.String,
99
+ remediation: S.String
100
+ }) {};
101
+ var HelpRendered = class extends S.TaggedClass()("help", {
102
+ schemaVersion: S.String,
103
+ code: S.Literals([0]),
104
+ help: S.String
105
+ }) {};
106
+ const RunEvent = S.Union([
107
+ RunStarted,
108
+ PhaseEntered,
109
+ PlanKnown,
110
+ MutantTested,
111
+ Heartbeat,
112
+ VerdictReached,
113
+ RunFailed,
114
+ HelpRendered
115
+ ]);
116
+ S.TaggedClass()("RunCommand", {
117
+ cliOptionsJson: S.String,
118
+ targetMutatePatterns: S.Array(S.String)
119
+ });
120
+ var RunOutput = class extends S.TaggedClass()("RunOutput", {
121
+ verdictJson: S.String,
122
+ exitCode: S.Finite
123
+ }) {};
124
+ S.TaggedError()("RunDecodeError", { message: S.String });
125
+ S.TaggedError()("RunReadError", { message: S.String });
126
+ S.TaggedError()("RunWriteError", { message: S.String });
127
+ var PlanMutationRunCommand = class extends S.TaggedClass()("PlanMutationRunCommand", {
128
+ configMutatePatterns: S.Array(S.String),
129
+ configMutatorNames: S.Array(S.String),
130
+ targetMutatePatterns: S.Array(S.String),
131
+ availableMutators: S.Array(S.String)
132
+ }) {};
133
+ var MutationRunPlan = class extends S.TaggedClass()("MutationRunPlan", {
134
+ mutatePatterns: S.Array(S.String),
135
+ mutatorNames: S.Array(S.String)
136
+ }) {};
137
+ //#endregion
138
+ export { MutantTested as a, PhaseEntered as c, RunEvent as d, RunFailed as f, VerdictReached as g, RunStarted as h, MutantStatus as i, PlanKnown as l, RunPhase as m, HelpRendered as n, MutationRunPlan as o, RunOutput as p, ModeSignal as r, OutputMode as s, Heartbeat as t, PlanMutationRunCommand as u };
@@ -1,5 +1,4 @@
1
1
  import * as S from "effect/Schema";
2
- import { Wire } from "@systemfsoftware/effect-cell-types";
3
2
  //#region src/Schema.schema.d.ts
4
3
  declare const LogLevel: S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>;
5
4
  declare const CoverageAnalysisMode: S.Literals<readonly ["off", "all", "perTest"]>;
@@ -11,76 +10,76 @@ type CoverageAnalysisMode = typeof CoverageAnalysisMode.Type;
11
10
  type ReportType = typeof ReportType.Type;
12
11
  type PackageManager = typeof PackageManager.Type;
13
12
  declare const StrykerOptionsSchema: S.StructWithRest<S.Struct<{
14
- readonly allowConsoleColors: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
15
- readonly buildCommand: S.optional<S.String & Wire.Mark>;
16
- readonly checkers: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
17
- readonly checkerNodeArgs: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
18
- readonly concurrency: S.optional<S.Union<readonly [S.Finite & Wire.Mark, S.String & Wire.Mark]> & Wire.Mark>;
13
+ readonly allowConsoleColors: S.withDecodingDefaultKey<S.Boolean, never>;
14
+ readonly buildCommand: S.optional<S.String>;
15
+ readonly checkers: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
16
+ readonly checkerNodeArgs: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
17
+ readonly concurrency: S.optional<S.Union<readonly [S.Finite, S.String]>>;
19
18
  readonly commandRunner: S.withDecodingDefaultKey<S.StructWithRest<S.Struct<{
20
- readonly command: S.withDecodingDefaultKey<S.String, never> & Wire.Mark;
21
- }> & Wire.Mark, readonly [S.$Record<S.String & Wire.Mark, S.Unknown & Wire.Mark> & Wire.Mark]>, never> & Wire.Mark;
22
- readonly coverageAnalysis: S.withDecodingDefaultKey<S.Literals<readonly ["off", "all", "perTest"]>, never> & Wire.Mark;
19
+ readonly command: S.withDecodingDefaultKey<S.String, never>;
20
+ }>, readonly [S.$Record<S.String, S.Unknown>]>, never>;
21
+ readonly coverageAnalysis: S.withDecodingDefaultKey<S.Literals<readonly ["off", "all", "perTest"]>, never>;
23
22
  readonly clearTextReporter: S.withDecodingDefaultKey<S.StructWithRest<S.Struct<{
24
- readonly allowColor: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
25
- readonly allowEmojis: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
26
- readonly logTests: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
27
- readonly maxTestsToLog: S.withDecodingDefaultKey<S.Finite, never> & Wire.Mark;
28
- readonly reportTests: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
29
- readonly reportMutants: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
30
- readonly reportScoreTable: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
31
- readonly skipFull: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
32
- }> & Wire.Mark, readonly [S.$Record<S.String & Wire.Mark, S.Unknown & Wire.Mark> & Wire.Mark]>, never> & Wire.Mark;
33
- readonly dryRunOnly: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
34
- readonly ignorePatterns: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
35
- readonly ignoreStatic: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
36
- readonly incremental: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
37
- readonly incrementalFile: S.withDecodingDefaultKey<S.String, never> & Wire.Mark;
38
- readonly progressStreamFile: S.withDecodingDefaultKey<S.String, never> & Wire.Mark;
39
- readonly force: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
40
- readonly fileLogLevel: S.withDecodingDefaultKey<S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>, never> & Wire.Mark;
41
- readonly inPlace: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
42
- readonly logLevel: S.withDecodingDefaultKey<S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>, never> & Wire.Mark;
43
- readonly maxConcurrentTestRunners: S.withDecodingDefaultKey<S.Finite, never> & Wire.Mark;
44
- readonly maxTestRunnerReuse: S.withDecodingDefaultKey<S.Finite, never> & Wire.Mark;
45
- readonly mutate: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
23
+ readonly allowColor: S.withDecodingDefaultKey<S.Boolean, never>;
24
+ readonly allowEmojis: S.withDecodingDefaultKey<S.Boolean, never>;
25
+ readonly logTests: S.withDecodingDefaultKey<S.Boolean, never>;
26
+ readonly maxTestsToLog: S.withDecodingDefaultKey<S.Finite, never>;
27
+ readonly reportTests: S.withDecodingDefaultKey<S.Boolean, never>;
28
+ readonly reportMutants: S.withDecodingDefaultKey<S.Boolean, never>;
29
+ readonly reportScoreTable: S.withDecodingDefaultKey<S.Boolean, never>;
30
+ readonly skipFull: S.withDecodingDefaultKey<S.Boolean, never>;
31
+ }>, readonly [S.$Record<S.String, S.Unknown>]>, never>;
32
+ readonly dryRunOnly: S.withDecodingDefaultKey<S.Boolean, never>;
33
+ readonly ignorePatterns: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
34
+ readonly ignoreStatic: S.withDecodingDefaultKey<S.Boolean, never>;
35
+ readonly incremental: S.withDecodingDefaultKey<S.Boolean, never>;
36
+ readonly incrementalFile: S.withDecodingDefaultKey<S.String, never>;
37
+ readonly progressStreamFile: S.withDecodingDefaultKey<S.String, never>;
38
+ readonly force: S.withDecodingDefaultKey<S.Boolean, never>;
39
+ readonly fileLogLevel: S.withDecodingDefaultKey<S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>, never>;
40
+ readonly inPlace: S.withDecodingDefaultKey<S.Boolean, never>;
41
+ readonly logLevel: S.withDecodingDefaultKey<S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>, never>;
42
+ readonly maxConcurrentTestRunners: S.withDecodingDefaultKey<S.Finite, never>;
43
+ readonly maxTestRunnerReuse: S.withDecodingDefaultKey<S.Finite, never>;
44
+ readonly mutate: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
46
45
  readonly mutator: S.withDecodingDefaultKey<S.Struct<{
47
- excludedMutations: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
48
- }>, never> & Wire.Mark;
46
+ readonly excludedMutations: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
47
+ }>, never>;
49
48
  readonly packageManager: S.optional<S.Literals<readonly ["npm", "yarn", "pnpm"]>>;
50
- readonly plugins: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
51
- readonly appendPlugins: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
52
- readonly reporters: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
49
+ readonly plugins: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
50
+ readonly appendPlugins: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
51
+ readonly reporters: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
53
52
  readonly htmlReporter: S.withDecodingDefaultKey<S.Struct<{
54
- fileName: S.withDecodingDefaultKey<S.String, never> & Wire.Mark;
55
- }>, never> & Wire.Mark;
53
+ readonly fileName: S.withDecodingDefaultKey<S.String, never>;
54
+ }>, never>;
56
55
  readonly jsonReporter: S.withDecodingDefaultKey<S.Struct<{
57
- fileName: S.withDecodingDefaultKey<S.String, never> & Wire.Mark;
58
- }>, never> & Wire.Mark;
59
- readonly disableTypeChecks: S.withDecodingDefaultKey<S.Union<readonly [S.Boolean & Wire.Mark, S.String & Wire.Mark]>, never> & Wire.Mark;
60
- readonly symlinkNodeModules: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
61
- readonly tempDirName: S.withDecodingDefaultKey<S.String, never> & Wire.Mark;
62
- readonly cleanTempDir: S.withDecodingDefaultKey<S.Literals<readonly ["always", false, true]>, never> & Wire.Mark;
63
- readonly testRunner: S.withDecodingDefaultKey<S.String, never> & Wire.Mark;
64
- readonly testRunnerNodeArgs: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
56
+ readonly fileName: S.withDecodingDefaultKey<S.String, never>;
57
+ }>, never>;
58
+ readonly disableTypeChecks: S.withDecodingDefaultKey<S.Union<readonly [S.Boolean, S.String]>, never>;
59
+ readonly symlinkNodeModules: S.withDecodingDefaultKey<S.Boolean, never>;
60
+ readonly tempDirName: S.withDecodingDefaultKey<S.String, never>;
61
+ readonly cleanTempDir: S.withDecodingDefaultKey<S.Literals<readonly ["always", false, true]>, never>;
62
+ readonly testRunner: S.withDecodingDefaultKey<S.String, never>;
63
+ readonly testRunnerNodeArgs: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
65
64
  readonly thresholds: S.withDecodingDefaultKey<S.Struct<{
66
- readonly high: S.withDecodingDefaultKey<S.Finite, never> & Wire.Mark;
67
- readonly low: S.withDecodingDefaultKey<S.Finite, never> & Wire.Mark;
68
- readonly break: S.withDecodingDefaultKey<S.NullOr<S.Finite & Wire.Mark>, never> & Wire.Mark;
69
- }>, never> & Wire.Mark;
70
- readonly timeoutFactor: S.withDecodingDefaultKey<S.Finite, never> & Wire.Mark;
71
- readonly timeoutMS: S.withDecodingDefaultKey<S.Finite, never> & Wire.Mark;
72
- readonly dryRunTimeoutMinutes: S.withDecodingDefaultKey<S.Finite, never> & Wire.Mark;
73
- readonly tsconfigFile: S.withDecodingDefaultKey<S.String, never> & Wire.Mark;
74
- readonly warnings: S.withDecodingDefaultKey<S.Union<readonly [S.Boolean & Wire.Mark, S.StructWithRest<S.Struct<{
75
- readonly unknownOptions: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
76
- readonly preprocessorErrors: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
77
- readonly unserializableOptions: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
78
- readonly slow: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
79
- }> & Wire.Mark, readonly [S.$Record<S.String & Wire.Mark, S.Unknown & Wire.Mark> & Wire.Mark]> & Wire.Mark]>, never> & Wire.Mark;
80
- readonly disableBail: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
81
- readonly allowEmpty: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
82
- readonly ignorers: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
83
- readonly testFiles: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
65
+ readonly high: S.withDecodingDefaultKey<S.Finite, never>;
66
+ readonly low: S.withDecodingDefaultKey<S.Finite, never>;
67
+ readonly break: S.withDecodingDefaultKey<S.NullOr<S.Finite>, never>;
68
+ }>, never>;
69
+ readonly timeoutFactor: S.withDecodingDefaultKey<S.Finite, never>;
70
+ readonly timeoutMS: S.withDecodingDefaultKey<S.Finite, never>;
71
+ readonly dryRunTimeoutMinutes: S.withDecodingDefaultKey<S.Finite, never>;
72
+ readonly tsconfigFile: S.withDecodingDefaultKey<S.String, never>;
73
+ readonly warnings: S.withDecodingDefaultKey<S.Union<readonly [S.Boolean, S.StructWithRest<S.Struct<{
74
+ readonly unknownOptions: S.withDecodingDefaultKey<S.Boolean, never>;
75
+ readonly preprocessorErrors: S.withDecodingDefaultKey<S.Boolean, never>;
76
+ readonly unserializableOptions: S.withDecodingDefaultKey<S.Boolean, never>;
77
+ readonly slow: S.withDecodingDefaultKey<S.Boolean, never>;
78
+ }>, readonly [S.$Record<S.String, S.Unknown>]>]>, never>;
79
+ readonly disableBail: S.withDecodingDefaultKey<S.Boolean, never>;
80
+ readonly allowEmpty: S.withDecodingDefaultKey<S.Boolean, never>;
81
+ readonly ignorers: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
82
+ readonly testFiles: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
84
83
  }>, readonly [S.$Record<S.String, S.Unknown>]>;
85
84
  /** The decoded type: every defaulted option is present. */
86
85
  type StrykerOptions = S.Schema.Type<typeof StrykerOptionsSchema>;
@@ -1,6 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
2
  import * as S from "effect/Schema";
3
- import { Wire } from "@systemfsoftware/effect-cell-types";
4
3
  import { Effect } from "effect";
5
4
  //#region src/Schema.schema.ts
6
5
  const RENDERED_OPTION_DEFAULTS$1 = {
@@ -34,7 +33,7 @@ const RENDERED_OPTION_DEFAULTS$1 = {
34
33
  * separate engine that happened not to inject them.
35
34
  */
36
35
  /** Open object: fixed fields plus an index signature accepting arbitrary plugin keys. */
37
- const openStruct = (fields) => Wire.mint(S.StructWithRest(Wire.wire(fields), [Wire.mint(S.Record(Wire.mint(S.String), Wire.mint(S.Unknown)))]));
36
+ const openStruct = (fields) => S.StructWithRest(S.Struct(fields), [S.Record(S.String, S.Unknown)]);
38
37
  /**
39
38
  * Field that decodes to a value but defaults when the key is absent.
40
39
  *
@@ -50,8 +49,7 @@ const openStruct = (fields) => Wire.mint(S.StructWithRest(Wire.wire(fields), [Wi
50
49
  */
51
50
  const defaulted = (schema, defaultValue) => {
52
51
  const annotated = schema.annotate({ default: defaultValue });
53
- const withDefault = S.withDecodingDefaultKey(Effect.succeed(defaultValue))(annotated);
54
- return Wire.mint(withDefault);
52
+ return S.withDecodingDefaultKey(Effect.succeed(defaultValue))(annotated);
55
53
  };
56
54
  const LogLevel = S.Literals([
57
55
  "off",
@@ -74,43 +72,43 @@ const PackageManager = S.Literals([
74
72
  "pnpm"
75
73
  ]);
76
74
  /** 0–100 percentage used by the mutation-score thresholds. */
77
- const Percentage = Wire.mint(Wire.mint(S.Finite).pipe(S.check(S.isBetween({
75
+ const Percentage = S.Finite.pipe(S.check(S.isBetween({
78
76
  minimum: 0,
79
77
  maximum: 100
80
- }))));
81
- const CommandRunnerOptionsSchema = openStruct({ command: defaulted(Wire.mint(S.String), "npm test") });
78
+ })));
79
+ const CommandRunnerOptionsSchema = openStruct({ command: defaulted(S.String, "npm test") });
82
80
  const ClearTextReporterOptions = openStruct({
83
- allowColor: defaulted(Wire.mint(S.Boolean), true),
84
- allowEmojis: defaulted(Wire.mint(S.Boolean), false),
85
- logTests: defaulted(Wire.mint(S.Boolean), true),
86
- maxTestsToLog: defaulted(Wire.mint(Wire.mint(S.Finite).pipe(S.check(S.isGreaterThanOrEqualTo(0)))), 3),
87
- reportTests: defaulted(Wire.mint(S.Boolean), true),
88
- reportMutants: defaulted(Wire.mint(S.Boolean), true),
89
- reportScoreTable: defaulted(Wire.mint(S.Boolean), true),
90
- skipFull: defaulted(Wire.mint(S.Boolean), false)
81
+ allowColor: defaulted(S.Boolean, true),
82
+ allowEmojis: defaulted(S.Boolean, false),
83
+ logTests: defaulted(S.Boolean, true),
84
+ maxTestsToLog: defaulted(S.Finite.pipe(S.check(S.isGreaterThanOrEqualTo(0))), 3),
85
+ reportTests: defaulted(S.Boolean, true),
86
+ reportMutants: defaulted(S.Boolean, true),
87
+ reportScoreTable: defaulted(S.Boolean, true),
88
+ skipFull: defaulted(S.Boolean, false)
91
89
  });
92
- const HtmlReporterOptions = Wire.wire({ fileName: defaulted(Wire.mint(S.String), "reports/mutation/mutation.html") });
93
- const JsonReporterOptions = Wire.wire({ fileName: defaulted(Wire.mint(S.String), "reports/mutation/mutation.json") });
90
+ const HtmlReporterOptions = S.Struct({ fileName: defaulted(S.String, "reports/mutation/mutation.html") });
91
+ const JsonReporterOptions = S.Struct({ fileName: defaulted(S.String, "reports/mutation/mutation.json") });
94
92
  const MutationScoreThresholdsSchema = S.Struct({
95
93
  high: defaulted(Percentage, 80),
96
94
  low: defaulted(Percentage, 60),
97
95
  break: defaulted(S.NullOr(Percentage), null)
98
96
  });
99
- const MutatorDescriptor = Wire.wire({ excludedMutations: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), []) });
97
+ const MutatorDescriptor = S.Struct({ excludedMutations: defaulted(S.Array(S.String), []) });
100
98
  const WarningOptions = openStruct({
101
- unknownOptions: defaulted(Wire.mint(S.Boolean), true),
102
- preprocessorErrors: defaulted(Wire.mint(S.Boolean), true),
103
- unserializableOptions: defaulted(Wire.mint(S.Boolean), true),
104
- slow: defaulted(Wire.mint(S.Boolean), true)
99
+ unknownOptions: defaulted(S.Boolean, true),
100
+ preprocessorErrors: defaulted(S.Boolean, true),
101
+ unserializableOptions: defaulted(S.Boolean, true),
102
+ slow: defaulted(S.Boolean, true)
105
103
  });
106
- const ConcurrencyCount = Wire.mint(Wire.mint(S.Finite).pipe(S.check(S.isGreaterThanOrEqualTo(1))));
107
- const ConcurrencyPercent = Wire.mint(Wire.mint(S.String).pipe(S.check(S.isPattern(/^(100|[1-9]?[0-9])%$/))));
104
+ const ConcurrencyCount = S.Finite.pipe(S.check(S.isGreaterThanOrEqualTo(1)));
105
+ const ConcurrencyPercent = S.String.pipe(S.check(S.isPattern(/^(100|[1-9]?[0-9])%$/)));
108
106
  const StrykerOptionsSchema = S.StructWithRest(S.Struct({
109
- allowConsoleColors: defaulted(Wire.mint(S.Boolean), true),
110
- buildCommand: S.optional(Wire.mint(S.String)),
111
- checkers: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), []),
112
- checkerNodeArgs: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), []),
113
- concurrency: S.optional(Wire.mint(S.Union([ConcurrencyCount, ConcurrencyPercent]))),
107
+ allowConsoleColors: defaulted(S.Boolean, true),
108
+ buildCommand: S.optional(S.String),
109
+ checkers: defaulted(S.Array(S.String), []),
110
+ checkerNodeArgs: defaulted(S.Array(S.String), []),
111
+ concurrency: S.optional(S.Union([ConcurrencyCount, ConcurrencyPercent])),
114
112
  commandRunner: defaulted(CommandRunnerOptionsSchema, { command: "npm test" }),
115
113
  coverageAnalysis: defaulted(CoverageAnalysisMode, RENDERED_OPTION_DEFAULTS$1.coverageAnalysis),
116
114
  clearTextReporter: defaulted(ClearTextReporterOptions, {
@@ -123,54 +121,54 @@ const StrykerOptionsSchema = S.StructWithRest(S.Struct({
123
121
  reportScoreTable: true,
124
122
  skipFull: false
125
123
  }),
126
- dryRunOnly: defaulted(Wire.mint(S.Boolean), false),
127
- ignorePatterns: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), []),
128
- ignoreStatic: defaulted(Wire.mint(S.Boolean), false),
129
- incremental: defaulted(Wire.mint(S.Boolean), false),
130
- incrementalFile: defaulted(Wire.mint(S.String), "reports/stryker-incremental.json"),
131
- progressStreamFile: defaulted(Wire.mint(S.String), "reports/mutation-stream.jsonl"),
132
- force: defaulted(Wire.mint(S.Boolean), false),
124
+ dryRunOnly: defaulted(S.Boolean, false),
125
+ ignorePatterns: defaulted(S.Array(S.String), []),
126
+ ignoreStatic: defaulted(S.Boolean, false),
127
+ incremental: defaulted(S.Boolean, false),
128
+ incrementalFile: defaulted(S.String, "reports/stryker-incremental.json"),
129
+ progressStreamFile: defaulted(S.String, "reports/mutation-stream.jsonl"),
130
+ force: defaulted(S.Boolean, false),
133
131
  fileLogLevel: defaulted(LogLevel, RENDERED_OPTION_DEFAULTS$1.fileLogLevel),
134
- inPlace: defaulted(Wire.mint(S.Boolean), false),
132
+ inPlace: defaulted(S.Boolean, false),
135
133
  logLevel: defaulted(LogLevel, RENDERED_OPTION_DEFAULTS$1.logLevel),
136
- maxConcurrentTestRunners: defaulted(Wire.mint(S.Finite), 9007199254740991),
137
- maxTestRunnerReuse: defaulted(Wire.mint(S.Finite), 0),
138
- mutate: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), ["{src,lib}/**/!(*.+(s|S)pec|*.+(t|T)est).+(cjs|mjs|js|ts|mts|cts|jsx|tsx|html|vue|svelte)", "!{src,lib}/**/__tests__/**/*.+(cjs|mjs|js|ts|mts|cts|jsx|tsx|html|vue|svelte)"]),
134
+ maxConcurrentTestRunners: defaulted(S.Finite, 9007199254740991),
135
+ maxTestRunnerReuse: defaulted(S.Finite, 0),
136
+ mutate: defaulted(S.Array(S.String), ["{src,lib}/**/!(*.+(s|S)pec|*.+(t|T)est).+(cjs|mjs|js|ts|mts|cts|jsx|tsx|html|vue|svelte)", "!{src,lib}/**/__tests__/**/*.+(cjs|mjs|js|ts|mts|cts|jsx|tsx|html|vue|svelte)"]),
139
137
  mutator: defaulted(MutatorDescriptor, { excludedMutations: [] }),
140
138
  packageManager: S.optional(PackageManager),
141
- plugins: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), ["@systemfsoftware/stryker-js-*"]),
142
- appendPlugins: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), []),
143
- reporters: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), [
139
+ plugins: defaulted(S.Array(S.String), ["@systemfsoftware/stryker-js-*"]),
140
+ appendPlugins: defaulted(S.Array(S.String), []),
141
+ reporters: defaulted(S.Array(S.String), [
144
142
  "clear-text",
145
143
  "progress",
146
144
  "html"
147
145
  ]),
148
146
  htmlReporter: defaulted(HtmlReporterOptions, { fileName: "reports/mutation/mutation.html" }),
149
147
  jsonReporter: defaulted(JsonReporterOptions, { fileName: "reports/mutation/mutation.json" }),
150
- disableTypeChecks: defaulted(Wire.mint(S.Union([Wire.mint(S.Boolean), Wire.mint(S.String)])), true),
151
- symlinkNodeModules: defaulted(Wire.mint(S.Boolean), true),
152
- tempDirName: defaulted(Wire.mint(S.String), RENDERED_OPTION_DEFAULTS$1.tempDirName),
148
+ disableTypeChecks: defaulted(S.Union([S.Boolean, S.String]), true),
149
+ symlinkNodeModules: defaulted(S.Boolean, true),
150
+ tempDirName: defaulted(S.String, RENDERED_OPTION_DEFAULTS$1.tempDirName),
153
151
  cleanTempDir: defaulted(S.Literals([
154
152
  "always",
155
153
  false,
156
154
  true
157
155
  ]), true),
158
- testRunner: defaulted(Wire.mint(S.String), "command"),
159
- testRunnerNodeArgs: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), []),
156
+ testRunner: defaulted(S.String, "command"),
157
+ testRunnerNodeArgs: defaulted(S.Array(S.String), []),
160
158
  thresholds: defaulted(MutationScoreThresholdsSchema, {
161
159
  high: 80,
162
160
  low: 60,
163
161
  break: null
164
162
  }),
165
- timeoutFactor: defaulted(Wire.mint(S.Finite), 1.5),
166
- timeoutMS: defaulted(Wire.mint(S.Finite), 5e3),
167
- dryRunTimeoutMinutes: defaulted(Wire.mint(Wire.mint(S.Finite).pipe(S.check(S.isGreaterThanOrEqualTo(0)))), 5),
168
- tsconfigFile: defaulted(Wire.mint(S.String), "tsconfig.json"),
169
- warnings: defaulted(Wire.mint(S.Union([Wire.mint(S.Boolean), WarningOptions])), true),
170
- disableBail: defaulted(Wire.mint(S.Boolean), false),
171
- allowEmpty: defaulted(Wire.mint(S.Boolean), false),
172
- ignorers: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), []),
173
- testFiles: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), [])
163
+ timeoutFactor: defaulted(S.Finite, 1.5),
164
+ timeoutMS: defaulted(S.Finite, 5e3),
165
+ dryRunTimeoutMinutes: defaulted(S.Finite.pipe(S.check(S.isGreaterThanOrEqualTo(0))), 5),
166
+ tsconfigFile: defaulted(S.String, "tsconfig.json"),
167
+ warnings: defaulted(S.Union([S.Boolean, WarningOptions]), true),
168
+ disableBail: defaulted(S.Boolean, false),
169
+ allowEmpty: defaulted(S.Boolean, false),
170
+ ignorers: defaulted(S.Array(S.String), []),
171
+ testFiles: defaulted(S.Array(S.String), [])
174
172
  }), [S.Record(S.String, S.Unknown)]);
175
173
  //#endregion
176
174
  //#region src/Schema.ts
package/dist/Schema.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { c as strykerReportBugUrl, d as PackageManager, f as PartialStrykerOptions, h as StrykerOptionsSchema, i as RENDERED_OPTION_DEFAULTS, l as CoverageAnalysisMode, m as StrykerOptions, n as Primitive, o as propertyPath, p as ReportType, r as PropertyPathOverloads, s as strykerCoreSchema, t as KnownKeys, u as LogLevel } from "./Schema-CXKiLnTu.mjs";
1
+ import { c as strykerReportBugUrl, d as PackageManager, f as PartialStrykerOptions, h as StrykerOptionsSchema, i as RENDERED_OPTION_DEFAULTS, l as CoverageAnalysisMode, m as StrykerOptions, n as Primitive, o as propertyPath, p as ReportType, r as PropertyPathOverloads, s as strykerCoreSchema, t as KnownKeys, u as LogLevel } from "./Schema-4oCWQ0P0.mjs";
2
2
  export { CoverageAnalysisMode, type CoverageAnalysisMode as CoverageAnalysisModeType, KnownKeys, LogLevel, type LogLevel as LogLevelType, PackageManager, type PackageManager as PackageManagerType, type PartialStrykerOptions, Primitive, PropertyPathOverloads, RENDERED_OPTION_DEFAULTS, ReportType, type ReportType as ReportTypeType, type StrykerOptions, StrykerOptionsSchema, propertyPath, strykerCoreSchema, strykerReportBugUrl };
package/dist/Schema.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as strykerReportBugUrl, c as PackageManager, i as strykerCoreSchema, l as ReportType, o as CoverageAnalysisMode, r as propertyPath, s as LogLevel, t as RENDERED_OPTION_DEFAULTS, u as StrykerOptionsSchema } from "./Schema-CdNkubPi.mjs";
1
+ import { a as strykerReportBugUrl, c as PackageManager, i as strykerCoreSchema, l as ReportType, o as CoverageAnalysisMode, r as propertyPath, s as LogLevel, t as RENDERED_OPTION_DEFAULTS, u as StrykerOptionsSchema } from "./Schema-CMKdWMUN.mjs";
2
2
  export { CoverageAnalysisMode, LogLevel, PackageManager, RENDERED_OPTION_DEFAULTS, ReportType, StrykerOptionsSchema, propertyPath, strykerCoreSchema, strykerReportBugUrl };
@@ -1,2 +1,2 @@
1
- import { $ as TimeoutMutantRunResult, A as CompleteDryRunResult, B as MutantRunOptions, F as ErrorMutantRunResult, G as SuccessTestResult, H as Position, I as FailedTestResult, J as TestRunner, K as SurvivedMutantRunResult, L as KilledMutantRunResult, M as DryRunOptions, N as DryRunResult, P as ErrorDryRunResult, Q as TimeoutDryRunResult, R as MutantActivation, U as RunOptions, V as MutantRunResult, W as SkippedTestResult, X as TestRunnerService, Y as TestRunnerCapabilities, at as DryRunStatus, ct as MutantRunOptionsSchema, dt as TestResultSchema, et as testFilesProvided, ft as TestRunnerCapabilitiesSchema, it as DryRunResultSchema, j as CoverageAnalysis, k as BaseTestResult, lt as MutantRunResultSchema, mt as TestStatus, nt as CoverageAnalysisSchema, ot as MutantActivationSchema, pt as TestRunnerFailed, q as TestResult, rt as DryRunOptionsSchema, st as MutantCoverageSchema, tt as toMutantRunResult, ut as MutantRunStatus, z as MutantCoverage } from "./Mutant-BPRJTF8f.mjs";
1
+ import { $ as testFilesProvided, A as CoverageAnalysis, B as MutantRunResult, F as FailedTestResult, G as SurvivedMutantRunResult, H as RunOptions, I as KilledMutantRunResult, J as TestRunnerCapabilities, K as TestResult, L as MutantActivation, M as DryRunResult, N as ErrorDryRunResult, O as BaseTestResult, P as ErrorMutantRunResult, Q as TimeoutMutantRunResult, R as MutantCoverage, U as SkippedTestResult, V as Position, W as SuccessTestResult, Y as TestRunnerService, Z as TimeoutDryRunResult, at as MutantActivationSchema, ct as MutantRunResultSchema, dt as TestRunnerCapabilitiesSchema, et as toMutantRunResult, ft as TestRunnerFailed, it as DryRunStatus, j as DryRunOptions, k as CompleteDryRunResult, lt as MutantRunStatus, nt as DryRunOptionsSchema, ot as MutantCoverageSchema, pt as TestStatus, q as TestRunner, rt as DryRunResultSchema, st as MutantRunOptionsSchema, tt as CoverageAnalysisSchema, ut as TestResultSchema, z as MutantRunOptions } from "./Mutant-Ci25PsWA.mjs";
2
2
  export { BaseTestResult, CompleteDryRunResult, CoverageAnalysis, CoverageAnalysisSchema, DryRunOptions, DryRunOptionsSchema, DryRunResult, DryRunResultSchema, DryRunStatus, ErrorDryRunResult, ErrorMutantRunResult, FailedTestResult, KilledMutantRunResult, MutantActivation, MutantActivationSchema, MutantCoverage, MutantCoverageSchema, MutantRunOptions, MutantRunOptionsSchema, MutantRunResult, MutantRunResultSchema, MutantRunStatus, Position, RunOptions, SkippedTestResult, SuccessTestResult, SurvivedMutantRunResult, TestResult, TestResultSchema, TestRunner, TestRunnerCapabilities, TestRunnerCapabilitiesSchema, TestRunnerFailed, TestRunnerService, TestStatus, TimeoutDryRunResult, TimeoutMutantRunResult, testFilesProvided, toMutantRunResult };
@@ -1,2 +1,57 @@
1
- import { _ as TestStatus, a as CoverageAnalysisSchema, c as DryRunStatus, d as MutantRunOptionsSchema, f as MutantRunResultSchema, g as TestRunnerFailed, h as TestRunnerCapabilitiesSchema, i as toMutantRunResult, l as MutantActivationSchema, m as TestResultSchema, o as DryRunOptionsSchema, p as MutantRunStatus, r as testFilesProvided, s as DryRunResultSchema, t as TestRunner, u as MutantCoverageSchema } from "./TestRunner-DC9U8Unb.mjs";
2
- export { CoverageAnalysisSchema, DryRunOptionsSchema, DryRunResultSchema, DryRunStatus, MutantActivationSchema, MutantCoverageSchema, MutantRunOptionsSchema, MutantRunResultSchema, MutantRunStatus, TestResultSchema, TestRunner, TestRunnerCapabilitiesSchema, TestRunnerFailed, TestStatus, testFilesProvided, toMutantRunResult };
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
+ import { a as MutantActivationSchema, c as MutantRunResultSchema, d as TestRunnerCapabilitiesSchema, f as TestRunnerFailed, i as DryRunStatus, l as MutantRunStatus, n as DryRunOptionsSchema, o as MutantCoverageSchema, p as TestStatus, r as DryRunResultSchema, s as MutantRunOptionsSchema, t as CoverageAnalysisSchema, u as TestResultSchema } from "./TestRunner.schema-Dy0Wdro2.mjs";
3
+ import * as Context from "effect/Context";
4
+ import * as Match from "effect/Match";
5
+ import * as Option from "effect/Option";
6
+ //#region src/TestRunner.ts
7
+ var TestRunner_exports = /* @__PURE__ */ __exportAll({
8
+ CoverageAnalysisSchema: () => CoverageAnalysisSchema,
9
+ DryRunOptionsSchema: () => DryRunOptionsSchema,
10
+ DryRunResultSchema: () => DryRunResultSchema,
11
+ DryRunStatus: () => DryRunStatus,
12
+ MutantActivationSchema: () => MutantActivationSchema,
13
+ MutantCoverageSchema: () => MutantCoverageSchema,
14
+ MutantRunOptionsSchema: () => MutantRunOptionsSchema,
15
+ MutantRunResultSchema: () => MutantRunResultSchema,
16
+ MutantRunStatus: () => MutantRunStatus,
17
+ TestResultSchema: () => TestResultSchema,
18
+ TestRunner: () => TestRunner,
19
+ TestRunnerCapabilitiesSchema: () => TestRunnerCapabilitiesSchema,
20
+ TestRunnerFailed: () => TestRunnerFailed,
21
+ TestStatus: () => TestStatus,
22
+ testFilesProvided: () => testFilesProvided,
23
+ toMutantRunResult: () => toMutantRunResult
24
+ });
25
+ function toMutantRunResult(dryRunResult, reportAllKillers) {
26
+ return Match.value(dryRunResult).pipe(Match.discriminator("status")("complete", (complete) => {
27
+ const failed = complete.tests.filter((t) => t.status === "failed");
28
+ const nrOfTests = complete.tests.filter((t) => t.status !== "skipped").length;
29
+ return Option.match(Option.fromUndefinedOr(failed.at(0)), {
30
+ onNone: () => ({
31
+ nrOfTests,
32
+ status: "survived"
33
+ }),
34
+ onSome: (firstFailed) => ({
35
+ failureMessage: firstFailed.failureMessage,
36
+ killedBy: Match.value(reportAllKillers).pipe(Match.when(true, () => failed.map((t) => t.id)), Match.when(false, () => [firstFailed.id]), Match.exhaustive),
37
+ nrOfTests,
38
+ status: "killed"
39
+ })
40
+ });
41
+ }), Match.discriminator("status")("error", (errored) => ({
42
+ errorMessage: errored.errorMessage,
43
+ status: "error"
44
+ })), Match.discriminator("status")("timeout", (timedOut) => Option.match(Option.fromUndefinedOr(timedOut.reason), {
45
+ onNone: () => ({ status: "timeout" }),
46
+ onSome: (reason) => ({
47
+ reason,
48
+ status: "timeout"
49
+ })
50
+ })), Match.exhaustive);
51
+ }
52
+ var TestRunner = class extends Context.Service()("~@systemfsoftware/stryker-js/TestRunner") {};
53
+ function testFilesProvided(options) {
54
+ return options.testFiles !== void 0 && options.testFiles.length > 0;
55
+ }
56
+ //#endregion
57
+ export { CoverageAnalysisSchema, DryRunOptionsSchema, DryRunResultSchema, DryRunStatus, MutantActivationSchema, MutantCoverageSchema, MutantRunOptionsSchema, MutantRunResultSchema, MutantRunStatus, TestResultSchema, TestRunner, TestRunnerCapabilitiesSchema, TestRunnerFailed, TestStatus, TestRunner_exports as t, testFilesProvided, toMutantRunResult };
@@ -1,6 +1,4 @@
1
- import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
- import { n as Mutant, r as PositionSchema } from "./Mutant.schema-BTWhFTk4.mjs";
3
- import * as Context from "effect/Context";
1
+ import { n as Mutant, r as PositionSchema } from "./Mutant.schema-H3r0ho_R.mjs";
4
2
  import * as S from "effect/Schema";
5
3
  //#region src/TestRunner.schema.ts
6
4
  const DryRunStatus = S.Literals([
@@ -118,64 +116,4 @@ var TestRunnerFailed = class extends S.TaggedError()("TestRunnerFailed", {
118
116
  runnerName: S.String
119
117
  }) {};
120
118
  //#endregion
121
- //#region src/TestRunner.ts
122
- var TestRunner_exports = /* @__PURE__ */ __exportAll({
123
- CoverageAnalysisSchema: () => CoverageAnalysisSchema,
124
- DryRunOptionsSchema: () => DryRunOptionsSchema,
125
- DryRunResultSchema: () => DryRunResultSchema,
126
- DryRunStatus: () => DryRunStatus,
127
- MutantActivationSchema: () => MutantActivationSchema,
128
- MutantCoverageSchema: () => MutantCoverageSchema,
129
- MutantRunOptionsSchema: () => MutantRunOptionsSchema,
130
- MutantRunResultSchema: () => MutantRunResultSchema,
131
- MutantRunStatus: () => MutantRunStatus,
132
- TestResultSchema: () => TestResultSchema,
133
- TestRunner: () => TestRunner,
134
- TestRunnerCapabilitiesSchema: () => TestRunnerCapabilitiesSchema,
135
- TestRunnerFailed: () => TestRunnerFailed,
136
- TestStatus: () => TestStatus,
137
- testFilesProvided: () => testFilesProvided,
138
- toMutantRunResult: () => toMutantRunResult
139
- });
140
- function toMutantRunResult(dryRunResult, reportAllKillers) {
141
- switch (dryRunResult.status) {
142
- case "timeout":
143
- if (dryRunResult.reason === void 0) return { status: "timeout" };
144
- return {
145
- reason: dryRunResult.reason,
146
- status: "timeout"
147
- };
148
- case "error": return {
149
- errorMessage: dryRunResult.errorMessage,
150
- status: "error"
151
- };
152
- case "complete": {
153
- const failed = dryRunResult.tests.filter((t) => t.status === "failed");
154
- const nrOfTests = dryRunResult.tests.filter((t) => t.status !== "skipped").length;
155
- if (failed.length === 0) return {
156
- nrOfTests,
157
- status: "survived"
158
- };
159
- const firstFailed = failed.at(0);
160
- if (firstFailed === void 0) return {
161
- nrOfTests,
162
- status: "survived"
163
- };
164
- let killedBy;
165
- if (reportAllKillers) killedBy = failed.map((t) => t.id);
166
- else killedBy = [firstFailed.id];
167
- return {
168
- failureMessage: firstFailed.failureMessage,
169
- killedBy,
170
- nrOfTests,
171
- status: "killed"
172
- };
173
- }
174
- }
175
- }
176
- var TestRunner = class extends Context.Service()("~@systemfsoftware/stryker-js/TestRunner") {};
177
- function testFilesProvided(options) {
178
- return options.testFiles !== void 0 && options.testFiles.length > 0;
179
- }
180
- //#endregion
181
- export { TestStatus as _, CoverageAnalysisSchema as a, DryRunStatus as c, MutantRunOptionsSchema as d, MutantRunResultSchema as f, TestRunnerFailed as g, TestRunnerCapabilitiesSchema as h, toMutantRunResult as i, MutantActivationSchema as l, TestResultSchema as m, TestRunner_exports as n, DryRunOptionsSchema as o, MutantRunStatus as p, testFilesProvided as r, DryRunResultSchema as s, TestRunner as t, MutantCoverageSchema as u };
119
+ export { MutantActivationSchema as a, MutantRunResultSchema as c, TestRunnerCapabilitiesSchema as d, TestRunnerFailed as f, DryRunStatus as i, MutantRunStatus as l, DryRunOptionsSchema as n, MutantCoverageSchema as o, TestStatus as p, DryRunResultSchema as r, MutantRunOptionsSchema as s, CoverageAnalysisSchema as t, TestResultSchema as u };