@any-nav/core 0.1.0 → 0.2.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.
- package/CHANGELOG.md +15 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.js +12 -3
- package/dist/config.js.map +1 -1
- package/dist/facade.d.ts +1 -1
- package/dist/facade.js +5 -4
- package/dist/facade.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/json.js +1 -1
- package/dist/query.d.ts +4 -12
- package/dist/query.js +21 -50
- package/dist/query.js.map +1 -1
- package/dist/search-engine.d.ts +15 -1
- package/dist/search-engine.js +62 -13
- package/dist/search-engine.js.map +1 -1
- package/dist/types.d.ts +15 -14
- package/package.json +8 -3
- package/dist/bindings.d.ts +0 -10
- package/dist/bindings.js +0 -51
- package/dist/bindings.js.map +0 -1
- package/dist/description.d.ts +0 -31
- package/dist/description.js +0 -273
- package/dist/description.js.map +0 -1
- package/dist/gitignore.d.ts +0 -9
- package/dist/gitignore.js +0 -110
- package/dist/gitignore.js.map +0 -1
- package/dist/path-hints.d.ts +0 -14
- package/dist/path-hints.js +0 -60
- package/dist/path-hints.js.map +0 -1
- package/dist/scan.d.ts +0 -46
- package/dist/scan.js +0 -301
- package/dist/scan.js.map +0 -1
package/dist/gitignore.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* gitignore-aware traversal support, ported verbatim from the routes module
|
|
3
|
-
* (dsh-plugin-dev/extras/modules/routes/src/gitignore.ts, ADR-0010: port,
|
|
4
|
-
* don't rewrite). Known subset boundary (routes-documented): `!` re-includes
|
|
5
|
-
* inside one file are honored; cross-file re-include of an ignored path is
|
|
6
|
-
* not — revisit via a port if real corpora hit it (ADR-0010 reversal).
|
|
7
|
-
*/
|
|
8
|
-
import { readFile } from 'node:fs/promises';
|
|
9
|
-
import { join, relative, resolve } from 'node:path';
|
|
10
|
-
export async function readInheritedGitignoreRules(root, scanRoot) {
|
|
11
|
-
const rootPath = resolve(root);
|
|
12
|
-
const scanRootPath = resolve(scanRoot);
|
|
13
|
-
const relativeScanRoot = normalizeSlash(relative(rootPath, scanRootPath));
|
|
14
|
-
const segments = relativeScanRoot && !relativeScanRoot.startsWith('..')
|
|
15
|
-
? relativeScanRoot.split('/').filter(Boolean)
|
|
16
|
-
: [];
|
|
17
|
-
const dirs = [rootPath];
|
|
18
|
-
for (let index = 0; index < segments.length; index += 1) {
|
|
19
|
-
dirs.push(join(rootPath, ...segments.slice(0, index + 1)));
|
|
20
|
-
}
|
|
21
|
-
const rules = await Promise.all(dirs.map((dir) => readGitignoreRules(dir)));
|
|
22
|
-
return rules.flat();
|
|
23
|
-
}
|
|
24
|
-
export async function readGitignoreRules(dir) {
|
|
25
|
-
let content;
|
|
26
|
-
try {
|
|
27
|
-
content = await readFile(join(dir, '.gitignore'), 'utf8');
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
return [];
|
|
31
|
-
}
|
|
32
|
-
return content
|
|
33
|
-
.split(/\r?\n/u)
|
|
34
|
-
.map((line) => parseGitignoreLine(dir, line))
|
|
35
|
-
.filter((rule) => rule !== null);
|
|
36
|
-
}
|
|
37
|
-
export function isGitignored(filePath, isDirectory, rules) {
|
|
38
|
-
let ignored = false;
|
|
39
|
-
for (const rule of rules) {
|
|
40
|
-
if (rule.directoryOnly && !isDirectory)
|
|
41
|
-
continue;
|
|
42
|
-
if (!matchesRule(filePath, rule))
|
|
43
|
-
continue;
|
|
44
|
-
ignored = !rule.negated;
|
|
45
|
-
}
|
|
46
|
-
return ignored;
|
|
47
|
-
}
|
|
48
|
-
function parseGitignoreLine(baseDir, rawLine) {
|
|
49
|
-
let line = rawLine.trim();
|
|
50
|
-
if (!line || line.startsWith('#'))
|
|
51
|
-
return null;
|
|
52
|
-
let negated = false;
|
|
53
|
-
if (line.startsWith('!')) {
|
|
54
|
-
negated = true;
|
|
55
|
-
line = line.slice(1).trim();
|
|
56
|
-
}
|
|
57
|
-
if (!line)
|
|
58
|
-
return null;
|
|
59
|
-
const directoryOnly = line.endsWith('/');
|
|
60
|
-
line = line.replace(/^\/+/u, '').replace(/\/+$/u, '');
|
|
61
|
-
if (!line)
|
|
62
|
-
return null;
|
|
63
|
-
return {
|
|
64
|
-
baseDir,
|
|
65
|
-
pattern: normalizeSlash(line),
|
|
66
|
-
negated,
|
|
67
|
-
directoryOnly,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function matchesRule(filePath, rule) {
|
|
71
|
-
const relativePath = normalizeSlash(relative(rule.baseDir, filePath));
|
|
72
|
-
if (!relativePath || relativePath.startsWith('..'))
|
|
73
|
-
return false;
|
|
74
|
-
if (!rule.pattern.includes('/')) {
|
|
75
|
-
return relativePath.split('/').some((part) => matchesGlob(part, rule.pattern));
|
|
76
|
-
}
|
|
77
|
-
return matchesGlob(relativePath, rule.pattern);
|
|
78
|
-
}
|
|
79
|
-
function matchesGlob(value, pattern) {
|
|
80
|
-
return new RegExp(`^${globToRegex(pattern)}$`, 'u').test(value);
|
|
81
|
-
}
|
|
82
|
-
function globToRegex(pattern) {
|
|
83
|
-
let regex = '';
|
|
84
|
-
for (let index = 0; index < pattern.length; index += 1) {
|
|
85
|
-
const char = pattern[index];
|
|
86
|
-
const next = pattern[index + 1];
|
|
87
|
-
if (char === '*' && next === '*') {
|
|
88
|
-
regex += '.*';
|
|
89
|
-
index += 1;
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
if (char === '*') {
|
|
93
|
-
regex += '[^/]*';
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
if (char === '?') {
|
|
97
|
-
regex += '[^/]';
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
regex += escapeRegex(char);
|
|
101
|
-
}
|
|
102
|
-
return regex;
|
|
103
|
-
}
|
|
104
|
-
function escapeRegex(value) {
|
|
105
|
-
return value.replace(/[|\\{}()[\]^$+*?.]/gu, '\\$&');
|
|
106
|
-
}
|
|
107
|
-
function normalizeSlash(value) {
|
|
108
|
-
return value.replace(/\\/gu, '/');
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=gitignore.js.map
|
package/dist/gitignore.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gitignore.js","sourceRoot":"","sources":["../src/gitignore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpD,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,IAAY,EAAE,QAAgB;IAC9E,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvC,MAAM,gBAAgB,GAAG,cAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAC1E,MAAM,QAAQ,GAAG,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC;QACrE,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;QAC7C,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;IAExB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACxD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,G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,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,WAAW,CAAC,OAAe;IAClC,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACvD,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAEhC,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjC,KAAK,IAAI,IAAI,CAAC;YACd,KAAK,IAAI,CAAC,CAAC;YACX,SAAS;QACX,CAAC;QAED,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,KAAK,IAAI,OAAO,CAAC;YACjB,SAAS;QACX,CAAC;QAED,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,KAAK,IAAI,MAAM,CAAC;YAChB,SAAS;QACX,CAAC;QAED,KAAK,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACpC,CAAC"}
|
package/dist/path-hints.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Route path miss hints, ported verbatim from the routes module
|
|
3
|
-
* (dsh-plugin-dev/extras/modules/routes/src/pathHints.ts, ADR-0010: port,
|
|
4
|
-
* don't rewrite). Suggests candidate paths for a query that missed; the
|
|
5
|
-
* caller auto-adopts a unique hit.
|
|
6
|
-
*/
|
|
7
|
-
export declare const PATH_MISS_MESSAGE = "Markdown route path not found.";
|
|
8
|
-
export declare const PATH_HINT_MESSAGE = "You may mean one of these Markdown route paths.";
|
|
9
|
-
export interface PathHintCandidate {
|
|
10
|
-
path: string;
|
|
11
|
-
aliases?: readonly string[];
|
|
12
|
-
}
|
|
13
|
-
export declare function pathMissMessage(routePath: string): string;
|
|
14
|
-
export declare function suggestPathHints(candidatePaths: Iterable<string | PathHintCandidate>, queryPath: string): string[];
|
package/dist/path-hints.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Route path miss hints, ported verbatim from the routes module
|
|
3
|
-
* (dsh-plugin-dev/extras/modules/routes/src/pathHints.ts, ADR-0010: port,
|
|
4
|
-
* don't rewrite). Suggests candidate paths for a query that missed; the
|
|
5
|
-
* caller auto-adopts a unique hit.
|
|
6
|
-
*/
|
|
7
|
-
const HINT_COLLECT_CAP = 5;
|
|
8
|
-
export const PATH_MISS_MESSAGE = 'Markdown route path not found.';
|
|
9
|
-
export const PATH_HINT_MESSAGE = 'You may mean one of these Markdown route paths.';
|
|
10
|
-
export function pathMissMessage(routePath) {
|
|
11
|
-
return `Markdown route path not found: ${routePath}`;
|
|
12
|
-
}
|
|
13
|
-
export function suggestPathHints(candidatePaths, queryPath) {
|
|
14
|
-
if (queryPath === '' || queryPath === '.')
|
|
15
|
-
return [];
|
|
16
|
-
const hints = new Set();
|
|
17
|
-
for (const candidate of candidatePaths) {
|
|
18
|
-
const path = typeof candidate === 'string' ? candidate : candidate.path;
|
|
19
|
-
const aliases = typeof candidate === 'string' ? [] : candidate.aliases ?? [];
|
|
20
|
-
const matchPaths = [path, ...aliases];
|
|
21
|
-
if (matchPaths.some((matchPath) => pathHintMatches(matchPath, queryPath))) {
|
|
22
|
-
hints.add(path);
|
|
23
|
-
if (hints.size >= HINT_COLLECT_CAP)
|
|
24
|
-
break;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return [...hints];
|
|
28
|
-
}
|
|
29
|
-
function pathHintMatches(candidate, queryPath) {
|
|
30
|
-
if (candidate === queryPath)
|
|
31
|
-
return false;
|
|
32
|
-
const candidateSegments = candidate.split('/').filter(Boolean);
|
|
33
|
-
const querySegments = queryPath.split('/').filter(Boolean);
|
|
34
|
-
if (querySegments.length === 0)
|
|
35
|
-
return false;
|
|
36
|
-
if (candidate.endsWith(`/${queryPath}`))
|
|
37
|
-
return true;
|
|
38
|
-
const tail = candidateSegments.slice(-querySegments.length);
|
|
39
|
-
if (tail.length !== querySegments.length)
|
|
40
|
-
return false;
|
|
41
|
-
const queryLeaf = querySegments[querySegments.length - 1];
|
|
42
|
-
if (queryLeaf.includes('.')) {
|
|
43
|
-
return tail.join('/') === queryPath;
|
|
44
|
-
}
|
|
45
|
-
tail[tail.length - 1] = stripLeafExtension(tail[tail.length - 1]);
|
|
46
|
-
if (tail.join('/') === queryPath)
|
|
47
|
-
return true;
|
|
48
|
-
const candidateLeaf = tail[tail.length - 1].toLowerCase();
|
|
49
|
-
const normalizedQueryLeaf = queryLeaf.toLowerCase();
|
|
50
|
-
return normalizedQueryLeaf.length >= 2 && candidateLeaf.includes(normalizedQueryLeaf);
|
|
51
|
-
}
|
|
52
|
-
function stripLeafExtension(segment) {
|
|
53
|
-
if (/^\.+$/u.test(segment))
|
|
54
|
-
return segment;
|
|
55
|
-
const dot = segment.lastIndexOf('.');
|
|
56
|
-
if (dot <= 0)
|
|
57
|
-
return segment;
|
|
58
|
-
return segment.slice(0, dot);
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=path-hints.js.map
|
package/dist/path-hints.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-hints.js","sourceRoot":"","sources":["../src/path-hints.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAE3B,M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AAM,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACrC,IAAI,GAAG,IAAI,CAAC;QAAE,OAAO,OAAO,CAAC;IAC7B,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC/B,CAAC"}
|
package/dist/scan.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { ScanConfig } from './config.ts';
|
|
2
|
-
import type { NavNode, ScanDiagnostic } from './types.ts';
|
|
3
|
-
/**
|
|
4
|
-
* Agent-instruction files harnesses load on their own; they carry no
|
|
5
|
-
* navigation value (the agent already has them) so they never appear in
|
|
6
|
-
* navigation (routes DEFAULT_EXCLUDE_FILES, ported).
|
|
7
|
-
*/
|
|
8
|
-
export declare const DEFAULT_EXCLUDE_FILES: readonly string[];
|
|
9
|
-
/** routes DEFAULT_EXCLUDE_DIRS, ported verbatim. Always on (the safety
|
|
10
|
-
* floor); user excludeDirs entries append to it, never replace it — a
|
|
11
|
-
* generate-era 'any-nav' entry was retired with `list --write` (the
|
|
12
|
-
* materialization target is now any file the caller names). */
|
|
13
|
-
export declare const DEFAULT_EXCLUDE_DIRS: readonly string[];
|
|
14
|
-
export interface ResolvedScanOptions {
|
|
15
|
-
excludeDirs: readonly string[];
|
|
16
|
-
excludeFiles: readonly string[];
|
|
17
|
-
excludeDotEntries: boolean;
|
|
18
|
-
respectGitignore: boolean;
|
|
19
|
-
maxFiles: number;
|
|
20
|
-
}
|
|
21
|
-
export declare function resolveScanOptions(config?: ScanConfig): ResolvedScanOptions;
|
|
22
|
-
export interface ScannedFile {
|
|
23
|
-
path: string;
|
|
24
|
-
content: string;
|
|
25
|
-
}
|
|
26
|
-
/** Port: built-in chain is the ported routes extraction; LLM providers arrive in v1.x. */
|
|
27
|
-
export interface DescriptionProvider {
|
|
28
|
-
extract(file: ScannedFile): Promise<string | null>;
|
|
29
|
-
}
|
|
30
|
-
export interface ScanOutput {
|
|
31
|
-
tree: NavNode;
|
|
32
|
-
itemCount: number;
|
|
33
|
-
diagnostics: ScanDiagnostic[];
|
|
34
|
-
}
|
|
35
|
-
export declare const builtinDescriptionProvider: DescriptionProvider;
|
|
36
|
-
export declare function isExcludedFileName(name: string, excludeFiles: readonly string[]): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Directory description sidecars (2026-10-07): the Docusaurus ecosystem
|
|
39
|
-
* names — a folder may state its navigation description in one of these
|
|
40
|
-
* instead of its README (release-face READMEs stay untouched). The first
|
|
41
|
-
* existing name in this order is authoritative; the files are never Markdown
|
|
42
|
-
* so they never enter the tree, and they never consume the maxFiles budget.
|
|
43
|
-
*/
|
|
44
|
-
export declare const DIR_SIDECAR_NAMES: readonly string[];
|
|
45
|
-
export declare function isDirSidecarName(name: string): boolean;
|
|
46
|
-
export declare function scanSource(root: string, provider?: DescriptionProvider, options?: ResolvedScanOptions): Promise<ScanOutput>;
|
package/dist/scan.js
DELETED
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scan: walk a Markdown folder into a NavTree under the routes traversal
|
|
3
|
-
* semantics (ADR-0010 absorption — port, don't rewrite): exclusion policies,
|
|
4
|
-
* gitignore inheritance, a loud maxFiles budget, empty-directory pruning, and
|
|
5
|
-
* folder descriptions — from a `_category_` sidecar when the folder carries
|
|
6
|
-
* one (the exception channel for release-face READMEs), else from the
|
|
7
|
-
* folder's own README.md. Description extraction is the ported routes chain
|
|
8
|
-
* (description.ts); null falls to core's placeholder + diagnostic, which
|
|
9
|
-
* routes does not have and core keeps (stricter).
|
|
10
|
-
*
|
|
11
|
-
* Read-only by contract: scanning must never modify source files
|
|
12
|
-
* (map is not territory).
|
|
13
|
-
*/
|
|
14
|
-
import { readdir, readFile, stat } from 'node:fs/promises';
|
|
15
|
-
import { basename, extname, join, relative, sep } from 'node:path';
|
|
16
|
-
import { extractDescription, extractSidecarDescription } from './description.js';
|
|
17
|
-
import { isGitignored, readGitignoreRules } from './gitignore.js';
|
|
18
|
-
const MARKDOWN_EXT = '.md';
|
|
19
|
-
/**
|
|
20
|
-
* Agent-instruction files harnesses load on their own; they carry no
|
|
21
|
-
* navigation value (the agent already has them) so they never appear in
|
|
22
|
-
* navigation (routes DEFAULT_EXCLUDE_FILES, ported).
|
|
23
|
-
*/
|
|
24
|
-
export const DEFAULT_EXCLUDE_FILES = ['AGENTS.md', 'CLAUDE.md'];
|
|
25
|
-
/** routes DEFAULT_EXCLUDE_DIRS, ported verbatim. Always on (the safety
|
|
26
|
-
* floor); user excludeDirs entries append to it, never replace it — a
|
|
27
|
-
* generate-era 'any-nav' entry was retired with `list --write` (the
|
|
28
|
-
* materialization target is now any file the caller names). */
|
|
29
|
-
export const DEFAULT_EXCLUDE_DIRS = [
|
|
30
|
-
'.git',
|
|
31
|
-
'.hg',
|
|
32
|
-
'.svn',
|
|
33
|
-
'node_modules',
|
|
34
|
-
'.pnpm',
|
|
35
|
-
'dist',
|
|
36
|
-
'build',
|
|
37
|
-
'lib',
|
|
38
|
-
'out',
|
|
39
|
-
];
|
|
40
|
-
export function resolveScanOptions(config) {
|
|
41
|
-
// Additive ruling (ADR-0010 update 2026-10-07): the built-in tables are the
|
|
42
|
-
// always-on floor, user entries append — "the file states only exceptions"
|
|
43
|
-
// must not mean restating the defaults to add one. Duplicates are harmless
|
|
44
|
-
// (membership checks only), so a plain concat stays honest.
|
|
45
|
-
return {
|
|
46
|
-
excludeDirs: [...DEFAULT_EXCLUDE_DIRS, ...(config?.excludeDirs ?? [])],
|
|
47
|
-
excludeFiles: [...DEFAULT_EXCLUDE_FILES, ...(config?.excludeFiles ?? [])],
|
|
48
|
-
excludeDotEntries: config?.excludeDotEntries ?? true,
|
|
49
|
-
respectGitignore: config?.respectGitignore ?? true,
|
|
50
|
-
maxFiles: config?.maxFiles ?? 2000,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export const builtinDescriptionProvider = {
|
|
54
|
-
extract: (file) => Promise.resolve(extractDescription(file.content)),
|
|
55
|
-
};
|
|
56
|
-
export function isExcludedFileName(name, excludeFiles) {
|
|
57
|
-
if (excludeFiles.length === 0)
|
|
58
|
-
return false;
|
|
59
|
-
const lower = name.toLowerCase();
|
|
60
|
-
return excludeFiles.some((excluded) => excluded.toLowerCase() === lower);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Directory description sidecars (2026-10-07): the Docusaurus ecosystem
|
|
64
|
-
* names — a folder may state its navigation description in one of these
|
|
65
|
-
* instead of its README (release-face READMEs stay untouched). The first
|
|
66
|
-
* existing name in this order is authoritative; the files are never Markdown
|
|
67
|
-
* so they never enter the tree, and they never consume the maxFiles budget.
|
|
68
|
-
*/
|
|
69
|
-
export const DIR_SIDECAR_NAMES = ['_category_.yml', '_category_.yaml', '_category_.json'];
|
|
70
|
-
export function isDirSidecarName(name) {
|
|
71
|
-
const lower = name.toLowerCase();
|
|
72
|
-
return DIR_SIDECAR_NAMES.some((sidecar) => sidecar === lower);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Read the directory's sidecar description from its already-listed entries.
|
|
76
|
-
* Returns undefined when no sidecar exists, when the authoritative one is
|
|
77
|
-
* gitignored (traversal honors the same rules as content), or when it carries
|
|
78
|
-
* no description key — the README chain then fills in. Unreadable or invalid
|
|
79
|
-
* sidecars fire a loud diagnostic and fall through the same way.
|
|
80
|
-
*/
|
|
81
|
-
async function sidecarDescription(absDir, relDir, entries, opts, gitignoreRules, diagnostics) {
|
|
82
|
-
for (const sidecarName of DIR_SIDECAR_NAMES) {
|
|
83
|
-
const entry = entries.find((candidate) => candidate.name.toLowerCase() === sidecarName && candidate.isFile());
|
|
84
|
-
if (entry === undefined)
|
|
85
|
-
continue;
|
|
86
|
-
const abs = join(absDir, entry.name);
|
|
87
|
-
if (opts.respectGitignore && isGitignored(abs, false, gitignoreRules))
|
|
88
|
-
return undefined;
|
|
89
|
-
const rel = relDir === '' ? entry.name : `${relDir}/${entry.name}`;
|
|
90
|
-
let content;
|
|
91
|
-
try {
|
|
92
|
-
content = await readFile(abs, 'utf8');
|
|
93
|
-
}
|
|
94
|
-
catch {
|
|
95
|
-
diagnostics.push({
|
|
96
|
-
code: 'sidecar-unreadable',
|
|
97
|
-
severity: 'warning',
|
|
98
|
-
message: `Unable to read directory description sidecar ${rel}.`,
|
|
99
|
-
path: rel,
|
|
100
|
-
audience: 'maintainer',
|
|
101
|
-
});
|
|
102
|
-
return undefined;
|
|
103
|
-
}
|
|
104
|
-
const read = extractSidecarDescription(entry.name, content);
|
|
105
|
-
if ('error' in read) {
|
|
106
|
-
diagnostics.push({
|
|
107
|
-
code: 'sidecar-unreadable',
|
|
108
|
-
severity: 'warning',
|
|
109
|
-
message: `Directory description sidecar ${rel}: ${read.error}.`,
|
|
110
|
-
path: rel,
|
|
111
|
-
audience: 'maintainer',
|
|
112
|
-
});
|
|
113
|
-
return undefined;
|
|
114
|
-
}
|
|
115
|
-
return read.description !== null && read.description.trim() !== '' ? read.description : undefined;
|
|
116
|
-
}
|
|
117
|
-
return undefined;
|
|
118
|
-
}
|
|
119
|
-
export async function scanSource(root, provider = builtinDescriptionProvider, options) {
|
|
120
|
-
const opts = options ?? resolveScanOptions();
|
|
121
|
-
const diagnostics = [];
|
|
122
|
-
const budget = { files: 0, limitHit: opts.maxFiles <= 0 };
|
|
123
|
-
let rootStat;
|
|
124
|
-
try {
|
|
125
|
-
rootStat = await stat(root);
|
|
126
|
-
}
|
|
127
|
-
catch {
|
|
128
|
-
diagnostics.push(rootDiagnostic('scan-root-not-found', `Scan root does not exist or is unreadable.`));
|
|
129
|
-
return { tree: rootNode(root), itemCount: 0, diagnostics };
|
|
130
|
-
}
|
|
131
|
-
if (rootStat.isFile()) {
|
|
132
|
-
diagnostics.push(rootDiagnostic('scan-root-is-file', `Scan root is a file. Navigation scans start from folders.`));
|
|
133
|
-
return { tree: rootNode(root), itemCount: 0, diagnostics };
|
|
134
|
-
}
|
|
135
|
-
if (!rootStat.isDirectory()) {
|
|
136
|
-
diagnostics.push(rootDiagnostic('scan-root-unsupported', `Scan root is neither a directory nor a Markdown file.`));
|
|
137
|
-
return { tree: rootNode(root), itemCount: 0, diagnostics };
|
|
138
|
-
}
|
|
139
|
-
const rootRules = opts.respectGitignore ? await readGitignoreRules(root) : [];
|
|
140
|
-
const rootEntries = await sortedEntries(root, diagnostics);
|
|
141
|
-
// Root description: the same chain as any directory — sidecar first, else
|
|
142
|
-
// the root README's own extraction (uniform semantics, no root special case).
|
|
143
|
-
const rootSidecar = await sidecarDescription(root, '', rootEntries, opts, rootRules, diagnostics);
|
|
144
|
-
const children = [];
|
|
145
|
-
let rootReadmeDescription;
|
|
146
|
-
for (const entry of rootEntries) {
|
|
147
|
-
if (isDirSidecarName(entry.name))
|
|
148
|
-
continue; // consumed by rootSidecar above
|
|
149
|
-
const node = await scanEntry(root, root, entry, opts, provider, diagnostics, rootRules, budget);
|
|
150
|
-
if (node === null)
|
|
151
|
-
continue;
|
|
152
|
-
children.push(node);
|
|
153
|
-
if (rootReadmeDescription === undefined &&
|
|
154
|
-
node.kind === 'file' &&
|
|
155
|
-
node.name.toLowerCase() === 'readme' &&
|
|
156
|
-
node.item !== undefined &&
|
|
157
|
-
!node.item.description.startsWith('Undocumented')) {
|
|
158
|
-
rootReadmeDescription = node.item.description;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
if (budget.limitHit) {
|
|
162
|
-
diagnostics.push({
|
|
163
|
-
code: 'file-limit-reached',
|
|
164
|
-
severity: 'warning',
|
|
165
|
-
message: `Markdown file limit (${opts.maxFiles}) reached while scanning; entries past the limit were not examined and the navigation may be incomplete. Raise scan.maxFiles to see the remaining items.`,
|
|
166
|
-
path: '.',
|
|
167
|
-
audience: 'consumer',
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
const tree = rootNode(root);
|
|
171
|
-
if (children.length > 0)
|
|
172
|
-
tree.children = children;
|
|
173
|
-
const rootDescription = rootSidecar ?? rootReadmeDescription;
|
|
174
|
-
if (rootDescription !== undefined)
|
|
175
|
-
tree.description = rootDescription;
|
|
176
|
-
return { tree, itemCount: budget.files, diagnostics };
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Scan one directory entry into a tree node, or null when it carries no
|
|
180
|
-
* Markdown descendant (empty-directory pruning, ADR-0010; a dir with only
|
|
181
|
-
* pruned subdirs prunes too — a directory with a README is never empty).
|
|
182
|
-
*/
|
|
183
|
-
async function scanEntry(root, absDir, entry, opts, provider, diagnostics, gitignoreRules, budget) {
|
|
184
|
-
if (budget.files >= opts.maxFiles) {
|
|
185
|
-
budget.limitHit = true;
|
|
186
|
-
return null;
|
|
187
|
-
}
|
|
188
|
-
if (opts.excludeDotEntries && entry.name.startsWith('.'))
|
|
189
|
-
return null;
|
|
190
|
-
const abs = join(absDir, entry.name);
|
|
191
|
-
const rel = relPath(root, abs);
|
|
192
|
-
if (opts.respectGitignore && isGitignored(abs, entry.isDirectory(), gitignoreRules))
|
|
193
|
-
return null;
|
|
194
|
-
if (entry.isDirectory()) {
|
|
195
|
-
if (opts.excludeDirs.includes(entry.name))
|
|
196
|
-
return null;
|
|
197
|
-
const nestedRules = opts.respectGitignore
|
|
198
|
-
? [...gitignoreRules, ...(await readGitignoreRules(abs))]
|
|
199
|
-
: gitignoreRules;
|
|
200
|
-
const dirEntries = await sortedEntries(abs, diagnostics);
|
|
201
|
-
const sidecar = await sidecarDescription(abs, rel, dirEntries, opts, nestedRules, diagnostics);
|
|
202
|
-
const children = [];
|
|
203
|
-
let readmeDescription;
|
|
204
|
-
for (const child of dirEntries) {
|
|
205
|
-
if (isDirSidecarName(child.name))
|
|
206
|
-
continue; // consumed by sidecar above
|
|
207
|
-
const node = await scanEntry(root, abs, child, opts, provider, diagnostics, nestedRules, budget);
|
|
208
|
-
if (node === null)
|
|
209
|
-
continue;
|
|
210
|
-
children.push(node);
|
|
211
|
-
if (readmeDescription === undefined &&
|
|
212
|
-
node.kind === 'file' &&
|
|
213
|
-
node.name.toLowerCase() === 'readme' &&
|
|
214
|
-
node.item !== undefined &&
|
|
215
|
-
!node.item.description.startsWith('Undocumented')) {
|
|
216
|
-
readmeDescription = node.item.description;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
if (children.length === 0)
|
|
220
|
-
return null;
|
|
221
|
-
const node = { name: entry.name, path: rel, kind: 'dir', children };
|
|
222
|
-
const dirDescription = sidecar ?? readmeDescription;
|
|
223
|
-
if (dirDescription !== undefined)
|
|
224
|
-
node.description = dirDescription;
|
|
225
|
-
return node;
|
|
226
|
-
}
|
|
227
|
-
if (entry.isFile() && extname(entry.name).toLowerCase() === MARKDOWN_EXT) {
|
|
228
|
-
if (isExcludedFileName(entry.name, opts.excludeFiles))
|
|
229
|
-
return null;
|
|
230
|
-
let content;
|
|
231
|
-
try {
|
|
232
|
-
content = await readFile(abs, 'utf8');
|
|
233
|
-
}
|
|
234
|
-
catch {
|
|
235
|
-
// routes port: an unreadable Markdown file still becomes a bare-path
|
|
236
|
-
// route (diagnostic fires, the entry survives) — it must not silently
|
|
237
|
-
// vanish from navigation, and it still consumes the maxFiles budget.
|
|
238
|
-
diagnostics.push({
|
|
239
|
-
code: 'unreadable-file',
|
|
240
|
-
severity: 'warning',
|
|
241
|
-
message: `Unable to read Markdown file ${rel}.`,
|
|
242
|
-
path: rel,
|
|
243
|
-
audience: 'maintainer',
|
|
244
|
-
});
|
|
245
|
-
content = null;
|
|
246
|
-
}
|
|
247
|
-
const extracted = content === null ? null : await provider.extract({ path: rel, content });
|
|
248
|
-
const description = extracted !== null && extracted.trim() !== ''
|
|
249
|
-
? extracted
|
|
250
|
-
: content === null
|
|
251
|
-
? `Undocumented — unreadable file ${rel}`
|
|
252
|
-
: placeholder(rel, diagnostics);
|
|
253
|
-
budget.files += 1;
|
|
254
|
-
const item = { name: stem(entry.name), description, locator: { kind: 'file', path: rel } };
|
|
255
|
-
return { name: item.name, path: rel, kind: 'file', item };
|
|
256
|
-
}
|
|
257
|
-
return null;
|
|
258
|
-
}
|
|
259
|
-
async function sortedEntries(dir, diagnostics) {
|
|
260
|
-
let entries;
|
|
261
|
-
try {
|
|
262
|
-
entries = await readdir(dir, { withFileTypes: true });
|
|
263
|
-
}
|
|
264
|
-
catch {
|
|
265
|
-
diagnostics.push({
|
|
266
|
-
code: 'unreadable-directory',
|
|
267
|
-
severity: 'warning',
|
|
268
|
-
message: `Unable to read directory.`,
|
|
269
|
-
path: dir,
|
|
270
|
-
audience: 'maintainer',
|
|
271
|
-
});
|
|
272
|
-
return [];
|
|
273
|
-
}
|
|
274
|
-
return entries.sort((a, b) => a.name.localeCompare(b.name));
|
|
275
|
-
}
|
|
276
|
-
function rootDiagnostic(code, message) {
|
|
277
|
-
return { code, severity: 'warning', message, path: '.', audience: 'consumer' };
|
|
278
|
-
}
|
|
279
|
-
function placeholder(relPath, diagnostics) {
|
|
280
|
-
diagnostics.push({
|
|
281
|
-
code: 'no-description',
|
|
282
|
-
severity: 'warning',
|
|
283
|
-
// The code states the condition; the message carries only the datum
|
|
284
|
-
// (coggit's WARN | code | source=... convention — no restating sentence).
|
|
285
|
-
message: relPath,
|
|
286
|
-
path: relPath,
|
|
287
|
-
audience: 'maintainer',
|
|
288
|
-
});
|
|
289
|
-
return `Undocumented — add a description to ${relPath}`;
|
|
290
|
-
}
|
|
291
|
-
function rootNode(root) {
|
|
292
|
-
const name = basename(root);
|
|
293
|
-
return { name: name === '' || name === '.' || name === '/' ? 'root' : name, path: '', kind: 'dir' };
|
|
294
|
-
}
|
|
295
|
-
function stem(fileName) {
|
|
296
|
-
return fileName.slice(0, fileName.length - extname(fileName).length);
|
|
297
|
-
}
|
|
298
|
-
function relPath(root, abs) {
|
|
299
|
-
return relative(root, abs).split(sep).join('/');
|
|
300
|
-
}
|
|
301
|
-
//# sourceMappingURL=scan.js.map
|
package/dist/scan.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../src/scan.ts"],"names":[],"mappings":"AAA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