Comparing version 0.2.0 to 0.2.1
@@ -15,4 +15,3 @@ var commandLineArgs = require('command-line-args'), | ||
} catch (e) { | ||
process.stderr.write("Envkey invalid. Couldn't load vars.") | ||
process.exit(1) | ||
} |
@@ -46,2 +46,10 @@ var dotenv = require("dotenv"), | ||
function keyError(){ | ||
"Envkey invalid. Couldn't load vars." | ||
} | ||
function throwKeyError(){ | ||
throw "Envkey invalid. Couldn't load vars." | ||
} | ||
function load(optsOrCb, maybeCb){ | ||
@@ -111,3 +119,3 @@ var opts = typeof optsOrCb == "object" ? optsOrCb : {}, | ||
child.stderr.setEncoding("utf-8") | ||
cb(child.stderr.read()) | ||
cb(keyError()) | ||
} | ||
@@ -119,6 +127,12 @@ }) | ||
if (res.status === 0){ | ||
var json = JSON.parse(res.stdout) | ||
return pickPermitted(json, opts) | ||
try { | ||
var json = JSON.parse(res.stdout) | ||
if(!json || typeof json == "string")throwKeyError() | ||
return pickPermitted(json, opts) | ||
} catch (e){ | ||
throwKeyError() | ||
} | ||
} else { | ||
throw res.stderr | ||
throwKeyError() | ||
} | ||
@@ -125,0 +139,0 @@ } |
{ | ||
"name": "envkey", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Envkey secures and simplifies app secrets and config by storing it in an encrypted vault and granting access to developers and servers.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
48077988
171
12