UNPKG

@pallad/app-env

Version:

Detects environment (production, staging, test, development, ci) and helps making decision based on that

11 lines (10 loc) 573 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NoEnvironmentNameFoundError = void 0; class NoEnvironmentNameFoundError extends Error { name = 'NoEnvironmentNameFoundError'; static fromConfig(envKeyNameList, supportedEnvNameList) { return new NoEnvironmentNameFoundError(`No environment name found in config. Supported environment names: ${supportedEnvNameList.join(', ')}. Environment variables considered: ${JSON.stringify(envKeyNameList)}`); } } exports.NoEnvironmentNameFoundError = NoEnvironmentNameFoundError;