@codyn06/cboard 0.0.1 → 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/LICENSE +21 -0
- package/README.md +71 -3
- package/THIRD_PARTY_NOTICES +29 -0
- package/bin/cboard-context.js +15 -0
- package/bin/cboard.js +5 -0
- package/dist/adapters/bash.d.ts +2 -0
- package/dist/adapters/bash.js +14 -0
- package/dist/adapters/c-family.d.ts +2 -0
- package/dist/adapters/c-family.js +81 -0
- package/dist/adapters/csharp.d.ts +2 -0
- package/dist/adapters/csharp.js +47 -0
- package/dist/adapters/extra-languages.d.ts +3 -0
- package/dist/adapters/extra-languages.js +15 -0
- package/dist/adapters/go.d.ts +2 -0
- package/dist/adapters/go.js +42 -0
- package/dist/adapters/grammar.d.ts +21 -0
- package/dist/adapters/grammar.js +54 -0
- package/dist/adapters/index.d.ts +20 -0
- package/dist/adapters/index.js +62 -0
- package/dist/adapters/java.d.ts +2 -0
- package/dist/adapters/java.js +36 -0
- package/dist/adapters/kotlin.d.ts +2 -0
- package/dist/adapters/kotlin.js +65 -0
- package/dist/adapters/lua-family.d.ts +2 -0
- package/dist/adapters/lua-family.js +186 -0
- package/dist/adapters/php.d.ts +2 -0
- package/dist/adapters/php.js +28 -0
- package/dist/adapters/python.d.ts +2 -0
- package/dist/adapters/python.js +68 -0
- package/dist/adapters/ruby.d.ts +2 -0
- package/dist/adapters/ruby.js +46 -0
- package/dist/adapters/rust.d.ts +2 -0
- package/dist/adapters/rust.js +85 -0
- package/dist/adapters/swift.d.ts +2 -0
- package/dist/adapters/swift.js +38 -0
- package/dist/adapters/types.d.ts +61 -0
- package/dist/adapters/types.js +1 -0
- package/dist/adapters/typescript.d.ts +2 -0
- package/dist/adapters/typescript.js +52 -0
- package/dist/api.d.ts +56 -0
- package/dist/api.js +439 -0
- package/dist/cboard.d.ts +2 -0
- package/dist/cboard.js +151 -0
- package/dist/cli.d.ts +27 -0
- package/dist/cli.js +180 -0
- package/dist/docs-parse.d.ts +64 -0
- package/dist/docs-parse.js +762 -0
- package/dist/docs.d.ts +39 -0
- package/dist/docs.js +243 -0
- package/dist/extract.d.ts +36 -0
- package/dist/extract.js +480 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/issues.d.ts +44 -0
- package/dist/issues.js +138 -0
- package/dist/languages.d.ts +9 -0
- package/dist/languages.js +128 -0
- package/dist/model.d.ts +85 -0
- package/dist/model.js +1 -0
- package/dist/wake.d.ts +13 -0
- package/dist/wake.js +33 -0
- package/grammars/LICENSES/README.md +3 -0
- package/grammars/LICENSES/c.LICENSE +21 -0
- package/grammars/LICENSES/kotlin.LICENSE +21 -0
- package/grammars/LICENSES/lua.LICENSE +21 -0
- package/grammars/LICENSES/luau.LICENSE +21 -0
- package/grammars/LICENSES/swift.LICENSE +21 -0
- package/grammars/manifest.json +39 -0
- package/grammars/tree-sitter-c.wasm +0 -0
- package/grammars/tree-sitter-kotlin.wasm +0 -0
- package/grammars/tree-sitter-lua.wasm +0 -0
- package/grammars/tree-sitter-luau.wasm +0 -0
- package/grammars/tree-sitter-swift.wasm +0 -0
- package/kit/cboard-connect.js +869 -0
- package/kit/cboard-kit/brief.js +512 -0
- package/kit/cboard-kit/config.js +250 -0
- package/kit/cboard-kit/connect-check.js +95 -0
- package/kit/cboard-kit/device.js +192 -0
- package/kit/cboard-kit/drift.js +55 -0
- package/kit/cboard-kit/headers.js +46 -0
- package/kit/cboard-kit/mcp.js +97 -0
- package/kit/cboard-kit/references.js +70 -0
- package/kit/cboard-kit/skill/SKILL.md +170 -0
- package/kit/cboard-kit/wait.js +45 -0
- package/package.json +47 -5
- package/queries/bash/imports.scm +11 -0
- package/queries/bash/symbols.scm +1 -0
- package/queries/c/imports.scm +2 -0
- package/queries/c/symbols.scm +10 -0
- package/queries/cpp/imports.scm +2 -0
- package/queries/cpp/symbols.scm +11 -0
- package/queries/csharp/imports.scm +2 -0
- package/queries/csharp/symbols.scm +10 -0
- package/queries/go/imports.scm +2 -0
- package/queries/go/symbols.scm +8 -0
- package/queries/java/imports.scm +2 -0
- package/queries/java/symbols.scm +9 -0
- package/queries/javascript/imports.scm +3 -0
- package/queries/javascript/symbols.scm +16 -0
- package/queries/kotlin/imports.scm +2 -0
- package/queries/kotlin/symbols.scm +4 -0
- package/queries/lua/imports.scm +5 -0
- package/queries/lua/symbols.scm +6 -0
- package/queries/luau/imports.scm +5 -0
- package/queries/luau/symbols.scm +9 -0
- package/queries/php/imports.scm +6 -0
- package/queries/php/symbols.scm +7 -0
- package/queries/python/imports.scm +3 -0
- package/queries/python/symbols.scm +8 -0
- package/queries/ruby/imports.scm +2 -0
- package/queries/ruby/symbols.scm +4 -0
- package/queries/rust/imports.scm +5 -0
- package/queries/rust/symbols.scm +11 -0
- package/queries/swift/imports.scm +2 -0
- package/queries/swift/symbols.scm +5 -0
- package/queries/typescript/imports.scm +3 -0
- package/queries/typescript/symbols.scm +20 -0
package/dist/docs.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Snapshot } from "./model.js";
|
|
2
|
+
/** `.cboard.json` `docs` block: globs relative to the repository root. */
|
|
3
|
+
export interface DocsConfig {
|
|
4
|
+
include?: string[];
|
|
5
|
+
exclude?: string[];
|
|
6
|
+
}
|
|
7
|
+
/** The optional `docs` block of `.cboard.json`; malformed values are ignored. */
|
|
8
|
+
export declare function docsConfig(root: string): DocsConfig;
|
|
9
|
+
export interface Section {
|
|
10
|
+
heading: string;
|
|
11
|
+
/** Heading line plus content, H3 and deeper folded in. */
|
|
12
|
+
text: string;
|
|
13
|
+
startLine: number;
|
|
14
|
+
endLine: number;
|
|
15
|
+
/** No content except headings. */
|
|
16
|
+
headingOnly: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Splits Markdown at H2 headings (fenced code is skipped). Merges heading-only fragments. */
|
|
19
|
+
export declare function parseMarkdown(text: string): {
|
|
20
|
+
title: string | undefined;
|
|
21
|
+
intro: string;
|
|
22
|
+
sections: Section[];
|
|
23
|
+
};
|
|
24
|
+
/** Maps an ADR status to the decision vocabulary; unknown wording gives no status. */
|
|
25
|
+
export declare function adrStatus(text: string): string | undefined;
|
|
26
|
+
export interface DocsSummary {
|
|
27
|
+
files: number;
|
|
28
|
+
sections: number;
|
|
29
|
+
truncated: number;
|
|
30
|
+
}
|
|
31
|
+
/** Reads the committed HEAD tree and builds the docs-layer snapshot. */
|
|
32
|
+
export declare function extractDocs(root: string, config?: DocsConfig): Snapshot & {
|
|
33
|
+
repo: string;
|
|
34
|
+
commit: string;
|
|
35
|
+
namespace: string;
|
|
36
|
+
summary: DocsSummary;
|
|
37
|
+
};
|
|
38
|
+
/** `cboard docs sync`: Markdown docs of this repository into the graph. */
|
|
39
|
+
export declare function docsSync(argv: string[]): Promise<void>;
|
package/dist/docs.js
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { posix, resolve } from "node:path";
|
|
4
|
+
import { ContextApi, reconcile } from "./api.js";
|
|
5
|
+
import { options, resolveSync } from "./cli.js";
|
|
6
|
+
import { repository } from "./extract.js";
|
|
7
|
+
import { globMatcher } from "./languages.js";
|
|
8
|
+
const DEFAULT_INCLUDE = ["README.md", "docs/**/*.md", "docs/adr/**", "adr/**", "docs/decisions/**"];
|
|
9
|
+
const ADR = ["docs/adr/**", "adr/**", "docs/decisions/**"].map(globMatcher);
|
|
10
|
+
const PLAN = globMatcher("docs/plans/**");
|
|
11
|
+
const MARKDOWN = /\.(md|markdown)$/i;
|
|
12
|
+
/** The server stores 8192 bytes; leave room like the code layer does. */
|
|
13
|
+
const BODY_BYTES = 7800;
|
|
14
|
+
/** The optional `docs` block of `.cboard.json`; malformed values are ignored. */
|
|
15
|
+
export function docsConfig(root) {
|
|
16
|
+
let parsed;
|
|
17
|
+
try {
|
|
18
|
+
parsed = JSON.parse(readFileSync(resolve(root, ".cboard.json"), "utf8"));
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
23
|
+
const found = parsed?.docs;
|
|
24
|
+
if (typeof found !== "object" || !found)
|
|
25
|
+
return {};
|
|
26
|
+
const docs = found;
|
|
27
|
+
const globs = (value) => Array.isArray(value) ? value.filter((v) => typeof v === "string") : undefined;
|
|
28
|
+
const config = {};
|
|
29
|
+
const include = globs(docs.include), exclude = globs(docs.exclude);
|
|
30
|
+
if (include)
|
|
31
|
+
config.include = include;
|
|
32
|
+
if (exclude)
|
|
33
|
+
config.exclude = exclude;
|
|
34
|
+
return config;
|
|
35
|
+
}
|
|
36
|
+
function capBody(text) {
|
|
37
|
+
if (Buffer.byteLength(text) <= BODY_BYTES)
|
|
38
|
+
return { body: text, truncated: false };
|
|
39
|
+
let bytes = 0, body = "";
|
|
40
|
+
for (const character of text) {
|
|
41
|
+
const size = Buffer.byteLength(character);
|
|
42
|
+
if (bytes + size > BODY_BYTES)
|
|
43
|
+
break;
|
|
44
|
+
bytes += size;
|
|
45
|
+
body += character;
|
|
46
|
+
}
|
|
47
|
+
return { body, truncated: true };
|
|
48
|
+
}
|
|
49
|
+
const plain = (s) => s
|
|
50
|
+
.replace(/\*\*|`/g, "")
|
|
51
|
+
.replace(/\[([^\]]+)\]\([^)]*\)/g, "$1")
|
|
52
|
+
.replace(/\s+/g, " ")
|
|
53
|
+
.trim();
|
|
54
|
+
const slugOf = (s) => plain(s)
|
|
55
|
+
.toLowerCase()
|
|
56
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
57
|
+
.replace(/^-+|-+$/g, "")
|
|
58
|
+
.slice(0, 60) || "section";
|
|
59
|
+
/** Splits Markdown at H2 headings (fenced code is skipped). Merges heading-only fragments. */
|
|
60
|
+
export function parseMarkdown(text) {
|
|
61
|
+
const lines = text.split(/\r?\n/);
|
|
62
|
+
let title;
|
|
63
|
+
const introLines = [];
|
|
64
|
+
const raw = [];
|
|
65
|
+
let fence = "";
|
|
66
|
+
lines.forEach((line, index) => {
|
|
67
|
+
const mark = /^\s*(```+|~~~+)/.exec(line)?.[1];
|
|
68
|
+
let heading = null;
|
|
69
|
+
if (mark) {
|
|
70
|
+
if (!fence)
|
|
71
|
+
fence = mark;
|
|
72
|
+
else if (mark === fence)
|
|
73
|
+
fence = "";
|
|
74
|
+
}
|
|
75
|
+
else if (!fence)
|
|
76
|
+
heading = /^(#{1,6})\s+(.+?)\s*#*\s*$/.exec(line);
|
|
77
|
+
const level = heading?.[1]?.length ?? 0;
|
|
78
|
+
const current = raw[raw.length - 1];
|
|
79
|
+
if (heading && level === 1 && !title && !current)
|
|
80
|
+
title = plain(heading[2] ?? "");
|
|
81
|
+
else if (heading && level <= 2) {
|
|
82
|
+
raw.push({
|
|
83
|
+
heading: plain(heading[2] ?? ""),
|
|
84
|
+
lines: [line],
|
|
85
|
+
start: index + 1,
|
|
86
|
+
content: false,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
else if (current) {
|
|
90
|
+
current.lines.push(line);
|
|
91
|
+
if (!heading && line.trim())
|
|
92
|
+
current.content = true;
|
|
93
|
+
}
|
|
94
|
+
else
|
|
95
|
+
introLines.push(line);
|
|
96
|
+
});
|
|
97
|
+
const sections = raw.map((r) => ({
|
|
98
|
+
heading: r.heading,
|
|
99
|
+
text: r.lines.join("\n").trimEnd(),
|
|
100
|
+
startLine: r.start,
|
|
101
|
+
endLine: r.start + r.lines.length - 1,
|
|
102
|
+
headingOnly: !r.content,
|
|
103
|
+
}));
|
|
104
|
+
// A heading-only fragment joins the section before it (its parent), else the one after it.
|
|
105
|
+
const merged = [];
|
|
106
|
+
let pending = [];
|
|
107
|
+
for (const s of sections) {
|
|
108
|
+
if (s.headingOnly) {
|
|
109
|
+
const previous = merged[merged.length - 1];
|
|
110
|
+
if (previous) {
|
|
111
|
+
previous.text += `\n\n${s.text}`;
|
|
112
|
+
previous.endLine = s.endLine;
|
|
113
|
+
}
|
|
114
|
+
else
|
|
115
|
+
pending.push(s);
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (pending.length) {
|
|
119
|
+
s.text = `${pending.map((p) => p.text).join("\n\n")}\n\n${s.text}`;
|
|
120
|
+
s.startLine = pending[0]?.startLine ?? s.startLine;
|
|
121
|
+
pending = [];
|
|
122
|
+
}
|
|
123
|
+
merged.push(s);
|
|
124
|
+
}
|
|
125
|
+
return { title, intro: introLines.join("\n").trim(), sections: merged };
|
|
126
|
+
}
|
|
127
|
+
/** Maps an ADR status to the decision vocabulary; unknown wording gives no status. */
|
|
128
|
+
export function adrStatus(text) {
|
|
129
|
+
let value = /^\s*[*_]*status[*_]*\s*:[*_]*\s*(.+)$/im.exec(text)?.[1];
|
|
130
|
+
value ??= /^#{1,6}\s+status\s*\r?\n+\s*(\S.*)$/im.exec(text)?.[1];
|
|
131
|
+
const word = value ? plain(value).toLowerCase() : "";
|
|
132
|
+
if (/^(accepted|approved|adopted)/.test(word))
|
|
133
|
+
return "accepted";
|
|
134
|
+
if (/^decided/.test(word))
|
|
135
|
+
return "decided";
|
|
136
|
+
if (/^(proposed|draft|pending)/.test(word))
|
|
137
|
+
return "proposed";
|
|
138
|
+
if (/^rejected/.test(word))
|
|
139
|
+
return "rejected";
|
|
140
|
+
if (/^(superseded|deprecated|obsolete)/.test(word))
|
|
141
|
+
return "superseded";
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
/** Reads the committed HEAD tree and builds the docs-layer snapshot. */
|
|
145
|
+
export function extractDocs(root, config = {}) {
|
|
146
|
+
root = resolve(root);
|
|
147
|
+
const { repo, commit, namespace: codeNamespace } = repository(root);
|
|
148
|
+
const namespace = codeNamespace.replace(/^code:/, "docs:");
|
|
149
|
+
const nodes = [], edges = [];
|
|
150
|
+
const summary = { files: 0, sections: 0, truncated: 0 };
|
|
151
|
+
const location = (path, startLine = 1, endLine = startLine) => [
|
|
152
|
+
{ kind: "repo", repo, commit, path, startLine, endLine },
|
|
153
|
+
];
|
|
154
|
+
const add = (path, symbol, type, title, body, start, end, status, properties = {}) => {
|
|
155
|
+
const clientKey = `${namespace}:${path}${symbol ? `#${symbol}` : ""}`;
|
|
156
|
+
const capped = capBody(body);
|
|
157
|
+
title = title.length > 300 ? `${title.slice(0, 299)}…` : title;
|
|
158
|
+
if (clientKey.length > 1024)
|
|
159
|
+
throw new Error(`Document identity exceeds graph limits: ${path}`);
|
|
160
|
+
nodes.push({
|
|
161
|
+
clientKey,
|
|
162
|
+
namespace,
|
|
163
|
+
type,
|
|
164
|
+
title,
|
|
165
|
+
body: capped.body,
|
|
166
|
+
...(status ? { status } : {}),
|
|
167
|
+
properties: capped.truncated ? { ...properties, bodyTruncated: true } : properties,
|
|
168
|
+
provenance: location(path, start, end),
|
|
169
|
+
derivation: "extracted",
|
|
170
|
+
});
|
|
171
|
+
if (capped.truncated)
|
|
172
|
+
summary.truncated++;
|
|
173
|
+
return clientKey;
|
|
174
|
+
};
|
|
175
|
+
const link = (type, from, to, path) => edges.push({
|
|
176
|
+
type,
|
|
177
|
+
from,
|
|
178
|
+
to,
|
|
179
|
+
provenance: location(path),
|
|
180
|
+
derivation: "extracted",
|
|
181
|
+
properties: {},
|
|
182
|
+
});
|
|
183
|
+
const repoKey = add(".", "", "repository", `Repository ${repo} (docs)`, "", 1, 1);
|
|
184
|
+
const include = (config.include?.length ? config.include : DEFAULT_INCLUDE).map(globMatcher);
|
|
185
|
+
const exclude = (config.exclude ?? []).map(globMatcher);
|
|
186
|
+
const tracked = execFileSync("git", ["ls-tree", "-r", "-z", commit], {
|
|
187
|
+
cwd: root,
|
|
188
|
+
encoding: "utf8",
|
|
189
|
+
maxBuffer: Infinity,
|
|
190
|
+
})
|
|
191
|
+
.split("\0")
|
|
192
|
+
.filter(Boolean)
|
|
193
|
+
.flatMap((entry) => {
|
|
194
|
+
const tab = entry.indexOf("\t");
|
|
195
|
+
const [mode, type, sha] = entry.slice(0, tab).split(/\s+/);
|
|
196
|
+
const path = entry.slice(tab + 1);
|
|
197
|
+
return type === "blob" && mode !== "120000" && sha && MARKDOWN.test(path)
|
|
198
|
+
? [{ path, sha }]
|
|
199
|
+
: [];
|
|
200
|
+
})
|
|
201
|
+
.filter(({ path }) => include.some((m) => m(path)) && !exclude.some((m) => m(path)))
|
|
202
|
+
.sort((a, b) => (a.path < b.path ? -1 : 1));
|
|
203
|
+
for (const { path, sha } of tracked) {
|
|
204
|
+
const text = execFileSync("git", ["cat-file", "blob", sha], {
|
|
205
|
+
cwd: root,
|
|
206
|
+
encoding: "utf8",
|
|
207
|
+
maxBuffer: Infinity,
|
|
208
|
+
}).replace(new RegExp(`^${String.fromCharCode(0xfeff)}`), "");
|
|
209
|
+
const parsed = parseMarkdown(text);
|
|
210
|
+
const isAdr = ADR.some((m) => m(path));
|
|
211
|
+
const type = isAdr ? "decision" : PLAN(path) ? "plan" : "source";
|
|
212
|
+
const status = isAdr ? adrStatus(text) : type === "plan" ? "planned" : "recorded";
|
|
213
|
+
const lineCount = text.split(/\r?\n/).length;
|
|
214
|
+
const fileKey = add(path, "", type, parsed.title || posix.basename(path), isAdr ? text : parsed.intro, 1, lineCount, status, { path });
|
|
215
|
+
summary.files++;
|
|
216
|
+
link("derived_from", fileKey, repoKey, path);
|
|
217
|
+
const used = new Map();
|
|
218
|
+
for (const section of parsed.sections) {
|
|
219
|
+
const base = slugOf(section.heading);
|
|
220
|
+
const n = (used.get(base) ?? 0) + 1;
|
|
221
|
+
used.set(base, n);
|
|
222
|
+
const sectionKey = add(path, n > 1 ? `${base}-${String(n)}` : base, "excerpt", `${path}: ${section.heading}`, section.text, section.startLine, section.endLine, undefined, { path, heading: section.heading });
|
|
223
|
+
summary.sections++;
|
|
224
|
+
link("part_of", sectionKey, fileKey, path);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return { nodes, edges, repo, commit, namespace, summary };
|
|
228
|
+
}
|
|
229
|
+
/** `cboard docs sync`: Markdown docs of this repository into the graph. */
|
|
230
|
+
export async function docsSync(argv) {
|
|
231
|
+
const args = options(argv);
|
|
232
|
+
const root = resolve(args.repo ?? process.cwd());
|
|
233
|
+
const { project, token, server } = resolveSync(args, root);
|
|
234
|
+
const snapshot = extractDocs(root, docsConfig(root));
|
|
235
|
+
const result = await reconcile(new ContextApi(server, project, token), snapshot, snapshot.namespace);
|
|
236
|
+
console.log(JSON.stringify({
|
|
237
|
+
commit: snapshot.commit,
|
|
238
|
+
nodes: snapshot.nodes.length,
|
|
239
|
+
edges: snapshot.edges.length,
|
|
240
|
+
contributions: result.contributions,
|
|
241
|
+
summary: snapshot.summary,
|
|
242
|
+
}));
|
|
243
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Snapshot } from "./model.js";
|
|
2
|
+
export declare function repository(root: string): {
|
|
3
|
+
repo: string;
|
|
4
|
+
commit: string;
|
|
5
|
+
namespace: string;
|
|
6
|
+
};
|
|
7
|
+
/** A parser for files with this extension (unknown extensions use the JavaScript grammar). */
|
|
8
|
+
export declare function parserFor(extension: string): Promise<import("web-tree-sitter").Parser>;
|
|
9
|
+
/** `.cboard.json` `code` block: globs relative to the repository root. */
|
|
10
|
+
export interface CodeConfig {
|
|
11
|
+
include?: string[];
|
|
12
|
+
exclude?: string[];
|
|
13
|
+
maxFileBytes?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const SKIP_REASONS: readonly ["unknown-language", "binary", "minified", "generated", "vendored", "too-large", "excluded-dir", "excluded-glob"];
|
|
16
|
+
export type SkipReason = (typeof SKIP_REASONS)[number];
|
|
17
|
+
export interface Summary {
|
|
18
|
+
files: Record<string, number>;
|
|
19
|
+
symbols: number;
|
|
20
|
+
edges: number;
|
|
21
|
+
skipped: Record<SkipReason, number>;
|
|
22
|
+
parseErrors: string[];
|
|
23
|
+
/** The working tree had uncommitted changes; they were not synced (HEAD was read). */
|
|
24
|
+
dirty: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare const DEFAULT_MAX_FILE_BYTES = 1000000;
|
|
27
|
+
/** The optional `code` block of the repository's `.cboard.json`; malformed values are ignored. */
|
|
28
|
+
export declare function codeConfig(root: string): CodeConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Reads the committed HEAD tree of the whole repository (or `roots`). A dirty working tree is
|
|
31
|
+
* not an error: HEAD is read and `summary.dirty` says so. Language adapters other than TS/JS
|
|
32
|
+
* are out of scope here: other languages get file nodes only.
|
|
33
|
+
*/
|
|
34
|
+
export declare function extract(root: string, roots?: string[], options?: CodeConfig): Promise<Snapshot & ReturnType<typeof repository> & {
|
|
35
|
+
summary: Summary;
|
|
36
|
+
}>;
|