@moontra/moonui-pro 2.37.14 → 2.37.15
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/cdn/index.global.js +85 -85
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.mjs +27 -18
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2185,21 +2185,30 @@ function MoonUIAuthProvider({ children }) {
|
|
|
2185
2185
|
authPromise = (async () => {
|
|
2186
2186
|
try {
|
|
2187
2187
|
lastFetchTime = now;
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2188
|
+
let isProduction = false;
|
|
2189
|
+
let isDevelopment = true;
|
|
2190
|
+
let environmentInfo = {};
|
|
2191
|
+
try {
|
|
2192
|
+
const envResponse = await fetch("/api/environment", {
|
|
2193
|
+
method: "GET",
|
|
2194
|
+
cache: "no-store"
|
|
2195
|
+
});
|
|
2196
|
+
if (envResponse.ok) {
|
|
2197
|
+
environmentInfo = await envResponse.json();
|
|
2198
|
+
isProduction = environmentInfo.isProduction;
|
|
2199
|
+
isDevelopment = environmentInfo.isDevelopment;
|
|
2200
|
+
console.log("[MoonUI Auth] Runtime Environment Detection:", {
|
|
2201
|
+
...environmentInfo.debug,
|
|
2202
|
+
environment: environmentInfo.environment,
|
|
2203
|
+
isProduction,
|
|
2204
|
+
isDevelopment
|
|
2205
|
+
});
|
|
2206
|
+
} else {
|
|
2207
|
+
console.warn("[MoonUI Auth] Failed to fetch environment info, falling back to development mode");
|
|
2208
|
+
}
|
|
2209
|
+
} catch (error) {
|
|
2210
|
+
console.warn("[MoonUI Auth] Error fetching environment info:", error);
|
|
2211
|
+
}
|
|
2203
2212
|
if (isDevelopment) {
|
|
2204
2213
|
let response;
|
|
2205
2214
|
const authServerUrl = typeof window !== "undefined" ? process.env.NEXT_PUBLIC_MOONUI_AUTH_SERVER || "http://localhost:7878" : "http://localhost:7878";
|
|
@@ -2240,8 +2249,8 @@ function MoonUIAuthProvider({ children }) {
|
|
|
2240
2249
|
}
|
|
2241
2250
|
}
|
|
2242
2251
|
if (isProduction) {
|
|
2243
|
-
const
|
|
2244
|
-
if (
|
|
2252
|
+
const licenseKey = environmentInfo.hasLicenseKey ? process.env.NEXT_PUBLIC_MOONUI_LICENSE_KEY || process.env.MOONUI_LICENSE_KEY || process.env.VITE_MOONUI_LICENSE_KEY || process.env.REACT_APP_MOONUI_LICENSE_KEY || "check-server" : null;
|
|
2253
|
+
if (licenseKey) {
|
|
2245
2254
|
console.log("[MoonUI Auth] Production mode - validating license key...");
|
|
2246
2255
|
try {
|
|
2247
2256
|
const currentDomain = typeof window !== "undefined" ? window.location.hostname : process.env.VERCEL_URL || process.env.NEXT_PUBLIC_VERCEL_URL || "";
|
|
@@ -2252,7 +2261,7 @@ function MoonUIAuthProvider({ children }) {
|
|
|
2252
2261
|
"Content-Type": "application/json"
|
|
2253
2262
|
},
|
|
2254
2263
|
body: JSON.stringify({
|
|
2255
|
-
licenseKey
|
|
2264
|
+
licenseKey,
|
|
2256
2265
|
domain: currentDomain
|
|
2257
2266
|
})
|
|
2258
2267
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.37.
|
|
3
|
+
"version": "2.37.15",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|