@dads-framework/testing 0.1.0 → 0.3.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 (144) hide show
  1. package/README.md +72 -10
  2. package/bin/dad-test-import-nx.js +3 -0
  3. package/bin/dad-test-nx.js +3 -0
  4. package/dist/init/init-testing-manifest.js +1 -1
  5. package/dist/init/init-testing-manifest.js.map +1 -1
  6. package/dist/nx/atomic-output.d.ts +9 -0
  7. package/dist/nx/atomic-output.d.ts.map +1 -0
  8. package/dist/nx/atomic-output.js +39 -0
  9. package/dist/nx/atomic-output.js.map +1 -0
  10. package/dist/nx/cli.d.ts +2 -0
  11. package/dist/nx/cli.d.ts.map +1 -0
  12. package/dist/nx/cli.js +21 -0
  13. package/dist/nx/cli.js.map +1 -0
  14. package/dist/nx/dads-identifier.d.ts +11 -0
  15. package/dist/nx/dads-identifier.d.ts.map +1 -0
  16. package/dist/nx/dads-identifier.js +14 -0
  17. package/dist/nx/dads-identifier.js.map +1 -0
  18. package/dist/nx/import-digest.d.ts +12 -0
  19. package/dist/nx/import-digest.d.ts.map +1 -0
  20. package/dist/nx/import-digest.js +69 -0
  21. package/dist/nx/import-digest.js.map +1 -0
  22. package/dist/nx/import-nx-types.d.ts +166 -0
  23. package/dist/nx/import-nx-types.d.ts.map +1 -0
  24. package/dist/nx/import-nx-types.js +2 -0
  25. package/dist/nx/import-nx-types.js.map +1 -0
  26. package/dist/nx/import-nx-workspace.d.ts +7 -0
  27. package/dist/nx/import-nx-workspace.d.ts.map +1 -0
  28. package/dist/nx/import-nx-workspace.js +292 -0
  29. package/dist/nx/import-nx-workspace.js.map +1 -0
  30. package/dist/nx/import-nx.d.ts +12 -0
  31. package/dist/nx/import-nx.d.ts.map +1 -0
  32. package/dist/nx/import-nx.js +12 -0
  33. package/dist/nx/import-nx.js.map +1 -0
  34. package/dist/nx/index.d.ts +4 -0
  35. package/dist/nx/index.d.ts.map +1 -0
  36. package/dist/nx/index.js +4 -0
  37. package/dist/nx/index.js.map +1 -0
  38. package/dist/nx/json-values.d.ts +43 -0
  39. package/dist/nx/json-values.d.ts.map +1 -0
  40. package/dist/nx/json-values.js +76 -0
  41. package/dist/nx/json-values.js.map +1 -0
  42. package/dist/nx/nx-graph-fallback.d.ts +18 -0
  43. package/dist/nx/nx-graph-fallback.d.ts.map +1 -0
  44. package/dist/nx/nx-graph-fallback.js +61 -0
  45. package/dist/nx/nx-graph-fallback.js.map +1 -0
  46. package/dist/nx/nx-installation.d.ts +4 -0
  47. package/dist/nx/nx-installation.d.ts.map +1 -0
  48. package/dist/nx/nx-installation.js +97 -0
  49. package/dist/nx/nx-installation.js.map +1 -0
  50. package/dist/nx/nx-jsonc.d.ts +3 -0
  51. package/dist/nx/nx-jsonc.d.ts.map +1 -0
  52. package/dist/nx/nx-jsonc.js +91 -0
  53. package/dist/nx/nx-jsonc.js.map +1 -0
  54. package/dist/nx/nx-native-cli.d.ts +2 -0
  55. package/dist/nx/nx-native-cli.d.ts.map +1 -0
  56. package/dist/nx/nx-native-cli.js +64 -0
  57. package/dist/nx/nx-native-cli.js.map +1 -0
  58. package/dist/nx/nx-native-graph.d.ts +11 -0
  59. package/dist/nx/nx-native-graph.d.ts.map +1 -0
  60. package/dist/nx/nx-native-graph.js +130 -0
  61. package/dist/nx/nx-native-graph.js.map +1 -0
  62. package/dist/nx/nx-native-input-expansion.d.ts +9 -0
  63. package/dist/nx/nx-native-input-expansion.d.ts.map +1 -0
  64. package/dist/nx/nx-native-input-expansion.js +114 -0
  65. package/dist/nx/nx-native-input-expansion.js.map +1 -0
  66. package/dist/nx/nx-native-inputs.d.ts +9 -0
  67. package/dist/nx/nx-native-inputs.d.ts.map +1 -0
  68. package/dist/nx/nx-native-inputs.js +212 -0
  69. package/dist/nx/nx-native-inputs.js.map +1 -0
  70. package/dist/nx/nx-native-model.d.ts +28 -0
  71. package/dist/nx/nx-native-model.d.ts.map +1 -0
  72. package/dist/nx/nx-native-model.js +119 -0
  73. package/dist/nx/nx-native-model.js.map +1 -0
  74. package/dist/nx/nx-native-process.d.ts +2 -0
  75. package/dist/nx/nx-native-process.d.ts.map +1 -0
  76. package/dist/nx/nx-native-process.js +18 -0
  77. package/dist/nx/nx-native-process.js.map +1 -0
  78. package/dist/nx/nx-native-scope.d.ts +4 -0
  79. package/dist/nx/nx-native-scope.d.ts.map +1 -0
  80. package/dist/nx/nx-native-scope.js +21 -0
  81. package/dist/nx/nx-native-scope.js.map +1 -0
  82. package/dist/nx/nx-native-scratch.d.ts +5 -0
  83. package/dist/nx/nx-native-scratch.d.ts.map +1 -0
  84. package/dist/nx/nx-native-scratch.js +78 -0
  85. package/dist/nx/nx-native-scratch.js.map +1 -0
  86. package/dist/nx/nx-native-workspace.d.ts +16 -0
  87. package/dist/nx/nx-native-workspace.d.ts.map +1 -0
  88. package/dist/nx/nx-native-workspace.js +72 -0
  89. package/dist/nx/nx-native-workspace.js.map +1 -0
  90. package/dist/nx/nx-target-conversion.d.ts +9 -0
  91. package/dist/nx/nx-target-conversion.d.ts.map +1 -0
  92. package/dist/nx/nx-target-conversion.js +284 -0
  93. package/dist/nx/nx-target-conversion.js.map +1 -0
  94. package/dist/nx/nx-workspace-reader.d.ts +42 -0
  95. package/dist/nx/nx-workspace-reader.d.ts.map +1 -0
  96. package/dist/nx/nx-workspace-reader.js +302 -0
  97. package/dist/nx/nx-workspace-reader.js.map +1 -0
  98. package/dist/path-aliases/alias-file-system.d.ts +26 -0
  99. package/dist/path-aliases/alias-file-system.d.ts.map +1 -0
  100. package/dist/path-aliases/alias-file-system.js +16 -0
  101. package/dist/path-aliases/alias-file-system.js.map +1 -0
  102. package/dist/path-aliases/alias-resolver-conformance-cases.d.ts +40 -0
  103. package/dist/path-aliases/alias-resolver-conformance-cases.d.ts.map +1 -0
  104. package/dist/path-aliases/alias-resolver-conformance-cases.js +324 -0
  105. package/dist/path-aliases/alias-resolver-conformance-cases.js.map +1 -0
  106. package/dist/path-aliases/alias-resolver-conformance.d.ts +41 -0
  107. package/dist/path-aliases/alias-resolver-conformance.d.ts.map +1 -0
  108. package/dist/path-aliases/alias-resolver-conformance.js +141 -0
  109. package/dist/path-aliases/alias-resolver-conformance.js.map +1 -0
  110. package/dist/path-aliases/alias-resolver.d.ts +23 -0
  111. package/dist/path-aliases/alias-resolver.d.ts.map +1 -0
  112. package/dist/path-aliases/alias-resolver.js +199 -0
  113. package/dist/path-aliases/alias-resolver.js.map +1 -0
  114. package/dist/path-aliases/in-memory-file-system.d.ts +16 -0
  115. package/dist/path-aliases/in-memory-file-system.d.ts.map +1 -0
  116. package/dist/path-aliases/in-memory-file-system.js +43 -0
  117. package/dist/path-aliases/in-memory-file-system.js.map +1 -0
  118. package/dist/path-aliases/index.d.ts +6 -0
  119. package/dist/path-aliases/index.d.ts.map +1 -0
  120. package/dist/path-aliases/index.js +6 -0
  121. package/dist/path-aliases/index.js.map +1 -0
  122. package/dist/path-aliases/json-with-comments.d.ts +14 -0
  123. package/dist/path-aliases/json-with-comments.d.ts.map +1 -0
  124. package/dist/path-aliases/json-with-comments.js +245 -0
  125. package/dist/path-aliases/json-with-comments.js.map +1 -0
  126. package/dist/path-aliases/node-file-system.d.ts +10 -0
  127. package/dist/path-aliases/node-file-system.d.ts.map +1 -0
  128. package/dist/path-aliases/node-file-system.js +29 -0
  129. package/dist/path-aliases/node-file-system.js.map +1 -0
  130. package/dist/path-aliases/tsconfig-chain.d.ts +40 -0
  131. package/dist/path-aliases/tsconfig-chain.d.ts.map +1 -0
  132. package/dist/path-aliases/tsconfig-chain.js +139 -0
  133. package/dist/path-aliases/tsconfig-chain.js.map +1 -0
  134. package/dist/testing.tsbuildinfo +1 -1
  135. package/dist/vitest/dads-tsconfig-paths.d.ts +17 -0
  136. package/dist/vitest/dads-tsconfig-paths.d.ts.map +1 -0
  137. package/dist/vitest/dads-tsconfig-paths.js +38 -0
  138. package/dist/vitest/dads-tsconfig-paths.js.map +1 -0
  139. package/dist/vitest/index.d.ts +2 -0
  140. package/dist/vitest/index.d.ts.map +1 -0
  141. package/dist/vitest/index.js +2 -0
  142. package/dist/vitest/index.js.map +1 -0
  143. package/nx/README.md +259 -0
  144. package/package.json +35 -8
@@ -0,0 +1,302 @@
1
+ /**
2
+ * Reading an Nx workspace, and nothing more.
3
+ *
4
+ * Everything this module knows about Nx it learned by running Nx's own
5
+ * machine-readable commands against a workspace that is clean and committed,
6
+ * so an import always names the exact tree it read. Nothing here decides what
7
+ * a target becomes; it only turns Nx's JSON into the `Nx*` shapes the rest of
8
+ * the package reasons about, and refuses loudly when Nx answers in a shape
9
+ * this importer does not recognize.
10
+ */
11
+ import { randomUUID } from "node:crypto";
12
+ import { promises as fs } from "node:fs";
13
+ import path from "node:path";
14
+ import { spawn } from "node:child_process";
15
+ import { isRecord, isUnknownArray } from "../parse-guards.js";
16
+ import { dadsIdentifier } from "./dads-identifier.js";
17
+ import { parseNxConfiguration } from "./nx-installation.js";
18
+ import { isJsonRecord, parseJson, readOptionalBoolean, readOptionalString, readOptionalJsonRecord, } from "./json-values.js";
19
+ /** Target fields this importer resolves; every other field is dropped. */
20
+ const carriedTargetFields = ["executor", "options", "continuous"];
21
+ const carriedOptionFields = ["command", "cwd"];
22
+ const executionAffectingFields = [
23
+ "dependsOn",
24
+ "defaultConfiguration",
25
+ "configurations",
26
+ ];
27
+ // --- The source tree -----------------------------------------------------
28
+ /**
29
+ * Refuses any workspace whose HEAD is not exactly the immutable object ID the
30
+ * caller approved. An import records a SHA; a dirty tree would make that
31
+ * record a lie, so the check happens before Nx is asked anything at all.
32
+ */
33
+ export async function requireCleanCommittedWorkspace(workspaceRoot, expectedGitSha, runner) {
34
+ const expected = readApprovedSha(expectedGitSha);
35
+ const status = await runner({
36
+ executable: "git",
37
+ args: ["status", "--porcelain=v1", "--untracked-files=all"],
38
+ cwd: workspaceRoot,
39
+ });
40
+ if (status.stdout.trim() !== "") {
41
+ throw new Error("Refusing Nx import: source workspace has uncommitted or untracked changes.");
42
+ }
43
+ const revision = await runner({
44
+ executable: "git",
45
+ args: ["rev-parse", "--verify", "HEAD"],
46
+ cwd: workspaceRoot,
47
+ });
48
+ const resolved = revision.stdout.trim().toLowerCase();
49
+ if (!/^[0-9a-f]{40,64}$/.test(resolved)) {
50
+ throw new Error("Refusing Nx import: source workspace does not have an immutable Git HEAD SHA.");
51
+ }
52
+ if (resolved !== expected) {
53
+ throw new Error(`Refusing Nx import: expected Git SHA ${expected} does not match clean HEAD ${resolved}.`);
54
+ }
55
+ return { expected, resolved };
56
+ }
57
+ /** The caller's SHA, normalized, or a refusal naming what was wrong with it. */
58
+ function readApprovedSha(expectedGitSha) {
59
+ if (typeof expectedGitSha !== "string") {
60
+ throw new Error("Refusing Nx import: expectedGitSha is required and must be a full Git object ID.");
61
+ }
62
+ const expected = expectedGitSha.trim().toLowerCase();
63
+ if (!/^[0-9a-f]{40,64}$/.test(expected)) {
64
+ throw new Error("Refusing Nx import: expectedGitSha must be a full 40- or 64-character Git object ID.");
65
+ }
66
+ return expected;
67
+ }
68
+ // --- Nx's own answers ----------------------------------------------------
69
+ /** The Node, npm, and Nx versions the import was taken under. */
70
+ export async function readVersions(workspaceRoot, nxExecutable, runner) {
71
+ const [nx, node, npm] = await Promise.all([
72
+ runner({
73
+ executable: process.execPath,
74
+ args: [nxExecutable, "--version"],
75
+ cwd: workspaceRoot,
76
+ }),
77
+ runner({
78
+ executable: process.execPath,
79
+ args: ["--version"],
80
+ cwd: workspaceRoot,
81
+ }),
82
+ runner({ executable: "npm", args: ["--version"], cwd: workspaceRoot }),
83
+ ]);
84
+ return {
85
+ node: node.stdout.trim(),
86
+ npm: npm.stdout.trim(),
87
+ nx: nx.stdout.trim(),
88
+ };
89
+ }
90
+ /** Every project name Nx reports, sorted; `nx-native-graph.ts` has `readNativeProjects` for a collected graph. */
91
+ export async function readProjects(workspaceRoot, nxExecutable, runner) {
92
+ const result = await runNxJson(workspaceRoot, nxExecutable, runner, ["show", "projects", "--json"], "project list");
93
+ if (!Array.isArray(result) ||
94
+ !result.every((entry) => typeof entry === "string")) {
95
+ throw new Error("Unsupported Nx interface: `nx show projects --json` did not return a JSON string array.");
96
+ }
97
+ return [...result].sort();
98
+ }
99
+ /** One project's fully resolved configuration, exactly as Nx reported it; `nx-native-graph.ts` has `readNativeProject` for a graph node. */
100
+ export async function readNxProjectConfiguration(workspaceRoot, nxExecutable, runner, name) {
101
+ return runNxJson(workspaceRoot, nxExecutable, runner, ["show", "project", name, "--json"], `project ${name}`);
102
+ }
103
+ /**
104
+ * The project graph, collected through a uniquely named scratch file that is
105
+ * removed whether or not Nx succeeded, so a failed import leaves nothing
106
+ * behind in someone else's workspace.
107
+ */
108
+ export async function readProjectGraph(workspaceRoot, nxExecutable, runner) {
109
+ const graphName = `.dads.testing.nx-graph.${randomUUID()}.json`;
110
+ const graphPath = path.join(workspaceRoot, graphName);
111
+ try {
112
+ await runner({
113
+ executable: process.execPath,
114
+ args: [nxExecutable, "graph", `--file=${graphName}`, "--open=false"],
115
+ cwd: workspaceRoot,
116
+ });
117
+ const raw = await fs.readFile(graphPath, "utf8");
118
+ return parseJson(raw, "Nx project graph");
119
+ }
120
+ catch (error) {
121
+ const message = error instanceof Error
122
+ ? error.message
123
+ : "Unknown graph collection failure.";
124
+ throw new Error(`Unsupported Nx interface: could not collect a machine-readable project graph (${message}).`, { cause: error });
125
+ }
126
+ finally {
127
+ await fs.rm(graphPath, { force: true });
128
+ }
129
+ }
130
+ /** Runs one Nx command and parses its stdout as JSON. */
131
+ async function runNxJson(workspaceRoot, nxExecutable, runner, args, subject) {
132
+ try {
133
+ const result = await runner({
134
+ executable: process.execPath,
135
+ args: [nxExecutable, ...args],
136
+ cwd: workspaceRoot,
137
+ });
138
+ return parseJson(result.stdout, `Nx ${subject}`);
139
+ }
140
+ catch (error) {
141
+ const message = error instanceof Error ? error.message : "Unknown Nx command failure.";
142
+ throw new Error(`Unable to read Nx ${subject}: ${message}`, {
143
+ cause: error,
144
+ });
145
+ }
146
+ }
147
+ // --- nx.json -------------------------------------------------------------
148
+ /** Parses a JSONC configuration file, or `undefined` when it is absent. */
149
+ export async function readOptionalJson(filePath) {
150
+ try {
151
+ const value = parseNxConfiguration(await fs.readFile(filePath, "utf8"), filePath);
152
+ if (!isRecord(value))
153
+ throw new Error(`${filePath} must be a JSON object.`);
154
+ return value;
155
+ }
156
+ catch (error) {
157
+ if (isMissingFile(error))
158
+ return undefined;
159
+ throw error;
160
+ }
161
+ }
162
+ /** Every plugin name `nx.json` declares, in either supported spelling. */
163
+ export function readNxPlugins(record) {
164
+ const value = record?.["plugins"];
165
+ if (value === undefined)
166
+ return [];
167
+ if (!isUnknownArray(value))
168
+ throw new Error("Invalid nx.json plugins: plugins must be an array of names or plugin objects.");
169
+ const names = new Set();
170
+ for (const entry of value)
171
+ names.add(readNxPluginName(entry));
172
+ return [...names].sort();
173
+ }
174
+ /** One plugin entry's name, whether it was written as a string or an object. */
175
+ function readNxPluginName(entry) {
176
+ if (typeof entry === "string" && entry.trim() !== "")
177
+ return entry;
178
+ const plugin = isRecord(entry) ? entry["plugin"] : undefined;
179
+ if (typeof plugin === "string" && plugin.trim() !== "")
180
+ return plugin;
181
+ throw new Error("Invalid nx.json plugins: every plugin object must provide a non-empty string plugin field.");
182
+ }
183
+ // --- Projects and targets ------------------------------------------------
184
+ /** Turns one `nx show project` answer into the project shape Dads imports. */
185
+ export function parseProject(value, fallbackName) {
186
+ if (!isJsonRecord(value))
187
+ throw new Error(`Nx project ${fallbackName} is not an object.`);
188
+ const name = readOptionalString(value, "name") ?? fallbackName;
189
+ const root = readOptionalString(value, "root") ?? ".";
190
+ const targetRecord = readOptionalJsonRecord(value, "targets") ?? {};
191
+ const targets = Object.entries(targetRecord).map(([targetName, targetValue]) => parseTarget(targetName, targetValue));
192
+ return {
193
+ name,
194
+ id: dadsIdentifier(name),
195
+ root: normalizeRoot(root),
196
+ targets: targets.sort((left, right) => left.name.localeCompare(right.name)),
197
+ };
198
+ }
199
+ /**
200
+ * Reads one target, keeping only the fields this importer can honor and
201
+ * recording every other field twice: once as dropped, and once as a reason the
202
+ * target may not be safe to materialize at all.
203
+ */
204
+ function parseTarget(name, value) {
205
+ if (!isJsonRecord(value))
206
+ return unreadableTarget(name);
207
+ const options = readOptionalJsonRecord(value, "options");
208
+ const executor = readOptionalString(value, "executor");
209
+ const command = options ? readOptionalString(options, "command") : undefined;
210
+ const cwd = options ? readOptionalString(options, "cwd") : undefined;
211
+ return {
212
+ name,
213
+ id: dadsIdentifier(name),
214
+ ...(executor === undefined ? {} : { executor }),
215
+ ...(command === undefined ? {} : { command }),
216
+ ...(cwd === undefined ? {} : { cwd }),
217
+ continuous: readOptionalBoolean(value, "continuous") === true,
218
+ inferred: readOptionalJsonRecord(value, "metadata") !== undefined,
219
+ unresolvedExecutionFields: unresolvedExecutionFields(value, options),
220
+ droppedFields: droppedTargetFields(value, options),
221
+ };
222
+ }
223
+ /** A target Nx did not describe as an object carries nothing but its name. */
224
+ function unreadableTarget(name) {
225
+ return {
226
+ name,
227
+ id: dadsIdentifier(name),
228
+ continuous: false,
229
+ inferred: false,
230
+ unresolvedExecutionFields: ["target:non-object"],
231
+ droppedFields: ["target:non-object"],
232
+ };
233
+ }
234
+ /** Fields that change what running a target does, so it cannot be imported. */
235
+ function unresolvedExecutionFields(value, options) {
236
+ const configuration = Object.keys(value).filter((key) => executionAffectingFields.includes(key));
237
+ return [...configuration, ...unsupportedOptionFields(options)].sort();
238
+ }
239
+ /** Every field of the target that the imported recipe does not carry. */
240
+ function droppedTargetFields(value, options) {
241
+ const topLevel = Object.keys(value).filter((key) => !carriedTargetFields.includes(key));
242
+ return [...topLevel, ...unsupportedOptionFields(options)].sort();
243
+ }
244
+ /** The `options.*` fields other than the command and its directory. */
245
+ function unsupportedOptionFields(options) {
246
+ if (!options)
247
+ return [];
248
+ return Object.keys(options)
249
+ .filter((key) => !carriedOptionFields.includes(key))
250
+ .map((key) => `options.${key}`);
251
+ }
252
+ // --- Workspace-relative paths --------------------------------------------
253
+ /** A workspace-relative POSIX path, with `.` standing for the root itself. */
254
+ export function normalizeRoot(value) {
255
+ const normalized = path.posix.normalize(value.replaceAll(path.sep, "/"));
256
+ return normalized === "" ? "." : normalized.replace(/^\.\//, "") || ".";
257
+ }
258
+ /** Where `candidate` sits relative to the workspace root. */
259
+ export function relativeLocation(workspaceRoot, candidate) {
260
+ const absolute = path.resolve(workspaceRoot, candidate);
261
+ const relative = path.relative(workspaceRoot, absolute);
262
+ return relative === "" ? "." : normalizeRoot(relative);
263
+ }
264
+ /** True for the one read failure that means "this file simply is not here". */
265
+ export function isMissingFile(error) {
266
+ return (typeof error === "object" &&
267
+ error !== null &&
268
+ "code" in error &&
269
+ error["code"] === "ENOENT");
270
+ }
271
+ // --- Running commands ----------------------------------------------------
272
+ /** The default runner: a direct child process with no shell in between. */
273
+ export async function runProcess(input) {
274
+ return new Promise((resolve, reject) => {
275
+ const child = spawn(input.executable, input.args, {
276
+ cwd: input.cwd,
277
+ stdio: ["ignore", "pipe", "pipe"],
278
+ });
279
+ const stdoutStream = child.stdout;
280
+ const stderrStream = child.stderr;
281
+ let stdout = "";
282
+ let stderr = "";
283
+ stdoutStream.setEncoding("utf8");
284
+ stderrStream.setEncoding("utf8");
285
+ stdoutStream.on("data", (chunk) => {
286
+ stdout += chunk;
287
+ });
288
+ stderrStream.on("data", (chunk) => {
289
+ stderr += chunk;
290
+ });
291
+ child.on("error", reject);
292
+ child.on("close", (code) => {
293
+ if (code === 0) {
294
+ resolve({ stdout, stderr });
295
+ return;
296
+ }
297
+ const exitStatus = code === null ? "without a status" : String(code);
298
+ reject(new Error(`${input.executable} ${input.args.join(" ")} exited ${exitStatus}: ${stderr.trim()}`));
299
+ });
300
+ });
301
+ }
302
+ //# sourceMappingURL=nx-workspace-reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nx-workspace-reader.js","sourceRoot":"","sources":["../../src/nx/nx-workspace-reader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,U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,IAAI,CAAC,GAAG,CAAC,WAAW,UAAU,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CACrF,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The file system an alias resolver is written against.
3
+ *
4
+ * Resolving a TypeScript path alias asks a file system three questions and no
5
+ * others: is this path a readable file, what text does it hold, and where does
6
+ * a package name resolve to from this file. Naming those three is what makes
7
+ * the boundary a wall rather than a folder name — the same resolver runs over
8
+ * a directory on disk and over a map held in memory, and both are put through
9
+ * one conformance suite.
10
+ *
11
+ * The port is deliberately smaller than `node:fs`. Nothing here lists a
12
+ * directory, watches a path, or writes: an alias resolver that could do any of
13
+ * those would be answering a different question.
14
+ */
15
+ export type AliasFileSystem = {
16
+ /** True when the path names a readable file. A directory is never a file. */
17
+ readonly isFile: (path: string) => boolean;
18
+ /** The file's text. Throws when the path names no readable file. */
19
+ readonly readText: (path: string) => string;
20
+ /**
21
+ * The absolute path a package specifier resolves to when it is required
22
+ * from `fromFile`, or `undefined` when nothing there answers to that name.
23
+ */
24
+ readonly resolvePackage: (specifier: string, fromFile: string) => string | undefined;
25
+ };
26
+ //# sourceMappingURL=alias-file-system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alias-file-system.d.ts","sourceRoot":"","sources":["../../src/path-aliases/alias-file-system.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,eAAe,GAAG;IAC5B,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3C,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,CACvB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,KACb,MAAM,GAAG,SAAS,CAAC;CACzB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The file system an alias resolver is written against.
3
+ *
4
+ * Resolving a TypeScript path alias asks a file system three questions and no
5
+ * others: is this path a readable file, what text does it hold, and where does
6
+ * a package name resolve to from this file. Naming those three is what makes
7
+ * the boundary a wall rather than a folder name — the same resolver runs over
8
+ * a directory on disk and over a map held in memory, and both are put through
9
+ * one conformance suite.
10
+ *
11
+ * The port is deliberately smaller than `node:fs`. Nothing here lists a
12
+ * directory, watches a path, or writes: an alias resolver that could do any of
13
+ * those would be answering a different question.
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=alias-file-system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alias-file-system.js","sourceRoot":"","sources":["../../src/path-aliases/alias-file-system.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The fixtures the conformance suite asks every provider about.
3
+ *
4
+ * They are data rather than code: a tsconfig chain, the files around it, and
5
+ * either the answer the resolver must give or the refusal it must raise. The
6
+ * suite that runs them is `alias-resolver-conformance.ts`; keeping the two
7
+ * apart is what lets a reader see the whole list of laws on one screen.
8
+ *
9
+ * Every path in a case is written relative to that case's own directory, so no
10
+ * two cases can see each other's files.
11
+ */
12
+ /** A path inside one case's own directory, so no two cases share a file. */
13
+ export type FixturePath = (relative: string) => string;
14
+ export type Resolution = {
15
+ readonly law: string;
16
+ readonly specifier: string;
17
+ /** When true, the specifier is the fixture-relative path made absolute. */
18
+ readonly asAbsolutePath?: boolean;
19
+ /** The fixture-relative file it must answer, or `null` to defer. */
20
+ readonly to: string | null;
21
+ };
22
+ export type ResolutionCase = {
23
+ readonly name: string;
24
+ readonly files: Readonly<Record<string, string>>;
25
+ readonly tsconfig: string;
26
+ readonly resolutions: readonly Resolution[];
27
+ };
28
+ export type RefusalCase = {
29
+ readonly name: string;
30
+ readonly law: string;
31
+ readonly files: Readonly<Record<string, string>>;
32
+ readonly tsconfig: string;
33
+ /** The message the refusal must carry, in the fixture's own paths. */
34
+ readonly message: (at: FixturePath) => string;
35
+ };
36
+ /** Every case whose law is an answer the resolver must give. */
37
+ export declare function aliasResolutionCases(): readonly ResolutionCase[];
38
+ /** Every case whose law is a refusal raised while the resolver is built. */
39
+ export declare const aliasRefusalCases: readonly RefusalCase[];
40
+ //# sourceMappingURL=alias-resolver-conformance-cases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alias-resolver-conformance-cases.d.ts","sourceRoot":"","sources":["../../src/path-aliases/alias-resolver-conformance-cases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,4EAA4E;AAC5E,MAAM,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;AAEvD,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,2EAA2E;IAC3E,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,oEAAoE;IACpE,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAA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