@thinkmill/devops-env-vars
Advanced tools
Comparing version 0.0.1 to 0.0.2
10
index.js
@@ -89,7 +89,9 @@ /* | ||
const serverIp = getServerIp(); | ||
var envRtn = 'development'; | ||
Object.keys(VPC_IP_RANGES).forEach(cidr => { | ||
const cidrEnv = VPC_IP_RANGES[cidr]; | ||
if (new Netmask(cidr).contains(serverIp) && supportedEnvs.includes(cidrEnv)) { | ||
debug(`APP_ENV determined from server IP as ${chalk.cyan(processAppEnv)} (${chalk.green(serverIp)} is within ${chalk.green(cidr)})`); | ||
return cidrEnv; | ||
debug(`APP_ENV determined from server IP as ${chalk.cyan(cidrEnv)} (${chalk.green(serverIp)} is within ${chalk.green(cidr)})`); | ||
envRtn = cidrEnv; | ||
} | ||
@@ -99,4 +101,4 @@ }); | ||
// Default to development | ||
debug(`APP_ENV defaulting to ${chalk.cyan('development')}`); | ||
return 'development'; | ||
debug(`APP_ENV returning as ${chalk.cyan(envRtn)}`); | ||
return envRtn; | ||
} | ||
@@ -103,0 +105,0 @@ |
{ | ||
"name": "@thinkmill/devops-env-vars", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Helper functions that encapsulate our treatment of environment vars for KeystoneJS apps", | ||
@@ -14,3 +14,2 @@ "main": "index.js", | ||
"author": "John Molomby <john@thinkmill.com.au>", | ||
"license": "ISC", | ||
"bugs": { | ||
@@ -17,0 +16,0 @@ "url": "https://github.com/Thinkmill/devops-env-vars/issues" |
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
6275
3
129