frack-settings
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "frack-settings", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Settings defaults and runtime loader from rc file", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -39,5 +39,5 @@ /* eslint-disable global-require */ | ||
const settings = getFrackRc() | ||
guards.checkAppEnv(settings) | ||
const currentEnv = process.env.APP_ENV || 'development' | ||
guards.checkAppEnv(settings, currentEnv) | ||
return deepMerge(settings[currentEnv], settings.common) | ||
} |
@@ -1,2 +0,2 @@ | ||
function checkAppEnv(frackSettings) { | ||
function checkAppEnv(frackSettings, currentEnv) { | ||
if (typeof frackSettings !== 'object') { | ||
@@ -6,5 +6,5 @@ throw new Error(`Settings should be object instead of ${typeof frackSettings}`) | ||
if (Object.keys(frackSettings).indexOf(process.env.APP_ENV) === -1) { | ||
throw new Error(`Enviroment variable APP_ENV with value ${process.env | ||
.APP_ENV} doesn't match any app enviroment section in .frackrc.js`) | ||
if (Object.keys(frackSettings).indexOf(currentEnv) === -1) { | ||
throw new Error(`Enviroment variable APP_ENV with value ${currentEnv} | ||
doesn't match any app enviroment section in .frackrc.js`) | ||
} | ||
@@ -11,0 +11,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
216853
6336
10
2