/** * @file Upstream OpenGrep release asset-name mapping per `platform-arch`. * OpenGrep publishes raw binaries with no archive wrapper for macOS and * Linux, and a zipped binary (`opengrep-core_windows_x86.zip` containing * `opengrep-core.exe`) for Windows. The `isArchive` flag tells the download * helper whether to extract or copy as-is. */ export interface OpengrepAssetEntry { /** * Full asset filename (no version interpolation — OpenGrep keeps asset names * version-free). */ readonly asset: string; /** * `true` when the asset is a zip that must be extracted; `false` when the * asset IS the binary (just copy + chmod). */ readonly isArchive: boolean; /** * For archive assets, the path inside the zip to the binary. Undefined for * bare-binary assets. */ readonly binaryInArchive: string | undefined; } export declare const OPENGREP_ASSET_MAP: Readonly>; export declare function getOpengrepAssetEntry(platformArch: string): OpengrepAssetEntry | undefined; export interface OpengrepDownloadOptions { /** * OpenGrep release version, e.g. `'1.16.5'` (no `v` prefix; the helper * prepends it for the release tag). */ version: string; /** * Socket platform-arch token — looked up in `OPENGREP_ASSET_MAP`. */ platformArch: string; } /** * Build the GitHub release-asset download URL for an upstream OpenGrep binary. * Returns `undefined` when no entry exists for the requested platform-arch. * * Reference: https://github.com/opengrep/opengrep/releases. */ export declare function getOpengrepDownloadUrl(options: OpengrepDownloadOptions): string | undefined;