@tap-payments/os-micro-frontend-shared 0.1.419 → 0.1.420

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.
@@ -1,7 +1,6 @@
1
- var _a;
2
- // NOTE: This environment variables should be defined in .env file of the hosting server
3
- const isSAOCI = import.meta.env.VITE_DEPLOYMENT_REGION === 'sa-oci';
4
- export const BASE_URL = (_a = (isSAOCI ? 'https://mw-os.tap.com.sa' : import.meta.env.VITE_MW_BASE_URL)) !== null && _a !== void 0 ? _a : import.meta.env.VITE_BASE_URL;
1
+ var _a, _b;
2
+ const runtimeConfig = (_a = window.__GLOBAL_CONFIG__) !== null && _a !== void 0 ? _a : {};
3
+ export const BASE_URL = (_b = runtimeConfig.MW_BASE_URL) !== null && _b !== void 0 ? _b : import.meta.env.VITE_BASE_URL;
5
4
  export const API_URL = `${BASE_URL}/api`;
6
5
  export const ENV = import.meta.env.VITE_ENV;
7
6
  export const TEST_SECRET_KEY = import.meta.env.VITE_TEST_FIXED_SK;
@@ -34,3 +34,4 @@ export * from './reports';
34
34
  export * from './document';
35
35
  export * from './toast';
36
36
  export * from './flag';
37
+ export * from './window';
@@ -34,3 +34,4 @@ export * from './reports';
34
34
  export * from './document';
35
35
  export * from './toast';
36
36
  export * from './flag';
37
+ export * from './window';
@@ -0,0 +1,4 @@
1
+ export type AppEnvironment = 'development' | 'sandbox' | 'beta' | 'production';
2
+ export type WindowGlobalConfig = {
3
+ MW_BASE_URL?: string;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.419",
4
+ "version": "0.1.420",
5
5
  "testVersion": 0,
6
6
  "type": "module",
7
7
  "main": "build/index.js",