@asymmetrik/yadda-secret
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "@asymmetrik/yadda-secret", | ||
"description": "Client secret library", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "author": "contributors", |
@@ -74,8 +74,8 @@ 'use strict'; | ||
if (typeof target[name] === 'object' && target[name].constructor === KMSFLAG) { | ||
// If variable is in environment use it instead for backwards comparability | ||
if (target[name].name in process.env) | ||
return Promise.resolve(process.env[target[name].name]); | ||
// If given a resolved variable, resolve to the value directly | ||
if (target[name].resolveTo !== undefined) | ||
else if (target[name].resolveTo !== undefined) | ||
return Promise.resolve(target[name].resolveTo); | ||
// If variable is in environment use it instead for backwards comparability & testing | ||
else if (target[name].name in process.env) | ||
return Promise.resolve(process.env[target[name].name]); | ||
else | ||
@@ -82,0 +82,0 @@ return this.retrieveFromKMS(target[name].name); |
13439