"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_primordials_object = require('../../primordials/object.js');

//#region src/external-tools/trivy/asset-names.ts
/**
* @file Upstream Trivy release asset-name mapping per `platform-arch`. Trivy
*   publishes per-platform archives under
*   https://github.com/aquasecurity/trivy/releases/download/v<X.Y.Z>/. Asset
*   names follow `trivy_<X.Y.Z>_<OS>-<Arch>.{tar.gz,zip}` where `<OS>` is
*   `macOS` / `Linux` / `windows` (capitalization matters) and `<Arch>` is
*   `ARM64` / `64bit`.
*/
const TRIVY_ASSET_MAP = require_primordials_object.ObjectFreeze({
	__proto__: null,
	"darwin-arm64": require_primordials_object.ObjectFreeze({
		__proto__: null,
		suffix: "macOS-ARM64.tar.gz"
	}),
	"darwin-x64": require_primordials_object.ObjectFreeze({
		__proto__: null,
		suffix: "macOS-64bit.tar.gz"
	}),
	"linux-arm64": require_primordials_object.ObjectFreeze({
		__proto__: null,
		suffix: "Linux-ARM64.tar.gz"
	}),
	"linux-x64": require_primordials_object.ObjectFreeze({
		__proto__: null,
		suffix: "Linux-64bit.tar.gz"
	}),
	"win-x64": require_primordials_object.ObjectFreeze({
		__proto__: null,
		suffix: "windows-64bit.zip"
	})
});
function getTrivyAssetEntry(platformArch) {
	return TRIVY_ASSET_MAP[platformArch];
}
/**
* Build the GitHub release-asset download URL for an upstream Trivy binary.
* Returns `undefined` when no entry exists for the requested platform-arch.
*
* Reference: https://github.com/aquasecurity/trivy/releases.
*/
function getTrivyDownloadUrl(opts) {
	const { platformArch, version } = opts;
	const entry = TRIVY_ASSET_MAP[platformArch];
	if (!entry) return;
	return `https://github.com/aquasecurity/trivy/releases/download/v${version}/trivy_${version}_${entry.suffix}`;
}

//#endregion
exports.TRIVY_ASSET_MAP = TRIVY_ASSET_MAP;
exports.getTrivyAssetEntry = getTrivyAssetEntry;
exports.getTrivyDownloadUrl = getTrivyDownloadUrl;