config 3.2.4 → 3.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/History.md CHANGED
@@ -1,3 +1,8 @@
1
+ 3.2.5 / 2020-01-16
2
+ ==================
3
+
4
+ * Fixed issue with getCustomEnvVars and multiple config dirs #585 - @dekelev
5
+
1
6
  3.2.4 / 2019-10-25
2
7
  ==================
3
8
 
package/README.md CHANGED
@@ -126,7 +126,7 @@ Articles
126
126
 
127
127
  Further Information
128
128
  ---------------------
129
- If you still don't see what you are looking for, here more resources to check:
129
+ If you still don't see what you are looking for, here are some more resources to check:
130
130
 
131
131
  * The [wiki may have more pages](https://github.com/lorenwest/node-config/wiki) which are not directly linked from here.
132
132
  * Review [questions tagged with node-config](https://stackexchange.com/filters/207096/node-config) on StackExchange. These are monitored by `node-config` contributors.
package/lib/config.js CHANGED
@@ -1073,8 +1073,13 @@ util.substituteDeep = function (substitutionMap, variables) {
1073
1073
  */
1074
1074
  util.getCustomEnvVars = function (CONFIG_DIR, extNames) {
1075
1075
  var result = {};
1076
+ var resolutionIndex = 1;
1077
+ var allowedFiles = {};
1076
1078
  extNames.forEach(function (extName) {
1077
- var fullFilename = Path.join(CONFIG_DIR , 'custom-environment-variables' + '.' + extName);
1079
+ allowedFiles['custom-environment-variables' + '.' + extName] = resolutionIndex++;
1080
+ });
1081
+ var locatedFiles = util.locateMatchingFiles(CONFIG_DIR, allowedFiles);
1082
+ locatedFiles.forEach(function (fullFilename) {
1078
1083
  var configObj = util.parseFile(fullFilename);
1079
1084
  if (configObj) {
1080
1085
  var environmentSubstitutions = util.substituteDeep(configObj, process.env);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "config",
3
- "version": "3.2.4",
3
+ "version": "3.2.5",
4
4
  "main": "./lib/config.js",
5
5
  "description": "Configuration control for production node deployments",
6
6
  "author": "Loren West <open_source@lorenwest.com>",