import type { BrowserContext, Page } from '@playwright/test'; /** `/.har-recording--/`, see `recordingTempPath`. */ export declare const RECORDING_DIR_PREFIX = ".har-recording-"; export type ReplayEngine = 'native' | 'fallback'; /** * Playwright writes the recording here, we post-process it into the requested * path. If anything goes wrong the dump is simply missing instead of being * committed with unscrubbed headers. * * The recording gets a private directory next to the dump: Playwright writes the * body blobs of an unpacked dump into the recording's directory, and this way a * failed recording can be removed whole without touching the blobs of the dumps * that are already there. The directory name carries the pid, so that a * recording abandoned by a dead process can be told from one in progress. */ export declare function recordingTempPath(targetPath: string): string; /** Test seam: which engine served the most recent replay of this worker. */ export declare function getLastReplayEngine(): ReplayEngine | undefined; /** * Makes the registered transforms effective in this worker process. * * Playwright versions through 1.59 use the historical internal engine: its * patches are installed here. On 1.60 and newer every `routeFromHAR()`, * `recordHar` and `tracing.startHar()` of the worker is routed through the * public-API engine: transform-aware replay for reading, post-processing for * recording. The `add*Transform` functions and `initDumps` call it for you. * * Passing a page or a context additionally wraps that object's own prototypes, * which matters only when it comes from a `playwright-core` copy the package * could not resolve itself. */ export declare function installHarEngine(target?: Page | BrowserContext): void;