( portStr: string, protocol: string, )
| 13 | * always includes a trailing colon (e.g. `"https:"`). |
| 14 | */ |
| 15 | export const resolveLocalhostPort = ( |
| 16 | portStr: string, |
| 17 | protocol: string, |
| 18 | ): number => { |
| 19 | if (portStr) { |
| 20 | return Number.parseInt(portStr, 10); |
| 21 | } |
| 22 | return protocol === "https:" ? 443 : 80; |
| 23 | }; |
| 24 | |
| 25 | export const portForwardURL = ( |
| 26 | host: string, |
no outgoing calls
no test coverage detected