"use strict";
/* Socket Lib - Built with esbuild */
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var parse_manifest_exports = {};
__export(parse_manifest_exports, {
  jsParseManifest: () => jsParseManifest,
  parseManifest: () => parseManifest
});
module.exports = __toCommonJS(parse_manifest_exports);
var import_manifest_error = require("./manifest-error");
var import_parse_package_json = require("../npm/parse-package-json");
var import_manifest = require("../../smol/manifest");
function jsParseManifest(content, ecosystem) {
  switch (ecosystem) {
    case "npm":
      return (0, import_parse_package_json.parsePackageJson)(content);
    default:
      throw new import_manifest_error.ManifestError(
        `Unsupported ecosystem: ${ecosystem}`,
        "ERR_UNSUPPORTED"
      );
  }
}
const _smol = (0, import_manifest.getSmolManifest)();
const smolParseManifest = _smol ? (content, ecosystem) => _smol.parseManifest(content, ecosystem) : void 0;
const parseManifest = smolParseManifest ?? jsParseManifest;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  jsParseManifest,
  parseManifest
});
