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

Function index

__tests__/python-module-attribute-local.test.ts:18–25  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

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

Calls 2

joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected