UNPKG

@builder.io/dev-tools

Version:

Builder.io Visual CMS Devtools

12 lines (11 loc) 635 B
import { type RequestInit } from "undici"; import { NetworkError } from "../common/errors"; export declare const safeFetch: (input: string | URL, init?: RequestInit) => ReturnType<typeof globalThis.fetch>; /** * Checks the health of the Builder.io API by attempting to fetch the health endpoint. * Retries up to 3 times with a delay between attempts. * @param delayMs - The delay in milliseconds between retry attempts (default: 1000ms) * @returns undefined if all attempts fail * @throws NetworkError if all retry attempts fail */ export declare function checkBuilderHealth(delayMs?: number): Promise<NetworkError | undefined>;