@hexclave/dashboard-ui-components 1.0.23 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4113,7 +4113,10 @@ This is likely an error in Hexclave. Please make sure you are running the newest
4113
4113
  },
4114
4114
  enumerable: false
4115
4115
  });
4116
- if ((typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_DEBUGGER_ON_ASSERTION_ERROR : void 0) === "true") debugger;
4116
+ const hexclaveDebuggerValue = typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_DEBUGGER_ON_ASSERTION_ERROR : void 0;
4117
+ const stackDebuggerValue = typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_DEBUGGER_ON_ASSERTION_ERROR : void 0;
4118
+ if (hexclaveDebuggerValue && stackDebuggerValue && hexclaveDebuggerValue !== stackDebuggerValue) throw new Error("Environment variables NEXT_PUBLIC_HEXCLAVE_DEBUGGER_ON_ASSERTION_ERROR and NEXT_PUBLIC_STACK_DEBUGGER_ON_ASSERTION_ERROR are both set to different values. Remove one of them or set them to the same value.");
4119
+ if ((hexclaveDebuggerValue || stackDebuggerValue) === "true") debugger;
4117
4120
  }
4118
4121
  };
4119
4122
  HexclaveAssertionError.prototype.name = "HexclaveAssertionError";
@@ -4316,14 +4319,24 @@ This is likely an error in Hexclave. Please make sure you are running the newest
4316
4319
  StatusError.prototype.name = "StatusError";
4317
4320
 
4318
4321
  // ../shared/dist/esm/utils/env.js
4319
- function getHexclaveEnvVarName(name) {
4320
- if (!name.includes("STACK_")) return;
4321
- return name.replace("STACK_", "HEXCLAVE_");
4322
+ function resolveHexclaveStackEnvVarValue(hexclaveName, stackName, hexclaveValue, stackValue) {
4323
+ if (hexclaveValue && stackValue && hexclaveValue !== stackValue) throw new Error(`Environment variables ${hexclaveName} and ${stackName} are both set to different values. Remove one of them or set them to the same value.`);
4324
+ return hexclaveValue || stackValue || void 0;
4325
+ }
4326
+ function getEnvVarWithHexclaveFallback(name) {
4327
+ if (name.includes("STACK_")) {
4328
+ const hexclaveName = name.replace("STACK_", "HEXCLAVE_");
4329
+ return resolveHexclaveStackEnvVarValue(hexclaveName, name, process.env[hexclaveName], process.env[name]);
4330
+ }
4331
+ if (name.includes("HEXCLAVE_")) {
4332
+ const stackName = name.replace("HEXCLAVE_", "STACK_");
4333
+ return resolveHexclaveStackEnvVarValue(name, stackName, process.env[name], process.env[stackName]);
4334
+ }
4335
+ return process.env[name];
4322
4336
  }
4323
4337
  function getProcessEnv(name) {
4324
4338
  if (typeof process === "undefined" || typeof process.env === "undefined") return;
4325
- const hexclaveName = getHexclaveEnvVarName(name);
4326
- return (hexclaveName ? process.env[hexclaveName] : void 0) ?? process.env[name];
4339
+ return getEnvVarWithHexclaveFallback(name);
4327
4340
  }
4328
4341
 
4329
4342
  // ../shared/dist/esm/utils/results.js