@tap-payments/os-micro-frontend-shared 0.1.419-test.2 → 0.1.419-test.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.
@@ -1,4 +1,4 @@
1
1
  export declare const BASE_URL: string;
2
2
  export declare const API_URL: string;
3
- export declare const ENV: import("src/types/window").AppEnvironment;
3
+ export declare const ENV: any;
4
4
  export declare const TEST_SECRET_KEY: any;
@@ -1,14 +1,10 @@
1
- var _a, _b, _c, _d, _e, _f;
1
+ var _a, _b, _c;
2
2
  const runtimeConfig = (_a = window.__GLOBAL_CONFIG__) !== null && _a !== void 0 ? _a : {};
3
3
  const config = {
4
- env: (_b = runtimeConfig.ENV) !== null && _b !== void 0 ? _b : import.meta.env.VITE_ENV,
5
- deploymentRegion: (_c = runtimeConfig.DEPLOYMENT_REGION) !== null && _c !== void 0 ? _c : import.meta.env.VITE_DEPLOYMENT_REGION,
6
- baseUrl: (_d = runtimeConfig.BASE_URL) !== null && _d !== void 0 ? _d : import.meta.env.VITE_BASE_URL,
7
- mwBaseUrl: (_e = runtimeConfig.MW_BASE_URL) !== null && _e !== void 0 ? _e : import.meta.env.VITE_MW_BASE_URL,
4
+ mwBaseUrl: (_b = runtimeConfig.MW_BASE_URL) !== null && _b !== void 0 ? _b : '',
8
5
  };
9
- const isSAOCI = config.deploymentRegion === 'sa-oci';
10
- export const BASE_URL = (_f = (isSAOCI ? 'https://mw-os.tap.com.sa' : config.mwBaseUrl)) !== null && _f !== void 0 ? _f : config.baseUrl;
6
+ export const BASE_URL = (_c = config.mwBaseUrl) !== null && _c !== void 0 ? _c : import.meta.env.VITE_BASE_URL;
11
7
  export const API_URL = `${BASE_URL}/api`;
12
- export const ENV = config.env;
8
+ export const ENV = import.meta.env.VITE_ENV;
13
9
  export const TEST_SECRET_KEY = import.meta.env.VITE_TEST_FIXED_SK;
14
- console.log('runtimeConfig', { runtimeConfig, isSAOCI, BASE_URL });
10
+ console.log('shared:config', { config });
@@ -1,7 +1,4 @@
1
1
  export type AppEnvironment = 'development' | 'sandbox' | 'beta' | 'production';
2
2
  export type WindowGlobalConfig = {
3
- ENV: AppEnvironment;
4
- DEPLOYMENT_REGION: string;
5
- BASE_URL: string;
6
- MW_BASE_URL: string;
3
+ MW_BASE_URL?: string;
7
4
  };
package/package.json CHANGED
@@ -1,8 +1,8 @@
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-test.2",
5
- "testVersion": 2,
4
+ "version": "0.1.419-test.3",
5
+ "testVersion": 3,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",