export declare const HEAVY_NPM_DEPS: readonly ["webdriverio", "appium", "appium-chromium-driver", "appium-geckodriver", "appium-safari-driver", "appium-xcuitest-driver", "sharp", "@ffmpeg-installer/ffmpeg", "@puppeteer/browsers", "geckodriver", "pixelmatch", "pngjs", "@homebridge/node-pty-prebuilt-multiarch"]; export type HeavyDepName = (typeof HEAVY_NPM_DEPS)[number]; /** * Heavy deps whose install is **best-effort**: a failure to install them (e.g. * no prebuilt binary for the runner's platform/arch + no build toolchain) must * NOT abort the whole `install all` batch. The corresponding feature degrades to * SKIP at runtime instead. The PTY backend is native; even with the * prebuilt-multiarch fork's broad coverage, an exotic platform/arch could miss a * binary, so it is installed on its own, failure-tolerant, as a safety net. */ export declare const BEST_EFFORT_NPM_DEPS: ReadonlySet; /** * Optional peer dependencies that npm will NOT auto-install, but a heavy dep * needs for full functionality. `@puppeteer/browsers@3` moved `proxy-agent` * from a regular dependency (2.x) to an `optional` peer, so a bare * `npm install @puppeteer/browsers` into /runtime omits it and * proxy-based browser downloads break. We install each companion alongside * its owner so the cached install matches what 2.x shipped. */ export declare const RUNTIME_PEER_COMPANIONS: Record; /** * Expand a list of runtime package names to include any peer companions * (see RUNTIME_PEER_COMPANIONS), preserving order and de-duplicating. */ export declare function withPeerCompanions(names: string[]): string[]; /** * Every npm package name the shim itself may install into /runtime. * This is the sweep list recordRuntimeDependencies uses to find packages * physically on disk but missing from installed.json — the orphans an * interrupted install batch (killed npm child, install timeout, cancelled CI * job) leaves behind, which would otherwise be invisible to the recorded * sources and pruned as extraneous by the next install's reify. */ export declare function managedDepNames(): string[]; /** * Pure union of every field the shim declares runtime installs from, split * out from managedDepNames so it can be unit-tested against synthetic * manifests: HEAVY_NPM_DEPS (the loader's own list) plus the keys of * `ddRuntimeDependencies` / `optionalDependencies` — the app-surface drivers * (appium-novawindows-driver, appium-mac2-driver, appium-uiautomator2-driver) * are JIT-installed by the platform preflights but live ONLY in those * manifest fields, not in HEAVY_NPM_DEPS — expanded with peer companions. * * `dependencies` is deliberately EXCLUDED: those are the shim's regular * runtime deps, whose names can collide with transitives hoisted into the * cache's node_modules — sweeping them would promote a hoisted transitive to * a direct dependency, distorting every future ideal tree. (It only exists * as a legacy fallback in resolveDeclaredVersion, predating the cache.) */ export declare function resolveManagedDepNames(pkg: ShimPackageJson): string[]; export interface ShimPackageJson { ddRuntimeDependencies?: Record; optionalDependencies?: Record; dependencies?: Record; } /** * Returns the version constraint declared in the shim's own package.json * for `name`. The version source differs between the published package and * a source/CI checkout, so we check in priority order: * 1. `ddRuntimeDependencies` — the published state. The publish step moves the * heavy deps here so npm never auto-installs them. * 2. `optionalDependencies` — the source/CI state (kept for Dependabot). * 3. `dependencies` — the legacy state, pre lazy-install migration. * The first non-empty match wins. * * Throws for unknown names; the resolver is the only caller and a missing * entry is a programming error, not a user-facing one. */ export declare function getDeclaredVersion(name: string): string; /** * Pure field-priority resolution, split out from getDeclaredVersion so it can * be unit-tested against synthetic manifests without touching the filesystem. */ export declare function resolveDeclaredVersion(pkg: ShimPackageJson, name: string): string; /** Test seam: drop the cached package.json read. */ export declare function _resetCacheForTests(): void; /** * Minimal semver-range check covering the shapes that appear in this * repo's `package.json#optionalDependencies`: exact `X.Y.Z`, caret * `^X.Y.Z`, tilde `~X.Y.Z`. Anything else (`>=`, `||`, `*`, etc.) * degrades to "matches" so callers don't surface false positives. * * Pulling in the full `semver` package would put a runtime dep into * the shim we're explicitly trying to keep lean; this is sufficient * for the use sites that compare installed-cache versions against * declared ranges. */ export declare function satisfiesRange(installed: string, range: string): boolean; //# sourceMappingURL=heavyDeps.d.ts.map