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

Function parseRequestTimeoutFlag

src/commands/project.ts:511–516  ·  view source on GitHub ↗

* 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.

(raw: string | undefined)

Source from the content-addressed store, hash-verified

509 * the env var / default). Silently clamps out-of-range values.
510 */
511function parseRequestTimeoutFlag(raw: string | undefined): number | undefined {
512 if (raw === undefined) return undefined;
513 const n = Number(raw);
514 if (!Number.isFinite(n) || n <= 0) return undefined;
515 return Math.round(n * 1000); // seconds → milliseconds
516}
517
518function makeClient(opts: CommonOptions, deps: ProjectDeps): HttpClient {
519 return makeHttpClient(opts, {

Callers 1

resolveCommonOptionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected