| 14 | const timeoutMs = |
| 15 | opts.timeoutMs ?? |
| 16 | (env.CMDOP_TIMEOUT_MS ? Number(env.CMDOP_TIMEOUT_MS) : DEFAULT_TIMEOUT_MS); |
| 17 | if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) { |
| 18 | throw new Error("timeoutMs must be greater than zero"); |
| 19 | } |
| 20 | const rawBase = opts.baseUrl ?? env.CMDOP_BASE_URL; |
| 21 | return { |
| 22 | token: opts.token ?? env.CMDOP_TOKEN ?? undefined, |
| 23 | baseUrl: rawBase ? rawBase.replace(/\/+$/, "") : undefined, |
| 24 | timeoutMs, |
| 25 | }; |
| 26 | } |
nothing calls this directly
no outgoing calls
no test coverage detected