/** * @file `cdxgenFromDownload()` — fetches the upstream cdxgen SEA binary (slim * by default) and returns a `ResolvedCdxgen` pointing at the cached * executable. cdxgen ships bare-binary assets per platform (no archive * wrapper) with sidecar `.sha256` files; this helper passes the pinned * integrity through `downloadToolArchive`, then copies the downloaded blob to * `cdxgen[.exe]` and chmods it 0o755. Platforms upstream doesn't ship a SEA * for (none today; the asset map covers all 8 Socket targets) return * `undefined` — callers should fall back to `cdxgenFromNpm()` for those. */ import type { BinaryDownloader } from '../from-download.js'; import type { HashInput } from '../../crypto/integrity.js'; import type { CdxgenVariant } from './asset-names.js'; import type { ResolvedCdxgen } from './types.js'; export interface CdxgenFromDownloadOptions { /** * Cdxgen release version, e.g. `'12.4.1'`. */ version: string; /** * Socket platform-arch token, e.g. `'darwin-arm64'`. */ platformArch: string; /** * Slim is the default and bundles no bun/deno; full bundles both. */ variant?: CdxgenVariant | undefined; /** * Optional pinned integrity from `external-tools.json`. */ integrity?: HashInput | undefined; /** * Override the cache directory. By default the binary lands under * `/cdxgen//-/`. */ cacheDir?: string | undefined; /** * Inject a custom downloader. Forwarded to the underlying * `downloadToolArchive`. Defaults to dlx. */ downloader?: BinaryDownloader | undefined; } export declare function cdxgenFromDownload(options: CdxgenFromDownloadOptions): Promise;