@systemfsoftware/stryker-js-typescript-checker 8.0.1 → 8.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,102 @@
1
+ import { Handle, Workflow } from "@systemfsoftware/effect-cell-types";
2
+ import { Source } from "@systemfsoftware/stryker-js-instrumenter";
3
+ import { Checker, Options } from "@systemfsoftware/stryker-js-plugin-interface";
4
+ import * as Context from "effect/Context";
5
+ import * as Effect from "effect/Effect";
6
+ import * as FileSystem$1 from "effect/FileSystem";
7
+ import * as HashMap from "effect/HashMap";
8
+ import * as Layer from "effect/Layer";
9
+ import * as Option from "effect/Option";
10
+ import * as Path from "effect/Path";
11
+ import "effect/Schema";
12
+ import * as HashSet from "effect/HashSet";
13
+ import * as SynchronizedRef from "effect/SynchronizedRef";
14
+ import { API, Snapshot } from "typescript/unstable/async";
15
+ import { Schema } from "effect";
16
+ import * as DateTime from "effect/DateTime";
17
+ import * as Cause from "effect/Cause";
18
+ import { FileSystem } from "typescript/unstable/fs";
19
+ //#region src/CheckMutants.schema.d.ts
20
+ interface NodeDecodedShape {
21
+ readonly fileName: string;
22
+ readonly parents: readonly NodeDecodedShape[];
23
+ readonly children: readonly NodeDecodedShape[];
24
+ }
25
+ //#endregion
26
+ //#region src/ts-files.handle.d.ts
27
+ declare const TypeId$1: unique symbol;
28
+ type TypeId$1 = typeof TypeId$1;
29
+ interface ScriptFile {
30
+ readonly fileName: string;
31
+ readonly originalContent: string;
32
+ readonly content: string;
33
+ readonly modifiedTime: DateTime.Utc;
34
+ readonly lineStarts: Source.LineStarts;
35
+ }
36
+ interface TSFilesSources {
37
+ readonly files: HashMap.HashMap<string, Option.Option<ScriptFile>>;
38
+ readonly overrides: HashMap.HashMap<string, string>;
39
+ }
40
+ interface SynchronousSnapshot {
41
+ current: TSFilesSources;
42
+ }
43
+ interface TSFilesState {
44
+ readonly host: FileSystem$1.FileSystem;
45
+ readonly snapshot: SynchronousSnapshot;
46
+ }
47
+ declare const TSFiles: Handle.Definition<typeof TypeId$1, object, TSFilesState, never>;
48
+ type TSFiles = Handle.Of<typeof TSFiles>;
49
+ //#endregion
50
+ //#region src/ts-compiler.handle.d.ts
51
+ declare const TypeId: unique symbol;
52
+ type TypeId = typeof TypeId;
53
+ type FileNode = NodeDecodedShape;
54
+ type GraphNodes = HashMap.HashMap<string, FileNode>;
55
+ interface SourceFileEntry {
56
+ readonly fileName: string;
57
+ readonly imports: HashSet.HashSet<string>;
58
+ }
59
+ type SourceFiles = HashMap.HashMap<string, SourceFileEntry>;
60
+ interface CompilerState {
61
+ readonly api: API | undefined;
62
+ readonly snapshot: Snapshot | undefined;
63
+ readonly sourceFiles: SourceFiles;
64
+ readonly nodes: GraphNodes;
65
+ readonly lastMutants: ReadonlyArray<Checker.CheckerMutantWire>;
66
+ readonly lastMutatedFileNames: ReadonlyArray<string>;
67
+ readonly allTSConfigFiles: HashSet.HashSet<string>;
68
+ readonly aliases: ReadonlyArray<PathAlias>;
69
+ readonly tsconfigFile: string;
70
+ }
71
+ interface TSCompilerRuntime {
72
+ readonly options: Options.StrykerOptions;
73
+ readonly host: FileSystem$1.FileSystem;
74
+ readonly pathService: Path.Path;
75
+ readonly files: TSFiles;
76
+ readonly sourceFileSystem: FileSystem;
77
+ readonly state: SynchronizedRef.SynchronizedRef<CompilerState>;
78
+ }
79
+ declare const TSCompiler: Handle.Definition<typeof TypeId, object, TSCompilerRuntime, never>;
80
+ type TSCompiler = Handle.Of<typeof TSCompiler>;
81
+ interface PathAlias {
82
+ readonly pattern: string;
83
+ readonly targets: ReadonlyArray<string>;
84
+ readonly baseDir: string;
85
+ }
86
+ export declare const nodes: (self: Handle.Handle<typeof TypeId, object, TSCompilerRuntime, never>) => Effect.Effect<GraphNodes, never, never>;
87
+ //#endregion
88
+ //#region src/ts-compiler.service.d.ts
89
+ interface TypeScriptCompilerShape extends TSCompiler {}
90
+ declare const TypeScriptCompiler_base: Context.ServiceClass<TypeScriptCompiler, "@systemfsoftware/stryker-js-typescript-checker/ts-compiler.service/TypeScriptCompiler", TypeScriptCompilerShape>;
91
+ export declare class TypeScriptCompiler extends TypeScriptCompiler_base {}
92
+ //#endregion
93
+ //#region src/CheckerRuntime.service.d.ts
94
+ interface CheckerRuntimeShape {
95
+ readonly checker: Effect.Effect<Checker.Checker['Service'], Cause.Cause<Checker.CheckerFailed>>;
96
+ }
97
+ declare const CheckerRuntime_base: Context.ServiceClass<CheckerRuntime, "@systemfsoftware/stryker-js-typescript-checker/CheckerRuntime.service/CheckerRuntime", CheckerRuntimeShape>;
98
+ export declare class CheckerRuntime extends CheckerRuntime_base {
99
+ static readonly layer: (options: Options.StrykerOptions) => Layer.Layer<CheckerRuntime | TypeScriptCompiler, never, FileSystem$1.FileSystem | Path.Path>;
100
+ }
101
+ //#endregion
102
+ export type { CheckerRuntimeShape };