(value: string)
| 46 | } |
| 47 | |
| 48 | function parsePort(value: string): number { |
| 49 | const port = parsePositiveInteger(value, "--port"); |
| 50 | if (port > 65_535) { |
| 51 | throw new Error(`--port must be <= 65535, got: ${value}`); |
| 52 | } |
| 53 | return port; |
| 54 | } |
| 55 | |
| 56 | function parseArgs(argv: string[]): Options { |
| 57 | if (argv.includes("--help") || argv.includes("-h")) { |
no test coverage detected