pi-kiosk-shared 1.0.20 → 1.0.21
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/config/environments.js +16 -0
- package/package.json +1 -1
|
@@ -102,6 +102,22 @@ export const getCurrentEnvironment = () => {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
// Additional fallback: check for production URLs in environment variables
|
|
106
|
+
if (typeof window !== 'undefined') {
|
|
107
|
+
try {
|
|
108
|
+
// @ts-ignore - Vite environment
|
|
109
|
+
const meta = globalThis.import?.meta;
|
|
110
|
+
if (meta && meta.env) {
|
|
111
|
+
const apiUrl = meta.env.VITE_API_URL || meta.env.REACT_APP_API_URL;
|
|
112
|
+
if (apiUrl && apiUrl.includes('railway.app')) {
|
|
113
|
+
return 'production';
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch (e) {
|
|
118
|
+
// Ignore errors
|
|
119
|
+
}
|
|
120
|
+
}
|
|
105
121
|
return 'development';
|
|
106
122
|
};
|
|
107
123
|
// Get current environment configuration
|