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

Function cli

__tests__/lazy-engine.test.ts:41–48  ·  view source on GitHub ↗

Run the built CLI, and list the files of dist/ it loaded.

(args: string[])

Source from the content-addressed store, hash-verified

39
40 /** Run the built CLI, and list the files of dist/ it loaded. */
41 function cli(args: string[]): { stdout: string; loaded: string[] } {
42 const stdout = node(['--require', hook, BIN, ...args], dir);
43 const files = JSON.parse(fs.readFileSync(loadedList, 'utf-8')) as string[];
44 return {
45 stdout,
46 loaded: files.filter((f) => f.startsWith(DIST)).map((f) => path.relative(DIST, f).split(path.sep).join('/')),
47 };
48 }
49
50 beforeAll(async () => {
51 root = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-lazy-engine-'));

Callers 1

Calls 4

parseMethod · 0.80
mapMethod · 0.80
nodeFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected