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

Function resolveCommonOptions

src/commands/usage.ts:213–226  ·  view source on GitHub ↗
(command: Command)

Source from the content-addressed store, hash-verified

211}
212
213function resolveCommonOptions(command: Command): CommonOptions {
214 const globals = command.optsWithGlobals() as Partial<CommonOptions> & {
215 requestTimeout?: string;
216 };
217 return {
218 profile: globals.profile ?? 'default',
219 output: globals.output ?? 'text',
220 endpointUrl: globals.endpointUrl,
221 debug: globals.debug ?? false,
222 verbose: globals.verbose ?? false,
223 dryRun: globals.dryRun ?? false,
224 requestTimeoutMs: parseRequestTimeoutFlag(globals.requestTimeout),
225 };
226}
227
228function parseRequestTimeoutFlag(raw: string | undefined): number | undefined {
229 if (raw === undefined) return undefined;

Callers 1

createUsageCommandFunction · 0.70

Calls 1

parseRequestTimeoutFlagFunction · 0.70

Tested by

no test coverage detected