/** * @file `resolveBazel()` — Bazel resolution entry point. Tries each source in * order: * * 1. PATH — `bazelisk` (preferred) or `bazel` on the system PATH * 2. download — upstream GitHub release binary (only when `downloadIfMissing` is * passed) No VFS tier: Bazel's version comes from the project's * `.bazelversion`, not from a global pin, so a smol-bundled Bazel would * always be the wrong version for any project that pinned a different one. * Every Bazel use must go through the project-specific download path. * Returns `undefined` if all of the enabled sources miss. Memoized per * option-shape: calls with identical options return the same cached * promise. Calling without `downloadIfMissing` and then with * `downloadIfMissing` produces two distinct cache entries so the second * call can fall through to the download tier. */ import type { BinaryDownloader } from '../from-download.js'; import type { HashInput } from '../../crypto/integrity.js'; import type { ResolvedBazel } from './types.js'; export interface ResolveBazelOptions { /** * When set, the resolver falls through to a GitHub release download after the * local-discovery tiers miss. Omit to keep the resolver read-only. */ downloadIfMissing?: { version: string; platformArch: string; integrity?: HashInput | undefined; downloader?: BinaryDownloader | undefined; } | undefined; } export declare function cacheKey(options: ResolveBazelOptions | undefined): string; export declare function doResolveBazel(options?: ResolveBazelOptions | undefined): Promise; /** * @unused No internal or Socket consumers; exercised only by its unit tests. */ export declare function resetBazelResolution(): void; export declare function resolveBazel(options?: ResolveBazelOptions | undefined): Promise;