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

Function workspace

__tests__/workspace-nested-globs.test.ts:32–40  ·  view source on GitHub ↗
(files: Files)

Source from the content-addressed store, hash-verified

30});
31
32function workspace(files: Files): string {
33 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-ws-globs-'));
34 roots.push(root);
35 for (const [file, text] of Object.entries(files)) {
36 fs.mkdirSync(path.dirname(path.join(root, file)), { recursive: true });
37 fs.writeFileSync(path.join(root, file), text);
38 }
39 return root;
40}
41
42const pkg = (name: string) => JSON.stringify({ name });
43const pnpm = (...globs: string[]) => `packages:\n${globs.map((g) => ` - '${g}'`).join('\n')}\n`;

Callers 1

Calls 2

pushMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected