@dotenvx/dotenvx
Advanced tools
Comparing version 0.6.10 to 0.6.11
{ | ||
"version": "0.6.10", | ||
"version": "0.6.11", | ||
"name": "@dotenvx/dotenvx", | ||
@@ -4,0 +4,0 @@ "description": "a better dotenv–from the creator of `dotenv`", |
@@ -240,6 +240,8 @@ #!/usr/bin/env node | ||
// used later in logging to user | ||
const dotenvKeys = (main.configDotenv({ path: '.env.keys' }).parsed || {}) | ||
try { | ||
logger.verbose(`generating .env.vault from ${optionEnvFile}`) | ||
const dotenvKeys = (main.configDotenv({ path: '.env.keys' }).parsed || {}) | ||
const dotenvVaults = (main.configDotenv({ path: '.env.vault' }).parsed || {}) | ||
@@ -296,7 +298,15 @@ | ||
} | ||
if (addedVaults.size > 0) { | ||
const DOTENV_VAULT_X = [...addedVaults][addedVaults.size - 1] | ||
const DOTENV_KEY_X = DOTENV_VAULT_X.replace('_VAULT_', '_KEY_') | ||
const tryKey = dotenvKeys[DOTENV_KEY_X] || '<dotenv_key_environment>' | ||
logger.info('') | ||
logger.info('next, try it:') | ||
logger.info('') | ||
logger.info(` [DOTENV_KEY='${tryKey}' dotenvx run -- your-cmd]`) | ||
} | ||
logger.verbose('') | ||
logger.verbose('try it out:') | ||
logger.verbose('') | ||
logger.verbose(' DOTENV_KEY=\'<DOTENV_KEY_ENVIRONMENT>\' dotenvx run -- node index.js') | ||
logger.verbose('') | ||
logger.verbose('next:') | ||
@@ -303,0 +313,0 @@ logger.verbose('') |
29650
590