MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / collectTsFiles

Function collectTsFiles

scripts/migrate-schema-class.ts:59–75  ·  view source on GitHub ↗
(dir: string, out: string[] = [])

Source from the content-addressed store, hash-verified

57}
58
59const collectTsFiles = (dir: string, out: string[] = []): string[] => {
60 for (const entry of readdirSync(dir)) {
61 if (IGNORE_DIRS.has(entry)) continue;
62 const full = join(dir, entry);
63 const stat = statSync(full);
64 if (stat.isDirectory()) {
65 collectTsFiles(full, out);
66 continue;
67 }
68 if (!stat.isFile()) continue;
69 if (!entry.endsWith(".ts") && !entry.endsWith(".tsx")) continue;
70 if (entry.endsWith(".d.ts")) continue;
71 if (SKIP_FILES.has(full)) continue;
72 out.push(full);
73 }
74 return out;
75};
76
77/** Match an extends clause shape:
78 * Schema.Class<X>("ID")(FIELDS_EXPR)

Callers 1

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected