@transcommerce/cwm-shared 1.1.77 → 1.1.78
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.
|
@@ -27778,7 +27778,7 @@ class ConfigService {
|
|
|
27778
27778
|
this.logger.trace("This is just a sting marked as JSON so we are correcting the contentType");
|
|
27779
27779
|
}
|
|
27780
27780
|
else {
|
|
27781
|
-
valueToSave = JSON.stringify(setting);
|
|
27781
|
+
valueToSave = JSON.stringify(setting, null, 2);
|
|
27782
27782
|
this.logger.trace("This is a valid JSON configuration");
|
|
27783
27783
|
}
|
|
27784
27784
|
}
|
|
@@ -27804,7 +27804,10 @@ class ConfigService {
|
|
|
27804
27804
|
/**********************************************************************************************************************/
|
|
27805
27805
|
async getConfigAsync(company, force = false) {
|
|
27806
27806
|
this.logger.methodName = "getConfigAsync()";
|
|
27807
|
-
|
|
27807
|
+
if (force) {
|
|
27808
|
+
this.logger.info("Force Reload Enabled, Clearing Config Cache");
|
|
27809
|
+
ConfigService._configCache = undefined;
|
|
27810
|
+
}
|
|
27808
27811
|
if (this.mockData) {
|
|
27809
27812
|
this.configCache = DEFAULT_CONFIGURATION;
|
|
27810
27813
|
this.logger.debug("Mock Data Enabled, Using Mock Config", this.configCache);
|
|
@@ -27824,7 +27827,7 @@ class ConfigService {
|
|
|
27824
27827
|
return config;
|
|
27825
27828
|
}
|
|
27826
27829
|
/**********************************************************************************************************************/
|
|
27827
|
-
async saveConfigAsync(config, company
|
|
27830
|
+
async saveConfigAsync(config, company) {
|
|
27828
27831
|
this.logger.logLevel = config.authConfig.logLevel;
|
|
27829
27832
|
this.logger.methodName = "saveConfigAsync()";
|
|
27830
27833
|
// Update configuration cache
|