(route: RouteRef, via: 'handler' | 'file')
| 499 | const seen = new Set<string>(); |
| 500 | const out: ImpactEndpoint[] = []; |
| 501 | const add = (route: RouteRef, via: 'handler' | 'file'): void => { |
| 502 | const key = `${route.method ?? ''} ${route.path}`; |
| 503 | if (seen.has(key)) { |
| 504 | return; |
| 505 | } |
| 506 | seen.add(key); |
| 507 | out.push({ |
| 508 | routePath: route.path, |
| 509 | method: route.method, |
| 510 | via, |
| 511 | filePath: route.filePath, |
| 512 | line: route.line, |
| 513 | origin: route.origin, |
| 514 | }); |
| 515 | }; |
| 516 | for (const route of routes) { |
| 517 | if (route.handler && symbolNames.has(route.handler)) { |
| 518 | add(route, 'handler'); |
no test coverage detected