(host: string)
| 44 | * `http://::1:3001/` is an invalid URL. Already-bracketed literals, IPv4 |
| 45 | * addresses, and hostnames are returned unchanged. */ |
| 46 | export function hostForUrl(host: string): string { |
| 47 | if (host.includes(':') && !host.startsWith('[')) return `[${host}]`; |
| 48 | return host; |
| 49 | } |
| 50 | |
| 51 | export function resolveVisAuthToken(host: string = resolveHost()): string | undefined { |
| 52 | const raw = process.env['VIS_AUTH_TOKEN']; |
no outgoing calls
no test coverage detected