(cg: CodeGraph, target: Node)
| 218 | const proxyEdges = (cg: CodeGraph): Edge[] => |
| 219 | cg.getNodesByKind('route').flatMap((r) => cg.getOutgoingEdges(r.id).filter((e) => meta(e).synthesizedBy === 'next-proxy')); |
| 220 | const routesRunning = (cg: CodeGraph, target: Node): Record<string, unknown> => |
| 221 | Object.fromEntries( |
| 222 | proxyEdges(cg).filter((e) => e.target === target.id).map((e) => [cg.getNode(e.source)!.name, meta(e).matcher ?? null]) |
| 223 | ); |
| 224 | const fn = (cg: CodeGraph, name: string, filePath: string): Node => { |
| 225 | const node = cg.getNodesByName(name).find((n) => n.filePath === filePath && n.kind === 'function'); |
| 226 | if (!node) throw new Error(`no function ${name} in ${filePath}`); |
no test coverage detected