UNPKG

@capgo/cli

Version:
26 lines (25 loc) • 1.05 kB
import type { OptionsBase } from '../schemas/base'; export interface PrewarmRegion { region: string; /** HTTP status of the regional call; null when it never answered. */ status?: number | null; /** The call ran in the worker's placement data center (server-side placement check). */ pinned?: boolean; placement: string | null; revision: string | null; cached: number; skipped: string | null; error: string | null; } export interface PrewarmResponse { app_id: string; regions: PrewarmRegion[]; } /** One line per region: where its cache lives and what the prewarm did there. */ export declare function describePrewarmRegion(region: PrewarmRegion): string; /** * `app prewarm`: load the app's published plugin state into every Capgo plugin * region's cache now, so the next device requests are served from it. * Publications are also prewarmed automatically after each upload or channel change. */ export declare function prewarmApp(appId: string | undefined, options: OptionsBase): Promise<void>;