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

//#endregion
exports.CDXGEN_VFS_KEY = CDXGEN_VFS_KEY;
exports.cdxgenFromVfs = cdxgenFromVfs;