* Render the URL's host for human-facing log lines. Falls back to the raw * input if it isn't a valid URL — better than throwing in the middle of * a status message.
(apiUrl: string)
| 9 | * a status message. |
| 10 | */ |
| 11 | function hostLabel(apiUrl: string): string { |
| 12 | try { |
| 13 | return new URL(apiUrl).host; |
| 14 | } catch { |
| 15 | return apiUrl; |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | const LOGIN_TIMEOUT_MS = 2 * 60 * 1000; |
| 20 |
no outgoing calls
no test coverage detected