(dir, acc = [])
| 4 | const root = './recovered-claude-code/src' |
| 5 | |
| 6 | function collectFiles(dir, acc = []) { |
| 7 | for (const entry of readdirSync(dir)) { |
| 8 | const fullPath = join(dir, entry) |
| 9 | const stat = statSync(fullPath) |
| 10 | if (stat.isDirectory()) { |
| 11 | collectFiles(fullPath, acc) |
| 12 | continue |
| 13 | } |
| 14 | if (/\.(ts|tsx)$/.test(entry)) { |
| 15 | acc.push(fullPath) |
| 16 | } |
| 17 | } |
| 18 | return acc |
| 19 | } |
| 20 | |
| 21 | function findInsertionIndex(lines) { |
| 22 | let i = 0 |
no test coverage detected