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

Function listSourceFiles

__tests__/child-process-windows-hide.test.ts:59–67  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

57};
58
59function listSourceFiles(dir: string): string[] {
60 const out: string[] = [];
61 for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
62 const p = path.join(dir, entry.name);
63 if (entry.isDirectory()) out.push(...listSourceFiles(p));
64 else if (entry.name.endsWith('.ts') && !entry.name.endsWith('.d.ts')) out.push(p);
65 }
66 return out;
67}
68
69function isChildProcessModule(node: ts.Node | undefined): boolean {
70 return node !== undefined && ts.isStringLiteralLike(node) && CHILD_PROCESS_MODULES.has(node.text);

Calls 2

pushMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected