@packt/serverless-env-generator
Advanced tools
Comparing version 0.0.1 to 0.0.2
13
index.js
@@ -30,4 +30,10 @@ #!/usr/bin/env node | ||
.option('--env-variables [filename|string]', 'Set the serverless env file') | ||
.option('--local, -l', 'Use .env file') | ||
.parse(process.argv); | ||
// Use local ENV | ||
if (commander.local) { | ||
require('dotenv').load(); | ||
} | ||
// Name of the ENV storage file | ||
@@ -69,5 +75,6 @@ const serverlessEnvFile = commander.serverlessEnvFile; | ||
Object.keys(envVariables[STAGE]).map(key => { | ||
if (process.env[key] || process.env[`${STAGE}-${key}`]) { | ||
envVariables[STAGE][key] = process.env[`${STAGE}-${key}`] | ||
? process.env[`${STAGE}-${key}`] | ||
const stageKey = `${STAGE}_${key}`.toUpperCase(); | ||
if (process.env[key] || process.env[stageKey]) { | ||
envVariables[STAGE][key] = process.env[stageKey] | ||
? process.env[stageKey] | ||
: process.env[key]; | ||
@@ -74,0 +81,0 @@ } |
{ | ||
"name": "@packt/serverless-env-generator", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": | ||
@@ -15,3 +15,12 @@ "Generate serverless.env.yml for dynamic ENV assignments within serverless.yml", | ||
}, | ||
"author": "Packt Publishing Ltd <https://www.packtpub.com>", | ||
"author": { | ||
"name": "Packt Publishing Ltd", | ||
"url": "https://packtpub.com/" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Mike Elsmore", | ||
"email": "mike@builtbyme.tech" | ||
} | ||
], | ||
"license": "Apache-2.0", | ||
@@ -22,2 +31,3 @@ "homepage": | ||
"commander": "^2.15.1", | ||
"dotenv": "^5.0.1", | ||
"yamljs": "^0.3.0" | ||
@@ -24,0 +34,0 @@ }, |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
14136
85
3
+ Addeddotenv@^5.0.1
+ Addeddotenv@5.0.1(transitive)