MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / collectProjectFiles

Function collectProjectFiles

packages/cli/src/utils/publishProject.ts:166–181  ·  view source on GitHub ↗
(rootDir: string, currentDir: string, paths: string[])

Source from the content-addressed store, hash-verified

164}
165
166function collectProjectFiles(rootDir: string, currentDir: string, paths: string[]): void {
167 for (const entry of readdirSync(currentDir, { withFileTypes: true })) {
168 if (shouldIgnoreSegment(entry.name)) continue;
169 const absolutePath = join(currentDir, entry.name);
170 const relativePath = relative(rootDir, absolutePath).replaceAll("\\", "/");
171 if (!relativePath) continue;
172
173 if (entry.isDirectory()) {
174 collectProjectFiles(rootDir, absolutePath, paths);
175 continue;
176 }
177
178 if (!statSync(absolutePath).isFile()) continue;
179 paths.push(relativePath);
180 }
181}
182
183const EXT_ASSETS_PREFIX = "_ext";
184

Callers 1

createPublishArchiveFunction · 0.85

Calls 1

shouldIgnoreSegmentFunction · 0.85

Tested by

no test coverage detected