(filesMap, rootDir)
| 326 | } |
| 327 | |
| 328 | function buildGraph(filesMap, rootDir) { |
| 329 | const fileSet = new Set(Object.keys(filesMap)); |
| 330 | const graph = {}; |
| 331 | |
| 332 | for (const [relPath, info] of Object.entries(filesMap)) { |
| 333 | const deps = []; |
| 334 | for (const imp of info.imports) { |
| 335 | const resolved = resolveImportPath(imp, relPath, rootDir, fileSet); |
| 336 | if (resolved && resolved !== relPath) deps.push(resolved); |
| 337 | } |
| 338 | if (deps.length > 0) graph[relPath] = dedupe(deps); |
| 339 | } |
| 340 | |
| 341 | return graph; |
| 342 | } |
| 343 | |
| 344 | function extractRoutesFromFile(relPath, content) { |
| 345 | const routes = []; |
no test coverage detected