()
| 15 | } |
| 16 | |
| 17 | export function findProjectRoot(): string { |
| 18 | const start = path.dirname(fileURLToPath(import.meta.url)); |
| 19 | let current = start; |
| 20 | for (let i = 0; i < 6; i += 1) { |
| 21 | const pkgPath = path.join(current, 'package.json'); |
| 22 | if (fs.existsSync(pkgPath)) return current; |
| 23 | current = path.dirname(current); |
| 24 | } |
| 25 | return start; |
| 26 | } |
no outgoing calls