UNPKG

histoire

Version:

A fast story book powered by Vite

152 lines • 6.12 kB
import type { ScreenshotSetupSnapshot } from '@histoire/shared'; import { z } from 'zod/v4'; /** Per-feature result ceiling before the shared 64 KB channel limit. */ export declare const SCREENSHOT_SETUP_RESULT_BYTES: number; /** Exact read/check/refresh request; arbitrary browser options are forbidden. */ export declare const screenshotSetupRequestSchema: z.ZodObject<{ requestId: z.ZodString; action: z.ZodEnum<{ check: "check"; read: "read"; refresh: "refresh"; }>; }, z.core.$strict>; /** Exact cancellation request, scoped by the originating socket in the handler. */ export declare const screenshotSetupCancelSchema: z.ZodObject<{ requestId: z.ZodString; }, z.core.$strict>; /** Runtime guard keeping internal paths and unbounded diagnostics off the wire. */ export declare const screenshotSetupSnapshotSchema: z.ZodObject<{ revision: z.ZodNumber; state: z.ZodEnum<{ checking: "checking"; "needs-action": "needs-action"; ready: "ready"; unverified: "unverified"; }>; source: z.ZodOptional<z.ZodEnum<{ chrome: "chrome"; chromium: "chromium"; executable: "executable"; "headless-shell": "headless-shell"; msedge: "msedge"; }>>; reason: z.ZodOptional<z.ZodEnum<{ "browser-missing": "browser-missing"; "driver-invalid": "driver-invalid"; "driver-missing": "driver-missing"; "driver-version": "driver-version"; permission: "permission"; "startup-failed": "startup-failed"; "system-dependencies": "system-dependencies"; "unsupported-platform": "unsupported-platform"; }>>; attempts: z.ZodArray<z.ZodObject<{ source: z.ZodEnum<{ chrome: "chrome"; chromium: "chromium"; executable: "executable"; "headless-shell": "headless-shell"; msedge: "msedge"; }>; reason: z.ZodEnum<{ "browser-missing": "browser-missing"; "driver-invalid": "driver-invalid"; "driver-missing": "driver-missing"; "driver-version": "driver-version"; permission: "permission"; "startup-failed": "startup-failed"; "system-dependencies": "system-dependencies"; "unsupported-platform": "unsupported-platform"; }>; stage: z.ZodOptional<z.ZodEnum<{ discovery: "discovery"; launch: "launch"; probe: "probe"; }>>; driver: z.ZodOptional<z.ZodObject<{ packageName: z.ZodEnum<{ playwright: "playwright"; "playwright-core": "playwright-core"; }>; version: z.ZodString; }, z.core.$strict>>; diagnostic: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{ code: z.ZodLiteral<"process-exited">; exitCode: z.ZodOptional<z.ZodNumber>; signal: z.ZodOptional<z.ZodEnum<{ SIGABRT: "SIGABRT"; SIGALRM: "SIGALRM"; SIGBREAK: "SIGBREAK"; SIGBUS: "SIGBUS"; SIGCHLD: "SIGCHLD"; SIGCONT: "SIGCONT"; SIGFPE: "SIGFPE"; SIGHUP: "SIGHUP"; SIGILL: "SIGILL"; SIGINFO: "SIGINFO"; SIGINT: "SIGINT"; SIGIO: "SIGIO"; SIGKILL: "SIGKILL"; SIGLOST: "SIGLOST"; SIGPIPE: "SIGPIPE"; SIGPOLL: "SIGPOLL"; SIGPROF: "SIGPROF"; SIGPWR: "SIGPWR"; SIGQUIT: "SIGQUIT"; SIGSEGV: "SIGSEGV"; SIGSTKFLT: "SIGSTKFLT"; SIGSTOP: "SIGSTOP"; SIGSYS: "SIGSYS"; SIGTERM: "SIGTERM"; SIGTRAP: "SIGTRAP"; SIGTSTP: "SIGTSTP"; SIGTTIN: "SIGTTIN"; SIGTTOU: "SIGTTOU"; SIGUNUSED: "SIGUNUSED"; SIGURG: "SIGURG"; SIGUSR1: "SIGUSR1"; SIGUSR2: "SIGUSR2"; SIGVTALRM: "SIGVTALRM"; SIGWINCH: "SIGWINCH"; SIGXCPU: "SIGXCPU"; SIGXFSZ: "SIGXFSZ"; }>>; }, z.core.$strict>, z.ZodObject<{ code: z.ZodLiteral<"missing-library">; library: z.ZodString; }, z.core.$strict>, z.ZodObject<{ code: z.ZodLiteral<"executable-format">; }, z.core.$strict>, z.ZodObject<{ code: z.ZodLiteral<"sandbox-denied">; }, z.core.$strict>, z.ZodObject<{ code: z.ZodLiteral<"invalid-probe-image">; }, z.core.$strict>, z.ZodObject<{ code: z.ZodLiteral<"protocol-error">; }, z.core.$strict>, z.ZodObject<{ code: z.ZodLiteral<"unknown">; }, z.core.$strict>], "code">>; }, z.core.$strict>>; repairs: z.ZodArray<z.ZodObject<{ id: z.ZodEnum<{ "check-setup": "check-setup"; "install-core-shell": "install-core-shell"; "install-full-chromium": "install-full-chromium"; "install-playwright": "install-playwright"; "install-shell": "install-shell"; "install-system-dependencies": "install-system-dependencies"; "restart-histoire": "restart-histoire"; "upgrade-playwright": "upgrade-playwright"; }>; label: z.ZodString; command: z.ZodOptional<z.ZodObject<{ executable: z.ZodString; args: z.ZodArray<z.ZodString>; }, z.core.$strict>>; }, z.core.$strict>>; }, z.core.$strict>; /** Copy only the finite portable DTO fields accepted by the UI contract. */ export declare function portableScreenshotSetupSnapshot(value: ScreenshotSetupSnapshot): ScreenshotSetupSnapshot; /** Include the Vite custom-event wrapper when bounding setup result receipts. */ export declare function isScreenshotSetupResultWithinBudget(result: unknown): boolean; //# sourceMappingURL=screenshot-setup-validation.d.ts.map