import { type RemoteArchiveTarget } from './lib/project.js'; import type { BrowserDefaulted, BrowserType, PreviewOptions } from './types.js'; /** * Resolved browser launch options returned by extensionPreview. * The caller is responsible for actually launching the browser. */ export interface ResolvedPreviewOptions { browser: BrowserType; outPath: string; shippedPath?: string; contextDir: string; readyPath: string; extensionsToLoad: string[]; noOpen?: boolean; profile?: string | false; profileSource?: 'flag' | 'config'; persistProfile?: boolean; keepProfileChanges?: boolean; copyFromProfile?: string; preferences?: Record; browserFlags?: string[]; excludeBrowserFlags?: string[]; startingUrl?: string; chromiumBinary?: string; geckoBinary?: string; instanceId?: string; port?: number | string; dryRun?: boolean; logLevel?: string; logContexts?: string[]; logFormat?: 'pretty' | 'json' | 'ndjson'; logTimestamps?: boolean; logColor?: boolean; logUrl?: string; logTab?: number | string; } /** * What a launcher may hand back about the browser it started. */ export interface PreviewBrowserSession { /** Start a suspended background again. Firefox only. */ wakeBackground?(): Promise; /** Settles once the browser this session opened is gone. */ ended?: Promise; } export type PreviewLauncherFn = (opts: ResolvedPreviewOptions) => Promise; export declare function explicitUnpackedDir(pathOrRemoteUrl: string | undefined, packageJsonDir: string, manifestDir?: string): string | undefined; export declare function previewArchiveTarget(metadataCommand: 'start' | 'preview', outputPath?: string): RemoteArchiveTarget | undefined; export declare const EXECUTOR_ATTACH_WAIT_MS = 10000; export declare function extensionPreview(pathOrRemoteUrl: string | undefined, previewOptions: BrowserDefaulted, browserLauncher?: PreviewLauncherFn): Promise<{ warnings: string[]; }>;