(server: ActiveServer, route: string)
| 93 | } |
| 94 | |
| 95 | export function studioApiUrl(server: ActiveServer, route: string): string { |
| 96 | const host = server.host ?? "127.0.0.1"; |
| 97 | return `http://${host}:${server.port}/api/projects/${encodeURIComponent(server.projectName)}/${route}`; |
| 98 | } |
| 99 | |
| 100 | // Vite dev servers bind IPv6 loopback (`::1`) by default while embedded servers |
| 101 | // bind IPv4 (`127.0.0.1`), so probe both — a single family misses the other and |
no outgoing calls
no test coverage detected