analytica-frontend-lib 1.1.6 → 1.1.7
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/Auth/AuthProvider/index.js +12 -0
- package/dist/Auth/AuthProvider/index.js.map +1 -1
- package/dist/Auth/AuthProvider/index.mjs +12 -0
- package/dist/Auth/AuthProvider/index.mjs.map +1 -1
- package/dist/Auth/ProtectedRoute/index.js +12 -0
- package/dist/Auth/ProtectedRoute/index.js.map +1 -1
- package/dist/Auth/ProtectedRoute/index.mjs +12 -0
- package/dist/Auth/ProtectedRoute/index.mjs.map +1 -1
- package/dist/Auth/PublicRoute/index.js +12 -0
- package/dist/Auth/PublicRoute/index.js.map +1 -1
- package/dist/Auth/PublicRoute/index.mjs +12 -0
- package/dist/Auth/PublicRoute/index.mjs.map +1 -1
- package/dist/Auth/getRootDomain/index.js +12 -0
- package/dist/Auth/getRootDomain/index.js.map +1 -1
- package/dist/Auth/getRootDomain/index.mjs +12 -0
- package/dist/Auth/getRootDomain/index.mjs.map +1 -1
- package/dist/Auth/index.d.mts +15 -1
- package/dist/Auth/index.d.ts +15 -1
- package/dist/Auth/index.js +12 -0
- package/dist/Auth/index.js.map +1 -1
- package/dist/Auth/index.mjs +12 -0
- package/dist/Auth/index.mjs.map +1 -1
- package/dist/Auth/useAuth/index.js +12 -0
- package/dist/Auth/useAuth/index.js.map +1 -1
- package/dist/Auth/useAuth/index.mjs +12 -0
- package/dist/Auth/useAuth/index.mjs.map +1 -1
- package/dist/Auth/useAuthGuard/index.js +12 -0
- package/dist/Auth/useAuthGuard/index.js.map +1 -1
- package/dist/Auth/useAuthGuard/index.mjs +12 -0
- package/dist/Auth/useAuthGuard/index.mjs.map +1 -1
- package/dist/Auth/useRouteAuth/index.js +12 -0
- package/dist/Auth/useRouteAuth/index.js.map +1 -1
- package/dist/Auth/useRouteAuth/index.mjs +12 -0
- package/dist/Auth/useRouteAuth/index.mjs.map +1 -1
- package/dist/Auth/withAuth/index.js +12 -0
- package/dist/Auth/withAuth/index.js.map +1 -1
- package/dist/Auth/withAuth/index.mjs +12 -0
- package/dist/Auth/withAuth/index.mjs.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7365,7 +7365,19 @@ var getRootDomain = () => {
|
|
|
7365
7365
|
if (hostname === "localhost") {
|
|
7366
7366
|
return `${protocol}//${hostname}${portStr}`;
|
|
7367
7367
|
}
|
|
7368
|
+
const isIPv4 = /^\d{1,3}(?:\.\d{1,3}){3}$/.test(hostname);
|
|
7369
|
+
const isIPv6 = hostname.includes(":");
|
|
7370
|
+
if (isIPv4 || isIPv6) {
|
|
7371
|
+
return `${protocol}//${hostname}${portStr}`;
|
|
7372
|
+
}
|
|
7368
7373
|
const parts = hostname.split(".");
|
|
7374
|
+
if (parts.length >= 3 && parts[parts.length - 2] === "com" && parts[parts.length - 1] === "br") {
|
|
7375
|
+
if (parts.length === 3) {
|
|
7376
|
+
return `${protocol}//${hostname}${portStr}`;
|
|
7377
|
+
}
|
|
7378
|
+
const base = parts.slice(-3).join(".");
|
|
7379
|
+
return `${protocol}//${base}${portStr}`;
|
|
7380
|
+
}
|
|
7369
7381
|
if (parts.length > 2) {
|
|
7370
7382
|
const base = parts.slice(-2).join(".");
|
|
7371
7383
|
return `${protocol}//${base}${portStr}`;
|