@incanta/config
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -52,3 +52,3 @@ "use strict"; | ||
} | ||
getFormattedConfig(format) { | ||
getFormattedConfig(prefix, format) { | ||
let value = ""; | ||
@@ -65,3 +65,3 @@ while (format.length > 0) { | ||
const configKey = match[1]; | ||
value += `${this.get(configKey)}`; | ||
value += `${this.get(`${prefix}.${configKey}`)}`; | ||
} | ||
@@ -79,3 +79,3 @@ } | ||
typeof envValue.format !== "undefined") { | ||
extraEnv[key] = this.getFormattedConfig(envValue.format); | ||
extraEnv[key] = this.getFormattedConfig(configKey, envValue.format); | ||
} | ||
@@ -82,0 +82,0 @@ else { |
{ | ||
"name": "@incanta/config", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "exports": { |
@@ -70,3 +70,3 @@ import merge from "lodash.merge"; | ||
private getFormattedConfig(format: string): string { | ||
private getFormattedConfig(prefix: string, format: string): string { | ||
let value = ""; | ||
@@ -82,3 +82,3 @@ while (format.length > 0) { | ||
const configKey = match[1]; | ||
value += `${this.get<any>(configKey)}`; | ||
value += `${this.get<any>(`${prefix}.${configKey}`)}`; | ||
} | ||
@@ -103,3 +103,3 @@ } | ||
) { | ||
extraEnv[key] = this.getFormattedConfig(envValue.format); | ||
extraEnv[key] = this.getFormattedConfig(configKey, envValue.format); | ||
} else { | ||
@@ -106,0 +106,0 @@ extraEnv[key] = `${envValue}`; |
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
29741