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

Function project

__tests__/member-value-module-function.test.ts:169–177  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

167 let kernel: string | undefined;
168
169 async function project(files: Record<string, string>): Promise<CodeGraph> {
170 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-member-value-module-function-'));
171 roots.push(root);
172 for (const [rel, content] of Object.entries(files)) {
173 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
174 fs.writeFileSync(path.join(root, rel), content);
175 }
176 return CodeGraph.init(root, { index: true });
177 }
178
179 beforeAll(async () => {
180 kernel = process.env.CODEGRAPH_KERNEL;

Calls 3

pushMethod · 0.80
joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected