text: "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.parseEnvValue = void 0;
  const chalk_1 = __importDefault(require("chalk"));
  /**
   * Parses the EnvValue and return the string value
   *
   * - If there is no env var just return the value
   * - If there is an env var it will be resolve and returned.
   * - If there is an env var is present but can't be resolved an error will be thrown
   */
  function parseEnvValue(provider) {
      if (provider.fromEnvVar && provider.fromEnvVar !== 'null') {
          const value = process.env[provider.fromEnvVar];
          if (!value) {
              throw new Error(`Attempted to load provider value using \`env(${provider.fromEnvVar})\` but it was not present. Please insure that ${chalk_1.default.dim(provider.fromEnvVar)} is present in your Environment Variables`);
          }
          return value;
      }
      return provider.value;
  }
  exports.parseEnvValue = parseEnvValue;
  //# sourceMappingURL=parseEnvValue.js.map