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

//#region src/external-tools/trivy/from-vfs.ts
/**
* @file `trivyFromVfs()` — extracts the Trivy binary from the smol binary's
*   VFS. Returns `undefined` when the binary doesn't have Trivy bundled.
*/
const TRIVY_VFS_KEY = "trivy";
async function trivyFromVfs() {
	const vfs = /* @__PURE__ */ require_smol_vfs.getSmolVfs();
	if (!vfs) return;
	/* c8 ignore start - smol Node binary only. */
	if (!vfs.has("trivy")) return;
	return {
		path: await vfs.extract(TRIVY_VFS_KEY),
		source: "vfs"
	};
	/* c8 ignore stop */
}

//#endregion
exports.TRIVY_VFS_KEY = TRIVY_VFS_KEY;
exports.trivyFromVfs = trivyFromVfs;