MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / resolveCommonOptions

Function resolveCommonOptions

src/commands/init.ts:388–401  ·  view source on GitHub ↗
(command: Command)

Source from the content-addressed store, hash-verified

386// ---------------------------------------------------------------------------
387
388function resolveCommonOptions(command: Command): CommonOptions {
389 const globals = command.optsWithGlobals() as Partial<CommonOptions> & {
390 requestTimeout?: string;
391 };
392 return {
393 profile: globals.profile ?? 'default',
394 output: globals.output ?? 'text',
395 endpointUrl: globals.endpointUrl,
396 debug: globals.debug ?? false,
397 verbose: globals.verbose ?? false,
398 dryRun: globals.dryRun ?? false,
399 requestTimeoutMs: parseRequestTimeoutFlag(globals.requestTimeout),
400 };
401}
402
403function parseRequestTimeoutFlag(raw: string | undefined): number | undefined {
404 if (raw === undefined) return undefined;

Callers 1

buildSetupOptionsFunction · 0.70

Calls 1

parseRequestTimeoutFlagFunction · 0.70

Tested by

no test coverage detected