"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_runtime = require('../_virtual/_rolldown/runtime.js');
let src_external_which = require("../external/which");
src_external_which = require_runtime.__toESM(src_external_which);

//#region src/constants/agents.ts
/**
* @file Package manager agent constants. Exports agent names
*   (npm/pnpm/yarn/bun/vlt/npx), lockfile names, registry URLs, and resolved
*   npm binary paths used across Socket tooling.
*/
const NPM = "npm";
const PNPM = "pnpm";
const YARN = "yarn";
const BUN = "bun";
const VLT = "vlt";
const NPX = "npx";
const _npmBinPath = /*@__PURE__*/ (() => {
	try {
		return src_external_which.default.sync("npm", { nothrow: true }) || void 0;
	} catch {
		return;
	}
	/* c8 ignore stop */
})();
const NPM_BIN_PATH = _npmBinPath || "npm";
const NPM_REAL_EXEC_PATH = /*@__PURE__*/ (() => {
	try {
		/* c8 ignore start - Module-init IIFE; only reachable when
		which.sync returns null at module load. */
		if (!_npmBinPath) return;
		/* c8 ignore stop */
		const { existsSync } = /*@__PURE__*/ require("node:fs");
		const path = /*@__PURE__*/ require("node:path");
		const npmDir = path.dirname(_npmBinPath);
		const nodeModulesPath = path.join(npmDir, "..", "lib", "node_modules", "npm", "lib", "cli.js");
		if (existsSync(nodeModulesPath)) return nodeModulesPath;
		/* c8 ignore start - Module-init fallthroughs; reached only when cli.js
		isn't where expected, or when the outer try throws. */
		return;
	} catch {
		return;
	}
	/* c8 ignore stop */
})();
const NPM_REGISTRY_URL = "https://registry.npmjs.org";
const YARN_BERRY = "yarn/berry";
const YARN_CLASSIC = "yarn/classic";
const ZPM = "zpm";
const PACKAGE_LOCK = "package-lock";
const PACKAGE_LOCK_JSON = "package-lock.json";
const NPM_SHRINKWRAP_JSON = "npm-shrinkwrap.json";
const PNPM_LOCK = "pnpm-lock";
const PNPM_LOCK_YAML = "pnpm-lock.yaml";
const YARN_LOCK = "yarn.lock";
const BUN_LOCK = "bun.lock";
const BUN_LOCKB = "bun.lockb";
const VLT_LOCK_JSON = "vlt-lock.json";
const PNPM_WORKSPACE_YAML = "pnpm-workspace.yaml";
const OVERRIDES = "overrides";
const RESOLUTIONS = "resolutions";

//#endregion
exports.BUN = BUN;
exports.BUN_LOCK = BUN_LOCK;
exports.BUN_LOCKB = BUN_LOCKB;
exports.NPM = NPM;
exports.NPM_BIN_PATH = NPM_BIN_PATH;
exports.NPM_REAL_EXEC_PATH = NPM_REAL_EXEC_PATH;
exports.NPM_REGISTRY_URL = NPM_REGISTRY_URL;
exports.NPM_SHRINKWRAP_JSON = NPM_SHRINKWRAP_JSON;
exports.NPX = NPX;
exports.OVERRIDES = OVERRIDES;
exports.PACKAGE_LOCK = PACKAGE_LOCK;
exports.PACKAGE_LOCK_JSON = PACKAGE_LOCK_JSON;
exports.PNPM = PNPM;
exports.PNPM_LOCK = PNPM_LOCK;
exports.PNPM_LOCK_YAML = PNPM_LOCK_YAML;
exports.PNPM_WORKSPACE_YAML = PNPM_WORKSPACE_YAML;
exports.RESOLUTIONS = RESOLUTIONS;
exports.VLT = VLT;
exports.VLT_LOCK_JSON = VLT_LOCK_JSON;
exports.YARN = YARN;
exports.YARN_BERRY = YARN_BERRY;
exports.YARN_CLASSIC = YARN_CLASSIC;
exports.YARN_LOCK = YARN_LOCK;
exports.ZPM = ZPM;