(value, fallback)
| 23 | const DEFAULT_WAIT_TIMEOUT_MS = 30_000; |
| 24 | |
| 25 | function parsePort(value, fallback) { |
| 26 | if (value == null || value === "") { |
| 27 | return fallback; |
| 28 | } |
| 29 | |
| 30 | const parsed = Number.parseInt(value, 10); |
| 31 | if (!Number.isInteger(parsed) || parsed <= 0) { |
| 32 | throw new Error(`Invalid port: ${value}`); |
| 33 | } |
| 34 | |
| 35 | return parsed; |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Build a config for an *extra* standalone agent-server that shares the |
no outgoing calls
no test coverage detected