MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / fullIndexWithDb

Function fullIndexWithDb

__tests__/sync-module-config-change.test.ts:130–134  ·  view source on GitHub ↗

What a full index of C_BEFORE holds under a compile database naming `dir`, which names the folder it's in.

(dir: string)

Source from the content-addressed store, hash-verified

128
129/** What a full index of C_BEFORE holds under a compile database naming `dir`, which names the folder it's in. */
130async function fullIndexWithDb(dir: string): Promise<string[]> {
131 const root = tempRoot();
132 write(root, { ...C_BEFORE, 'compile_commands.json': compileDb(root, dir) });
133 return stateOf(root, await index(root));
134}
135
136/** Index `before`, write `after` over it, sync; return the graph and what a full index of the final tree holds. */
137async function syncEdit(before: Files, after: Files): Promise<{ root: string; graph: CodeGraph; full: string[] }> {

Calls 5

compileDbFunction · 0.85
tempRootFunction · 0.70
writeFunction · 0.70
stateOfFunction · 0.70
indexFunction · 0.70

Tested by

no test coverage detected