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

Function fullIndexWithDb

__tests__/sync-module-config-change.test.ts:156–160  ·  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

154
155/** What a full index of C_BEFORE holds under a compile database naming `dir`, which names the folder it's in. */
156async function fullIndexWithDb(dir: string): Promise<string[]> {
157 const root = tempRoot();
158 write(root, { ...C_BEFORE, 'compile_commands.json': compileDb(root, dir) });
159 return stateOf(root, await index(root));
160}
161
162/** Index `before`, write `after` over it, sync; return the graph and what a full index of the final tree holds. */
163async 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