/** * @file `sbtFromDownload()` — fetches the SBT launcher tarball, extracts it, * and returns a `ResolvedSbt` pointing at the `bin/sbt` script. SBT * distributes a single platform-agnostic tgz containing a `bin/sbt` script * plus `bin/sbt-launch.jar`. The `bin/sbt` form is directly invocable (it * shells out to `java -jar` internally), so `isJar: false` even though the * underlying machinery is a JAR. Default cache layout: * `/sbt//`. Trust-on-first-use: pass `integrity` from * `external-tools.json` when available. */ import type { BinaryDownloader } from '../from-download.js'; import type { HashInput } from '../../crypto/integrity.js'; import type { ResolvedSbt } from './types.js'; export interface SbtFromDownloadOptions { /** * SBT release version, e.g. `'1.10.7'`. */ version: string; /** * Optional pinned integrity from `external-tools.json`. */ integrity?: HashInput | undefined; /** * Override the cache directory. Default: * `/sbt//`. */ cacheDir?: string | undefined; /** * Inject a custom downloader. Forwarded to the underlying * `downloadAndExtractTool`. Defaults to dlx. */ downloader?: BinaryDownloader | undefined; } /** * Resolve SBT by downloading and extracting the upstream tgz. Returns the * standard `ResolvedSbt` shape with `source: 'download'`. * * @example * ;```typescript * const sbt = await sbtFromDownload({ version: '1.10.7' }) * // → { path: '/.../bin/sbt', isJar: false, source: 'download' } * ``` */ export declare function sbtFromDownload(options: SbtFromDownloadOptions): Promise;