import type { PathLike } from "node:fs"; import type { Writable } from "node:stream"; export declare const OS_NAME: "mac" | "win" | "lin"; export declare const INSTALL_DIR: PathLike; export declare const LOCAL_DATA: PathLike; export declare const OS_ARCH_MATRIX: { [key: string]: string[]; }; export declare const LAUNCH_FILE: { [key: string]: string; }; declare class Version { release: string; version?: string; sorted_rel: number[]; constructor(release: string, version?: string); private buildSortedRel; get fullString(): string; equals(other: Version): boolean; lessThan(other: Version): boolean; isSupported(): boolean; static fromPath(filePath?: PathLike): Version; static isSupportedPath(path: PathLike): boolean; static buildMinMax(): [Version, Version]; } export declare class GitHubDownloader { githubRepo: string; apiUrl: string; constructor(githubRepo: string); checkAsset(asset: any): any; missingAssetError(): void; getAsset({ retries }?: { retries: number; }): Promise; } export declare class CamoufoxFetcher extends GitHubDownloader { arch: string; _version_obj?: Version; pattern: RegExp; _url?: string; constructor(); init(): Promise; checkAsset(asset: any): [Version, string] | null; missingAssetError(): void; static getPlatformArch(): string; fetchLatest(): Promise; static downloadFile(url: string): Promise; extractZip(zipFile: string | Buffer): Promise; /** * PHI-VENDOR: Verify the downloaded zip against the `SHA256SUMS` asset * published alongside it in the same GitHub Release. The sums file is * same-origin as the zip, so this only guards against in-transit * corruption (not a fully compromised release); it nonetheless closes the * gap where the `fetch`/auto-install path extracted and executed an * unverified binary, unlike scripts/postinstall.mjs which already verifies. * * Fails closed when a checksum IS published for the asset and does not * match. When no `SHA256SUMS` asset exists for the release (e.g. some * upstream daijro releases), it logs that integrity could not be verified * and proceeds, to preserve the opt-in legacy fetch behaviour. */ verifyIntegrity(zipFilePath: string): Promise; static parseSumsMap(text: string): Map; static cleanup(): boolean; setVersion(): void; install(): Promise; get url(): string; get version(): string; get release(): string; get verstr(): string; } export declare function installedVerStr(): string; export declare function camoufoxPath(downloadIfMissing?: boolean): PathLike; export declare function getPath(file: string): string; export declare function launchPath(): string; export declare function webdl(url: string, desc?: string, bar?: boolean, buffer?: Writable | null, { retries }?: { retries: number; }): Promise; export declare function unzip(zipFile: Buffer, extractPath: string, desc?: string, bar?: boolean): Promise; export {};