@magmamath/frontend-config 1.5.0-rc.2 → 1.5.0-rc.3
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/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11795,14 +11795,22 @@ var AppConfigManager = class {
|
|
|
11795
11795
|
getPresets = () => {
|
|
11796
11796
|
const envPreset = JSON.parse(JSON.stringify(ENV_PRESET));
|
|
11797
11797
|
if (this._DEV_OVERRIDES_) {
|
|
11798
|
+
const platformPreset = envPreset[this.platform];
|
|
11799
|
+
const applyOverrides = (envMap, overrides) => {
|
|
11800
|
+
if (!envMap) return;
|
|
11801
|
+
for (const envKey of Object.keys(envMap)) {
|
|
11802
|
+
Object.assign(envMap[envKey], overrides);
|
|
11803
|
+
}
|
|
11804
|
+
};
|
|
11798
11805
|
for (const [region, overrides] of Object.entries(this._DEV_OVERRIDES_)) {
|
|
11799
11806
|
if (!overrides) continue;
|
|
11800
|
-
const
|
|
11801
|
-
|
|
11802
|
-
|
|
11803
|
-
|
|
11804
|
-
|
|
11805
|
-
|
|
11807
|
+
const locale = region;
|
|
11808
|
+
applyOverrides(platformPreset?.["eu-main" /* EU_MAIN */]?.[locale], overrides);
|
|
11809
|
+
if (locale === "en-SE" /* US */) {
|
|
11810
|
+
applyOverrides(platformPreset?.["us-main" /* US_MAIN */], overrides);
|
|
11811
|
+
}
|
|
11812
|
+
if (locale === "en-CA" /* CA */) {
|
|
11813
|
+
applyOverrides(platformPreset?.["ca-main" /* CA_MAIN */], overrides);
|
|
11806
11814
|
}
|
|
11807
11815
|
}
|
|
11808
11816
|
}
|