@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
@@ -1,158 +0,0 @@
1
- import * as S from "effect/Schema";
2
- //#region src/Schema.schema.d.ts
3
- declare const LogLevel: S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>;
4
- declare const CoverageAnalysisMode: S.Literals<readonly ["off", "all", "perTest"]>;
5
- declare const ReportType: S.Literals<readonly ["full", "mutationScore"]>;
6
- declare const PackageManager: S.Literals<readonly ["npm", "yarn", "pnpm"]>;
7
- /** The generated module exported these as TypeScript types; consumers still name them that way. */
8
- type LogLevel = typeof LogLevel.Type;
9
- type CoverageAnalysisMode = typeof CoverageAnalysisMode.Type;
10
- type ReportType = typeof ReportType.Type;
11
- type PackageManager = typeof PackageManager.Type;
12
- declare const StrykerOptionsSchema: S.StructWithRest<S.Struct<{
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]>>;
18
- readonly commandRunner: S.withDecodingDefaultKey<S.StructWithRest<S.Struct<{
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>;
22
- readonly clearTextReporter: S.withDecodingDefaultKey<S.StructWithRest<S.Struct<{
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>;
45
- readonly mutator: S.withDecodingDefaultKey<S.Struct<{
46
- readonly excludedMutations: S.withDecodingDefaultKey<S.$Array<S.String>, never>;
47
- }>, never>;
48
- readonly packageManager: S.optional<S.Literals<readonly ["npm", "yarn", "pnpm"]>>;
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>;
52
- readonly htmlReporter: S.withDecodingDefaultKey<S.Struct<{
53
- readonly fileName: S.withDecodingDefaultKey<S.String, never>;
54
- }>, never>;
55
- readonly jsonReporter: S.withDecodingDefaultKey<S.Struct<{
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>;
64
- readonly thresholds: S.withDecodingDefaultKey<S.Struct<{
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>;
83
- }>, readonly [S.$Record<S.String, S.Unknown>]>;
84
- /** The decoded type: every defaulted option is present. */
85
- type StrykerOptions = S.Schema.Type<typeof StrykerOptionsSchema>;
86
- /**
87
- * The deep-partial input type: when configuring Stryker, every option is
88
- * optional, including deep properties like `dashboard.project`.
89
- */
90
- type PartialStrykerOptions = DeepOptional<StrykerOptions>;
91
- /**
92
- * Every option optional, all the way down, and mutable: this is the type a
93
- * caller CONSTRUCTS by assignment, so `readonly` is stripped. The decoded
94
- * `StrykerOptions` keeps it - that side is read, never built.
95
- */
96
- type DeepOptional<T> = { -readonly [P in keyof T]?: T[P] extends Record<string, unknown> ? DeepOptional<T[P]> | undefined : T[P]; };
97
- declare namespace Schema_d_exports {
98
- export { CoverageAnalysisMode, CoverageAnalysisMode as CoverageAnalysisModeType, KnownKeys, LogLevel, LogLevel as LogLevelType, PackageManager, PackageManager as PackageManagerType, PartialStrykerOptions, Primitive, PropertyPathOverloads, RENDERED_OPTION_DEFAULTS, ReportType, ReportType as ReportTypeType, StrykerOptions, StrykerOptionsSchema, propertyPath, strykerCoreSchema, strykerReportBugUrl };
99
- }
100
- /**
101
- * The four option defaults a human reads about in help text.
102
- *
103
- * `Schema.schema.ts` declares every default, and a CLI that wants to
104
- * name one in a `--help` description must read it from here rather than type
105
- * the literal a second time: a restated default drifts the moment the schema
106
- * moves, and no gate compares a help string against a schema annotation.
107
- *
108
- * Only these four are here because only these four are rendered. A default
109
- * nobody prints has one declaration site already, which is the schema.
110
- */
111
- declare const RENDERED_OPTION_DEFAULTS: {
112
- readonly coverageAnalysis: 'perTest';
113
- readonly fileLogLevel: 'off';
114
- readonly logLevel: 'info';
115
- readonly tempDirName: '.stryker-tmp';
116
- };
117
- type Primitive = boolean | number | string | null | undefined;
118
- /**
119
- * Known keys filters out the index signature from the keys of a type
120
- * @see https://stackoverflow.com/questions/51465182/typescript-remove-index-signature-using-mapped-types
121
- */
122
- type KnownKeys<T> = keyof { [P in keyof T as string extends P ? never : number extends P ? never : P]: T[P]; };
123
- type OnlyObject<T> = Exclude<T, Primitive>;
124
- interface PropertyPathOverloads<T> {
125
- (key: KnownKeys<T>): string;
126
- <TProp1 extends KnownKeys<T>>(key: TProp1, key2: KnownKeys<OnlyObject<T[TProp1]>>): string;
127
- <TProp1 extends KnownKeys<T>, TProp2 extends KnownKeys<OnlyObject<T[TProp1]>>>(key: TProp1, key2: TProp2, key3: KnownKeys<OnlyObject<OnlyObject<T[TProp1]>[TProp2]>>): string;
128
- }
129
- /**
130
- * Given a base type, allows type safe access to the name of a property.
131
- * @param prop The property name
132
- */
133
- declare function propertyPath<T>(): PropertyPathOverloads<T>;
134
- /**
135
- * Creates a URL to the page where a consumer can report a bug against this
136
- * project.
137
- *
138
- * The tracker is ours. The ported original addressed the upstream StrykerJS
139
- * repository, along with its label and issue-template parameters, so every bug
140
- * a consumer filed from a Stryker run arrived at a project that does not own
141
- * this code (`REPO-O1`) and prefilled a template that does not exist here.
142
- *
143
- * @param titleSuggestion The title to be prefilled in.
144
- */
145
- declare function strykerReportBugUrl(titleSuggestion: string): string;
146
- /**
147
- * The JSON Schema document derived from `StrykerOptionsSchema`, self-contained.
148
- *
149
- * It lives beside the schema module rather than inside it because it is a *use*
150
- * of that schema, not a declaration of one: `S.toJsonSchemaDocument` consumes a
151
- * schema and returns a plain document. Keeping uses out of a `*.schema.ts` is
152
- * what lets a tool read every exported schema in a package and trust that each
153
- * one is a schema - the generated law suite does exactly that, and a document
154
- * handed to `toEncoded` takes the whole suite down with it.
155
- */
156
- declare const strykerCoreSchema: Record<string, unknown>;
157
- //#endregion
158
- export { Schema_d_exports as a, strykerReportBugUrl as c, PackageManager as d, PartialStrykerOptions as f, StrykerOptionsSchema as h, RENDERED_OPTION_DEFAULTS as i, CoverageAnalysisMode as l, StrykerOptions as m, Primitive as n, propertyPath as o, ReportType as p, PropertyPathOverloads as r, strykerCoreSchema as s, KnownKeys as t, LogLevel as u };
@@ -1,244 +0,0 @@
1
- import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
- import * as S from "effect/Schema";
3
- import { Effect } from "effect";
4
- //#region src/Schema.schema.ts
5
- const RENDERED_OPTION_DEFAULTS$1 = {
6
- coverageAnalysis: "perTest",
7
- fileLogLevel: "off",
8
- logLevel: "info",
9
- tempDirName: ".stryker-tmp"
10
- };
11
- /**
12
- * The Stryker option set, declared as ONE Effect Schema.
13
- *
14
- * Replaces the vendored `schema/stryker-core.json` codegen chain
15
- * (`tasks/generate-stryker-core.mjs` → `src-generated/stryker-core.ts`): every
16
- * option name, type, optionality and default is preserved, and
17
- * `strykerCoreSchema` is the JSON Schema document **derived** from
18
- * `StrykerOptionsSchema` (no file read).
19
- *
20
- * Layering mirrors the original document:
21
- * - objects without `additionalProperties: false` there (the option set
22
- * itself, `commandRunner`, `clearTextReporter`, `warnings`) are open here —
23
- * `S.StructWithRest` with a `Record<string, unknown>` index keeps arbitrary
24
- * plugin-proposed keys and makes the decoded type carry
25
- * `[k: string]: unknown`;
26
- * - objects with `additionalProperties: false` (`htmlReporter`, `jsonReporter`,
27
- * `thresholds`, `mutator`) are closed here.
28
- *
29
- * `dashboard` and `eventReporter` are absent: the reporters they configured were
30
- * removed, and the removed-option check rejects both names. Declaring them here
31
- * with defaults meant the default option set carried two options the very next
32
- * validation step refused - invisible only while the defaults were filled by a
33
- * separate engine that happened not to inject them.
34
- */
35
- /** Open object: fixed fields plus an index signature accepting arbitrary plugin keys. */
36
- const openStruct = (fields) => S.StructWithRest(S.Struct(fields), [S.Record(S.String, S.Unknown)]);
37
- /**
38
- * Field that decodes to a value but defaults when the key is absent.
39
- *
40
- * The default is typed by the schema's ENCODED side, which is what
41
- * `withDecodingDefaultKey` consumes: a whole-object option can therefore default
42
- * to `{}` exactly when every field inside it carries its own default, and
43
- * the compiler decides that rather than the author asserting it.
44
- *
45
- * The annotation is applied to the schema BEFORE the default transform wraps it.
46
- * Annotating the wrapper instead leaves `default` off the derived JSON Schema
47
- * document, so a consumer filling defaults from that document (ajv
48
- * `useDefaults`) silently injects nothing.
49
- */
50
- const defaulted = (schema, defaultValue) => {
51
- const annotated = schema.annotate({ default: defaultValue });
52
- return S.withDecodingDefaultKey(Effect.succeed(defaultValue))(annotated);
53
- };
54
- const LogLevel = S.Literals([
55
- "off",
56
- "fatal",
57
- "error",
58
- "warn",
59
- "info",
60
- "debug",
61
- "trace"
62
- ]);
63
- const CoverageAnalysisMode = S.Literals([
64
- "off",
65
- "all",
66
- "perTest"
67
- ]);
68
- const ReportType = S.Literals(["full", "mutationScore"]);
69
- const PackageManager = S.Literals([
70
- "npm",
71
- "yarn",
72
- "pnpm"
73
- ]);
74
- /** 0–100 percentage used by the mutation-score thresholds. */
75
- const Percentage = S.Finite.pipe(S.check(S.isBetween({
76
- minimum: 0,
77
- maximum: 100
78
- })));
79
- const CommandRunnerOptionsSchema = openStruct({ command: defaulted(S.String, "npm test") });
80
- const ClearTextReporterOptions = openStruct({
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)
89
- });
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") });
92
- const MutationScoreThresholdsSchema = S.Struct({
93
- high: defaulted(Percentage, 80),
94
- low: defaulted(Percentage, 60),
95
- break: defaulted(S.NullOr(Percentage), null)
96
- });
97
- const MutatorDescriptor = S.Struct({ excludedMutations: defaulted(S.Array(S.String), []) });
98
- const WarningOptions = openStruct({
99
- unknownOptions: defaulted(S.Boolean, true),
100
- preprocessorErrors: defaulted(S.Boolean, true),
101
- unserializableOptions: defaulted(S.Boolean, true),
102
- slow: defaulted(S.Boolean, true)
103
- });
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])%$/)));
106
- const StrykerOptionsSchema = S.StructWithRest(S.Struct({
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])),
112
- commandRunner: defaulted(CommandRunnerOptionsSchema, { command: "npm test" }),
113
- coverageAnalysis: defaulted(CoverageAnalysisMode, RENDERED_OPTION_DEFAULTS$1.coverageAnalysis),
114
- clearTextReporter: defaulted(ClearTextReporterOptions, {
115
- allowColor: true,
116
- allowEmojis: false,
117
- logTests: true,
118
- maxTestsToLog: 3,
119
- reportTests: true,
120
- reportMutants: true,
121
- reportScoreTable: true,
122
- skipFull: false
123
- }),
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),
131
- fileLogLevel: defaulted(LogLevel, RENDERED_OPTION_DEFAULTS$1.fileLogLevel),
132
- inPlace: defaulted(S.Boolean, false),
133
- logLevel: defaulted(LogLevel, RENDERED_OPTION_DEFAULTS$1.logLevel),
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)"]),
137
- mutator: defaulted(MutatorDescriptor, { excludedMutations: [] }),
138
- packageManager: S.optional(PackageManager),
139
- plugins: defaulted(S.Array(S.String), ["@systemfsoftware/stryker-js-*"]),
140
- appendPlugins: defaulted(S.Array(S.String), []),
141
- reporters: defaulted(S.Array(S.String), [
142
- "clear-text",
143
- "progress",
144
- "html"
145
- ]),
146
- htmlReporter: defaulted(HtmlReporterOptions, { fileName: "reports/mutation/mutation.html" }),
147
- jsonReporter: defaulted(JsonReporterOptions, { fileName: "reports/mutation/mutation.json" }),
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),
151
- cleanTempDir: defaulted(S.Literals([
152
- "always",
153
- false,
154
- true
155
- ]), true),
156
- testRunner: defaulted(S.String, "command"),
157
- testRunnerNodeArgs: defaulted(S.Array(S.String), []),
158
- thresholds: defaulted(MutationScoreThresholdsSchema, {
159
- high: 80,
160
- low: 60,
161
- break: null
162
- }),
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), [])
172
- }), [S.Record(S.String, S.Unknown)]);
173
- //#endregion
174
- //#region src/Schema.ts
175
- var Schema_exports = /* @__PURE__ */ __exportAll({
176
- CoverageAnalysisMode: () => CoverageAnalysisMode,
177
- LogLevel: () => LogLevel,
178
- PackageManager: () => PackageManager,
179
- RENDERED_OPTION_DEFAULTS: () => RENDERED_OPTION_DEFAULTS,
180
- ReportType: () => ReportType,
181
- StrykerOptionsSchema: () => StrykerOptionsSchema,
182
- propertyPath: () => propertyPath,
183
- strykerCoreSchema: () => strykerCoreSchema,
184
- strykerReportBugUrl: () => strykerReportBugUrl
185
- });
186
- /**
187
- * The four option defaults a human reads about in help text.
188
- *
189
- * `Schema.schema.ts` declares every default, and a CLI that wants to
190
- * name one in a `--help` description must read it from here rather than type
191
- * the literal a second time: a restated default drifts the moment the schema
192
- * moves, and no gate compares a help string against a schema annotation.
193
- *
194
- * Only these four are here because only these four are rendered. A default
195
- * nobody prints has one declaration site already, which is the schema.
196
- */
197
- const RENDERED_OPTION_DEFAULTS = {
198
- coverageAnalysis: "perTest",
199
- fileLogLevel: "off",
200
- logLevel: "info",
201
- tempDirName: ".stryker-tmp"
202
- };
203
- /**
204
- * Given a base type, allows type safe access to the name of a property.
205
- * @param prop The property name
206
- */
207
- function propertyPath() {
208
- const fn = (...args) => args.join(".");
209
- return fn;
210
- }
211
- /**
212
- * Creates a URL to the page where a consumer can report a bug against this
213
- * project.
214
- *
215
- * The tracker is ours. The ported original addressed the upstream StrykerJS
216
- * repository, along with its label and issue-template parameters, so every bug
217
- * a consumer filed from a Stryker run arrived at a project that does not own
218
- * this code (`REPO-O1`) and prefilled a template that does not exist here.
219
- *
220
- * @param titleSuggestion The title to be prefilled in.
221
- */
222
- function strykerReportBugUrl(titleSuggestion) {
223
- return `https://github.com/systemfsoftware/systemfsoftware/issues/new?title=${encodeURIComponent(titleSuggestion)}`;
224
- }
225
- /**
226
- * The JSON Schema document derived from `StrykerOptionsSchema`, self-contained.
227
- *
228
- * It lives beside the schema module rather than inside it because it is a *use*
229
- * of that schema, not a declaration of one: `S.toJsonSchemaDocument` consumes a
230
- * schema and returns a plain document. Keeping uses out of a `*.schema.ts` is
231
- * what lets a tool read every exported schema in a package and trust that each
232
- * one is a schema - the generated law suite does exactly that, and a document
233
- * handed to `toEncoded` takes the whole suite down with it.
234
- */
235
- const strykerCoreSchema = (() => {
236
- const { schema, definitions } = S.toJsonSchemaDocument(StrykerOptionsSchema);
237
- if (Object.keys(definitions).length === 0) return schema;
238
- return {
239
- ...schema,
240
- definitions
241
- };
242
- })();
243
- //#endregion
244
- export { strykerReportBugUrl as a, PackageManager as c, strykerCoreSchema as i, ReportType as l, Schema_exports as n, CoverageAnalysisMode as o, propertyPath as r, LogLevel as s, RENDERED_OPTION_DEFAULTS as t, StrykerOptionsSchema as u };
package/dist/Schema.d.mts DELETED
@@ -1,2 +0,0 @@
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
- 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 DELETED
@@ -1,2 +0,0 @@
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
- export { CoverageAnalysisMode, LogLevel, PackageManager, RENDERED_OPTION_DEFAULTS, ReportType, StrykerOptionsSchema, propertyPath, strykerCoreSchema, strykerReportBugUrl };
@@ -1,2 +0,0 @@
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
- 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,57 +0,0 @@
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,119 +0,0 @@
1
- import { n as Mutant, r as PositionSchema } from "./Mutant.schema-H3r0ho_R.mjs";
2
- import * as S from "effect/Schema";
3
- //#region src/TestRunner.schema.ts
4
- const DryRunStatus = S.Literals([
5
- "complete",
6
- "error",
7
- "timeout"
8
- ]);
9
- const TestStatus = S.Literals([
10
- "success",
11
- "failed",
12
- "skipped"
13
- ]);
14
- const MutantRunStatus = S.Literals([
15
- "killed",
16
- "survived",
17
- "timeout",
18
- "error"
19
- ]);
20
- const TestResultBase = {
21
- id: S.String,
22
- name: S.String,
23
- timeSpentMs: S.Finite,
24
- fileName: S.optionalKey(S.String),
25
- startPosition: S.optionalKey(PositionSchema)
26
- };
27
- const TestResultSchema = S.Union([
28
- S.Struct({
29
- ...TestResultBase,
30
- status: S.Literal("failed"),
31
- failureMessage: S.String
32
- }),
33
- S.Struct({
34
- ...TestResultBase,
35
- status: S.Literal("skipped")
36
- }),
37
- S.Struct({
38
- ...TestResultBase,
39
- status: S.Literal("success")
40
- })
41
- ]);
42
- const MutantCoverageSchema = S.Struct({
43
- perTest: S.Record(S.String, S.Record(S.String, S.Finite)),
44
- static: S.Record(S.String, S.Finite)
45
- });
46
- const DryRunResultSchema = S.Union([
47
- S.Struct({
48
- status: S.Literal("complete"),
49
- tests: S.Array(TestResultSchema),
50
- mutantCoverage: S.optionalKey(MutantCoverageSchema)
51
- }),
52
- S.Struct({
53
- status: S.Literal("timeout"),
54
- reason: S.optionalKey(S.String)
55
- }),
56
- S.Struct({
57
- status: S.Literal("error"),
58
- errorMessage: S.String
59
- })
60
- ]);
61
- const MutantRunResultSchema = S.Union([
62
- S.Struct({
63
- status: S.Literal("killed"),
64
- killedBy: S.Array(S.String),
65
- failureMessage: S.String,
66
- nrOfTests: S.Finite
67
- }),
68
- S.Struct({
69
- status: S.Literal("survived"),
70
- nrOfTests: S.Finite
71
- }),
72
- S.Struct({
73
- status: S.Literal("timeout"),
74
- reason: S.optionalKey(S.String)
75
- }),
76
- S.Struct({
77
- status: S.Literal("error"),
78
- errorMessage: S.String
79
- })
80
- ]);
81
- const CoverageAnalysisSchema = S.Literals([
82
- "off",
83
- "all",
84
- "perTest"
85
- ]);
86
- const RunOptionsFields = {
87
- timeout: S.Finite,
88
- disableBail: S.Boolean
89
- };
90
- const DryRunOptionsSchema = S.Struct({
91
- ...RunOptionsFields,
92
- coverageAnalysis: CoverageAnalysisSchema,
93
- files: S.optionalKey(S.Array(S.String)),
94
- testFiles: S.optionalKey(S.Array(S.String))
95
- });
96
- const MutantActivationSchema = S.Literals(["runtime", "static"]);
97
- const MutantRunOptionsSchema = S.Struct({
98
- ...RunOptionsFields,
99
- activeMutant: Mutant,
100
- sandboxFileName: S.String,
101
- mutantActivation: MutantActivationSchema,
102
- reloadEnvironment: S.Boolean,
103
- testFilter: S.optionalKey(S.Array(S.String)),
104
- hitLimit: S.optionalKey(S.Finite)
105
- });
106
- const TestRunnerCapabilitiesSchema = S.Struct({ reloadEnvironment: S.Boolean });
107
- var TestRunnerFailed = class extends S.TaggedError()("TestRunnerFailed", {
108
- cause: S.String,
109
- phase: S.Literals([
110
- "capabilities",
111
- "dispose",
112
- "dryRun",
113
- "init",
114
- "mutantRun"
115
- ]),
116
- runnerName: S.String
117
- }) {};
118
- //#endregion
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 };
@@ -1,8 +0,0 @@
1
- import * as Effect from "effect/Effect";
2
- import * as FileSystem from "effect/FileSystem";
3
- import * as Path from "effect/Path";
4
- import { PlatformError } from "effect/PlatformError";
5
- //#region src/output-file.d.ts
6
- declare const writeOutputFile: (fs: FileSystem.FileSystem, path: Path.Path, fileName: string, content: string) => Effect.Effect<void, PlatformError, never>;
7
- //#endregion
8
- export { writeOutputFile };
@@ -1,8 +0,0 @@
1
- import * as Effect from "effect/Effect";
2
- //#region src/output-file.ts
3
- const writeOutputFile = (fs, path, fileName, content) => Effect.gen(function* () {
4
- yield* fs.makeDirectory(path.dirname(fileName), { recursive: true });
5
- yield* fs.writeFileString(fileName, content);
6
- });
7
- //#endregion
8
- export { writeOutputFile };
@@ -1,16 +0,0 @@
1
- import { c as RunConfiguration } from "./Plugin-BtItMchw.mjs";
2
- //#region src/provided-options.d.ts
3
- /**
4
- * The run's options exactly as the `RunConfiguration` service hands them over.
5
- *
6
- * Derived from the service rather than restated, because the two are not
7
- * interchangeable under `exactOptionalPropertyTypes`: reading a service widens
8
- * every optional property to include `undefined`, so the yielded value is not
9
- * assignable to the `StrykerOptions` the schema declares even though it is the
10
- * same data. Taking the type from its producer keeps them in step — a field
11
- * added to the options reaches this alias with no edit, and no assertion is
12
- * needed at the call site.
13
- */
14
- type ProvidedStrykerOptions = RunConfiguration['Service'];
15
- //#endregion
16
- export { ProvidedStrykerOptions };
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __defProp = Object.defineProperty;
3
- var __exportAll = (all, no_symbols) => {
4
- let target = {};
5
- for (var name in all) __defProp(target, name, {
6
- get: all[name],
7
- enumerable: true
8
- });
9
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
- return target;
11
- };
12
- //#endregion
13
- export { __exportAll as t };