(command: Command)
| 211 | } |
| 212 | |
| 213 | function 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 | |
| 228 | function parseRequestTimeoutFlag(raw: string | undefined): number | undefined { |
| 229 | if (raw === undefined) return undefined; |
no test coverage detected