MCPcopy Create free account
hub / github.com/evi0s/WMPFDebugger / parse_cli_options

Function parse_cli_options

src/cli.ts:44–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42};
43
44const parse_cli_options = (): CliOptions => {
45 const { values } = parseArgs({
46 options: {
47 "debug-port": { type: "string" },
48 "cdp-port": { type: "string" },
49 "debug-main": { type: "boolean" },
50 "debug-frida": { type: "boolean" },
51 help: { type: "boolean", short: "h" },
52 },
53 allowPositionals: false,
54 });
55
56 if (values.help) {
57 print_help();
58 process.exit(0);
59 }
60
61 return {
62 debugPort: parse_port("--debug-port", values["debug-port"], DEBUG_PORT),
63 cdpPort: parse_port("--cdp-port", values["cdp-port"], CDP_PORT),
64 debugMain: values["debug-main"] ?? false,
65 debugFrida: values["debug-frida"] ?? false,
66 };
67};
68
69export { CliOptions, parse_cli_options };

Callers 1

mainFunction · 0.90

Calls 2

print_helpFunction · 0.85
parse_portFunction · 0.85

Tested by

no test coverage detected