@navbook/cli 0.1.2 → 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.
- package/dist/commands/complete.js +124 -0
- package/dist/commands/complete.js.map +1 -0
- package/dist/{cli/commands → commands}/compose.js +5 -3
- package/dist/commands/compose.js.map +1 -0
- package/dist/commands/doctor.js +56 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/entity.js +252 -0
- package/dist/commands/entity.js.map +1 -0
- package/dist/commands/feature.js +202 -0
- package/dist/commands/feature.js.map +1 -0
- package/dist/commands/init.js +23 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/{cli/commands → commands}/install.js +1 -2
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/issue.js +89 -0
- package/dist/commands/issue.js.map +1 -0
- package/dist/commands/policy.js +49 -0
- package/dist/commands/policy.js.map +1 -0
- package/dist/commands/pr.js +311 -0
- package/dist/commands/pr.js.map +1 -0
- package/dist/context.js +21 -0
- package/dist/context.js.map +1 -0
- package/dist/{cli/editor.js → editor.js} +1 -1
- package/dist/editor.js.map +1 -0
- package/dist/errors.js.map +1 -0
- package/dist/install/completions.js.map +1 -0
- package/dist/{cli/install → install}/hook.js +1 -1
- package/dist/install/hook.js.map +1 -0
- package/dist/{cli/main.js → main.js} +10 -0
- package/dist/main.js.map +1 -0
- package/dist/{cli/program.js → program.js} +162 -23
- package/dist/program.js.map +1 -0
- package/dist/{cli/prompt.js → prompt.js} +11 -0
- package/dist/prompt.js.map +1 -0
- package/dist/render/colors.js.map +1 -0
- package/dist/render/detail.js +197 -0
- package/dist/render/detail.js.map +1 -0
- package/dist/render/table.js.map +1 -0
- package/dist/sort.js +77 -0
- package/dist/sort.js.map +1 -0
- package/package.json +15 -21
- package/README.md +0 -165
- package/dist/cli/commands/complete.d.ts +0 -9
- package/dist/cli/commands/complete.js +0 -72
- package/dist/cli/commands/complete.js.map +0 -1
- package/dist/cli/commands/compose.d.ts +0 -27
- package/dist/cli/commands/compose.js.map +0 -1
- package/dist/cli/commands/doctor.d.ts +0 -14
- package/dist/cli/commands/doctor.js +0 -127
- package/dist/cli/commands/doctor.js.map +0 -1
- package/dist/cli/commands/entity.d.ts +0 -55
- package/dist/cli/commands/entity.js +0 -209
- package/dist/cli/commands/entity.js.map +0 -1
- package/dist/cli/commands/init.d.ts +0 -11
- package/dist/cli/commands/init.js +0 -39
- package/dist/cli/commands/init.js.map +0 -1
- package/dist/cli/commands/install.d.ts +0 -17
- package/dist/cli/commands/install.js.map +0 -1
- package/dist/cli/commands/issue.d.ts +0 -12
- package/dist/cli/commands/issue.js +0 -42
- package/dist/cli/commands/issue.js.map +0 -1
- package/dist/cli/commands/pr.d.ts +0 -64
- package/dist/cli/commands/pr.js +0 -466
- package/dist/cli/commands/pr.js.map +0 -1
- package/dist/cli/commit-flow.d.ts +0 -27
- package/dist/cli/commit-flow.js +0 -47
- package/dist/cli/commit-flow.js.map +0 -1
- package/dist/cli/context.d.ts +0 -39
- package/dist/cli/context.js +0 -93
- package/dist/cli/context.js.map +0 -1
- package/dist/cli/editor.d.ts +0 -23
- package/dist/cli/editor.js.map +0 -1
- package/dist/cli/errors.d.ts +0 -17
- package/dist/cli/errors.js.map +0 -1
- package/dist/cli/history-checks.d.ts +0 -21
- package/dist/cli/history-checks.js +0 -134
- package/dist/cli/history-checks.js.map +0 -1
- package/dist/cli/install/completions.d.ts +0 -19
- package/dist/cli/install/completions.js.map +0 -1
- package/dist/cli/install/hook.d.ts +0 -20
- package/dist/cli/install/hook.js.map +0 -1
- package/dist/cli/main.d.ts +0 -14
- package/dist/cli/main.js.map +0 -1
- package/dist/cli/program.d.ts +0 -23
- package/dist/cli/program.js.map +0 -1
- package/dist/cli/prompt.d.ts +0 -22
- package/dist/cli/prompt.js.map +0 -1
- package/dist/cli/render/colors.d.ts +0 -13
- package/dist/cli/render/colors.js.map +0 -1
- package/dist/cli/render/detail.d.ts +0 -10
- package/dist/cli/render/detail.js +0 -105
- package/dist/cli/render/detail.js.map +0 -1
- package/dist/cli/render/table.d.ts +0 -19
- package/dist/cli/render/table.js.map +0 -1
- package/dist/cli/resolve.d.ts +0 -17
- package/dist/cli/resolve.js +0 -68
- package/dist/cli/resolve.js.map +0 -1
- package/dist/cli/workspace.d.ts +0 -52
- package/dist/cli/workspace.js +0 -178
- package/dist/cli/workspace.js.map +0 -1
- package/dist/core/comments.d.ts +0 -31
- package/dist/core/comments.js +0 -80
- package/dist/core/comments.js.map +0 -1
- package/dist/core/files.d.ts +0 -88
- package/dist/core/files.js +0 -441
- package/dist/core/files.js.map +0 -1
- package/dist/core/frontmatter.d.ts +0 -63
- package/dist/core/frontmatter.js +0 -149
- package/dist/core/frontmatter.js.map +0 -1
- package/dist/core/id.d.ts +0 -46
- package/dist/core/id.js +0 -66
- package/dist/core/id.js.map +0 -1
- package/dist/core/index.d.ts +0 -19
- package/dist/core/index.js +0 -20
- package/dist/core/index.js.map +0 -1
- package/dist/core/json.d.ts +0 -18
- package/dist/core/json.js +0 -51
- package/dist/core/json.js.map +0 -1
- package/dist/core/ops.d.ts +0 -92
- package/dist/core/ops.js +0 -173
- package/dist/core/ops.js.map +0 -1
- package/dist/core/person.d.ts +0 -20
- package/dist/core/person.js +0 -50
- package/dist/core/person.js.map +0 -1
- package/dist/core/query.d.ts +0 -30
- package/dist/core/query.js +0 -106
- package/dist/core/query.js.map +0 -1
- package/dist/core/refs.d.ts +0 -12
- package/dist/core/refs.js +0 -36
- package/dist/core/refs.js.map +0 -1
- package/dist/core/slug.d.ts +0 -22
- package/dist/core/slug.js +0 -40
- package/dist/core/slug.js.map +0 -1
- package/dist/core/time.d.ts +0 -14
- package/dist/core/time.js +0 -37
- package/dist/core/time.js.map +0 -1
- package/dist/core/tree.d.ts +0 -94
- package/dist/core/tree.js +0 -237
- package/dist/core/tree.js.map +0 -1
- package/dist/core/validate.d.ts +0 -55
- package/dist/core/validate.js +0 -312
- package/dist/core/validate.js.map +0 -1
- package/dist/git/config.d.ts +0 -12
- package/dist/git/config.js +0 -27
- package/dist/git/config.js.map +0 -1
- package/dist/git/exec.d.ts +0 -35
- package/dist/git/exec.js +0 -58
- package/dist/git/exec.js.map +0 -1
- package/dist/git/history.d.ts +0 -35
- package/dist/git/history.js +0 -82
- package/dist/git/history.js.map +0 -1
- package/dist/git/index-ops.d.ts +0 -20
- package/dist/git/index-ops.js +0 -45
- package/dist/git/index-ops.js.map +0 -1
- package/dist/git/merge.d.ts +0 -27
- package/dist/git/merge.js +0 -57
- package/dist/git/merge.js.map +0 -1
- package/dist/git/refscan.d.ts +0 -32
- package/dist/git/refscan.js +0 -82
- package/dist/git/refscan.js.map +0 -1
- package/dist/git/repo.d.ts +0 -45
- package/dist/git/repo.js +0 -95
- package/dist/git/repo.js.map +0 -1
- /package/dist/{cli/errors.js → errors.js} +0 -0
- /package/dist/{cli/install → install}/completions.js +0 -0
- /package/dist/{cli/render → render}/colors.js +0 -0
- /package/dist/{cli/render → render}/table.js +0 -0
package/dist/core/ops.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ops.js","sourceRoot":"","sources":["../../src/core/ops.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAiB,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAmD,SAAS,EAAE,MAAM,WAAW,CAAC;AAmBvF,2EAA2E;AAC3E,MAAM,UAAU,SAAS,CAAC,IAAU;IAClC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QAC1B,IAA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AAE,CAAC;QACzE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC;QACtD,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;KAC3C,CAAC;AACJ,CAAC;AASD,uEAAuE;AACvE,MAAM,UAAU,eAAe,CAAC,MAAoB,EAAE,MAAmB;IACvE,MAAM,GAAG,GAAG,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACtD,QAAQ,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1B,OAAO;QACL,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;QACzE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;QACrD,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;KAC3C,CAAC;AACJ,CAAC"}
|
package/dist/core/person.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* People — spec 02 §2.4. RFC 5322 addresses, display name optional. The email
|
|
3
|
-
* address is the identity key and is compared case-insensitively.
|
|
4
|
-
*/
|
|
5
|
-
export interface Person {
|
|
6
|
-
name?: string;
|
|
7
|
-
email: string;
|
|
8
|
-
}
|
|
9
|
-
/** Parse `alice@example.com` or `Alice Smith <alice@example.com>`. */
|
|
10
|
-
export declare function parsePerson(input: string): Person | null;
|
|
11
|
-
/** Render a person back to its RFC 5322 form. */
|
|
12
|
-
export declare function formatPerson(person: Person): string;
|
|
13
|
-
/** Compare two addresses case-insensitively (§2.4). */
|
|
14
|
-
export declare function sameEmail(a: string, b: string): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Match a person against an `author:`/`assignee:` query value: the full address
|
|
17
|
-
* matches case-insensitively, and a bare domain fragment matches as a substring
|
|
18
|
-
* of the part after `@` (spec 04, query grammar).
|
|
19
|
-
*/
|
|
20
|
-
export declare function personMatches(queryValue: string, personField: string): boolean;
|
package/dist/core/person.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* People — spec 02 §2.4. RFC 5322 addresses, display name optional. The email
|
|
3
|
-
* address is the identity key and is compared case-insensitively.
|
|
4
|
-
*/
|
|
5
|
-
const ADDRESS_PATTERN = /^[^\s<>@,;]+@[^\s<>@,;]+\.[^\s<>@,;]+$/;
|
|
6
|
-
const NAMED_PATTERN = /^(.*?)\s*<([^<>]+)>$/;
|
|
7
|
-
/** Parse `alice@example.com` or `Alice Smith <alice@example.com>`. */
|
|
8
|
-
export function parsePerson(input) {
|
|
9
|
-
const text = input.trim();
|
|
10
|
-
if (text === "")
|
|
11
|
-
return null;
|
|
12
|
-
const named = NAMED_PATTERN.exec(text);
|
|
13
|
-
if (named) {
|
|
14
|
-
const email = named[2].trim();
|
|
15
|
-
if (!ADDRESS_PATTERN.test(email))
|
|
16
|
-
return null;
|
|
17
|
-
const name = named[1].replace(/^"|"$/g, "").trim();
|
|
18
|
-
return name === "" ? { email } : { name, email };
|
|
19
|
-
}
|
|
20
|
-
if (!ADDRESS_PATTERN.test(text))
|
|
21
|
-
return null;
|
|
22
|
-
return { email: text };
|
|
23
|
-
}
|
|
24
|
-
/** Render a person back to its RFC 5322 form. */
|
|
25
|
-
export function formatPerson(person) {
|
|
26
|
-
return person.name ? `${person.name} <${person.email}>` : person.email;
|
|
27
|
-
}
|
|
28
|
-
/** Compare two addresses case-insensitively (§2.4). */
|
|
29
|
-
export function sameEmail(a, b) {
|
|
30
|
-
return a.trim().toLowerCase() === b.trim().toLowerCase();
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Match a person against an `author:`/`assignee:` query value: the full address
|
|
34
|
-
* matches case-insensitively, and a bare domain fragment matches as a substring
|
|
35
|
-
* of the part after `@` (spec 04, query grammar).
|
|
36
|
-
*/
|
|
37
|
-
export function personMatches(queryValue, personField) {
|
|
38
|
-
const needle = queryValue.trim().toLowerCase();
|
|
39
|
-
if (needle === "")
|
|
40
|
-
return false;
|
|
41
|
-
const person = parsePerson(personField);
|
|
42
|
-
const email = (person?.email ?? personField).trim().toLowerCase();
|
|
43
|
-
if (email === needle)
|
|
44
|
-
return true;
|
|
45
|
-
if (needle.includes("@"))
|
|
46
|
-
return false;
|
|
47
|
-
const domain = email.slice(email.indexOf("@") + 1);
|
|
48
|
-
return domain.includes(needle);
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=person.js.map
|
package/dist/core/person.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"person.js","sourceRoot":"","sources":["../../src/core/person.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,MAAM,eAAe,GAAG,wCAAwC,CAAC;AACjE,MAAM,aAAa,GAAG,sBAAsB,CAAC;AAE7C,sEAAsE;AACtE,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC1B,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAC7B,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,KAAK,GAAI,KAAK,CAAC,CAAC,CAAY,CAAC,IAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAC9C,MAAM,IAAI,GAAI,KAAK,CAAC,CAAC,CAAY,CAAC,OAAO,CAAC,QAAQ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C,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACnD,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC"}
|
package/dist/core/query.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Query grammar for `nav issue list` / `nav pr list` — spec 04.
|
|
3
|
-
*
|
|
4
|
-
* Terms AND together. Within a single key the semantics follow the field:
|
|
5
|
-
* single-valued fields (`status`, `author`, `milestone`) OR their terms, since
|
|
6
|
-
* requiring two different values at once could never match; multi-valued fields
|
|
7
|
-
* (`label`, `assignee`) AND theirs, matching forge convention.
|
|
8
|
-
*/
|
|
9
|
-
import type { EntityKind, EntityRecord, Status } from "./tree.ts";
|
|
10
|
-
export interface Query {
|
|
11
|
-
status: string[];
|
|
12
|
-
labels: string[];
|
|
13
|
-
assignees: string[];
|
|
14
|
-
authors: string[];
|
|
15
|
-
milestones: string[];
|
|
16
|
-
text: string[];
|
|
17
|
-
}
|
|
18
|
-
export interface QueryError {
|
|
19
|
-
message: string;
|
|
20
|
-
}
|
|
21
|
-
export declare function emptyQuery(): Query;
|
|
22
|
-
/** Statuses a `list` command defaults to when the query names none. */
|
|
23
|
-
export declare function defaultStatuses(): Status[];
|
|
24
|
-
/** Parse query terms. Unknown `key:value` shapes are treated as free text. */
|
|
25
|
-
export declare function parseQuery(terms: readonly string[], kind: EntityKind): Query | QueryError;
|
|
26
|
-
export declare function isQueryError(value: Query | QueryError): value is QueryError;
|
|
27
|
-
/** True when evaluating the query requires reading comment bodies. */
|
|
28
|
-
export declare function needsComments(query: Query): boolean;
|
|
29
|
-
/** Evaluate a query against one entity. */
|
|
30
|
-
export declare function matchesQuery(query: Query, entity: EntityRecord): boolean;
|
package/dist/core/query.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Query grammar for `nav issue list` / `nav pr list` — spec 04.
|
|
3
|
-
*
|
|
4
|
-
* Terms AND together. Within a single key the semantics follow the field:
|
|
5
|
-
* single-valued fields (`status`, `author`, `milestone`) OR their terms, since
|
|
6
|
-
* requiring two different values at once could never match; multi-valued fields
|
|
7
|
-
* (`label`, `assignee`) AND theirs, matching forge convention.
|
|
8
|
-
*/
|
|
9
|
-
import { readAssignees, readLabels } from "./files.js";
|
|
10
|
-
import { personMatches } from "./person.js";
|
|
11
|
-
const KEYED_TERM = /^(status|label|assignee|author|milestone):(.*)$/;
|
|
12
|
-
export function emptyQuery() {
|
|
13
|
-
return { status: [], labels: [], assignees: [], authors: [], milestones: [], text: [] };
|
|
14
|
-
}
|
|
15
|
-
/** Statuses a `list` command defaults to when the query names none. */
|
|
16
|
-
export function defaultStatuses() {
|
|
17
|
-
return ["open"];
|
|
18
|
-
}
|
|
19
|
-
/** Parse query terms. Unknown `key:value` shapes are treated as free text. */
|
|
20
|
-
export function parseQuery(terms, kind) {
|
|
21
|
-
const query = emptyQuery();
|
|
22
|
-
for (const term of terms) {
|
|
23
|
-
if (term.trim() === "")
|
|
24
|
-
continue;
|
|
25
|
-
const match = KEYED_TERM.exec(term);
|
|
26
|
-
if (!match) {
|
|
27
|
-
query.text.push(term);
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
const key = match[1];
|
|
31
|
-
const value = match[2].trim();
|
|
32
|
-
if (value === "")
|
|
33
|
-
return { message: `query term '${term}' is missing a value` };
|
|
34
|
-
switch (key) {
|
|
35
|
-
case "status": {
|
|
36
|
-
const allowed = kind === "issue" ? ["open", "closed"] : ["open", "merged", "closed"];
|
|
37
|
-
if (!allowed.includes(value)) {
|
|
38
|
-
return {
|
|
39
|
-
message: `unknown status '${value}' for ${kind === "issue" ? "issues" : "pull requests"} (expected ${allowed.join(", ")})`,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
query.status.push(value);
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
case "label":
|
|
46
|
-
query.labels.push(value);
|
|
47
|
-
break;
|
|
48
|
-
case "assignee":
|
|
49
|
-
query.assignees.push(value);
|
|
50
|
-
break;
|
|
51
|
-
case "author":
|
|
52
|
-
query.authors.push(value);
|
|
53
|
-
break;
|
|
54
|
-
default:
|
|
55
|
-
query.milestones.push(value);
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return query;
|
|
60
|
-
}
|
|
61
|
-
export function isQueryError(value) {
|
|
62
|
-
return value.message !== undefined;
|
|
63
|
-
}
|
|
64
|
-
/** True when evaluating the query requires reading comment bodies. */
|
|
65
|
-
export function needsComments(query) {
|
|
66
|
-
return query.text.length > 0;
|
|
67
|
-
}
|
|
68
|
-
/** Evaluate a query against one entity. */
|
|
69
|
-
export function matchesQuery(query, entity) {
|
|
70
|
-
const statuses = query.status.length > 0 ? query.status : defaultStatuses();
|
|
71
|
-
if (!statuses.includes(entity.status))
|
|
72
|
-
return false;
|
|
73
|
-
const labels = readLabels(entity.fm).map((l) => l.toLowerCase());
|
|
74
|
-
for (const wanted of query.labels) {
|
|
75
|
-
if (!labels.includes(wanted.toLowerCase()))
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
const assignees = readAssignees(entity.fm);
|
|
79
|
-
for (const wanted of query.assignees) {
|
|
80
|
-
if (!assignees.some((a) => personMatches(wanted, a)))
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
if (query.authors.length > 0) {
|
|
84
|
-
const author = typeof entity.fm.author === "string" ? entity.fm.author : "";
|
|
85
|
-
if (!query.authors.some((wanted) => personMatches(wanted, author)))
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
if (query.milestones.length > 0) {
|
|
89
|
-
const milestone = typeof entity.fm.milestone === "string" ? entity.fm.milestone : "";
|
|
90
|
-
if (!query.milestones.some((wanted) => wanted === milestone))
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
for (const needle of query.text) {
|
|
94
|
-
if (!matchesText(needle.toLowerCase(), entity))
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
return true;
|
|
98
|
-
}
|
|
99
|
-
function matchesText(needle, entity) {
|
|
100
|
-
if (entity.title.toLowerCase().includes(needle))
|
|
101
|
-
return true;
|
|
102
|
-
if (entity.body.toLowerCase().includes(needle))
|
|
103
|
-
return true;
|
|
104
|
-
return entity.comments.some((comment) => comment.body.toLowerCase().includes(needle));
|
|
105
|
-
}
|
|
106
|
-
//# sourceMappingURL=query.js.map
|
package/dist/core/query.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/core/query.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAgB5C,MAAM,UAAU,GAAG,iDAAiD,CAAC;AAErE,MAAM,UAAU,UAAU;IACxB,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AAC1F,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,MAAM,CAAC,CAAC;AAClB,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,UAAU,CAAC,KAAwB,EAAE,IAAgB;IACnE,MAAM,KAAK,GAAG,UAAU,EAAE,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE;YAAE,SAAS;QACjC,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,KAAK,CAAC,IAAI,CAAC,IA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CAAC,MAAM,CAAC,CAAC,CAAC;AACxF,CAAC"}
|
package/dist/core/refs.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* References — spec 02 §2.9. `#<id>` in prose, `Refs:`/`Closes:` git trailers in
|
|
3
|
-
* commit messages. Mentions never change state; they only document intent.
|
|
4
|
-
*/
|
|
5
|
-
/** Extract `#id` references from Markdown prose, ignoring English words. */
|
|
6
|
-
export declare function extractProseRefs(markdown: string): string[];
|
|
7
|
-
export interface TrailerRefs {
|
|
8
|
-
refs: string[];
|
|
9
|
-
closes: string[];
|
|
10
|
-
}
|
|
11
|
-
/** Extract `Refs:` and `Closes:` trailers from a commit message. */
|
|
12
|
-
export declare function extractTrailerRefs(message: string): TrailerRefs;
|
package/dist/core/refs.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* References — spec 02 §2.9. `#<id>` in prose, `Refs:`/`Closes:` git trailers in
|
|
3
|
-
* commit messages. Mentions never change state; they only document intent.
|
|
4
|
-
*/
|
|
5
|
-
import { isId } from "./id.js";
|
|
6
|
-
const PROSE_REF = /(^|[^\w#/`])#([a-z][a-z0-9]{7})\b/g;
|
|
7
|
-
const TRAILER_LINE = /^(Refs|Closes):[ \t]*(.+?)[ \t]*$/gim;
|
|
8
|
-
/** Extract `#id` references from Markdown prose, ignoring English words. */
|
|
9
|
-
export function extractProseRefs(markdown) {
|
|
10
|
-
const out = new Set();
|
|
11
|
-
for (const match of markdown.matchAll(PROSE_REF)) {
|
|
12
|
-
const id = match[2];
|
|
13
|
-
if (isId(id))
|
|
14
|
-
out.add(id);
|
|
15
|
-
}
|
|
16
|
-
return [...out];
|
|
17
|
-
}
|
|
18
|
-
/** Extract `Refs:` and `Closes:` trailers from a commit message. */
|
|
19
|
-
export function extractTrailerRefs(message) {
|
|
20
|
-
const refs = new Set();
|
|
21
|
-
const closes = new Set();
|
|
22
|
-
for (const match of message.matchAll(TRAILER_LINE)) {
|
|
23
|
-
const kind = match[1].toLowerCase();
|
|
24
|
-
for (const token of match[2].split(/[\s,]+/)) {
|
|
25
|
-
const id = token.replace(/^#/, "");
|
|
26
|
-
if (!isId(id))
|
|
27
|
-
continue;
|
|
28
|
-
if (kind === "closes")
|
|
29
|
-
closes.add(id);
|
|
30
|
-
else
|
|
31
|
-
refs.add(id);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return { refs: [...refs], closes: [...closes] };
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=refs.js.map
|
package/dist/core/refs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refs.js","sourceRoot":"","sources":["../../src/core/refs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,SAAS,GAAG,oCAAoC,CAAC;AACvD,MAAM,YAAY,GAAG,sCAAsC,CAAC;AAE5D,4EAA4E;AAC5E,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACjD,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAW,CAAC;QAC9B,IAAI,IAAI,CAAC,EAAE,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;AAClB,CAAC;AAOD,oEAAoE;AACpE,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QACnD,MAAM,IAAI,GAAI,KAAK,CAAC,CAAC,CAAY,CAAC,WAAW,EAAE,CAAC;QAChD,KAAK,MAAM,KAAK,IAAK,KAAK,CAAC,CAAC,CAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzD,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAAE,SAAS;YACxB,IAAI,IAAI,KAAK,QAAQ;gBAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;;gBACjC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC;AAClD,CAAC"}
|
package/dist/core/slug.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Entity directory names — spec 02 §2.3: `<id>-<slug>`.
|
|
3
|
-
*/
|
|
4
|
-
export declare const MAX_SLUG_LENGTH = 50;
|
|
5
|
-
export declare const SLUG_FALLBACK = "untitled";
|
|
6
|
-
export declare const DIR_NAME_PATTERN: RegExp;
|
|
7
|
-
export declare const SLUG_PATTERN: RegExp;
|
|
8
|
-
/**
|
|
9
|
-
* Derive a display slug from a title: fold accents, lowercase, collapse every
|
|
10
|
-
* run of non-alphanumerics to a single hyphen, cap at 50 characters.
|
|
11
|
-
*
|
|
12
|
-
* Titles with no ASCII-representable alphanumerics (CJK, emoji, punctuation
|
|
13
|
-
* only) slug to {@link SLUG_FALLBACK}, since §2.3 requires at least one segment.
|
|
14
|
-
*/
|
|
15
|
-
export declare function slugify(title: string): string;
|
|
16
|
-
/** Compose an entity directory name. */
|
|
17
|
-
export declare function dirName(id: string, slug: string): string;
|
|
18
|
-
/** Split an entity directory name, or return null if it violates the grammar. */
|
|
19
|
-
export declare function parseDirName(name: string): {
|
|
20
|
-
id: string;
|
|
21
|
-
slug: string;
|
|
22
|
-
} | null;
|
package/dist/core/slug.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Entity directory names — spec 02 §2.3: `<id>-<slug>`.
|
|
3
|
-
*/
|
|
4
|
-
import { isId } from "./id.js";
|
|
5
|
-
export const MAX_SLUG_LENGTH = 50;
|
|
6
|
-
export const SLUG_FALLBACK = "untitled";
|
|
7
|
-
export const DIR_NAME_PATTERN = /^[a-z][a-z0-9]{7}-[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
8
|
-
export const SLUG_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
9
|
-
/**
|
|
10
|
-
* Derive a display slug from a title: fold accents, lowercase, collapse every
|
|
11
|
-
* run of non-alphanumerics to a single hyphen, cap at 50 characters.
|
|
12
|
-
*
|
|
13
|
-
* Titles with no ASCII-representable alphanumerics (CJK, emoji, punctuation
|
|
14
|
-
* only) slug to {@link SLUG_FALLBACK}, since §2.3 requires at least one segment.
|
|
15
|
-
*/
|
|
16
|
-
export function slugify(title) {
|
|
17
|
-
const folded = title.normalize("NFKD").replace(/\p{M}/gu, "");
|
|
18
|
-
let slug = folded
|
|
19
|
-
.toLowerCase()
|
|
20
|
-
.replace(/[^a-z0-9]+/g, "-")
|
|
21
|
-
.replace(/^-+|-+$/g, "");
|
|
22
|
-
if (slug.length > MAX_SLUG_LENGTH) {
|
|
23
|
-
slug = slug.slice(0, MAX_SLUG_LENGTH).replace(/-+$/, "");
|
|
24
|
-
}
|
|
25
|
-
return slug === "" ? SLUG_FALLBACK : slug;
|
|
26
|
-
}
|
|
27
|
-
/** Compose an entity directory name. */
|
|
28
|
-
export function dirName(id, slug) {
|
|
29
|
-
return `${id}-${slug}`;
|
|
30
|
-
}
|
|
31
|
-
/** Split an entity directory name, or return null if it violates the grammar. */
|
|
32
|
-
export function parseDirName(name) {
|
|
33
|
-
if (!DIR_NAME_PATTERN.test(name))
|
|
34
|
-
return null;
|
|
35
|
-
const id = name.slice(0, 8);
|
|
36
|
-
if (!isId(id))
|
|
37
|
-
return null;
|
|
38
|
-
return { id, slug: name.slice(9) };
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=slug.js.map
|
package/dist/core/slug.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slug.js","sourceRoot":"","sources":["../../src/core/slug.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;AACxC,MAAM,CAAC,MAAM,gBAAgB,GAAG,2CAA2C,CAAC;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC9D,IAAI,IAAI,GAAG,MAAM;SACd,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC3B,IAAI,IAAI,CAAC,MAAM,GAAG,eAAe,EAAE,CAAC;QAClC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5C,CAAC;AAED,wCAAwC;AACxC,MAAM,UAAU,OAAO,CAAC,EAAU,EAAE,IAAY;IAC9C,OAAO,GAAG,EAAE,IAAI,IAAI,EAAE,CAAC;AACzB,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9C,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5B,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACrC,CAAC"}
|
package/dist/core/time.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Timestamp helpers — spec 02 §2.4 (ISO 8601, UTC recommended).
|
|
3
|
-
*
|
|
4
|
-
* Frontmatter timestamps are display data; git history is authoritative
|
|
5
|
-
* wherever ordering or authority matters.
|
|
6
|
-
*/
|
|
7
|
-
/** Normalize an instant to `YYYY-MM-DDTHH:MM:SSZ` (no sub-second precision). */
|
|
8
|
-
export declare function toIsoSeconds(date: Date): string;
|
|
9
|
-
/** Compact UTC stamp used in comment filenames: `YYYY-MM-DDTHHMMSSZ` (§2.6). */
|
|
10
|
-
export declare function toCompactStamp(date: Date): string;
|
|
11
|
-
/** Parse an ISO 8601 timestamp, returning null when it is not a valid instant. */
|
|
12
|
-
export declare function parseIso(value: string): Date | null;
|
|
13
|
-
/** Expand a compact comment-filename stamp into an ISO 8601 timestamp. */
|
|
14
|
-
export declare function fromCompactStamp(stamp: string): Date | null;
|
package/dist/core/time.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Timestamp helpers — spec 02 §2.4 (ISO 8601, UTC recommended).
|
|
3
|
-
*
|
|
4
|
-
* Frontmatter timestamps are display data; git history is authoritative
|
|
5
|
-
* wherever ordering or authority matters.
|
|
6
|
-
*/
|
|
7
|
-
/** Normalize an instant to `YYYY-MM-DDTHH:MM:SSZ` (no sub-second precision). */
|
|
8
|
-
export function toIsoSeconds(date) {
|
|
9
|
-
return `${date.toISOString().slice(0, 19)}Z`;
|
|
10
|
-
}
|
|
11
|
-
/** Compact UTC stamp used in comment filenames: `YYYY-MM-DDTHHMMSSZ` (§2.6). */
|
|
12
|
-
export function toCompactStamp(date) {
|
|
13
|
-
const iso = date.toISOString();
|
|
14
|
-
return `${iso.slice(0, 10)}T${iso.slice(11, 13)}${iso.slice(14, 16)}${iso.slice(17, 19)}Z`;
|
|
15
|
-
}
|
|
16
|
-
/** Parse an ISO 8601 timestamp, returning null when it is not a valid instant. */
|
|
17
|
-
export function parseIso(value) {
|
|
18
|
-
const trimmed = value.trim();
|
|
19
|
-
if (!/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:?\d{2})?)?$/.test(trimmed)) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
const date = new Date(trimmed);
|
|
23
|
-
return Number.isNaN(date.getTime()) ? null : date;
|
|
24
|
-
}
|
|
25
|
-
/** Expand a compact comment-filename stamp into an ISO 8601 timestamp. */
|
|
26
|
-
export function fromCompactStamp(stamp) {
|
|
27
|
-
const match = /^(\d{4}-\d{2}-\d{2})T(\d{2})(\d{2})(\d{2})Z$/.exec(stamp);
|
|
28
|
-
if (!match)
|
|
29
|
-
return null;
|
|
30
|
-
const iso = `${match[1]}T${match[2]}:${match[3]}:${match[4]}Z`;
|
|
31
|
-
const date = new Date(iso);
|
|
32
|
-
if (Number.isNaN(date.getTime()))
|
|
33
|
-
return null;
|
|
34
|
-
// Reject values that rolled over (e.g. month 13, day 32, hour 25).
|
|
35
|
-
return toCompactStamp(date) === stamp ? date : null;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=time.js.map
|
package/dist/core/time.js.map
DELET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,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;IAC/D,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9C,mEAAmE;IACnE,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACtD,CAAC"}
|
package/dist/core/tree.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The in-memory model of a `.navbook/` tree — spec 02 §2.1.
|
|
3
|
-
*
|
|
4
|
-
* Input is a flat map of paths (relative to `.navbook/`) to file contents, so
|
|
5
|
-
* the model works equally well over a working tree, a git index, or the blobs
|
|
6
|
-
* of a branch that is not checked out.
|
|
7
|
-
*/
|
|
8
|
-
import { type ParsedFile } from "./files.ts";
|
|
9
|
-
export type NavTree = ReadonlyMap<string, string>;
|
|
10
|
-
export type EntityKind = "issue" | "pr";
|
|
11
|
-
export type Status = "open" | "closed" | "merged";
|
|
12
|
-
export declare const ISSUE_STATUSES: readonly Status[];
|
|
13
|
-
export declare const PR_STATUSES: readonly Status[];
|
|
14
|
-
export interface CommentRecord {
|
|
15
|
-
id: string;
|
|
16
|
-
fileName: string;
|
|
17
|
-
/** Path relative to `.navbook/`. */
|
|
18
|
-
path: string;
|
|
19
|
-
stamp: string;
|
|
20
|
-
date: Date;
|
|
21
|
-
author: string;
|
|
22
|
-
replyTo?: string;
|
|
23
|
-
body: string;
|
|
24
|
-
parsed: ParsedFile;
|
|
25
|
-
}
|
|
26
|
-
export interface EntityRecord {
|
|
27
|
-
kind: EntityKind;
|
|
28
|
-
id: string;
|
|
29
|
-
slug: string;
|
|
30
|
-
dirName: string;
|
|
31
|
-
status: Status;
|
|
32
|
-
/** True when the entity lives under `.navbook/archive/` (spec 03 §3.6). */
|
|
33
|
-
archived: boolean;
|
|
34
|
-
archiveYear?: string;
|
|
35
|
-
/** Directory path relative to `.navbook/`. */
|
|
36
|
-
dirPath: string;
|
|
37
|
-
/** Path of `issue.md` or `pr.md`, relative to `.navbook/`. */
|
|
38
|
-
filePath: string;
|
|
39
|
-
parsed: ParsedFile;
|
|
40
|
-
fm: Record<string, unknown>;
|
|
41
|
-
body: string;
|
|
42
|
-
title: string;
|
|
43
|
-
comments: CommentRecord[];
|
|
44
|
-
/** Extra files inside the entity directory, preserved untouched (§2.1). */
|
|
45
|
-
extraFiles: string[];
|
|
46
|
-
}
|
|
47
|
-
export interface StructuralProblem {
|
|
48
|
-
path: string;
|
|
49
|
-
message: string;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* An entity directory whose name is well formed but which has no `issue.md` /
|
|
53
|
-
* `pr.md`. The usual cause is a comment stranded by a merge (spec 03 §3.3.1);
|
|
54
|
-
* recording the stray files lets `doctor --fix` reunite them with their entity.
|
|
55
|
-
*/
|
|
56
|
-
export interface OrphanDirectory {
|
|
57
|
-
kind: EntityKind;
|
|
58
|
-
id: string;
|
|
59
|
-
dirName: string;
|
|
60
|
-
dirPath: string;
|
|
61
|
-
status: Status;
|
|
62
|
-
archived: boolean;
|
|
63
|
-
/** Comment files found under the orphaned directory. */
|
|
64
|
-
commentPaths: string[];
|
|
65
|
-
}
|
|
66
|
-
export interface Repo {
|
|
67
|
-
issues: EntityRecord[];
|
|
68
|
-
prs: EntityRecord[];
|
|
69
|
-
/** Every entity by ID; when IDs collide the first one encountered wins. */
|
|
70
|
-
byId: Map<string, EntityRecord>;
|
|
71
|
-
/** Grammar and layout faults found while walking the tree (doctor check D1). */
|
|
72
|
-
problems: StructuralProblem[];
|
|
73
|
-
/** Well-named directories that hold no entity file (spec 03 §3.3.1). */
|
|
74
|
-
orphans: OrphanDirectory[];
|
|
75
|
-
/** False when the caller deliberately skipped reading comment files. */
|
|
76
|
-
commentsLoaded: boolean;
|
|
77
|
-
/** Paths that were tolerated but not interpreted (reserved names, §2.10). */
|
|
78
|
-
reserved: string[];
|
|
79
|
-
}
|
|
80
|
-
/** Build a {@link Repo} from a flat path→content map. */
|
|
81
|
-
export declare function parseTree(files: NavTree, opts?: {
|
|
82
|
-
commentsLoaded?: boolean;
|
|
83
|
-
}): Repo;
|
|
84
|
-
/** Every entity in the repository, issues first. */
|
|
85
|
-
export declare function allEntities(repo: Repo): EntityRecord[];
|
|
86
|
-
/** Every ID in the repository: entities and comments alike (doctor check D3). */
|
|
87
|
-
export declare function allIds(repo: Repo): {
|
|
88
|
-
id: string;
|
|
89
|
-
path: string;
|
|
90
|
-
}[];
|
|
91
|
-
/** Directory path for an entity of the given kind, status and directory name. */
|
|
92
|
-
export declare function statusDir(kind: EntityKind, status: Status): string;
|
|
93
|
-
/** Locate an entity by exact ID across both kinds. */
|
|
94
|
-
export declare function findById(repo: Repo, id: string): EntityRecord | undefined;
|