Function
mkRoute
(
filePath: string,
line: number,
method: string,
path: string,
nameOverride?: string
)
Source from the content-addressed store, hash-verified
| 546 | } |
| 547 | |
| 548 | function mkRoute( |
| 549 | filePath: string, |
| 550 | line: number, |
| 551 | method: string, |
| 552 | path: string, |
| 553 | nameOverride?: string |
| 554 | ): Node { |
| 555 | return { |
| 556 | id: `route:${filePath}:${line}:${method}:${path}`, |
| 557 | kind: 'route', |
| 558 | name: nameOverride ?? `${method} ${path}`, |
| 559 | qualifiedName: `${filePath}::${method}:${path}`, |
| 560 | filePath, |
| 561 | language: 'typescript', |
| 562 | startLine: line, |
| 563 | endLine: line, |
| 564 | startColumn: 0, |
| 565 | endColumn: 0, |
| 566 | updatedAt: 0, |
| 567 | }; |
| 568 | } |
| 569 | |
| 570 | function makeContext(opts: { |
| 571 | files?: Record<string, string>; |
Tested by
no test coverage detected