()
| 122 | let methods: string[] = []; |
| 123 | |
| 124 | const flushRoute = () => { |
| 125 | if (!pending || !currentPath) return; |
| 126 | |
| 127 | const methodTag = methods.length > 0 ? ` [${methods.join(',')}]` : ''; |
| 128 | const routeNode: Node = { |
| 129 | id: `route:${filePath}:${pending.lineNum}:${currentPath}`, |
| 130 | kind: 'route', |
| 131 | name: `${currentPath}${methodTag}`, |
| 132 | qualifiedName: `${filePath}::${pending.name}`, |
| 133 | filePath, |
| 134 | startLine: pending.lineNum, |
| 135 | endLine: pending.lineNum, |
| 136 | startColumn: 0, |
| 137 | endColumn: 0, |
| 138 | language: 'yaml', |
| 139 | updatedAt: now, |
| 140 | }; |
| 141 | nodes.push(routeNode); |
| 142 | |
| 143 | for (const handler of handlerRefs) { |
| 144 | references.push({ |
| 145 | fromNodeId: routeNode.id, |
| 146 | referenceName: handler, |
| 147 | referenceKind: 'references', |
| 148 | line: pending.lineNum, |
| 149 | column: 0, |
| 150 | filePath, |
| 151 | language: 'yaml', |
| 152 | }); |
| 153 | } |
| 154 | }; |
| 155 | |
| 156 | for (let i = 0; i < lines.length; i++) { |
| 157 | const line = lines[i]!; |
no test coverage detected