import type { IncomingMessage, ServerResponse } from 'node:http'; export declare const EMULATOR_FILES_PATH = "/__extjs-emulator/files.json"; declare const EMULATOR_FILES_VERSION: 1; export declare const DEFAULT_EMULATOR_ORIGIN = "https://browsers.extension.land"; interface EmulatorFileEntry { path: string; size: number; sha256: string; } interface EmulatorFileIndex { version: typeof EMULATOR_FILES_VERSION; instanceId: string; root: '/'; livereload?: { path: string; }; files: EmulatorFileEntry[]; } export declare function normalizeWebOrigin(value: unknown): string | null; export declare function resolveEmulatorOrigin(env?: NodeJS.ProcessEnv): string; export declare function isSameWebOrigin(candidate: unknown, expected: string | null | undefined): boolean; export declare function buildEmulatorViewerUrl(options: { origin: string; host: string; port: number; controlPort: number | null; controlPath: string; instanceId: string; }): string; interface EmulatorAssetLike { name: string; source: { buffer(): Buffer; }; info?: { hotModuleReplacement?: boolean; related?: Record; }; } export declare function buildEmulatorFileIndex(assets: Iterable, instanceId: string): EmulatorFileIndex; export declare function resolveLivereloadPath(webSocketServer: unknown): string | null; export interface EmulatorFileIndexHolder { publish(assets: Iterable): EmulatorFileIndex; reset(): void; noteCompileFailure(errors: readonly unknown[] | undefined): void; setLivereloadPath(socketPath: string | null): void; current(): Promise; unavailableReason(): string; } export declare function createEmulatorFileIndexHolder(instanceId: string, options?: { waitMs?: number; maxWaiters?: number; }): EmulatorFileIndexHolder; export declare function attachEmulatorFileIndex(compiler: unknown, holder: EmulatorFileIndexHolder): void; export declare function createEmulatorFilesMiddlewareEntry(holder: EmulatorFileIndexHolder, devServer: unknown, viewerOrigin?: string | null): { name: string; path: string; middleware: (req: IncomingMessage, res: ServerResponse, next: (err?: unknown) => void) => Promise; }; export {};