environment-configuration-resolver
Advanced tools
+0
-0
@@ -0,0 +0,0 @@ { |
+15
-15
@@ -87,3 +87,3 @@ // | ||
| let variableValue = provider.get(variableName); | ||
| // Support for default variables | ||
@@ -103,18 +103,18 @@ if (variableValue === undefined && parsed.query && parsed.query.default) { | ||
| switch (parsed.query.type) { | ||
| case 'boolean': | ||
| case 'bool:': | ||
| if (currentValue) { | ||
| variableValue = true; | ||
| } else { | ||
| variableValue = false; | ||
| } | ||
| break; | ||
| case 'boolean': | ||
| case 'bool': | ||
| if (currentValue && currentValue !== 'false' && currentValue != '0' && currentValue !== 'False') { | ||
| variableValue = true; | ||
| } else { | ||
| variableValue = false; | ||
| } | ||
| break; | ||
| case 'integer': | ||
| case 'int': | ||
| variableValue = parseInt(currentValue, 10); | ||
| break; | ||
| case 'integer': | ||
| case 'int': | ||
| variableValue = parseInt(currentValue, 10); | ||
| break; | ||
| default: | ||
| return callback(new Error(`The "type" parameter for the env:// string was set to "${parsed.query.type}", a type that is currently not supported.`)); | ||
| default: | ||
| return callback(new Error(`The "type" parameter for the env:// string was set to "${parsed.query.type}", a type that is currently not supported.`)); | ||
| } | ||
@@ -121,0 +121,0 @@ } |
+0
-0
@@ -0,0 +0,0 @@ MIT License |
+2
-2
| { | ||
| "name": "environment-configuration-resolver", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "description": "Helpful environment variable resolver for Node.js objects that performs a deep walk looking for a custom env:// scheme", | ||
@@ -21,3 +21,3 @@ "main": "lib/index.js", | ||
| "contributors": [ | ||
| "Wilcox, Jeff <jwilcox@microsoft.com>" | ||
| "Jeff Wilcox <jwilcox@microsoft.com>" | ||
| ], | ||
@@ -24,0 +24,0 @@ "license": "MIT", |
+0
-0
| # environment-configuration-resolver-node | ||
| Helpful environment variable resolver for Node.js objects that performs a deep walk looking for a custom env:// scheme |
Sorry, the diff of this file is not supported yet
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
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
6723
-2.94%