/** * @file Probe githubstatus.com to detect platform degradation before making * GitHub API calls. Useful in scripts, release tooling, and CI pre-flight * checks where a cryptic "operation was canceled" error would otherwise mask * an upstream GitHub outage. Component IDs are stable GitHub-assigned * identifiers from githubstatus.com/api/v2/components.json. The probe adds at * most 8 seconds to startup and fails open on network error so a down status * page never blocks a healthy workflow. Callers can configure the timeout. */ export type GitHubComponentStatus = 'degraded_performance' | 'major_outage' | 'operational' | 'partial_outage' | 'under_maintenance'; export type GitHubStatusResult = { /** * Worst-case status across all monitored components. */ status: GitHubComponentStatus | 'unknown'; /** * Whether any monitored component is not fully operational. */ degraded: boolean; /** * Human-readable summary, e.g. "Actions: degraded_performance". */ summary: string; /** * Per-component breakdown for the monitored set. */ components: Array<{ id: string; name: string; status: GitHubComponentStatus; }>; }; /** * Probe githubstatus.com and return the health of GitHub Actions, Git * Operations, and API Requests. Fails open (returns `{ status: 'unknown' }`) * when the probe itself fails — so a down status page never blocks a healthy * workflow. * * @example * ;```typescript * import { probeGitHubStatus } from '@socketsecurity/lib/env/github-status' * * const health = await probeGitHubStatus() * if (health.degraded) { * console.warn(`GitHub degraded: ${health.summary}`) * } * ``` * * @param timeoutMs - Maximum milliseconds to wait for the probe. Default 8000. */ export declare function probeGitHubStatus(timeoutMs?: number): Promise;