(input: string)
| 440 | } |
| 441 | |
| 442 | function toHttpUrl(input: string): string { |
| 443 | if (input.startsWith("ws://")) return `http://${input.slice("ws://".length)}`; |
| 444 | if (input.startsWith("wss://")) return `https://${input.slice("wss://".length)}`; |
| 445 | return input; |
| 446 | } |
| 447 | |
| 448 | async function main(): Promise<void> { |
| 449 | // Install logging + crash handlers first thing so any early throws |