@tagadapay/plugin-sdk 2.7.26 → 2.7.28
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.
|
@@ -4,15 +4,21 @@ const DEFAULT_PREFIXES = ['', 'VITE_', 'REACT_APP_', 'NEXT_PUBLIC_'];
|
|
|
4
4
|
* using a list of supported prefixes.
|
|
5
5
|
*/
|
|
6
6
|
export function resolveEnvValue(key, prefixes = DEFAULT_PREFIXES) {
|
|
7
|
+
console.log('process?.env', process?.env);
|
|
8
|
+
console.log('import?.meta', import.meta);
|
|
9
|
+
console.log('window', window);
|
|
7
10
|
for (const prefix of prefixes) {
|
|
8
11
|
const envKey = prefix ? `${prefix}${key}` : key;
|
|
9
12
|
if (typeof process !== 'undefined' && process?.env?.[envKey]) {
|
|
13
|
+
console.log(`process.env[${envKey}]`, process.env[envKey]);
|
|
10
14
|
return process.env[envKey];
|
|
11
15
|
}
|
|
12
16
|
if (typeof import.meta !== 'undefined' && import.meta?.env?.[envKey]) {
|
|
17
|
+
console.log(`import.meta.env[${envKey}]`, import.meta.env[envKey]);
|
|
13
18
|
return import.meta.env[envKey];
|
|
14
19
|
}
|
|
15
20
|
if (typeof window !== 'undefined' && window?.__TAGADA_ENV__?.[envKey]) {
|
|
21
|
+
console.log(`window.__TAGADA_ENV__[${envKey}]`, window.__TAGADA_ENV__[envKey]);
|
|
16
22
|
return window.__TAGADA_ENV__[envKey];
|
|
17
23
|
}
|
|
18
24
|
}
|
|
@@ -175,6 +175,9 @@ rawPluginConfig, }) {
|
|
|
175
175
|
const envFromVariables = resolveEnvironmentFromVariables();
|
|
176
176
|
const detectedEnv = environment || envFromVariables || detectEnvironment();
|
|
177
177
|
const config = getEnvironmentConfig(detectedEnv);
|
|
178
|
+
console.log('envFromVariables', envFromVariables);
|
|
179
|
+
console.log('detectedEnv', detectedEnv);
|
|
180
|
+
console.log('config', config);
|
|
178
181
|
// Log environment detection for debugging
|
|
179
182
|
if (environment) {
|
|
180
183
|
console.log(`[TagadaSDK] Using explicit environment: ${environment}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tagadapay/plugin-sdk",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.28",
|
|
4
4
|
"description": "Modern React SDK for building Tagada Pay plugins",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@basis-theory/basis-theory-react": "^1.32.5",
|
|
63
63
|
"@basis-theory/web-threeds": "^1.0.1",
|
|
64
64
|
"@google-pay/button-react": "^3.0.10",
|
|
65
|
-
"@tagadapay/plugin-sdk": "
|
|
65
|
+
"@tagadapay/plugin-sdk": "workspace:*",
|
|
66
66
|
"@tanstack/react-query": "^5.90.2",
|
|
67
67
|
"axios": "^1.10.0",
|
|
68
68
|
"iso3166-2-db": "^2.3.11",
|