@gasket/core
Advanced tools
Comparing version 7.0.0-next.45 to 7.0.0-next.46
@@ -57,10 +57,5 @@ /* eslint-disable no-console, no-process-env */ "use strict"; | ||
* Get the environment to use for the gasket instance. | ||
* Defaults to `development`. | ||
* Defaults to `local`. | ||
* @returns {string} env | ||
*/ function getEnvironment() { | ||
// TODO: enable if cli commands and flags are to be used with v7 | ||
// if (flags.env) { | ||
// debug('Environment was passed through command line flags', flags.env); | ||
// return flags.env; | ||
// } | ||
const { GASKET_ENV } = process.env; | ||
@@ -70,15 +65,4 @@ if (GASKET_ENV) { | ||
} | ||
// TODO: enable if cli commands and flags are to be used with v7 | ||
// // special snowflake case to match up `local` env with command unless set | ||
// if (commandId === 'local') { | ||
// debug('Environment defaulting to `local` due to `local` command'); | ||
// return 'local'; | ||
// } | ||
const { NODE_ENV } = process.env; | ||
if (NODE_ENV) { | ||
console.warn(`No GASKET_ENV specified, falling back to NODE_ENV: "${NODE_ENV}".`); | ||
return NODE_ENV; | ||
} | ||
console.warn('No GASKET_ENV specified, falling back to "development".'); | ||
return 'development'; | ||
console.warn(`No GASKET_ENV env variable set; defaulting to "local".`); | ||
return 'local'; | ||
} | ||
@@ -85,0 +69,0 @@ /* eslint-enable no-console, no-process-env */ // TODO: Add JSDoc types |
@@ -8,14 +8,6 @@ /* eslint-disable no-console, no-process-env */ | ||
* Get the environment to use for the gasket instance. | ||
* Defaults to `development`. | ||
* Defaults to `local`. | ||
* @returns {string} env | ||
*/ | ||
function getEnvironment( | ||
// flags, commandId, warn | ||
) { | ||
// TODO: enable if cli commands and flags are to be used with v7 | ||
// if (flags.env) { | ||
// debug('Environment was passed through command line flags', flags.env); | ||
// return flags.env; | ||
// } | ||
function getEnvironment() { | ||
const { GASKET_ENV } = process.env; | ||
@@ -26,17 +18,4 @@ if (GASKET_ENV) { | ||
// TODO: enable if cli commands and flags are to be used with v7 | ||
// // special snowflake case to match up `local` env with command unless set | ||
// if (commandId === 'local') { | ||
// debug('Environment defaulting to `local` due to `local` command'); | ||
// return 'local'; | ||
// } | ||
const { NODE_ENV } = process.env; | ||
if (NODE_ENV) { | ||
console.warn(`No GASKET_ENV specified, falling back to NODE_ENV: "${NODE_ENV}".`); | ||
return NODE_ENV; | ||
} | ||
console.warn('No GASKET_ENV specified, falling back to "development".'); | ||
return 'development'; | ||
console.warn(`No GASKET_ENV env variable set; defaulting to "local".`); | ||
return 'local'; | ||
} | ||
@@ -43,0 +22,0 @@ /* eslint-enable no-console, no-process-env */ |
{ | ||
"name": "@gasket/core", | ||
"version": "7.0.0-next.45", | ||
"version": "7.0.0-next.46", | ||
"description": "Entry point to setting up Gasket instances", | ||
@@ -91,3 +91,3 @@ "exports": { | ||
"type": "module", | ||
"gitHead": "cca9f460bdf2859d000443b25a76927251560f48" | ||
"gitHead": "4c71946310ef8b3d1a3f1f705dfd85475386f24a" | ||
} |
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
2
53873
1313