|
|
@ -3,7 +3,7 @@ let { logger } = require('./logging'); |
|
|
|
|
|
|
|
let loadedConfigs = new Map(); |
|
|
|
|
|
|
|
function sanitizeConfig(config, fields=[]) { |
|
|
|
function sanitizeConfig(config, fields = []) { |
|
|
|
let clonedConfig = { ...config }; |
|
|
|
fields.forEach((field) => { |
|
|
|
clonedConfig[field] = '******' |
|
|
@ -11,7 +11,7 @@ function sanitizeConfig(config, fields=[]) { |
|
|
|
return clonedConfig; |
|
|
|
} |
|
|
|
|
|
|
|
function getConfig(configFile, sanitizedFields=[], reload=false) { |
|
|
|
function getConfig(configFile, sanitizedFields = [], reload = false) { |
|
|
|
if (loadedConfigs.has(configFile) && !reload) { |
|
|
|
return loadedConfigs.get(configFile); |
|
|
|
} else { |
|
|
|