@incanta/config
Advanced tools
Comparing version 0.5.3 to 0.5.4
@@ -65,2 +65,3 @@ "use strict"; | ||
(0, lodash_merge_1.default)(this.values, defaultValues, envValues, overrideValues); | ||
this.values = loader_1.Loader.convertKebabToCamelCase(this.values, configFolderOptions); | ||
this.normalizedValues = this.normalizeObject(this.values, []); | ||
@@ -105,6 +106,11 @@ // load the environment variables that are configured to be injected | ||
}); | ||
if (typeof obj[newPart] === "undefined") { | ||
if (typeof obj[newPart] === "undefined" && obj[part] === undefined) { | ||
throw new Error(`Could not find value for key ${keyParts.join(".")}`); | ||
} | ||
obj = obj[newPart]; | ||
else if (obj[newPart] === undefined && obj[part] !== undefined) { | ||
obj = obj[part]; | ||
} | ||
else { | ||
obj = obj[newPart]; | ||
} | ||
} | ||
@@ -196,6 +202,11 @@ return obj; | ||
}); | ||
if (typeof obj[newPart] === "undefined") { | ||
if (typeof obj[newPart] === "undefined" && obj[part] === undefined) { | ||
throw new Error(`Could not find value for key ${keyParts.join(".")}`); | ||
} | ||
obj = obj[newPart]; | ||
else if (obj[newPart] === undefined && obj[part] !== undefined) { | ||
obj = obj[part]; | ||
} | ||
else { | ||
obj = obj[newPart]; | ||
} | ||
} | ||
@@ -202,0 +213,0 @@ if (obj !== null) { |
@@ -115,5 +115,2 @@ "use strict"; | ||
} | ||
if (typeof obj === "object" && obj !== null && !Array.isArray(obj)) { | ||
obj = Loader.convertKebabToCamelCase(obj, options); | ||
} | ||
return obj; | ||
@@ -120,0 +117,0 @@ } |
{ | ||
"name": "@incanta/config", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "exports": { |
@@ -105,2 +105,8 @@ import merge from "lodash.merge"; | ||
merge(this.values, defaultValues, envValues, overrideValues); | ||
this.values = Loader.convertKebabToCamelCase( | ||
this.values, | ||
configFolderOptions | ||
); | ||
this.normalizedValues = this.normalizeObject(this.values, []); | ||
@@ -160,7 +166,9 @@ | ||
if (typeof obj[newPart] === "undefined") { | ||
if (typeof obj[newPart] === "undefined" && obj[part] === undefined) { | ||
throw new Error(`Could not find value for key ${keyParts.join(".")}`); | ||
} else if (obj[newPart] === undefined && obj[part] !== undefined) { | ||
obj = obj[part]; | ||
} else { | ||
obj = obj[newPart]; | ||
} | ||
obj = obj[newPart]; | ||
} | ||
@@ -290,7 +298,9 @@ | ||
if (typeof obj[newPart] === "undefined") { | ||
if (typeof obj[newPart] === "undefined" && obj[part] === undefined) { | ||
throw new Error(`Could not find value for key ${keyParts.join(".")}`); | ||
} else if (obj[newPart] === undefined && obj[part] !== undefined) { | ||
obj = obj[part]; | ||
} else { | ||
obj = obj[newPart]; | ||
} | ||
obj = obj[newPart]; | ||
} | ||
@@ -297,0 +307,0 @@ |
@@ -145,6 +145,2 @@ import fs from "fs"; | ||
if (typeof obj === "object" && obj !== null && !Array.isArray(obj)) { | ||
obj = Loader.convertKebabToCamelCase(obj, options); | ||
} | ||
return obj; | ||
@@ -151,0 +147,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
75109
1359