/** * @file Upstream Bazel release asset-name mapping per `platform-arch`. Bazel's * GitHub Releases use a consistent naming pattern * (`bazel---[.exe]`); this leaf encodes the platform-arch * → suffix map so the bazelisk-style downloader can build the right URL * without spreading the convention. Bazel publishes native binaries for 5 of * socket's 8 targets. The 3 gap targets use compat-layer fallbacks: * * - `linux-x64-musl` / `linux-arm64-musl` → glibc binary + gcompat (user must * `apk add gcompat` on Alpine) * - `win-arm64` → Windows x64 binary via Prism emulation Callers can read * `BAZEL_ASSET_MAP[platformArch].native` to see whether the binary is * native to the target or runs under a compat layer. */ export interface BazelAssetEntry { /** * Asset-name suffix appended to `bazel--`. */ readonly suffix: string; /** * `true` if this is an upstream-native build; `false` if it runs via compat. */ readonly native: boolean; /** * Human-readable note about any compatibility quirks. */ readonly note: string | undefined; } export declare const BAZEL_ASSET_MAP: Readonly>; export declare function getBazelAssetEntry(platformArch: string): BazelAssetEntry | undefined; /** * Options for {@link getBazelDownloadUrl}. */ export interface BazelDownloadOptions { /** * Bazel release version, e.g. `'7.4.1'`. Passed verbatim into the release tag * — the helper doesn't validate against bazel's release feed, it just formats * the URL. */ version: string; /** * Socket platform-arch token — looked up in `BAZEL_ASSET_MAP`. Returns * `undefined` when no entry exists for the target. */ platformArch: string; } /** * Build the GitHub release-asset download URL for an upstream Bazel binary. * Returns `undefined` when no entry exists for the requested platform-arch. * * Note: the underlying asset may be a compat-layer build (see * `BazelAssetEntry.native`). Callers that require a native binary should check * `getBazelAssetEntry(platformArch).native` before downloading. * * Reference: https://github.com/bazelbuild/bazel/releases. * * @example * ;```typescript * const url = getBazelDownloadUrl({ * version: '7.4.1', * platformArch: 'darwin-arm64', * }) * // → 'https://github.com/bazelbuild/bazel/releases/download/7.4.1/bazel-7.4.1-darwin-arm64' * ``` */ export declare function getBazelDownloadUrl(options: BazelDownloadOptions): string | undefined;