@stag-build/phonebook 0.1.3 → 0.1.5

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.
@@ -1,5 +1,8 @@
1
+ import { execFile } from 'node:child_process';
1
2
  import { readdir, readFile } from 'node:fs/promises';
2
3
  import { join, relative } from 'node:path';
4
+ import { promisify } from 'node:util';
5
+ const run = promisify(execFile);
3
6
  /**
4
7
  * Shared iOS SnapshotTest-subclass discovery: scanning project sources for an
5
8
  * existing subclass, and (heuristically) parsing a .pbxproj to find which
@@ -79,6 +82,40 @@ function extractPbxprojObjects(pbxproj, isa) {
79
82
  }
80
83
  return map;
81
84
  }
85
+ /**
86
+ * Like extractPbxprojObjects, but for the isas Xcode writes on a single line.
87
+ *
88
+ * A pbxproj uses two layouts and the choice is per isa, not per project:
89
+ * PBXGroup and PBXNativeTarget get a line per field, while PBXFileReference and
90
+ * PBXBuildFile are written whole on one line —
91
+ * `ID /* Name *\/ = {isa = PBXFileReference; path = Name.swift; ...};`. A
92
+ * regex anchored on "\n\t\t\tisa" therefore finds every group in a project and
93
+ * none of its files, which reads as a project with no source files rather than
94
+ * as a parser that only knows one layout.
95
+ *
96
+ * This accepts either. Bodies come back with their fields in whatever spacing
97
+ * they were written, so read them with pbxprojField rather than a
98
+ * newline-anchored pattern of your own.
99
+ */
100
+ function extractPbxprojEntries(pbxproj, isa) {
101
+ const map = new Map();
102
+ const re = new RegExp(`\\n\\t\\t([0-9A-F]{24}) [^\\n]*?=\\s*\\{\\s*isa = ${isa};([\\s\\S]*?)\\n?\\t*\\};`, 'g');
103
+ let match;
104
+ while ((match = re.exec(pbxproj))) {
105
+ map.set(match[1], match[2]);
106
+ }
107
+ return map;
108
+ }
109
+ /**
110
+ * One field's value out of an object body, whichever layout it was written in.
111
+ * Comments are stripped because a single-line entry carries its name in one.
112
+ */
113
+ function pbxprojField(body, key) {
114
+ const match = body
115
+ .replace(/\/\*[\s\S]*?\*\//g, '')
116
+ .match(new RegExp(`(?:^|[\\n;{]|\\s)${key} = ([^\\n;]+);`));
117
+ return match ? unquote(match[1]) : undefined;
118
+ }
82
119
  function unquote(value) {
83
120
  const trimmed = value.trim();
84
121
  return trimmed.startsWith('"') && trimmed.endsWith('"') ? trimmed.slice(1, -1) : trimmed;
@@ -192,4 +229,232 @@ export function findSnapshotTestClassLocation(pbxproj) {
192
229
  return undefined;
193
230
  }
194
231
  }
232
+ function parseListItems(body, key) {
233
+ const match = body.match(new RegExp(`${key} = \\(([\\s\\S]*?)\\);`));
234
+ if (!match)
235
+ return [];
236
+ return match[1]
237
+ .split(',')
238
+ .map((item) => unquote(item.replace(/\/\*[\s\S]*?\*\//g, '').trim()))
239
+ .filter((item) => item.length > 0);
240
+ }
241
+ /**
242
+ * Every filesystem-synchronized folder in the project, with the target it
243
+ * belongs to and the files explicitly excepted from that target.
244
+ */
245
+ export function synchronizedGroupOwners(pbxproj) {
246
+ const targets = extractPbxprojObjects(pbxproj, 'PBXNativeTarget');
247
+ const syncGroups = extractPbxprojObjects(pbxproj, 'PBXFileSystemSynchronizedRootGroup');
248
+ const exceptionSets = extractPbxprojObjects(pbxproj, 'PBXFileSystemSynchronizedBuildFileExceptionSet');
249
+ const owners = [];
250
+ for (const [targetId, targetBody] of targets) {
251
+ const nameMatch = targetBody.match(/\n\t\t\tname = ([^\n;]+);/);
252
+ const targetName = nameMatch ? unquote(nameMatch[1]) : targetId;
253
+ const groupsMatch = targetBody.match(/fileSystemSynchronizedGroups = \(([\s\S]*?)\)/);
254
+ if (!groupsMatch)
255
+ continue;
256
+ for (const gid of [...groupsMatch[1].matchAll(/([0-9A-F]{24})/g)].map((m) => m[1])) {
257
+ const groupBody = syncGroups.get(gid);
258
+ if (!groupBody)
259
+ continue;
260
+ const pathMatch = groupBody.match(/\n\t\t\tpath = ([^\n;]+);/);
261
+ if (!pathMatch)
262
+ continue;
263
+ const path = unquote(pathMatch[1]).replace(/\/+$/, '');
264
+ const exclusions = new Set();
265
+ const exceptionIds = [
266
+ ...(groupBody.match(/exceptions = \(([\s\S]*?)\)/)?.[1] ?? '').matchAll(/([0-9A-F]{24})/g),
267
+ ].map((m) => m[1]);
268
+ for (const eid of exceptionIds) {
269
+ const exceptionBody = exceptionSets.get(eid);
270
+ if (!exceptionBody)
271
+ continue;
272
+ // An exception set belongs to one target; one that names another target
273
+ // says nothing about this folder's membership here.
274
+ const exceptionTarget = exceptionBody.match(/\n\t\t\ttarget = ([0-9A-F]{24})/)?.[1];
275
+ if (exceptionTarget && exceptionTarget !== targetId)
276
+ continue;
277
+ for (const member of parseListItems(exceptionBody, 'membershipExceptions')) {
278
+ exclusions.add(`${path}/${member}`);
279
+ }
280
+ }
281
+ owners.push({ targetName, path, exclusions });
282
+ }
283
+ }
284
+ return owners;
285
+ }
286
+ /**
287
+ * The target that compiles `filePath`, via the synchronized folder that covers
288
+ * it. The longest covering folder wins, so a nested folder assigned to its own
289
+ * target beats the parent that contains it; a file explicitly excepted from a
290
+ * folder's target falls through to the next-longest candidate.
291
+ */
292
+ export function targetForFile(pbxproj, filePath) {
293
+ const normalized = filePath.replace(/^\.\//, '');
294
+ const candidates = synchronizedGroupOwners(pbxproj)
295
+ .filter((owner) => normalized === owner.path || normalized.startsWith(`${owner.path}/`))
296
+ .sort((a, b) => b.path.length - a.path.length);
297
+ for (const candidate of candidates) {
298
+ if (candidate.exclusions.has(normalized))
299
+ continue;
300
+ return candidate.targetName;
301
+ }
302
+ // Synchronized folders are the Xcode 16 way and not the only way. A project
303
+ // that lists its files explicitly answers the same question through its
304
+ // build phases, so a file not covered by any folder is not a file whose
305
+ // target is unknowable.
306
+ return sourcesBuildPhaseOwner(pbxproj, normalized);
307
+ }
308
+ /**
309
+ * Every file reference in the project, by its path relative to the project
310
+ * directory.
311
+ *
312
+ * A PBXFileReference carries only its own last path component; the rest comes
313
+ * from the PBXGroups above it, each contributing its own `path` when it has
314
+ * one. So the map is built by walking down from every group rather than up
315
+ * from each file: a group with no `path` is a pure grouping folder that Xcode
316
+ * shows in the navigator and that contributes nothing to the path on disk,
317
+ * which is exactly what makes walking up from a file ambiguous.
318
+ *
319
+ * A group whose sourceTree is SOURCE_ROOT restarts the path at the project
320
+ * directory, because that is what the field means; one that is "<absolute>"
321
+ * describes a file outside the project entirely and is skipped, since nothing
322
+ * here can express it as a project-relative path.
323
+ */
324
+ export function fileReferencePaths(pbxproj) {
325
+ const groups = new Map([
326
+ ...extractPbxprojEntries(pbxproj, 'PBXGroup'),
327
+ ...extractPbxprojEntries(pbxproj, 'PBXVariantGroup'),
328
+ ]);
329
+ const files = extractPbxprojEntries(pbxproj, 'PBXFileReference');
330
+ const childIds = (body) => [...(body.match(/children = \(([\s\S]*?)\);/)?.[1] ?? '').matchAll(/([0-9A-F]{24})/g)].map((m) => m[1]);
331
+ const paths = new Map();
332
+ // A malformed project can name a group as its own descendant. Visiting each
333
+ // id once keeps that a missing entry rather than a hang.
334
+ const visited = new Set();
335
+ const walk = (id, prefix) => {
336
+ if (visited.has(id))
337
+ return;
338
+ visited.add(id);
339
+ const groupBody = groups.get(id);
340
+ if (groupBody !== undefined) {
341
+ const tree = pbxprojField(groupBody, 'sourceTree') ?? '<group>';
342
+ if (tree === '<absolute>')
343
+ return;
344
+ const own = pbxprojField(groupBody, 'path');
345
+ const base = tree === 'SOURCE_ROOT' ? (own ?? '') : own ? join(prefix, own) : prefix;
346
+ for (const child of childIds(groupBody))
347
+ walk(child, base);
348
+ return;
349
+ }
350
+ const fileBody = files.get(id);
351
+ if (fileBody === undefined)
352
+ return;
353
+ const tree = pbxprojField(fileBody, 'sourceTree') ?? '<group>';
354
+ if (tree === '<absolute>')
355
+ return;
356
+ const own = pbxprojField(fileBody, 'path');
357
+ if (own === undefined)
358
+ return;
359
+ paths.set(id, tree === 'SOURCE_ROOT' ? own : join(prefix, own));
360
+ };
361
+ for (const id of groups.keys()) {
362
+ if (!visited.has(id))
363
+ walk(id, '');
364
+ }
365
+ return paths;
366
+ }
367
+ /**
368
+ * The target whose PBXSourcesBuildPhase compiles `filePath`, for a project that
369
+ * records membership per file rather than per folder.
370
+ *
371
+ * This is the classic Xcode layout and still the common one: XcodeGen and Tuist
372
+ * both generate it, and every project predating Xcode 16 uses it. A file
373
+ * reaches a target through two hops — a PBXBuildFile wraps the file reference,
374
+ * and the target's sources phase lists that build file — so both are followed
375
+ * rather than guessed at.
376
+ *
377
+ * `filePath` is relative to the project directory.
378
+ */
379
+ export function sourcesBuildPhaseOwner(pbxproj, filePath) {
380
+ const normalized = filePath.replace(/^\.\//, '');
381
+ const paths = fileReferencePaths(pbxproj);
382
+ let fileRefId;
383
+ for (const [id, path] of paths) {
384
+ if (path === normalized) {
385
+ fileRefId = id;
386
+ break;
387
+ }
388
+ }
389
+ if (!fileRefId)
390
+ return undefined;
391
+ // One file reference can be compiled by several targets — an app and its
392
+ // test target, a framework and the app embedding it — so every build file
393
+ // pointing at it is a candidate.
394
+ const buildFileIds = new Set();
395
+ for (const [id, body] of extractPbxprojEntries(pbxproj, 'PBXBuildFile')) {
396
+ if (pbxprojField(body, 'fileRef') === fileRefId)
397
+ buildFileIds.add(id);
398
+ }
399
+ if (buildFileIds.size === 0)
400
+ return undefined;
401
+ const sourcePhases = extractPbxprojEntries(pbxproj, 'PBXSourcesBuildPhase');
402
+ for (const [targetId, targetBody] of extractPbxprojEntries(pbxproj, 'PBXNativeTarget')) {
403
+ const phaseIds = [
404
+ ...(targetBody.match(/buildPhases = \(([\s\S]*?)\);/)?.[1] ?? '').matchAll(/([0-9A-F]{24})/g),
405
+ ].map((m) => m[1]);
406
+ for (const phaseId of phaseIds) {
407
+ const phaseBody = sourcePhases.get(phaseId);
408
+ if (!phaseBody)
409
+ continue;
410
+ const compiled = [
411
+ ...(phaseBody.match(/files = \(([\s\S]*?)\);/)?.[1] ?? '').matchAll(/([0-9A-F]{24})/g),
412
+ ].map((m) => m[1]);
413
+ if (!compiled.some((id) => buildFileIds.has(id)))
414
+ continue;
415
+ return pbxprojField(targetBody, 'name') ?? targetId;
416
+ }
417
+ }
418
+ return undefined;
419
+ }
420
+ /**
421
+ * The Swift module name a source file compiles into, or undefined when the
422
+ * project structure cannot say (no synchronized folder covers it, or xcodebuild
423
+ * cannot report the target's settings).
424
+ *
425
+ * The module name is the first half of a #Preview's synthesized fileID
426
+ * ("<Module>/<File>.swift"), which is what SnapshotPreviews matches its filter
427
+ * patterns against. `cache` is keyed by target name so a run that filters a
428
+ * dozen files still shells out to xcodebuild once per target.
429
+ */
430
+ export async function moduleForFile(pbxproj, projectDir, filePath, xcodebuildTarget, cache) {
431
+ const targetName = targetForFile(pbxproj, filePath);
432
+ if (!targetName)
433
+ return undefined;
434
+ if (cache?.has(targetName))
435
+ return cache.get(targetName);
436
+ const module = await productModuleName(projectDir, targetName, xcodebuildTarget);
437
+ cache?.set(targetName, module);
438
+ return module;
439
+ }
440
+ async function productModuleName(projectDir, targetName, xcodebuildTarget) {
441
+ const args = ['-showBuildSettings'];
442
+ if (xcodebuildTarget.workspace) {
443
+ args.push('-workspace', xcodebuildTarget.workspace);
444
+ if (xcodebuildTarget.scheme)
445
+ args.push('-scheme', xcodebuildTarget.scheme);
446
+ }
447
+ else if (xcodebuildTarget.project) {
448
+ args.push('-project', xcodebuildTarget.project);
449
+ }
450
+ args.push('-target', targetName);
451
+ try {
452
+ const { stdout } = await run('xcodebuild', args, { cwd: projectDir, maxBuffer: 32 * 1024 * 1024 });
453
+ const match = stdout.match(/^\s*PRODUCT_MODULE_NAME = (.+)$/m);
454
+ return match ? match[1].trim() : undefined;
455
+ }
456
+ catch {
457
+ return undefined;
458
+ }
459
+ }
195
460
  //# sourceMappingURL=snapshotTestClass.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"snapshotTestClass.js","sourceRoot":"","sources":["../../src/ios/snapshotTestClass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,C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I,gBAAgB,CAAC,OAAO,EAAE,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IACD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACjC,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI,EAAE,CAAC,CAAC;QACnG,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAC/D,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { IncompleteRenderError } from '../engines/ios.js';
2
+ import type { ManifestEntry } from '../manifest.js';
3
+ import type { ScannedPreview } from '../scan/types.js';
4
+ /**
5
+ * The container of every preview test the runner reported failed, one per test.
6
+ *
7
+ * A snapshot test asserts nothing, so a failure is the preview trapping: the
8
+ * host app goes down with it and the runner relaunches it before carrying on.
9
+ */
10
+ export declare function parseFailedPreviews(output: string): string[];
11
+ export interface FailedContainer {
12
+ /** The container SnapshotPreviews reported, e.g. "Status Row Detail View". */
13
+ container: string;
14
+ failures: number;
15
+ /** The previews in that container's file that did not come back as images.
16
+ * Empty when the source holds no file matching the container. */
17
+ unrendered: {
18
+ file: string;
19
+ line: number;
20
+ name: string;
21
+ }[];
22
+ }
23
+ /**
24
+ * Turns failed preview tests into previews a reader can open.
25
+ *
26
+ * The test name says which file and nothing more: its index follows discovery
27
+ * order, not source order. What pins the preview down is subtraction — the
28
+ * previews the file declares, minus the ones that rendered. When the run was cut
29
+ * short that difference can also hold previews that were never reached, which
30
+ * is why the list is "did not render" and the count is kept apart from it.
31
+ */
32
+ export declare function explainFailedPreviews(failed: string[], rendered: ManifestEntry[], scanned: ScannedPreview[]): FailedContainer[];
33
+ /**
34
+ * The answer to a render that crashed previews. Leads with where to look, because
35
+ * each crash costs about a minute and a half on the next run too, and the reader
36
+ * can only fix the ones it can find.
37
+ */
38
+ export declare function summarizeIncompleteRender(error: IncompleteRenderError, explained: FailedContainer[]): string;
@@ -0,0 +1,92 @@
1
+ import { basename } from 'node:path';
2
+ import { spaceCamelCase } from '../naming.js';
3
+ /**
4
+ * SnapshotPreviews names each preview test `<orientation>-<container>-<j>-<i>`,
5
+ * where the container is the display name it derives from the preview's file
6
+ * or type and `i` is a position in its own discovery order. The container can
7
+ * carry hyphens, so the numbers are anchored at the end.
8
+ */
9
+ const FAILED_PREVIEW_TEST = /Test case '[^']*?\.[A-Za-z]+-(.+)-\d+-\d+\(\)' failed/g;
10
+ /**
11
+ * The container of every preview test the runner reported failed, one per test.
12
+ *
13
+ * A snapshot test asserts nothing, so a failure is the preview trapping: the
14
+ * host app goes down with it and the runner relaunches it before carrying on.
15
+ */
16
+ export function parseFailedPreviews(output) {
17
+ return [...output.matchAll(FAILED_PREVIEW_TEST)].map((m) => m[1]);
18
+ }
19
+ /**
20
+ * Turns failed preview tests into previews a reader can open.
21
+ *
22
+ * The test name says which file and nothing more: its index follows discovery
23
+ * order, not source order. What pins the preview down is subtraction — the
24
+ * previews the file declares, minus the ones that rendered. When the run was cut
25
+ * short that difference can also hold previews that were never reached, which
26
+ * is why the list is "did not render" and the count is kept apart from it.
27
+ */
28
+ export function explainFailedPreviews(failed, rendered, scanned) {
29
+ const failures = new Map();
30
+ for (const container of failed)
31
+ failures.set(container, (failures.get(container) ?? 0) + 1);
32
+ return [...failures].map(([container, count]) => {
33
+ const declared = scanned.filter((p) => spaceCamelCase(basename(p.file, '.swift')) === container);
34
+ const renderedLabels = new Set(rendered.flatMap((e) => {
35
+ if (!e.sourceFile || !declared.some((p) => sameSource(p.file, e.sourceFile)))
36
+ return [];
37
+ return [e.previewName.slice(e.sourceFile.length + 1)];
38
+ }));
39
+ return {
40
+ container,
41
+ failures: count,
42
+ unrendered: declared
43
+ .filter((p) => !renderedLabels.has(sidecarLabel(p)))
44
+ .map((p) => ({ file: p.file, line: p.line, name: p.displayName ?? container })),
45
+ };
46
+ });
47
+ }
48
+ /** What SnapshotPreviews writes as a preview's label: its display name, or
49
+ * Xcode's placeholder for an unnamed one. */
50
+ function sidecarLabel(preview) {
51
+ return preview.displayName ?? `At line #${preview.line}`;
52
+ }
53
+ /** Whether a scanned path is the file a `Module/File.swift` file ID names. */
54
+ function sameSource(path, fileId) {
55
+ const slash = fileId.indexOf('/');
56
+ const file = fileId.slice(slash + 1);
57
+ if (path !== file && !path.endsWith(`/${file}`))
58
+ return false;
59
+ return slash === -1 || path.split('/').includes(fileId.slice(0, slash));
60
+ }
61
+ /**
62
+ * The answer to a render that crashed previews. Leads with where to look, because
63
+ * each crash costs about a minute and a half on the next run too, and the reader
64
+ * can only fix the ones it can find.
65
+ */
66
+ export function summarizeIncompleteRender(error, explained) {
67
+ const crashed = error.failedPreviews.length;
68
+ const lines = [
69
+ `Rendered ${error.manifest.entries.length} previews into ${error.outputDir}; ${crashed} crashed.`,
70
+ '',
71
+ ];
72
+ if (crashed > 0) {
73
+ lines.push('A preview that crashes takes the app hosting the render down with it, and every relaunch costs about a', 'minute and a half of the next run as well. Open each one: a trap at render is often an @Environment', 'object the preview does not supply, which analyze_coverage reports as env-missing.');
74
+ for (const c of explained) {
75
+ if (c.unrendered.length === 0) {
76
+ lines.push(` ${c.container}`);
77
+ }
78
+ else if (c.unrendered.length === c.failures) {
79
+ lines.push(...c.unrendered.map((p) => ` ${p.file}:${p.line} ${p.name}`));
80
+ }
81
+ else {
82
+ lines.push(` ${c.container}: ${c.failures} crashed, and these ${c.unrendered.length} did not render`);
83
+ lines.push(...c.unrendered.map((p) => ` ${p.file}:${p.line} ${p.name}`));
84
+ }
85
+ }
86
+ lines.push('');
87
+ }
88
+ lines.push(...error.diagnosis);
89
+ lines.push('Recorded:', ...error.manifest.entries.map((e) => ` ${e.component}/${e.state}`).sort());
90
+ return lines.join('\n');
91
+ }
92
+ //# sourceMappingURL=unrendered.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unrendered.js","sourceRoot":"","sources":["../../src/ios/unrendered.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG,wDAAwD,CAAC;AAErF;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,OAAO,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC;AAWD;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAgB,EAChB,QAAyB,EACzB,OAAyB;IAEzB,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC3C,KAAK,MAAM,SAAS,IAAI,MAAM;QAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAE5F,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9C,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,KAAK,SAAS,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,QAAQ,uBAAuB,CAAC,CAAC,UAAU,CAAC,MAAM,iBAAiB,CAAC,CAAC;gBACvG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YAC9E,CAAC;QACH,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;IAC/B,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACpG,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -1 +1,29 @@
1
+ import type { CoverageReport } from '../scan/types.js';
2
+ export declare function summarizeCoverage(report: CoverageReport): string;
3
+ /**
4
+ * What a scoped report would otherwise hide: previews and views outside the
5
+ * scope that show a component inside it.
6
+ *
7
+ * Kept apart from the gaps above, and worded differently, because they are not
8
+ * the same kind of claim. A gap is a defect with a fix. The first list here is
9
+ * a fact — these previews show what you changed, and only their source says
10
+ * whether that matters. The second is a question: nothing renders that context
11
+ * at all, and whether it deserves a preview is a judgment about the product
12
+ * rather than about the code.
13
+ */
14
+ export declare function summarizeReach(report: CoverageReport): string;
15
+ /**
16
+ * What each component is missing, which is the half `summarizeHints` cannot
17
+ * see: a hint needs a preview to exist before it can say anything about it.
18
+ *
19
+ * Grouped by component rather than listed flat. A flat list sorted by severity
20
+ * put every "has no preview" first, and on a repository with a hundred of them
21
+ * the cap fell before a single state gap was reached — the specific, useful
22
+ * half of the report never reached the reader. Components carrying the most
23
+ * missing states come first for the same reason.
24
+ *
25
+ * It reports; it never edits.
26
+ */
27
+ export declare function summarizeGaps(report: CoverageReport): string;
28
+ export declare function summarizeHints(report: CoverageReport): string;
1
29
  export declare function runMcpServer(): Promise<void>;