UNPKG

histoire

Version:

A fast story book powered by Vite

15 lines • 1.17 kB
import type { Connect } from 'vite'; import type { PreviewHostRegistry } from '../browser/preview-host.js'; /** Uses the canonical deployment spelling for managed and host-owned routes. */ export declare function normalizeHostingBase(value: string): string; /** Accepts explicit HTTP(S) authorities without treating paths as origins. */ export declare function normalizeHostingOrigin(value: string): string; /** Claims the exact base root and descendants without consuming adjacent paths. */ export declare function matchesHostingBase(url: string | undefined, base: string): boolean; /** Replies explicitly while a claimed runtime has no ready generation. */ export declare const unavailableMiddleware: Connect.NextHandleFunction; /** Serves active capabilities before static/history routes, including expired 404s. */ export declare function createPreviewRoute(registry: PreviewHostRegistry): Connect.NextHandleFunction; /** Exposes the effective Node origin policy to the data child before static fallback. */ export declare function createEmbedOriginsRoute(base: string, allowedOrigins: readonly string[]): Connect.NextHandleFunction; //# sourceMappingURL=routes.d.ts.map