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

Function finalizeOptions

scripts/draft-changelog.ts:156–173  ·  view source on GitHub ↗
(parsed: MutableOptions)

Source from the content-addressed store, hash-verified

154}
155
156function finalizeOptions(parsed: MutableOptions): Options {
157 if (!parsed.version) {
158 printUsage();
159 process.exit(1);
160 }
161
162 validateCliVersion(parsed.version, CLI_SEMVER_PATTERN, fail);
163 validateCliDate(parsed.date, fail);
164
165 return {
166 version: parsed.version,
167 from: parsed.from,
168 to: parsed.to,
169 date: parsed.date,
170 write: parsed.write,
171 force: parsed.force,
172 };
173}
174
175function printUsage() {
176 console.log(`Usage:

Callers 1

parseArgsFunction · 0.70

Calls 3

validateCliVersionFunction · 0.90
validateCliDateFunction · 0.90
printUsageFunction · 0.70

Tested by

no test coverage detected