UNPKG

histoire

Version:

A fast story book powered by Vite

30 lines • 1.67 kB
import type { ScreenshotSetupDiagnostic, ScreenshotSetupReason } from '@histoire/shared'; /** Concrete browser operation stages with classified Playwright failures. */ export type BrowserSetupFailureStage = 'launch' | 'probe'; /** Launch or neutral-probe diagnosis; continuation stays explicit and conservative. */ export interface BrowserSetupDiagnosis { /** Safe reason used by the existing setup repair projection. */ reason?: ScreenshotSetupReason; /** Fixed diagnostic object; never contains raw logs, errors, or paths. */ diagnostic: ScreenshotSetupDiagnostic; /** Whether the owner may test another candidate before story navigation. */ continueCandidates: boolean; } /** Marks failures produced by the public driver launch call. */ export declare class BrowserSetupLaunchError extends Error { /** Preserve private SDK cause for fixed classification inside the Node owner. */ constructor(cause: unknown); } /** Marks failures produced by the neutral page probe. */ export declare class BrowserSetupProbeError extends Error { /** Keep the raw failure private while identifying its lifecycle stage. */ constructor(cause: unknown); } /** Marks invalid or incorrectly sized PNG output from the neutral probe. */ export declare class BrowserSetupInvalidProbeImageError extends Error { /** Retains parser detail only as an internal cause. */ constructor(cause?: unknown); } /** Extracts only allowlisted facts from audited Playwright launch/probe errors. */ export declare function diagnoseBrowserSetupFailure(error: unknown, stage: BrowserSetupFailureStage): BrowserSetupDiagnosis; //# sourceMappingURL=diagnostics.d.ts.map