"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/janus/asset-names.ts
/**
* @file Upstream janus release asset-name mapping per `platform-arch`. janus
*   publishes per-platform tarballs under
*   https://github.com/divmain/janus/releases/download/v<X.Y.Z>/. At v1.22.0
*   only darwin-arm64 is shipped; this map will expand as upstream adds builds.
*   Callers receive `undefined` for unsupported platforms — surface that as an
*   actionable "janus is mac-arm64 only" error rather than blindly fetching a
*   404.
*/
const JANUS_ASSET_MAP = require_primordials_object.ObjectFreeze({
	__proto__: null,
	"darwin-arm64": require_primordials_object.ObjectFreeze({
		__proto__: null,
		asset: "janus-aarch64-apple-darwin.tar.gz"
	})
});
/**
* Single source of truth for the platform-arch tokens janus ships. Derived from
* JANUS_ASSET_MAP keys so adding a new asset entry automatically updates the
* supported set. Use this from `from-download.ts` to throw a helpful error
* rather than letting the URL builder silently return undefined.
*/
const JANUS_SUPPORTED_PLATFORM_ARCHES = require_primordials_object.ObjectFreeze(require_primordials_object.ObjectKeys(JANUS_ASSET_MAP));
function getJanusAssetEntry(platformArch) {
	return JANUS_ASSET_MAP[platformArch];
}
/**
* Build the GitHub release-asset download URL for an upstream janus binary.
* Returns `undefined` when no entry exists for the requested platform-arch.
*
* Reference: https://github.com/divmain/janus/releases.
*/
function getJanusDownloadUrl(opts) {
	const { platformArch, version } = opts;
	const entry = JANUS_ASSET_MAP[platformArch];
	if (!entry) return;
	return `https://github.com/divmain/janus/releases/download/v${version}/` + entry.asset;
}

//#endregion
exports.JANUS_ASSET_MAP = JANUS_ASSET_MAP;
exports.JANUS_SUPPORTED_PLATFORM_ARCHES = JANUS_SUPPORTED_PLATFORM_ARCHES;
exports.getJanusAssetEntry = getJanusAssetEntry;
exports.getJanusDownloadUrl = getJanusDownloadUrl;