/** * What the generated worker is told about the project. `app` is the * installable app (caching, offline page, update flow); `notify` only shows * notifications — it has no fetch handler, so the network is untouched. */ export interface ServiceWorkerConfig { version: string; mode: 'app' | 'notify'; appName: string; /** False for a password-protected site: nothing is cached or precached. */ cacheContent: boolean; /** Start URLs precached at install, with the build assets they reference. */ precacheUrls: string[]; /** Prefix patterns (see `toNetworkOnlyPattern`) never answered from the cache. */ networkOnly: string[]; defaultLocale: string; /** Locales served under a `/` prefix; stripped before matching `networkOnly`. */ prefixedLocales: string[]; /** The code Next.js also serves the default language under (`/en/checkout`); stripped too. */ defaultLocalePrefix: string; /** Shown on a notification that carries no icon of its own. */ notificationIcon: string | null; /** Present when the project stores push subscriptions (re-subscription on rotation). */ push: { vapidPublicKey: string; subscriptionsPath: string; } | null; } /** * The service worker, `public/sw.js`. Authored as plain source text on purpose: * it runs in the visitor's browser exactly as written, and must never pass * through a bundler or a minifier. It contains no backslash and no template * literal, because this module embeds it in one. */ export declare const buildServiceWorkerSource: (config: ServiceWorkerConfig, offlinePages: Record) => string; /** * What an earlier publish's worker is replaced with once the app is no longer * installable: it takes over at once, deletes every cache the app created and * unregisters itself. It has no fetch handler, so the pages already open keep * working from the network — nobody is reloaded in the middle of a checkout. */ export declare const buildRetiringWorkerSource: () => string; //# sourceMappingURL=service-worker-source.d.ts.map