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

Function index

__tests__/python-call-result-locals.test.ts:19–26  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

17let cg: CodeGraph | null = null;
18
19async function index(files: Record<string, string>): Promise<void> {
20 tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-3038-'));
21 for (const [rel, source] of Object.entries(files)) {
22 fs.mkdirSync(path.dirname(path.join(tempDir, rel)), { recursive: true });
23 fs.writeFileSync(path.join(tempDir, rel), source);
24 }
25 cg = await CodeGraph.init(tempDir, { index: true });
26}
27
28afterEach(() => {
29 cg?.close();

Calls 2

joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected