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

Function indexedProject

__tests__/daemon-socket-shared-folder.test.ts:129–139  ·  view source on GitHub ↗

An indexed project whose `.codegraph/` has `mode`, whatever the umask made it.

(mode: number)

Source from the content-addressed store, hash-verified

127
128/** An indexed project whose `.codegraph/` has `mode`, whatever the umask made it. */
129async function indexedProject(mode: number): Promise<string> {
130 const root = project();
131 fs.writeFileSync(
132 path.join(root, 'orders.ts'),
133 'export function placeOrder() { return chargeCard(); }\nexport function chargeCard() { return 1; }\n',
134 );
135 const cg = await CodeGraph.init(root, { index: true });
136 cg.close();
137 fs.chmodSync(path.join(root, '.codegraph'), mode);
138 return root;
139}
140
141/**
142 * The real daemon for `root`, from the built CLI, started the way a launcher

Calls 4

projectFunction · 0.70
closeMethod · 0.65
joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected