@systemfsoftware/stryker-js 0.1.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 (47) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/LICENSE +213 -0
  3. package/README.md +32 -0
  4. package/dist/Checker-Bq8NXD8d.mjs +25 -0
  5. package/dist/Checker-DYgIIEai.d.mts +40 -0
  6. package/dist/Checker.d.mts +2 -0
  7. package/dist/Checker.mjs +2 -0
  8. package/dist/Evaluator-DLVXUcVj.d.mts +19 -0
  9. package/dist/Evaluator.d.mts +3 -0
  10. package/dist/Evaluator.mjs +9 -0
  11. package/dist/ExitClass.d.mts +8 -0
  12. package/dist/ExitClass.mjs +34 -0
  13. package/dist/ExitClass.schema-BmCUn2Sm.d.mts +6 -0
  14. package/dist/Ignorer-BUY68FZQ.d.mts +21 -0
  15. package/dist/Ignorer.d.mts +2 -0
  16. package/dist/Ignorer.mjs +7 -0
  17. package/dist/Mutant-BPRJTF8f.d.mts +351 -0
  18. package/dist/Mutant.d.mts +2 -0
  19. package/dist/Mutant.mjs +114 -0
  20. package/dist/Mutant.schema-BTWhFTk4.mjs +34 -0
  21. package/dist/Plugin-Ceh1G8Dz.mjs +117 -0
  22. package/dist/Plugin-ZYNaWrl7.d.mts +134 -0
  23. package/dist/Plugin.d.mts +2 -0
  24. package/dist/Plugin.mjs +2 -0
  25. package/dist/Reporter-COVWW1my.mjs +33 -0
  26. package/dist/Reporter-eZ3M7lO6.d.mts +83 -0
  27. package/dist/Reporter.d.mts +2 -0
  28. package/dist/Reporter.mjs +2 -0
  29. package/dist/Run-BudLsVwF.d.mts +183 -0
  30. package/dist/Run-lXratlN7.mjs +225 -0
  31. package/dist/Run.d.mts +2 -0
  32. package/dist/Run.mjs +2 -0
  33. package/dist/Schema-C7nahULg.mjs +249 -0
  34. package/dist/Schema-Df2kA6F7.d.mts +159 -0
  35. package/dist/Schema.d.mts +2 -0
  36. package/dist/Schema.mjs +2 -0
  37. package/dist/TestRunner-DC9U8Unb.mjs +181 -0
  38. package/dist/TestRunner.d.mts +2 -0
  39. package/dist/TestRunner.mjs +2 -0
  40. package/dist/index.d.mts +8 -0
  41. package/dist/index.mjs +9 -0
  42. package/dist/output-file.d.mts +8 -0
  43. package/dist/output-file.mjs +8 -0
  44. package/dist/provided-options.d.mts +16 -0
  45. package/dist/provided-options.mjs +1 -0
  46. package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
  47. package/package.json +70 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,126 @@
1
+ # @systemfsoftware/stryker-js
2
+
3
+ ## 0.1.0
4
+
5
+ ### Major Changes
6
+
7
+ - Three packages are renamed. `plugin-api` is now `@systemfsoftware/stryker-js`, the
8
+ language every plugin is written against. `mutation-run` is now
9
+ `@systemfsoftware/stryker-js-platform-node`, the Node host that runs a mutation
10
+ test. `mutation-report` is now `@systemfsoftware/stryker-js-html-reporter`.
11
+ Install the new names and change your imports.
12
+
13
+ Options types moved. `StrykerOptions`, `PartialStrykerOptions` and `LogLevel` are
14
+ imported from the `Schema` export; `Mutant`, `MutantStatus`, `Position` and
15
+ `Location` from the `Mutant` export. Point a config's `extends` at the language
16
+ package's `Schema` export.
17
+
18
+ `MutantStatus` accepts one spelling per outcome: `Killed`, `Survived`,
19
+ `NoCoverage`, `Timeout`, `CompileError`, `RuntimeError`, `Ignored` and `Pending`.
20
+ The lowercase and abbreviated forms — `killed`, `timedOut`, `noCoverage` and the
21
+ rest — are gone. A comparison against a removed spelling never matched the value
22
+ the reporter actually produced, so check any status comparison you wrote.
23
+
24
+ Statuses, plugin kinds, exit classes and AST formats are string literal unions
25
+ rather than enums, so read them as their string values. Member access such as
26
+ `ExitClass.VerdictFail` no longer resolves.
27
+
28
+ A plugin no longer receives a logger, and the logger port is gone. Plugins log
29
+ through Effect, and the host decides where that output goes.
30
+
31
+ The bundled base preset is gone. A config inherits from the language package's
32
+ `Schema` export and states the thresholds, reporters and plugins it wants; you no
33
+ longer silently inherit a package manager, a plugin list or a break threshold.
34
+
35
+ - An evaluator now answers with the verdict it reached instead of failing to
36
+ report one.
37
+
38
+ `Evaluator.evaluate` returns `ExitClass | null` on the success channel: the
39
+ class the run should end in, or `null` for nothing to report. `ExitClass` is
40
+ exported from `@systemfsoftware/stryker-js/evaluate`. The error
41
+ channel is for the evaluator itself breaking — a report it cannot read, a
42
+ decision it cannot reach.
43
+
44
+ Previously the only way to report a failed gate was to fail, which a caller
45
+ could not tell apart from the evaluator crashing, so neither the exit code nor
46
+ the message could distinguish them. If you wrote an evaluator that failed to
47
+ signal a verdict, return the class instead.
48
+
49
+ A run's verdict is now the most severe class anyone reported — the score against
50
+ your `break` threshold, plus every evaluator's answer.
51
+
52
+ - Plugins are written against Effect instead of Promise.
53
+
54
+ `Checker`, `TestRunner`, `Reporter`, `Ignorer` and `Evaluator` are capability services whose operations return an `Effect`. Provide your plugin as a `Layer` through `declarePlugin`; the class, factory and value declarations are gone, along with the `typed-inject` dependency. Implement the operations that were optional — return `Effect.void` where there is nothing to do, and one group per mutant from `group` if you have no grouping opinion.
55
+
56
+ Each capability fails with a tagged error. Outcomes are not failures: a killed mutant, a survivor and a compile error in the code under test are successful results.
57
+
58
+ Read the sandbox path from `SandboxDirectory`. `commonTokens`, `tokens` and the plugin context types are removed. `determineHitLimitReached` returns an `Option`.
59
+
60
+ ### Minor Changes
61
+
62
+ - `RENDERED_OPTION_DEFAULTS` is exported from the `core` entry point. It carries
63
+ the four option defaults that appear in human-readable help text, so a tool
64
+ printing "the default is X" reads the same value the option schema applies
65
+ instead of restating it.
66
+
67
+ - The shared helpers package is gone. Nothing installs it any more, and the
68
+ handful of helpers worth sharing now live in the plugin contract next to the
69
+ types they serve:
70
+
71
+ - `strykerReportBugUrl`, `normalizeFileName`, `propertyPath`, `errorToString`
72
+ and `isErrnoException` from `@systemfsoftware/stryker-js/core`
73
+ - `noopLogger` from `@systemfsoftware/stryker-js/logging`
74
+ - `testFilesProvided` from `@systemfsoftware/stryker-js/test-runner`
75
+
76
+ If you imported any of those, change the specifier. Everything else it exported
77
+ had no consumer and is removed: use `Predicate.isNotNullish` from Effect in place
78
+ of `notEmpty`, and `RegExp.escape` in place of `escapeRegExp`.
79
+
80
+ - Checker and test-runner workers now talk over Effect's own worker RPC, and every
81
+ call they exchange is a declared operation with a declared result.
82
+
83
+ Before, the parent and its workers spoke a protocol written by hand: messages were
84
+ newline-delimited JSON, arguments were typed as "any JSON value", and each method
85
+ was reached by name through a proxy. Nothing checked that a payload was one the far
86
+ end could serve, so a value it could not read was refused after it arrived, and a
87
+ call whose message never landed was waited on anyway.
88
+
89
+ The six operations that cross that boundary — a checker's `check` and `group`, a
90
+ runner's `capabilities`, `dryRun` and `mutantRun` — now each name what they take
91
+ and what they return, and the options a worker starts from are sent once when it
92
+ starts rather than as a first method call. A payload that does not fit is refused
93
+ where it is built, and a worker that cannot answer fails the call that was waiting.
94
+
95
+ The two worker entry points are no longer importable subpaths of this package.
96
+ They were only ever spawned as processes, and the paths resolved to TypeScript
97
+ sources that could not be executed.
98
+
99
+ ### Patch Changes
100
+
101
+ - New version is published through npm trusted publishing, so it carries a provenance attestation you can verify.
102
+
103
+ - An oversized message between the runner and a worker now fails the run with a
104
+ reason instead of exhausting memory. Each side of the connection reads frames
105
+ up to 16 MiB, which leaves headroom over the largest legitimate payload — a dry
106
+ run carrying per-test coverage — and a frame past the limit fails the calls
107
+ waiting on it rather than growing until the process dies.
108
+
109
+ - Each of these packages now has a README, so its registry page says what the package is, how
110
+ to install it, and what to import or register — previously the page was blank. The lint
111
+ plugins show the configuration line that enables what they recommend.
112
+
113
+ `@systemfsoftware/stryker-js-html-reporter` also carries its licence text
114
+
115
+ - These packages no longer install dependencies they never imported, so installing them pulls less into your tree.
116
+
117
+ `tslib` is gone from all six. The mutation runner additionally stops installing `lodash.groupby`, `semver` and `source-map`, and the command line interface stops installing `@effect/platform-node-shared`. Nothing exported changes.
118
+
119
+ - Published packages no longer carry build artifacts left over from earlier builds. One package was shipping about a megabyte of bundled test-runner internals this way.
120
+
121
+ - The closing verdict line carries its findings again. It had shrunk to the score alone, so a consumer reading the stream could no longer see the score limits the run was held to, where the report was written, or which mutants survived — the survivors were reported while the run was in flight and then absent from the summary that closes it.
122
+
123
+ The verdict now states the thresholds, the report path, and every surviving mutant with its file, position, mutator and replacement.
124
+
125
+ - Updated dependencies:
126
+ - @systemfsoftware/effect-cell-types@5.0.0
package/LICENSE ADDED
@@ -0,0 +1,213 @@
1
+ Copyright (c) 2026 Ryan Lee (systemfsoftware)
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright 2026 Ryan Lee (systemfsoftware)
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
204
+
205
+
206
+ ----------------------------------------------------------------------
207
+ Third-party notices
208
+
209
+ Portions of this software are derived from @stryker-mutator/vitest-runner
210
+ v9.6.1 (upstream commit e1abfbe), part of StrykerJS
211
+ (https://github.com/stryker-mutator/stryker-js), which is licensed under the
212
+ Apache License, Version 2.0 — the same license this package is distributed
213
+ under. The derived files have been modified.
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @systemfsoftware/stryker-js
2
+
3
+ The mutation-testing language — the plugin kinds, capability ports, and schemas
4
+ a mutation run is built from, with no platform. The Node host that runs a
5
+ mutation test lives in `@systemfsoftware/stryker-js-platform-node`.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ pnpm add @systemfsoftware/stryker-js
11
+ ```
12
+
13
+ ## Entry points
14
+
15
+ Each concept module is an enumerated specifier:
16
+
17
+ - `@systemfsoftware/stryker-js/Checker`
18
+ - `@systemfsoftware/stryker-js/Evaluator`
19
+ - `@systemfsoftware/stryker-js/ExitClass`
20
+ - `@systemfsoftware/stryker-js/Ignorer`
21
+ - `@systemfsoftware/stryker-js/Mutant`
22
+ - `@systemfsoftware/stryker-js/output-file`
23
+ - `@systemfsoftware/stryker-js/Plugin`
24
+ - `@systemfsoftware/stryker-js/provided-options`
25
+ - `@systemfsoftware/stryker-js/Reporter`
26
+ - `@systemfsoftware/stryker-js/Run`
27
+ - `@systemfsoftware/stryker-js/Schema`
28
+ - `@systemfsoftware/stryker-js/TestRunner`
29
+
30
+ ## License
31
+
32
+ Apache-2.0. Part of [systemfsoftware](https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/testing/mutation/stryker-js/stryker-js#readme).
@@ -0,0 +1,25 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
+ import * as Context from "effect/Context";
3
+ import * as S from "effect/Schema";
4
+ //#region src/Checker.schema.ts
5
+ const CheckStatus = S.Literals(["passed", "compileError"]);
6
+ const CheckResultSchema = S.Union([S.Struct({ status: S.Literal("passed") }), S.Struct({
7
+ status: S.Literal("compileError"),
8
+ reason: S.String
9
+ })]);
10
+ var CheckerFailed = class extends S.TaggedError()("CheckerFailed", {
11
+ cause: S.String,
12
+ checkerName: S.String,
13
+ mutantIds: S.Array(S.String)
14
+ }) {};
15
+ //#endregion
16
+ //#region src/Checker.ts
17
+ var Checker_exports = /* @__PURE__ */ __exportAll({
18
+ CheckResultSchema: () => CheckResultSchema,
19
+ CheckStatus: () => CheckStatus,
20
+ Checker: () => Checker,
21
+ CheckerFailed: () => CheckerFailed
22
+ });
23
+ var Checker = class extends Context.Service()("~@systemfsoftware/stryker-js/Checker") {};
24
+ //#endregion
25
+ export { CheckerFailed as a, CheckStatus as i, Checker_exports as n, CheckResultSchema as r, Checker as t };
@@ -0,0 +1,40 @@
1
+ import { _t as Mutant } from "./Mutant-BPRJTF8f.mjs";
2
+ import * as Context from "effect/Context";
3
+ import * as S from "effect/Schema";
4
+ import * as Effect from "effect/Effect";
5
+ import * as HashMap from "effect/HashMap";
6
+ //#region src/Checker.schema.d.ts
7
+ declare const CheckStatus: S.Literals<readonly ["passed", "compileError"]>;
8
+ type CheckStatus = typeof CheckStatus.Type;
9
+ declare const CheckResultSchema: S.Union<readonly [S.Struct<{
10
+ readonly status: S.Literal<"passed">;
11
+ }>, S.Struct<{
12
+ readonly status: S.Literal<"compileError">;
13
+ readonly reason: S.String;
14
+ }>]>;
15
+ declare const CheckerFailed_base: S.Class<CheckerFailed, S.TaggedStruct<"CheckerFailed", {
16
+ readonly cause: S.String;
17
+ readonly checkerName: S.String;
18
+ readonly mutantIds: S.$Array<S.String>;
19
+ }>, import("effect/Cause").YieldableError>;
20
+ declare class CheckerFailed extends CheckerFailed_base {}
21
+ declare namespace Checker_d_exports {
22
+ export { CheckResult, CheckResultSchema, CheckStatus, Checker, CheckerFailed, CheckerService, FailedCheckResult, PassedCheckResult };
23
+ }
24
+ interface FailedCheckResult {
25
+ readonly reason: string;
26
+ readonly status: 'compileError';
27
+ }
28
+ interface PassedCheckResult {
29
+ readonly status: 'passed';
30
+ }
31
+ type CheckResult = FailedCheckResult | PassedCheckResult;
32
+ interface CheckerService {
33
+ readonly init: Effect.Effect<void, CheckerFailed>;
34
+ readonly check: (mutants: readonly Mutant[]) => Effect.Effect<HashMap.HashMap<string, CheckResult>, CheckerFailed>;
35
+ readonly group: (mutants: readonly Mutant[]) => Effect.Effect<readonly (readonly string[])[], CheckerFailed>;
36
+ }
37
+ declare const Checker_base: Context.ServiceClass<Checker, "~@systemfsoftware/stryker-js/Checker", CheckerService>;
38
+ declare class Checker extends Checker_base {}
39
+ //#endregion
40
+ export { FailedCheckResult as a, CheckStatus as c, Checker_d_exports as i, CheckerFailed as l, Checker as n, PassedCheckResult as o, CheckerService as r, CheckResultSchema as s, CheckResult as t };
@@ -0,0 +1,2 @@
1
+ import { a as FailedCheckResult, c as CheckStatus, l as CheckerFailed, n as Checker, o as PassedCheckResult, r as CheckerService, s as CheckResultSchema, t as CheckResult } from "./Checker-DYgIIEai.mjs";
2
+ export { CheckResult, CheckResultSchema, CheckStatus, Checker, CheckerFailed, CheckerService, FailedCheckResult, PassedCheckResult };
@@ -0,0 +1,2 @@
1
+ import { a as CheckerFailed, i as CheckStatus, r as CheckResultSchema, t as Checker } from "./Checker-Bq8NXD8d.mjs";
2
+ export { CheckResultSchema, CheckStatus, Checker, CheckerFailed };
@@ -0,0 +1,19 @@
1
+ import { t as ExitClass } from "./ExitClass.schema-BmCUn2Sm.mjs";
2
+ import * as Context from "effect/Context";
3
+ import * as S from "effect/Schema";
4
+ import * as schema from "mutation-testing-report-schema/api";
5
+ import * as Effect from "effect/Effect";
6
+ //#region src/Evaluator.schema.d.ts
7
+ declare const EvaluatorFailed_base: S.Class<EvaluatorFailed, S.TaggedStruct<"EvaluatorFailed", {
8
+ readonly cause: S.Unknown;
9
+ }>, import("effect/Cause").YieldableError>;
10
+ declare class EvaluatorFailed extends EvaluatorFailed_base {}
11
+ //#endregion
12
+ //#region src/Evaluator.d.ts
13
+ interface EvaluatorService {
14
+ readonly evaluate: (report: schema.MutationTestResult) => Effect.Effect<ExitClass | null, EvaluatorFailed>;
15
+ }
16
+ declare const Evaluator_base: Context.ServiceClass<Evaluator, "~@systemfsoftware/stryker-js/Evaluator", EvaluatorService>;
17
+ declare class Evaluator extends Evaluator_base {}
18
+ //#endregion
19
+ export { EvaluatorService as n, EvaluatorFailed as r, Evaluator as t };
@@ -0,0 +1,3 @@
1
+ import { n as EvaluatorService, r as EvaluatorFailed, t as Evaluator } from "./Evaluator-DLVXUcVj.mjs";
2
+ import { t as ExitClass } from "./ExitClass.schema-BmCUn2Sm.mjs";
3
+ export { Evaluator, EvaluatorFailed, EvaluatorService, type ExitClass };
@@ -0,0 +1,9 @@
1
+ import * as Context from "effect/Context";
2
+ import * as S from "effect/Schema";
3
+ //#region src/Evaluator.schema.ts
4
+ var EvaluatorFailed = class extends S.TaggedError()("EvaluatorFailed", { cause: S.Unknown }) {};
5
+ //#endregion
6
+ //#region src/Evaluator.ts
7
+ var Evaluator = class extends Context.Service()("~@systemfsoftware/stryker-js/Evaluator") {};
8
+ //#endregion
9
+ export { Evaluator, EvaluatorFailed };
@@ -0,0 +1,8 @@
1
+ import { t as ExitClass } from "./ExitClass.schema-BmCUn2Sm.mjs";
2
+ //#region src/ExitClass.d.ts
3
+ declare const EXIT_CODE: Record<ExitClass, number>;
4
+ declare function verdictExitClass(score: number | null, breakingThreshold: number | null): ExitClass | null;
5
+ declare function highestExitClass(pending: Iterable<ExitClass>): ExitClass | null;
6
+ declare function resolveExitCode(pending: Iterable<ExitClass>, signal: number | null): number;
7
+ //#endregion
8
+ export { EXIT_CODE, ExitClass, highestExitClass, resolveExitCode, verdictExitClass };
@@ -0,0 +1,34 @@
1
+ import * as S from "effect/Schema";
2
+ //#region src/ExitClass.schema.ts
3
+ const ExitClass = S.Literals([
4
+ "VerdictFail",
5
+ "ConfigError",
6
+ "RuntimeError",
7
+ "InternalError"
8
+ ]);
9
+ //#endregion
10
+ //#region src/ExitClass.ts
11
+ const EXIT_CODE = {
12
+ VerdictFail: 1,
13
+ ConfigError: 2,
14
+ RuntimeError: 3,
15
+ InternalError: 4
16
+ };
17
+ function verdictExitClass(score, breakingThreshold) {
18
+ if (breakingThreshold === null || score === null) return null;
19
+ if (score < breakingThreshold) return "VerdictFail";
20
+ return null;
21
+ }
22
+ function highestExitClass(pending) {
23
+ let highest = null;
24
+ for (const exitClass of pending) if (highest === null || EXIT_CODE[exitClass] > EXIT_CODE[highest]) highest = exitClass;
25
+ return highest;
26
+ }
27
+ function resolveExitCode(pending, signal) {
28
+ if (signal !== null) return 128 + signal;
29
+ const highest = highestExitClass(pending);
30
+ if (highest === null) return 0;
31
+ return EXIT_CODE[highest];
32
+ }
33
+ //#endregion
34
+ export { EXIT_CODE, ExitClass, highestExitClass, resolveExitCode, verdictExitClass };
@@ -0,0 +1,6 @@
1
+ import * as S from "effect/Schema";
2
+ //#region src/ExitClass.schema.d.ts
3
+ declare const ExitClass: S.Literals<readonly ["VerdictFail", "ConfigError", "RuntimeError", "InternalError"]>;
4
+ type ExitClass = typeof ExitClass.Type;
5
+ //#endregion
6
+ export { ExitClass as t };
@@ -0,0 +1,21 @@
1
+ import * as Context from "effect/Context";
2
+ import * as Option from "effect/Option";
3
+ declare namespace Ignorer_d_exports {
4
+ export { Ignorer, IgnorerService, NodePath };
5
+ }
6
+ interface NodePath {
7
+ readonly node: unknown;
8
+ readonly parentPath?: NodePath | null;
9
+ isObjectExpression(): boolean;
10
+ isCallExpression(): boolean;
11
+ isClassProperty(): boolean;
12
+ isClassPrivateProperty(): boolean;
13
+ isClassAccessorProperty(): boolean;
14
+ }
15
+ interface IgnorerService {
16
+ readonly shouldIgnore: (path: NodePath) => Option.Option<string>;
17
+ }
18
+ declare const Ignorer_base: Context.ServiceClass<Ignorer, "~@systemfsoftware/stryker-js/Ignorer", IgnorerService>;
19
+ declare class Ignorer extends Ignorer_base {}
20
+ //#endregion
21
+ export { NodePath as i, IgnorerService as n, Ignorer_d_exports as r, Ignorer as t };
@@ -0,0 +1,2 @@
1
+ import { i as NodePath, n as IgnorerService, t as Ignorer } from "./Ignorer-BUY68FZQ.mjs";
2
+ export { Ignorer, IgnorerService, NodePath };
@@ -0,0 +1,7 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
+ import * as Context from "effect/Context";
3
+ //#region src/Ignorer.ts
4
+ var Ignorer_exports = /* @__PURE__ */ __exportAll({ Ignorer: () => Ignorer });
5
+ var Ignorer = class extends Context.Service()("~@systemfsoftware/stryker-js/Ignorer") {};
6
+ //#endregion
7
+ export { Ignorer, Ignorer_exports as t };