(repoRoot, projectRoot)
| 418 | } |
| 419 | |
| 420 | function findTargetExample(repoRoot, projectRoot) { |
| 421 | const examples = [ |
| 422 | 'src/App.jsx', |
| 423 | 'src/App.tsx', |
| 424 | 'src/main.jsx', |
| 425 | 'src/main.tsx', |
| 426 | 'src/index.jsx', |
| 427 | 'src/index.ts', |
| 428 | 'app/page.tsx', |
| 429 | 'pages/index.tsx', |
| 430 | 'public/index.html', |
| 431 | ]; |
| 432 | for (const rel of examples) { |
| 433 | const abs = path.join(projectRoot, rel); |
| 434 | if (fs.existsSync(abs)) return path.relative(repoRoot, abs).split(path.sep).join('/'); |
| 435 | } |
| 436 | return path.relative(repoRoot, projectRoot).split(path.sep).join('/'); |
| 437 | } |
| 438 | |
| 439 | function resolveWorkspaceProjectRoot(repoRoot, targetDir) { |
| 440 | const rel = path.relative(repoRoot, targetDir); |
no outgoing calls
no test coverage detected