"use strict";
/**
 * Bundled from libnpmexec
 * This is a zero-dependency bundle created by esbuild.
 */
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};

// node_modules/.pnpm/libnpmexec@10.1.8/node_modules/libnpmexec/lib/get-bin-from-manifest.js
var require_get_bin_from_manifest = __commonJS({
  "node_modules/.pnpm/libnpmexec@10.1.8/node_modules/libnpmexec/lib/get-bin-from-manifest.js"(exports2, module2) {
    var getBinFromManifest2 = /* @__PURE__ */ __name((mani) => {
      const bin = mani.bin || {};
      if (new Set(Object.values(bin)).size === 1) {
        return Object.keys(bin)[0];
      }
      const name = mani.name.replace(/^@[^/]+\//, "");
      if (bin[name]) {
        return name;
      }
      throw Object.assign(new Error("could not determine executable to run"), {
        pkgid: mani._id
      });
    }, "getBinFromManifest");
    module2.exports = getBinFromManifest2;
  }
});

// src/external/libnpmexec.js
var getBinFromManifest = require_get_bin_from_manifest();
module.exports = {
  getBinFromManifest
};
