* Parse the `--request-timeout ` flag value into milliseconds. * Returns `undefined` when the flag was not supplied (factory falls back to * the env var / default). Silently clamps out-of-range values — the * factory applies the same clamp so there is no double-clamp risk.
(raw: string | undefined)
| 334 | * factory applies the same clamp so there is no double-clamp risk. |
| 335 | */ |
| 336 | function parseRequestTimeoutFlag(raw: string | undefined): number | undefined { |
| 337 | if (raw === undefined) return undefined; |
| 338 | const n = Number(raw); |
| 339 | if (!Number.isFinite(n) || n <= 0) return undefined; |
| 340 | return Math.round(n * 1000); // seconds → milliseconds |
| 341 | } |
| 342 | |
| 343 | function makeOutput(mode: OutputMode, deps: AuthDeps): Output { |
| 344 | return new Output(mode, { stdout: deps.stdout, stderr: deps.stderr }); |
no outgoing calls
no test coverage detected