@systemfsoftware/stryker-js 10.1.0 → 10.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ import * as Predicate from "effect/Predicate";
2
+ import * as Record from "effect/Record";
3
+ //#region src/config/merge-config.ts
4
+ const usable = (value, key) => key !== "__proto__" && value !== void 0;
5
+ const isConfigRecord = (value) => Predicate.isObject(value);
6
+ const copyRecord = (source) => Record.filter(source, usable);
7
+ const mergeNested = (base, override) => isConfigRecord(override) ? mergeRecords(base, override) : override;
8
+ const mergeKeyInto = (merged, key, override) => {
9
+ const base = merged[key];
10
+ merged[key] = isConfigRecord(base) ? mergeNested(base, override) : override;
11
+ };
12
+ const mergeRecords = (base, overrides) => {
13
+ const merged = copyRecord(base);
14
+ for (const [key, override] of Object.entries(Record.filter(overrides, usable))) mergeKeyInto(merged, key, override);
15
+ return merged;
16
+ };
17
+ const mergeConfig = (defaults, overrides) => mergeRecords(defaults, overrides);
18
+ //#endregion
19
+ export { mergeConfig as t };
@@ -1,6 +1,6 @@
1
- import { B as ReporterFactory, Ct as RunMutantResult, K as StrykerOptions, P as PartialStrykerOptions, W as ReporterRpcs, X as TestResult, _ as ExitClass, at as WorkerPluginKind, ct as FileDescription, ft as Mutant, j as MutationTestResult, l as CompleteDryRunResult, lt as FileDescriptions, st as CoverageData, yt as MutateDescription } from "./index-BopuZXrl.mjs";
1
+ import { B as ReporterFactory, Ct as RunMutantResult, K as StrykerOptions, P as PartialStrykerOptions, W as ReporterRpcs, X as TestResult, _ as ExitClass, at as WorkerPluginKind, ct as FileDescription, ft as Mutant, j as MutationTestResult, l as CompleteDryRunResult, lt as FileDescriptions, st as CoverageData, yt as MutateDescription } from "./index-CogNSD0V.mjs";
2
2
  import { r as ResolvedMode } from "./output-mode-CfGHDpi5.mjs";
3
- import { _ as RunStarted, c as PhaseEntered, i as HelpRendered, l as PlanKnown, m as RunMutantTested, p as RunFailed, r as Heartbeat, x as VerdictReached } from "./Run.schema-RWUb38ZE.mjs";
3
+ import { _ as RunStarted, c as PhaseEntered, i as HelpRendered, l as PlanKnown, m as RunMutantTested, p as RunFailed, r as Heartbeat, x as VerdictReached } from "./Run.schema-BsSOfQnD.mjs";
4
4
  import * as Effect$1 from "effect/Effect";
5
5
  import * as FileSystem from "effect/FileSystem";
6
6
  import * as Path from "effect/Path";
@@ -18,15 +18,33 @@ import * as RpcGroup from "effect/unstable/rpc/RpcGroup";
18
18
  import * as Scope from "effect/Scope";
19
19
  import * as EffectDuration from "effect/Duration";
20
20
  import * as MutableHashMap from "effect/MutableHashMap";
21
+ import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner";
21
22
  import * as MutableHashSet from "effect/MutableHashSet";
22
23
  import * as HashMap from "effect/HashMap";
23
24
  import * as Cause from "effect/Cause";
24
- import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner";
25
25
  import * as RpcClient from "effect/unstable/rpc/RpcClient";
26
26
  import * as Schedule from "effect/Schedule";
27
27
  import { PlatformError } from "effect/PlatformError";
28
28
  import { RpcClientError } from "effect/unstable/rpc/RpcClientError";
29
29
  import * as Socket from "effect/unstable/socket/Socket";
30
+ //#region src/RunEvents.d.ts
31
+ declare const RunEvents_base: Context.ServiceClass<RunEvents, "@systemfsoftware/stryker-js/RunEvents", Queue.Queue<Heartbeat | HelpRendered | PhaseEntered | PlanKnown | RunFailed | RunMutantTested | RunStarted | VerdictReached, Cause.Done<void>>>;
32
+ declare class RunEvents extends RunEvents_base {}
33
+ interface RunIdentityShape {
34
+ readonly runId: string;
35
+ readonly basePath: string;
36
+ }
37
+ declare const RunIdentity_base: Context.ServiceClass<RunIdentity, "@systemfsoftware/stryker-js/RunEvents/RunIdentity", RunIdentityShape>;
38
+ declare class RunIdentity extends RunIdentity_base {}
39
+ //#endregion
40
+ //#region src/Mutants.d.ts
41
+ interface TestCoverage {
42
+ readonly testsByMutantId: MutableHashMap.MutableHashMap<string, MutableHashSet.MutableHashSet<TestResult>>;
43
+ readonly testsById: MutableHashMap.MutableHashMap<string, TestResult>;
44
+ readonly staticCoverage: CoverageData | undefined;
45
+ readonly hitsByMutantId: MutableHashMap.MutableHashMap<string, number>;
46
+ }
47
+ //#endregion
30
48
  //#region src/Worker.schema.d.ts
31
49
  declare const ChildProcessCrashedError_base: Schema.Class<ChildProcessCrashedError, Schema.TaggedStruct<"ChildProcessCrashedError", {
32
50
  readonly pid: Schema.Int;
@@ -59,6 +77,14 @@ declare class WorkerBootTimeoutError extends WorkerBootTimeoutError_base {
59
77
  readonly exitClass: 'InternalError';
60
78
  }
61
79
  //#endregion
80
+ //#region src/Worker.d.ts
81
+ interface IdGeneratorShape {
82
+ readonly next: Effect$1.Effect<number>;
83
+ }
84
+ declare const IdGenerator_base: Context.ServiceClass<IdGenerator, "@systemfsoftware/stryker-js/Worker/IdGenerator", IdGeneratorShape>;
85
+ declare class IdGenerator extends IdGenerator_base {}
86
+ declare const classifyWorkerExit: (pid: number, exitCode: number) => ChildProcessCrashedError | OutOfMemoryError;
87
+ //#endregion
62
88
  //#region src/WorkerLauncher.d.ts
63
89
  declare const connectRetry: Schedule.Schedule<import("effect/Duration").Duration, unknown, never, never>;
64
90
  type WorkerExit = ChildProcessCrashedError | OutOfMemoryError;
@@ -86,32 +112,6 @@ interface WorkerClientParams<Rpcs extends Rpc.Any> extends WorkerSpawnParams {
86
112
  }
87
113
  declare const makeWorkerClient: <Rpcs extends Rpc.Any>(params: WorkerClientParams<Rpcs>) => Effect$1.Effect<RpcClient.RpcClient<Rpcs, RpcClientError>, WorkerBootError, Scope.Scope | WorkerLauncher>;
88
114
  //#endregion
89
- //#region src/RunEvents.d.ts
90
- declare const RunEvents_base: Context.ServiceClass<RunEvents, "@systemfsoftware/stryker-js/RunEvents", Queue.Queue<Heartbeat | HelpRendered | PhaseEntered | PlanKnown | RunFailed | RunMutantTested | RunStarted | VerdictReached, Cause.Done<void>>>;
91
- declare class RunEvents extends RunEvents_base {}
92
- interface RunIdentityShape {
93
- readonly runId: string;
94
- readonly basePath: string;
95
- }
96
- declare const RunIdentity_base: Context.ServiceClass<RunIdentity, "@systemfsoftware/stryker-js/RunEvents/RunIdentity", RunIdentityShape>;
97
- declare class RunIdentity extends RunIdentity_base {}
98
- //#endregion
99
- //#region src/Mutants.d.ts
100
- interface TestCoverage {
101
- readonly testsByMutantId: MutableHashMap.MutableHashMap<string, MutableHashSet.MutableHashSet<TestResult>>;
102
- readonly testsById: MutableHashMap.MutableHashMap<string, TestResult>;
103
- readonly staticCoverage: CoverageData | undefined;
104
- readonly hitsByMutantId: MutableHashMap.MutableHashMap<string, number>;
105
- }
106
- //#endregion
107
- //#region src/Worker.d.ts
108
- interface IdGeneratorShape {
109
- readonly next: Effect$1.Effect<number>;
110
- }
111
- declare const IdGenerator_base: Context.ServiceClass<IdGenerator, "@systemfsoftware/stryker-js/Worker/IdGenerator", IdGeneratorShape>;
112
- declare class IdGenerator extends IdGenerator_base {}
113
- declare const classifyWorkerExit: (pid: number, exitCode: number) => ChildProcessCrashedError | OutOfMemoryError;
114
- //#endregion
115
115
  //#region ../ignorers/interface/dist/index.d.ts
116
116
  declare interface AccessorProperty$1 extends Span$1 {
117
117
  type: AccessorPropertyType;
@@ -1447,8 +1447,8 @@ interface EvaluatorPluginSource {
1447
1447
  }
1448
1448
  type AnyWorkerPluginSource = { [K in WorkerPluginKind]: WorkerPluginSource<K>; }[WorkerPluginKind];
1449
1449
  type PluginSource = AnyWorkerPluginSource | EvaluatorPluginSource;
1450
- interface LoadedPlugins {
1451
- readonly schemaContributions: readonly Record<string, unknown>[];
1450
+ interface LoadedPlugins<A = unknown> {
1451
+ readonly schemaContributions: readonly Record<string, A>[];
1452
1452
  readonly pluginsByKind: HashMap.HashMap<PluginKind, readonly PluginDescriptor[]>;
1453
1453
  readonly pluginModulePaths: readonly string[];
1454
1454
  readonly pluginSources: readonly PluginSource[];
@@ -1754,4 +1754,4 @@ interface MutationTestDone {
1754
1754
  readonly verdict: ExitClass | null;
1755
1755
  }
1756
1756
  //#endregion
1757
- export { PluginKind as $, ExtendsStepDocument as A, MergeResult as B, ConfigError as C, ConfigFileUnsupportedError as D, ConfigFileUnreadableError as E, ExtendsStepResolve as F, AnyPluginDescriptor as G, extendsPropertySchema as H, ExtendsStepState as I, EvaluatorPluginDescriptor as J, AnyWorkerPluginDescriptor as K, ExtendsStepStateSchema as L, ExtendsStepDone as M, ExtendsStepRead as N, ExtendsRefusalReason as O, ExtendsStepRefused as P, PluginDescriptorOf as Q, ImportedModuleSchema as R, ConfigDocumentSchema as S, WorkerBootTimeoutError as St, ConfigFileNotFoundError as T, forkOptionsSchema as U, ReadConfigCommand as V, survivorsPriorReport as W, LoadedPlugins as X, EvaluatorPluginSource as Y, PluginDescriptor as Z, ReporterStage as _, WorkerSpawnParams as _t, WiredRunLayer as a, IdGeneratorShape as at, reporterWorkerFactory as b, ChildProcessCrashedError as bt, PrepareDone as c, RunEvents as ct, RunEnvironmentShape as d, SpawnedSocketWorker as dt, PluginSource as et, SandboxHandle as f, WorkerBootError as ft, REPORTER_EVENT_BATCH_BOUND as g, WorkerLauncherShape as gt, ProjectFile as h, WorkerLauncher as ht, StageServices as i, IdGenerator as it, ExtendsStepDocumentSchema as j, ExtendsStepDecision as k, PrepareExecutorArgs as l, RunIdentity as lt, Project as m, WorkerExit as mt, EnginePorts as n, WorkerPluginSource as nt, DryRunDone as o, classifyWorkerExit as ot, StrykerError as p, WorkerClientParams as pt, AnyWorkerPluginSource as q, RunStageServices as r, Ignorer as rt, InstrumentDone as s, TestCoverage as st, MutationTestDone as t, WorkerPluginDescriptor as tt, RunEnvironment as u, RunIdentityShape as ut, ReporterWorkerClient as v, connectRetry as vt, ConfigFileInvalidError as w, spawnReporterWorker as x, OutOfMemoryError as xt, SpawnReporterWorkerParams as y, makeWorkerClient as yt, MergeCommand as z };
1757
+ export { PluginKind as $, ExtendsStepDocument as A, MergeResult as B, ConfigError as C, ConfigFileUnsupportedError as D, ConfigFileUnreadableError as E, ExtendsStepResolve as F, AnyPluginDescriptor as G, extendsPropertySchema as H, ExtendsStepState as I, EvaluatorPluginDescriptor as J, AnyWorkerPluginDescriptor as K, ExtendsStepStateSchema as L, ExtendsStepDone as M, ExtendsStepRead as N, ExtendsRefusalReason as O, ExtendsStepRefused as P, PluginDescriptorOf as Q, ImportedModuleSchema as R, ConfigDocumentSchema as S, RunIdentityShape as St, ConfigFileNotFoundError as T, forkOptionsSchema as U, ReadConfigCommand as V, survivorsPriorReport as W, LoadedPlugins as X, EvaluatorPluginSource as Y, PluginDescriptor as Z, ReporterStage as _, OutOfMemoryError as _t, WiredRunLayer as a, WorkerBootError as at, reporterWorkerFactory as b, RunEvents as bt, PrepareDone as c, WorkerLauncher as ct, RunEnvironmentShape as d, connectRetry as dt, PluginSource as et, SandboxHandle as f, makeWorkerClient as ft, REPORTER_EVENT_BATCH_BOUND as g, ChildProcessCrashedError as gt, ProjectFile as h, classifyWorkerExit as ht, StageServices as i, SpawnedSocketWorker as it, ExtendsStepDocumentSchema as j, ExtendsStepDecision as k, PrepareExecutorArgs as l, WorkerLauncherShape as lt, Project as m, IdGeneratorShape as mt, EnginePorts as n, WorkerPluginSource as nt, DryRunDone as o, WorkerClientParams as ot, StrykerError as p, IdGenerator as pt, AnyWorkerPluginSource as q, RunStageServices as r, Ignorer as rt, InstrumentDone as s, WorkerExit as st, MutationTestDone as t, WorkerPluginDescriptor as tt, RunEnvironment as u, WorkerSpawnParams as ut, ReporterWorkerClient as v, WorkerBootTimeoutError as vt, ConfigFileInvalidError as w, spawnReporterWorker as x, RunIdentity as xt, SpawnReporterWorkerParams as y, TestCoverage as yt, MergeCommand as z };
@@ -1,5 +1,5 @@
1
- import { P as PartialStrykerOptions } from "./index-BopuZXrl.mjs";
2
- import { t as MutationTestDone } from "./mutation-test.cell-CobzlfL-.mjs";
1
+ import { P as PartialStrykerOptions } from "./index-CogNSD0V.mjs";
2
+ import { t as MutationTestDone } from "./mutation-test.cell-DS86DvC9.mjs";
3
3
  //#region src/promises/index.d.ts
4
4
  export declare const run: (options: PartialStrykerOptions, targetMutatePatterns?: readonly string[]) => Promise<MutationTestDone>;
5
5
  //#endregion
package/dist/promises.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as strykerCell } from "./src-Baq6uz-6.mjs";
1
+ import { t as strykerCell } from "./src-BkTsNvl0.mjs";
2
2
  import * as Layer from "effect/Layer";
3
3
  import * as NodeFileSystem from "@effect/platform-node-shared/NodeFileSystem";
4
4
  import * as NodePath from "@effect/platform-node-shared/NodePath";