Recursively copy a directory. Skips __pycache__ and test files.
(src: string, dst: string)
| 14 | |
| 15 | /** Recursively copy a directory. Skips __pycache__ and test files. */ |
| 16 | function copyDirSync(src: string, dst: string): void { |
| 17 | fs.mkdirSync(dst, { recursive: true }); |
| 18 | for (const entry of fs.readdirSync(src, { withFileTypes: true })) { |
| 19 | if (entry.name.startsWith('test_') || entry.name.endsWith('.spec.ts') || entry.name === '__pycache__') { |
| 20 | continue; |
| 21 | } |
| 22 | const srcEntry = path.join(src, entry.name); |
| 23 | const dstEntry = path.join(dst, entry.name); |
| 24 | if (entry.isDirectory()) { |
| 25 | copyDirSync(srcEntry, dstEntry); |
| 26 | } else { |
| 27 | fs.copyFileSync(srcEntry, dstEntry); |
| 28 | } |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | /** Kept for backwards compatibility with cli-sc's index.ts (no-op). */ |
| 33 | export const conflictingClaudePluginKeys: string[] = []; |
no test coverage detected