"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 socket_exports = {};
__export(socket_exports, {
  getMcpHttpMode: () => getMcpHttpMode,
  getMcpPort: () => getMcpPort,
  getSocketAcceptRisks: () => getSocketAcceptRisks,
  getSocketApiBaseUrl: () => getSocketApiBaseUrl,
  getSocketApiProxy: () => getSocketApiProxy,
  getSocketApiTimeout: () => getSocketApiTimeout,
  getSocketApiToken: () => getSocketApiToken,
  getSocketApiUrl: () => getSocketApiUrl,
  getSocketBranchName: () => getSocketBranchName,
  getSocketCacacheDirEnv: () => getSocketCacacheDirEnv,
  getSocketCloudAuthUrl: () => getSocketCloudAuthUrl,
  getSocketCloudClientId: () => getSocketCloudClientId,
  getSocketCloudClientSecret: () => getSocketCloudClientSecret,
  getSocketCloudIntrospectUrl: () => getSocketCloudIntrospectUrl,
  getSocketCloudTokenUrl: () => getSocketCloudTokenUrl,
  getSocketCloudUserinfoUrl: () => getSocketCloudUserinfoUrl,
  getSocketConfig: () => getSocketConfig,
  getSocketDebug: () => getSocketDebug,
  getSocketDlxDirEnv: () => getSocketDlxDirEnv,
  getSocketHome: () => getSocketHome,
  getSocketNoApiToken: () => getSocketNoApiToken,
  getSocketNpmRegistry: () => getSocketNpmRegistry,
  getSocketOauthIntrospectionClientId: () => getSocketOauthIntrospectionClientId,
  getSocketOauthIntrospectionClientSecret: () => getSocketOauthIntrospectionClientSecret,
  getSocketOauthIssuer: () => getSocketOauthIssuer,
  getSocketOauthRequiredScopes: () => getSocketOauthRequiredScopes,
  getSocketOrgSlug: () => getSocketOrgSlug,
  getSocketRegistryUrl: () => getSocketRegistryUrl,
  getSocketRepositoryName: () => getSocketRepositoryName,
  getSocketViewAllRisks: () => getSocketViewAllRisks,
  getTrustProxy: () => getTrustProxy
});
module.exports = __toCommonJS(socket_exports);
var import_boolean = require("./boolean");
var import_number = require("./number");
var import_rewire = require("./rewire");
// @__NO_SIDE_EFFECTS__
function getMcpHttpMode() {
  return (0, import_rewire.getEnvValue)("MCP_HTTP_MODE") === "true";
}
// @__NO_SIDE_EFFECTS__
function getMcpPort() {
  const parsed = (0, import_number.envAsNumber)((0, import_rewire.getEnvValue)("MCP_PORT"));
  return Number.isFinite(parsed) && parsed > 0 ? parsed : 3e3;
}
// @__NO_SIDE_EFFECTS__
function getSocketAcceptRisks() {
  return (0, import_boolean.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_ACCEPT_RISKS"));
}
// @__NO_SIDE_EFFECTS__
function getSocketApiBaseUrl() {
  return (0, import_rewire.getEnvValue)("SOCKET_API_BASE_URL");
}
// @__NO_SIDE_EFFECTS__
function getSocketApiProxy() {
  return (0, import_rewire.getEnvValue)("SOCKET_API_PROXY");
}
// @__NO_SIDE_EFFECTS__
function getSocketApiTimeout() {
  return (0, import_number.envAsNumber)((0, import_rewire.getEnvValue)("SOCKET_API_TIMEOUT"));
}
// @__NO_SIDE_EFFECTS__
function getSocketApiToken() {
  return (0, import_rewire.getEnvValue)("SOCKET_API_TOKEN") || (0, import_rewire.getEnvValue)("SOCKET_API_KEY") || (0, import_rewire.getEnvValue)("SOCKET_CLI_API_TOKEN") || (0, import_rewire.getEnvValue)("SOCKET_CLI_API_KEY") || (0, import_rewire.getEnvValue)("SOCKET_SECURITY_API_TOKEN") || (0, import_rewire.getEnvValue)("SOCKET_SECURITY_API_KEY");
}
// @__NO_SIDE_EFFECTS__
function getSocketApiUrl() {
  return (0, import_rewire.getEnvValue)("SOCKET_API_URL");
}
// @__NO_SIDE_EFFECTS__
function getSocketBranchName() {
  return (0, import_rewire.getEnvValue)("SOCKET_BRANCH_NAME");
}
// @__NO_SIDE_EFFECTS__
function getSocketCacacheDirEnv() {
  return (0, import_rewire.getEnvValue)("SOCKET_CACACHE_DIR");
}
// @__NO_SIDE_EFFECTS__
function getSocketCloudAuthUrl() {
  return (0, import_rewire.getEnvValue)("SOCKET_CLOUD_AUTH_URL");
}
// @__NO_SIDE_EFFECTS__
function getSocketCloudClientId() {
  return (0, import_rewire.getEnvValue)("SOCKET_CLOUD_CLIENT_ID");
}
// @__NO_SIDE_EFFECTS__
function getSocketCloudClientSecret() {
  return (0, import_rewire.getEnvValue)("SOCKET_CLOUD_CLIENT_SECRET");
}
// @__NO_SIDE_EFFECTS__
function getSocketCloudIntrospectUrl() {
  return (0, import_rewire.getEnvValue)("SOCKET_CLOUD_INTROSPECT_URL");
}
// @__NO_SIDE_EFFECTS__
function getSocketCloudTokenUrl() {
  return (0, import_rewire.getEnvValue)("SOCKET_CLOUD_TOKEN_URL");
}
// @__NO_SIDE_EFFECTS__
function getSocketCloudUserinfoUrl() {
  return (0, import_rewire.getEnvValue)("SOCKET_CLOUD_USERINFO_URL");
}
// @__NO_SIDE_EFFECTS__
function getSocketConfig() {
  return (0, import_rewire.getEnvValue)("SOCKET_CONFIG");
}
// @__NO_SIDE_EFFECTS__
function getSocketDebug() {
  return (0, import_rewire.getEnvValue)("SOCKET_DEBUG");
}
// @__NO_SIDE_EFFECTS__
function getSocketDlxDirEnv() {
  return (0, import_rewire.getEnvValue)("SOCKET_DLX_DIR");
}
// @__NO_SIDE_EFFECTS__
function getSocketHome() {
  return (0, import_rewire.getEnvValue)("SOCKET_HOME");
}
// @__NO_SIDE_EFFECTS__
function getSocketNoApiToken() {
  return (0, import_boolean.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_NO_API_TOKEN"));
}
// @__NO_SIDE_EFFECTS__
function getSocketNpmRegistry() {
  return (0, import_rewire.getEnvValue)("SOCKET_NPM_REGISTRY");
}
// @__NO_SIDE_EFFECTS__
function getSocketOauthIntrospectionClientId() {
  return (0, import_rewire.getEnvValue)("SOCKET_OAUTH_INTROSPECTION_CLIENT_ID") ?? "";
}
// @__NO_SIDE_EFFECTS__
function getSocketOauthIntrospectionClientSecret() {
  return (0, import_rewire.getEnvValue)("SOCKET_OAUTH_INTROSPECTION_CLIENT_SECRET") ?? "";
}
// @__NO_SIDE_EFFECTS__
function getSocketOauthIssuer() {
  return (0, import_rewire.getEnvValue)("SOCKET_OAUTH_ISSUER") ?? "";
}
// @__NO_SIDE_EFFECTS__
function getSocketOauthRequiredScopes() {
  return (0, import_rewire.getEnvValue)("SOCKET_OAUTH_REQUIRED_SCOPES") ?? "packages:list";
}
// @__NO_SIDE_EFFECTS__
function getSocketOrgSlug() {
  return (0, import_rewire.getEnvValue)("SOCKET_ORG_SLUG");
}
// @__NO_SIDE_EFFECTS__
function getSocketRegistryUrl() {
  return (0, import_rewire.getEnvValue)("SOCKET_REGISTRY_URL");
}
// @__NO_SIDE_EFFECTS__
function getSocketRepositoryName() {
  return (0, import_rewire.getEnvValue)("SOCKET_REPOSITORY_NAME") || // Used by Coana.
  (0, import_rewire.getEnvValue)("SOCKET_REPO_NAME");
}
// @__NO_SIDE_EFFECTS__
function getSocketViewAllRisks() {
  return (0, import_boolean.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_VIEW_ALL_RISKS"));
}
// @__NO_SIDE_EFFECTS__
function getTrustProxy() {
  return (0, import_rewire.getEnvValue)("TRUST_PROXY") === "true";
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  getMcpHttpMode,
  getMcpPort,
  getSocketAcceptRisks,
  getSocketApiBaseUrl,
  getSocketApiProxy,
  getSocketApiTimeout,
  getSocketApiToken,
  getSocketApiUrl,
  getSocketBranchName,
  getSocketCacacheDirEnv,
  getSocketCloudAuthUrl,
  getSocketCloudClientId,
  getSocketCloudClientSecret,
  getSocketCloudIntrospectUrl,
  getSocketCloudTokenUrl,
  getSocketCloudUserinfoUrl,
  getSocketConfig,
  getSocketDebug,
  getSocketDlxDirEnv,
  getSocketHome,
  getSocketNoApiToken,
  getSocketNpmRegistry,
  getSocketOauthIntrospectionClientId,
  getSocketOauthIntrospectionClientSecret,
  getSocketOauthIssuer,
  getSocketOauthRequiredScopes,
  getSocketOrgSlug,
  getSocketRegistryUrl,
  getSocketRepositoryName,
  getSocketViewAllRisks,
  getTrustProxy
});
