(command: Command)
| 386 | // --------------------------------------------------------------------------- |
| 387 | |
| 388 | function 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 | |
| 403 | function parseRequestTimeoutFlag(raw: string | undefined): number | undefined { |
| 404 | if (raw === undefined) return undefined; |
no test coverage detected