"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/opengrep/from-vfs.ts
/**
* @file `opengrepFromVfs()` — extracts the OpenGrep binary from the smol
*   binary's VFS. Returns `undefined` when the binary doesn't have OpenGrep
*   bundled.
*/
const OPENGREP_VFS_KEY = "opengrep";
async function opengrepFromVfs() {
	const vfs = /* @__PURE__ */ require_smol_vfs.getSmolVfs();
	if (!vfs) return;
	/* c8 ignore start - smol Node binary only. */
	if (!vfs.has("opengrep")) return;
	return {
		path: await vfs.extract(OPENGREP_VFS_KEY),
		source: "vfs"
	};
	/* c8 ignore stop */
}

//#endregion
exports.OPENGREP_VFS_KEY = OPENGREP_VFS_KEY;
exports.opengrepFromVfs = opengrepFromVfs;