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

Function project

__tests__/objcpp-cpp-items.test.ts:269–277  ·  view source on GitHub ↗
(name: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

267 let kernel: string | undefined;
268
269 async function project(name: string, files: Record<string, string>): Promise<void> {
270 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-objcpp-'));
271 roots.push(root);
272 for (const [rel, content] of Object.entries(files)) {
273 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
274 fs.writeFileSync(path.join(root, rel), content);
275 }
276 graphs.set(name, await CodeGraph.init(root, { index: true }));
277 }
278
279 beforeAll(async () => {
280 kernel = process.env.CODEGRAPH_KERNEL;

Callers 1

Calls 4

pushMethod · 0.80
joinMethod · 0.45
setMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected