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