|
7 | 7 | // |
8 | 8 |
|
9 | 9 | import fs from "node:fs"; |
10 | | -import { Command } from "commander"; |
| 10 | +import { Command, Option } from "commander"; |
11 | 11 |
|
12 | 12 | import ConfigurableProxy from "../lib/configproxy.js"; |
13 | 13 | import { parseListenOptions } from "../lib/configproxy.js"; |
|
23 | 23 | .version(pkg.version) |
24 | 24 | .option("--ip <ip-address>", "Public-facing IP of the proxy") |
25 | 25 | .option("--port <n> (defaults to 8000)", "Public-facing port of the proxy", parseInt) |
26 | | - .option("--socket <path>", "Path to a UNIX domain socket for the proxy to listen on. Alternative to specifying IP and port.") |
| 26 | + .addOption(new Option("--socket <path>", "Path to a UNIX domain socket for the proxy to listen on. Alternative to specifying IP and port.").conflicts(['port', 'ip'])) |
27 | 27 | .option("--ssl-key <keyfile>", "SSL key to use, if any") |
28 | 28 | .option("--ssl-cert <certfile>", "SSL certificate to use, if any") |
29 | 29 | .option("--ssl-ca <ca-file>", "SSL certificate authority, if any") |
|
42 | 42 | "Inward-facing port for API requests (defaults to --port=value+1)", |
43 | 43 | parseInt |
44 | 44 | ) |
45 | | - .option("--api-socket <path>", "Path to a UNIX domain socket for the API server to listen on. Alternative to specifying API IP and port.") |
| 45 | + .addOption(new Option("--api-socket <path>", "Path to a UNIX domain socket for the API server to listen on. Alternative to specifying API IP and port.").conflicts(['api-port', 'api-ip'])) |
46 | 46 | .option("--api-ssl-key <keyfile>", "SSL key to use, if any, for API requests") |
47 | 47 | .option("--api-ssl-cert <certfile>", "SSL certificate to use, if any, for API requests") |
48 | 48 | .option("--api-ssl-ca <ca-file>", "SSL certificate authority, if any, for API requests") |
|
97 | 97 | .option("--host-routing", "Use host routing (host as first level of path)") |
98 | 98 | .option("--metrics-ip <ip>", "IP for metrics server", "") |
99 | 99 | .option("--metrics-port <n>", "Port of metrics server. Defaults to no metrics server") |
100 | | - .option("--metrics-socket <path>", "Path to a UNIX domain socket for the metrics server to listen on. Alternative to specifying metrics IP and port.") |
| 100 | + .addOption(new Option("--metrics-socket <path>", "Path to a UNIX domain socket for the metrics server to listen on. Alternative to specifying metrics IP and port.").conflicts(['metrics-port', 'metrics-ip'])) |
101 | 101 | .option("--log-level <loglevel>", "Log level (debug, info, warn, error)", "info") |
102 | 102 | .option( |
103 | 103 | "--timeout <n>", |
|
0 commit comments