MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / parseVersionOrHelp

Function parseVersionOrHelp

scripts/cli-options.ts:109–122  ·  view source on GitHub ↗
(
  arg: string,
  index: number,
  parsed: Parsed,
  config: { printUsage: () => void; fail: (message: string) => never },
)

Source from the content-addressed store, hash-verified

107}
108
109function parseVersionOrHelp<Parsed extends { version?: string }>(
110 arg: string,
111 index: number,
112 parsed: Parsed,
113 config: { printUsage: () => void; fail: (message: string) => never },
114) {
115 if (arg === "--help" || arg === "-h") {
116 config.printUsage();
117 process.exit(0);
118 }
119
120 parsed.version = parseVersionPositionalArg(arg, parsed.version, config.fail);
121 return index;
122}
123
124export function parseVersionPositionalArg(
125 arg: string,

Callers 1

Calls 1

Tested by

no test coverage detected