import { type CacheDirContext, type InstalledRecord } from "./cacheDir.js"; import type { Logger } from "./loader.js"; import { type AcquireLockOptions, type LockHandle } from "./lock.js"; import { type WdaFs } from "./wdaProducts.js"; export interface InstallReport { kind: "ios"; assetId: string; action: string; notes?: string[]; } export interface IOSInstallerDeps { logger?: Logger; platform?: NodeJS.Platform; run?: (command: string, args: string[]) => { status: number | null; stderr?: string; stdout?: string; }; /** Long-running async spawn for xcodebuild (async so the lock heartbeat can fire). */ runBuild?: (command: string, args: string[], opts?: { timeoutMs?: number; }) => Promise<{ status: number | null; stdout?: string; stderr?: string; /** True when the runner killed the build at the timeout ceiling — never retried. */ timedOut?: boolean; }>; /** Driver install, routed through the loader (npm-prune defenses stay engaged). */ ensureInstalled?: (packages: string[], options?: { ctx?: CacheDirContext; }) => Promise; resolveDriverPath?: (name: string, ctx: CacheDirContext) => string | null; resolveDriverVersion?: (name: string, ctx: CacheDirContext) => string | null; fs?: WdaFs; /** Test override for the managed WDA root (default: /ios/wda). */ wdaRootDir?: string; acquire?: (options: AcquireLockOptions) => Promise; readRecord?: (ctx: CacheDirContext) => InstalledRecord; writeRecord?: (record: InstalledRecord, ctx: CacheDirContext) => void; now?: () => number; /** Inter-attempt backoff for the transient-build retry; no-op in tests. */ sleep?: (ms: number) => Promise; } /** Ceiling for one xcodebuild build-for-testing attempt (~10 min typical cold). */ export declare const WDA_BUILD_TIMEOUT_MS: number; /** Total attempts for a transient xcodebuild failure (20-min ops — retry once). */ export declare const WDA_BUILD_MAX_ATTEMPTS = 2; /** * How long a second `install ios` waits for a concurrent build before * skipping. Sized to cover one full build attempt (WDA_BUILD_TIMEOUT_MS, * 20 min — ceiling kills are never retried) plus setup slack; a transient * retry that pushes the holder past this window just means the contender * reports `skipped` and the products land for the NEXT run — best-effort. */ export declare const WDA_LOCK_WAIT_MS: number; /** Keyed build dirs whose last-used stamp is older than this get pruned. */ export declare const WDA_PRUNE_AFTER_MS: number; export declare function isTransientXcodebuildError(message: unknown): boolean; export declare function installIos({ yes, dryRun, ctx, deps, }?: { yes?: boolean; dryRun?: boolean; ctx?: CacheDirContext; deps?: IOSInstallerDeps; }): Promise; //# sourceMappingURL=iosInstaller.d.ts.map