/** * Shared GitHub API helpers used by the grove CLI. * * - ghFetch: fetch + JSON parse + 2-attempt exponential backoff * - rateLimitWaitMs: read X-RateLimit-Reset header and return ms to wait * - sleep: small helper * - pLimit: tiny concurrency cap (no external deps) * * These exist so a single transient 5xx doesn't fail an entire daily * refresh, and so we can run the per-app loop with bounded concurrency * instead of one round-trip at a time. */ export interface GhFetchOptions { token?: string; userAgent?: string; attempts?: number; onRateLimited?: () => number; } export declare function rateLimitWaitMs(res: Response, capMs?: number): number; export declare function sleep(ms: number): Promise; export declare function ghFetch(path: string, options?: GhFetchOptions): Promise; /** * Tiny p-limit implementation: a promise-pool that caps how many * `fn(item)` calls run at once. Await the returned promise to get the * full results array in input order. */ export declare function pLimit(concurrency: number, items: T[], fn: (item: T, index: number) => Promise): Promise; //# sourceMappingURL=github-client.d.ts.map