@burdenoff/fe-libs 2026.1005.3 → 2026.1005.4
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/shared/components/SSORedirectGuard.d.ts +15 -0
- package/dist/shared/components/SSORedirectGuard.d.ts.map +1 -1
- package/dist/shared/components/SSORedirectGuard.js +39 -42
- package/dist/shared/native/platform.d.ts +6 -0
- package/dist/shared/native/platform.d.ts.map +1 -1
- package/dist/shared/native/platform.js +22 -15
- package/dist/shared/providers/shell/authProvider/ssoRelay.d.ts +3 -3
- package/dist/shared/providers/shell/authProvider/ssoRelay.d.ts.map +1 -1
- package/dist/shared/providers/shell/authProvider/ssoRelay.js +14 -13
- package/dist/shared/providers/shell/authProvider/useBridgeInitialization.d.ts.map +1 -1
- package/dist/shared/providers/shell/authProvider/useBridgeInitialization.js +38 -37
- package/dist/shared/providers/shell/authProvider/useSsoDepositBootGuard.d.ts.map +1 -1
- package/dist/shared/providers/shell/authProvider/useSsoDepositBootGuard.js +23 -26
- package/dist/shell-native/capacitor-config.d.ts +2 -0
- package/dist/shell-native/capacitor-config.d.ts.map +1 -1
- package/dist/shell-native/capacitor-config.js +38 -32
- package/dist/shell-native/index.d.ts +1 -1
- package/dist/shell-native/index.d.ts.map +1 -1
- package/dist/shell-native.js +4 -4
- package/package.json +2 -2
|
@@ -15,6 +15,21 @@ export declare function clearSSORelayAttempt(): void;
|
|
|
15
15
|
export declare function shouldSkipSSORedirect(returnPath?: string): boolean;
|
|
16
16
|
export declare function hasRecentSSORedirectAttempt(relayOrigin: string, returnTo: string): boolean;
|
|
17
17
|
export declare function markSSORedirectAttempt(relayOrigin: string, returnTo: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Check if an SSO redirect should be initiated.
|
|
20
|
+
* Returns the redirect URL if SSO should happen, null otherwise.
|
|
21
|
+
*
|
|
22
|
+
* Call this from ProtectedRoute or LandingOrDashboardRedirect
|
|
23
|
+
* before showing login page.
|
|
24
|
+
*
|
|
25
|
+
* Cross-eTLD+1 product shells always start at the central bridge
|
|
26
|
+
* (alphaapp/app.burdenoff.com): product cookies are first-party only and must
|
|
27
|
+
* not route a visitor through a different product origin. The bridge reads its
|
|
28
|
+
* own first-party session state — including its profile-origin hint — then
|
|
29
|
+
* returns to the original product origin through `/auth/sso-callback#sso=...`.
|
|
30
|
+
* On no central session the bridge bounces back with `?sso_failed=1` and
|
|
31
|
+
* `isAutoSSOSuppressed` keeps the user on the login screen.
|
|
32
|
+
*/
|
|
18
33
|
export declare function getSSORedirectUrl(returnPath?: string): string | null;
|
|
19
34
|
/**
|
|
20
35
|
* Check if Single Logout (SLO) has occurred on another shell.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SSORedirectGuard.d.ts","sourceRoot":"","sources":["../../../src/shared/components/SSORedirectGuard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAuDH,wBAAgB,oBAAoB,IAAI,IAAI,CAM3C;AA2CD,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAGlE;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAM1F;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAiBlF;
|
|
1
|
+
{"version":3,"file":"SSORedirectGuard.d.ts","sourceRoot":"","sources":["../../../src/shared/components/SSORedirectGuard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAuDH,wBAAgB,oBAAoB,IAAI,IAAI,CAM3C;AA2CD,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAGlE;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAM1F;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAiBlF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAqDpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CA6BlC;AAED;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAyC9F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CA6B1C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,4CAEjC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { resolveAuthBridgeConfig as e } from "../config/authBridgeUrls.js";
|
|
2
2
|
import { clearActiveContextStorage as t } from "../providers/shell/ActiveContextStorage.js";
|
|
3
3
|
import { clearShellSsoCookies as n, isLocalDevSsoHost as r, isSharedSsoCookieDomain as i, isTrustedSsoOrigin as a, readShellSsoCookie as o } from "../utils/authCookie.js";
|
|
4
|
-
import {
|
|
5
|
-
import { BrandedSplash as
|
|
6
|
-
import { jsx as
|
|
4
|
+
import { isRealNativeOrDesktopShell as s } from "../native/platform.js";
|
|
5
|
+
import { BrandedSplash as c } from "../../ui/branded-splash.js";
|
|
6
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
7
7
|
//#region src/shared/components/SSORedirectGuard.tsx
|
|
8
|
-
var
|
|
8
|
+
var u = "bf-sso-relay-attempt", d = 120 * 1e3, f = [
|
|
9
9
|
"sso_failed",
|
|
10
10
|
"sso-failed",
|
|
11
11
|
"sso-attempted"
|
|
12
12
|
];
|
|
13
|
-
function
|
|
13
|
+
function p(e) {
|
|
14
14
|
if (typeof window > "u") return null;
|
|
15
15
|
try {
|
|
16
16
|
let t = `${window.location.pathname}${window.location.search}${window.location.hash}`, n = new URL(e ?? t, window.location.origin);
|
|
@@ -19,73 +19,70 @@ function m(e) {
|
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function m(e) {
|
|
23
23
|
return e === "/auth" || e.startsWith("/auth/");
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return
|
|
25
|
+
function h(e) {
|
|
26
|
+
return f.some((t) => e.searchParams.has(t));
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
if (
|
|
30
|
-
if (
|
|
28
|
+
function g(e) {
|
|
29
|
+
if (h(e)) return n(), !0;
|
|
30
|
+
if (m(e.pathname)) return !0;
|
|
31
31
|
let t = e.searchParams.get("reason");
|
|
32
32
|
return t === "session-expired" || t === "logout";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function _() {
|
|
35
35
|
try {
|
|
36
|
-
sessionStorage.removeItem(
|
|
36
|
+
sessionStorage.removeItem(u);
|
|
37
37
|
} catch {}
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function v() {
|
|
40
40
|
if (typeof window > "u") return null;
|
|
41
41
|
try {
|
|
42
|
-
let e = sessionStorage.getItem(
|
|
42
|
+
let e = sessionStorage.getItem(u);
|
|
43
43
|
if (!e) return null;
|
|
44
44
|
let t = JSON.parse(e);
|
|
45
|
-
return typeof t.relayOrigin != "string" || typeof t.returnTo != "string" || typeof t.startedAt != "number" || Date.now() - t.startedAt >
|
|
45
|
+
return typeof t.relayOrigin != "string" || typeof t.returnTo != "string" || typeof t.startedAt != "number" || Date.now() - t.startedAt > d ? (_(), null) : {
|
|
46
46
|
relayOrigin: t.relayOrigin,
|
|
47
47
|
returnTo: t.returnTo,
|
|
48
48
|
startedAt: t.startedAt
|
|
49
49
|
};
|
|
50
50
|
} catch {
|
|
51
|
-
return
|
|
51
|
+
return _(), null;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function y(e) {
|
|
55
55
|
try {
|
|
56
56
|
return new URL(e).origin;
|
|
57
57
|
} catch {
|
|
58
58
|
return null;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
let t =
|
|
63
|
-
return !t ||
|
|
61
|
+
function b(e) {
|
|
62
|
+
let t = p(e);
|
|
63
|
+
return !t || g(t);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
let n =
|
|
65
|
+
function x(e, t) {
|
|
66
|
+
let n = y(e), r = p(t), i = v();
|
|
67
67
|
return !!(n && r && i?.returnTo === r.href);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function S(e, t) {
|
|
70
70
|
if (typeof window > "u") return;
|
|
71
|
-
let n =
|
|
71
|
+
let n = y(e), r = p(t);
|
|
72
72
|
if (!(!n || !r)) try {
|
|
73
73
|
let e = {
|
|
74
74
|
relayOrigin: n,
|
|
75
75
|
returnTo: r.href,
|
|
76
76
|
startedAt: Date.now()
|
|
77
77
|
};
|
|
78
|
-
sessionStorage.setItem(
|
|
78
|
+
sessionStorage.setItem(u, JSON.stringify(e));
|
|
79
79
|
} catch {}
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
function T(t) {
|
|
85
|
-
if (w()) return null;
|
|
81
|
+
function C(t) {
|
|
82
|
+
if (s()) return null;
|
|
86
83
|
try {
|
|
87
|
-
let n =
|
|
88
|
-
if (!n ||
|
|
84
|
+
let n = p(t);
|
|
85
|
+
if (!n || g(n) || r()) return null;
|
|
89
86
|
let i = window.location.origin, s = null;
|
|
90
87
|
try {
|
|
91
88
|
s = new URL(e().url).origin;
|
|
@@ -93,23 +90,23 @@ function T(t) {
|
|
|
93
90
|
let c = o();
|
|
94
91
|
if (s === i && c?.origin && a(c.origin)) {
|
|
95
92
|
let e = new URL(c.origin).origin;
|
|
96
|
-
if (e && e !== i && !
|
|
93
|
+
if (e && e !== i && !x(e, n.href)) return S(e, n.href), `${e}/auth/sso-relay?returnTo=${encodeURIComponent(n.href)}`;
|
|
97
94
|
}
|
|
98
|
-
return s && s !== i && !
|
|
95
|
+
return s && s !== i && !x(s, n.href) ? (S(s, n.href), `${s}/auth/sso-relay?returnTo=${encodeURIComponent(n.href)}`) : null;
|
|
99
96
|
} catch {
|
|
100
97
|
return null;
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
|
-
function
|
|
100
|
+
function w() {
|
|
104
101
|
try {
|
|
105
102
|
if (o()) return !1;
|
|
106
103
|
let e = sessionStorage.getItem("bf-active-profile");
|
|
107
|
-
return !e || !localStorage.getItem(`bf-p-${e}-tokens`) || !i() ? !1 : (
|
|
104
|
+
return !e || !localStorage.getItem(`bf-p-${e}-tokens`) || !i() ? !1 : (E(), !0);
|
|
108
105
|
} catch {
|
|
109
106
|
return !1;
|
|
110
107
|
}
|
|
111
108
|
}
|
|
112
|
-
async function
|
|
109
|
+
async function T(e, t) {
|
|
113
110
|
try {
|
|
114
111
|
let n = await fetch(e, {
|
|
115
112
|
method: "POST",
|
|
@@ -126,7 +123,7 @@ async function D(e, t) {
|
|
|
126
123
|
return !1;
|
|
127
124
|
}
|
|
128
125
|
}
|
|
129
|
-
function
|
|
126
|
+
function E() {
|
|
130
127
|
try {
|
|
131
128
|
let e = localStorage.getItem("bf-profiles");
|
|
132
129
|
if (e) {
|
|
@@ -137,8 +134,8 @@ function O() {
|
|
|
137
134
|
localStorage.removeItem("bf-profiles"), localStorage.removeItem("auth-storage"), sessionStorage.removeItem("bf-active-profile"), t(), n(), window.dispatchEvent(new Event("bf-auth-state-cleared")), window.dispatchEvent(new Event("bf-profile-storage-change"));
|
|
138
135
|
} catch {}
|
|
139
136
|
}
|
|
140
|
-
function
|
|
141
|
-
return /* @__PURE__ */
|
|
137
|
+
function D() {
|
|
138
|
+
return /* @__PURE__ */ l(c, { label: "Signing you in…" });
|
|
142
139
|
}
|
|
143
140
|
//#endregion
|
|
144
|
-
export {
|
|
141
|
+
export { D as SSORedirectSpinner, T as checkRemoteSLO, w as checkSLO, E as clearLocalAuthState, _ as clearSSORelayAttempt, C as getSSORedirectUrl, x as hasRecentSSORedirectAttempt, S as markSSORedirectAttempt, b as shouldSkipSSORedirect };
|
|
@@ -6,6 +6,12 @@ export declare function isAndroid(): boolean;
|
|
|
6
6
|
export declare function isWeb(): boolean;
|
|
7
7
|
/** Running inside an Electron desktop shell. */
|
|
8
8
|
export declare function isElectron(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether cross-origin session hops should stay inside the current product origin.
|
|
11
|
+
* Capacitor is detected independently of boot order; presentation previews remain
|
|
12
|
+
* ordinary browser tabs so their bridge-host session maintenance still runs.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isRealNativeOrDesktopShell(): boolean;
|
|
9
15
|
/** Running as an installed / standalone PWA (added to home screen / installed). */
|
|
10
16
|
export declare function isStandalonePWA(): boolean;
|
|
11
17
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/shared/native/platform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/shared/native/platform.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,wBAAgB,WAAW,IAAI,uBAAuB,CAIrD;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED,gDAAgD;AAChD,wBAAgB,UAAU,IAAI,OAAO,CAapC;AAYD;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAIpD;AAED,mFAAmF;AACnF,wBAAgB,eAAe,IAAI,OAAO,CAQzC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
|
|
@@ -1,35 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isCapacitorNative as e } from "./capacitor.js";
|
|
2
|
+
import { getNativeBridge as t } from "./bridge.js";
|
|
2
3
|
//#region src/shared/native/platform.ts
|
|
3
|
-
function t() {
|
|
4
|
-
let t = e();
|
|
5
|
-
return t ? t.getPlatform() : "web";
|
|
6
|
-
}
|
|
7
4
|
function n() {
|
|
8
|
-
|
|
5
|
+
let e = t();
|
|
6
|
+
return e ? e.getPlatform() : "web";
|
|
9
7
|
}
|
|
10
8
|
function r() {
|
|
11
|
-
return t()
|
|
9
|
+
return t()?.isNativePlatform() ?? !1;
|
|
12
10
|
}
|
|
13
11
|
function i() {
|
|
14
|
-
return
|
|
12
|
+
return n() === "ios";
|
|
15
13
|
}
|
|
16
14
|
function a() {
|
|
17
|
-
return
|
|
15
|
+
return n() === "android";
|
|
18
16
|
}
|
|
19
17
|
function o() {
|
|
20
|
-
return
|
|
18
|
+
return n() === "web";
|
|
21
19
|
}
|
|
22
20
|
function s() {
|
|
21
|
+
return typeof window > "u" ? !1 : !!(window.__burdenoffDesktop?.isElectron || typeof navigator < "u" && /electron/i.test(navigator.userAgent) || typeof window < "u" && window.process?.type === "renderer");
|
|
22
|
+
}
|
|
23
|
+
function c() {
|
|
24
|
+
return typeof document < "u" && !!document.documentElement?.dataset?.nativePreview;
|
|
25
|
+
}
|
|
26
|
+
function l() {
|
|
27
|
+
return e() ? !0 : c() ? !1 : r() || s();
|
|
28
|
+
}
|
|
29
|
+
function u() {
|
|
23
30
|
if (typeof window > "u") return !1;
|
|
24
31
|
if (document?.documentElement?.dataset?.nativePreview === "pwa") return !0;
|
|
25
32
|
let e = window.matchMedia?.("(display-mode: standalone)")?.matches ?? !1, t = window.navigator.standalone === !0;
|
|
26
33
|
return e || t;
|
|
27
34
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
35
|
+
function d() {
|
|
36
|
+
return r() || s() || u();
|
|
30
37
|
}
|
|
31
|
-
function
|
|
32
|
-
return !
|
|
38
|
+
function f() {
|
|
39
|
+
return !d();
|
|
33
40
|
}
|
|
34
41
|
//#endregion
|
|
35
|
-
export {
|
|
42
|
+
export { n as getPlatform, a as isAndroid, s as isElectron, i as isIOS, d as isInstalledApp, r as isNative, l as isRealNativeOrDesktopShell, u as isStandalonePWA, o as isWeb, f as isWebBrowser };
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* getSSORedirectUrl would relay the stale session back on the next visit
|
|
8
8
|
* and the user would silently stay logged in.
|
|
9
9
|
*
|
|
10
|
-
* Returns null when no detour is needed (already on the bridge host,
|
|
11
|
-
* unable to resolve a bridge URL — caller should
|
|
12
|
-
* own origin).
|
|
10
|
+
* Returns null when no detour is needed (already on the bridge host, inside a
|
|
11
|
+
* native or desktop shell, or unable to resolve a bridge URL — caller should
|
|
12
|
+
* just stay/navigate on its own origin).
|
|
13
13
|
*/
|
|
14
14
|
export declare function getCrossOriginLogoutUrl(): string | null;
|
|
15
15
|
export declare function hasLocalProfileSession(profileId: string | null): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssoRelay.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/ssoRelay.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ssoRelay.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/ssoRelay.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAYvD;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAWxE;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA2BrE"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { resolveAuthBridgeConfig as e } from "../../../config/authBridgeUrls.js";
|
|
2
2
|
import { isLocalDevSsoHost as t, isTrustedSsoOrigin as n, readShellSsoCookie as r } from "../../../utils/authCookie.js";
|
|
3
|
-
import {
|
|
3
|
+
import { isRealNativeOrDesktopShell as i } from "../../../native/platform.js";
|
|
4
|
+
import { hasRecentSSORedirectAttempt as a, markSSORedirectAttempt as o, shouldSkipSSORedirect as s } from "../../../components/SSORedirectGuard.js";
|
|
4
5
|
//#region src/shared/providers/shell/authProvider/ssoRelay.ts
|
|
5
|
-
function
|
|
6
|
-
if (typeof window > "u") return null;
|
|
6
|
+
function c() {
|
|
7
|
+
if (typeof window > "u" || i()) return null;
|
|
7
8
|
try {
|
|
8
9
|
let t = e(), n = new URL(t.url).origin;
|
|
9
10
|
if (n === window.location.origin) return null;
|
|
@@ -13,7 +14,7 @@ function s() {
|
|
|
13
14
|
return null;
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function l(e) {
|
|
17
18
|
if (!e) return !1;
|
|
18
19
|
try {
|
|
19
20
|
return !!(localStorage.getItem(`bf-p-${e}-tokens`) && localStorage.getItem(`bf-p-${e}-user`));
|
|
@@ -21,18 +22,18 @@ function c(e) {
|
|
|
21
22
|
return !1;
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
+
function u(e) {
|
|
25
26
|
try {
|
|
26
|
-
if (
|
|
27
|
-
let
|
|
28
|
-
if (!
|
|
29
|
-
let
|
|
30
|
-
if (
|
|
31
|
-
let
|
|
32
|
-
return
|
|
27
|
+
if (i() || s() || t()) return null;
|
|
28
|
+
let c = r();
|
|
29
|
+
if (!c?.origin || !n(c.origin)) return null;
|
|
30
|
+
let u = new URL(c.origin).origin, d = new URL(e).origin;
|
|
31
|
+
if (u === window.location.origin || u === d || l(c.id)) return null;
|
|
32
|
+
let f = window.location.href;
|
|
33
|
+
return a(u, f) ? null : (o(u, f), `${u}/auth/sso-relay?returnTo=${encodeURIComponent(f)}`);
|
|
33
34
|
} catch {
|
|
34
35
|
return null;
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
//#endregion
|
|
38
|
-
export {
|
|
39
|
+
export { u as getCookieSsoRelayUrl, c as getCrossOriginLogoutUrl };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBridgeInitialization.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/useBridgeInitialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,UAAU,EAKhB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"useBridgeInitialization.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/useBridgeInitialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,UAAU,EAKhB,MAAM,0BAA0B,CAAC;AAWlC,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACxC,oBAAoB,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChD,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,sBAAsB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,OAAO,EACP,SAAS,EACT,sBAAsB,EACtB,aAAa,EACb,eAAe,GAChB,EAAE,wBAAwB,GAAG,IAAI,CA0HjC"}
|
|
@@ -1,86 +1,87 @@
|
|
|
1
1
|
import { getProfileTokens as e, getProfileUser as t, getProfileWorkspaceToken as n, resolveActiveProfileId as r } from "../ProfileStorageManager.js";
|
|
2
2
|
import { initAuthBridge as i, isAuthBridgeInitialized as a } from "../AuthBridgeClient.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { isRealNativeOrDesktopShell as o } from "../../../native/platform.js";
|
|
4
|
+
import { hasRecentSSORedirectAttempt as s, markSSORedirectAttempt as c, shouldSkipSSORedirect as l } from "../../../components/SSORedirectGuard.js";
|
|
5
|
+
import { getCookieSsoRelayUrl as u } from "./ssoRelay.js";
|
|
6
|
+
import { syncBridgeStateToProfileStorage as d } from "./bridgeStateSync.js";
|
|
7
|
+
import { useEffect as f } from "react";
|
|
7
8
|
//#region src/shared/providers/shell/authProvider/useBridgeInitialization.ts
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
if (!
|
|
9
|
+
function p({ bridgeUrl: p, bridgeAllowedOrigins: m, bridgeDebug: h, onBridgeReady: g, bridgeSyncInProgress: _, setIsLoading: v, setActiveId: y, setUser: b, setTokens: x, setWorkspaceTokenLocal: S, clearAccounts: C, refreshAccounts: w }) {
|
|
10
|
+
f(() => {
|
|
11
|
+
if (!p) return;
|
|
11
12
|
try {
|
|
12
|
-
let e = new URL(
|
|
13
|
+
let e = new URL(p).pathname;
|
|
13
14
|
if (window.location.pathname === e) {
|
|
14
|
-
|
|
15
|
+
v(!1), g?.();
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
17
18
|
} catch {
|
|
18
|
-
|
|
19
|
+
v(!1), g?.();
|
|
19
20
|
return;
|
|
20
21
|
}
|
|
21
22
|
if (a()) {
|
|
22
|
-
|
|
23
|
+
v(!1), g?.();
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
26
|
+
let f = () => {
|
|
27
|
+
v(!1), g?.();
|
|
28
|
+
}, T = (i) => {
|
|
29
|
+
_.current = !0;
|
|
29
30
|
try {
|
|
30
|
-
if (
|
|
31
|
-
let e =
|
|
31
|
+
if (p) {
|
|
32
|
+
let e = u(p);
|
|
32
33
|
if (e) {
|
|
33
34
|
window.location.replace(e);
|
|
34
35
|
return;
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
+
d(i);
|
|
38
39
|
let a = r();
|
|
39
|
-
if (a)
|
|
40
|
+
if (a) y(a), b(t(a)), x(e(a)), S(n(a)), w();
|
|
40
41
|
else {
|
|
41
|
-
if (
|
|
42
|
-
let e = new URL(
|
|
42
|
+
if (p && !i.user && !i.tokens) try {
|
|
43
|
+
let e = new URL(p).origin, t = window.location.origin, n = u(p);
|
|
43
44
|
if (n) {
|
|
44
45
|
window.location.replace(n);
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
|
-
if (e !== t && !
|
|
48
|
+
if (e !== t && !l() && !o()) {
|
|
48
49
|
let t = window.location.href;
|
|
49
|
-
if (
|
|
50
|
-
|
|
50
|
+
if (s(e, t)) return;
|
|
51
|
+
c(e, t), window.location.replace(`${e}/auth/sso-relay?returnTo=${encodeURIComponent(t)}`);
|
|
51
52
|
return;
|
|
52
53
|
}
|
|
53
54
|
} catch {}
|
|
54
|
-
|
|
55
|
+
y(null), b(null), x(null), S(null), C();
|
|
55
56
|
}
|
|
56
57
|
} finally {
|
|
57
|
-
|
|
58
|
+
_.current = !1, f();
|
|
58
59
|
}
|
|
59
|
-
},
|
|
60
|
-
|
|
60
|
+
}, E = setTimeout(() => {
|
|
61
|
+
f();
|
|
61
62
|
}, 5e3);
|
|
62
63
|
return i({
|
|
63
|
-
bridgeUrl:
|
|
64
|
-
allowedOrigins:
|
|
65
|
-
onStateChanged:
|
|
66
|
-
debug:
|
|
64
|
+
bridgeUrl: p,
|
|
65
|
+
allowedOrigins: m,
|
|
66
|
+
onStateChanged: T,
|
|
67
|
+
debug: h ?? !1
|
|
67
68
|
}), () => {
|
|
68
|
-
clearTimeout(
|
|
69
|
+
clearTimeout(E);
|
|
69
70
|
};
|
|
70
71
|
}, [
|
|
71
|
-
f,
|
|
72
72
|
p,
|
|
73
73
|
m,
|
|
74
74
|
h,
|
|
75
|
-
C,
|
|
76
75
|
g,
|
|
76
|
+
w,
|
|
77
77
|
_,
|
|
78
78
|
v,
|
|
79
79
|
y,
|
|
80
80
|
b,
|
|
81
81
|
x,
|
|
82
|
-
S
|
|
82
|
+
S,
|
|
83
|
+
C
|
|
83
84
|
]);
|
|
84
85
|
}
|
|
85
86
|
//#endregion
|
|
86
|
-
export {
|
|
87
|
+
export { p as useBridgeInitialization };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSsoDepositBootGuard.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/useSsoDepositBootGuard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSsoDepositBootGuard.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/useSsoDepositBootGuard.ts"],"names":[],"mappings":"AAoBA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CA4E7C"}
|
|
@@ -2,47 +2,44 @@ import { resolveGatewayUrls as e } from "../../../config/gatewayUrls.js";
|
|
|
2
2
|
import { resolveAuthBridgeConfig as t } from "../../../config/authBridgeUrls.js";
|
|
3
3
|
import { resolveActiveProfileId as n } from "../ProfileStorageManager.js";
|
|
4
4
|
import { isLocalDevSsoHost as r, isSharedSsoCookieDomain as i } from "../../../utils/authCookie.js";
|
|
5
|
-
import {
|
|
6
|
-
import { beginSsoNavigation as
|
|
7
|
-
import { useEffect as
|
|
5
|
+
import { isRealNativeOrDesktopShell as a } from "../../../native/platform.js";
|
|
6
|
+
import { beginSsoNavigation as o, buildSsoDepositUrl as s, consumeSsoDepositMarker as c, markSsoDepositPending as l, mintSsoSessionTokens as u, shouldAttemptSsoDeposit as d } from "../../../utils/ssoDeposit.js";
|
|
7
|
+
import { useEffect as f } from "react";
|
|
8
8
|
//#region src/shared/providers/shell/authProvider/useSsoDepositBootGuard.ts
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
function g() {
|
|
14
|
-
p(() => {
|
|
9
|
+
var p = 2500;
|
|
10
|
+
function m() {
|
|
11
|
+
f(() => {
|
|
15
12
|
if (typeof window > "u") return;
|
|
16
|
-
let
|
|
17
|
-
if (
|
|
18
|
-
let
|
|
13
|
+
let f = n();
|
|
14
|
+
if (c(f) || !f || a() || r() || i() || window.location.pathname.startsWith("/auth/")) return;
|
|
15
|
+
let m;
|
|
19
16
|
try {
|
|
20
17
|
let e = t();
|
|
21
|
-
|
|
18
|
+
m = new URL(e.url).origin;
|
|
22
19
|
} catch {
|
|
23
20
|
return;
|
|
24
21
|
}
|
|
25
|
-
if (
|
|
26
|
-
let
|
|
22
|
+
if (m === window.location.origin || !d(f)) return;
|
|
23
|
+
let h = setTimeout(async () => {
|
|
27
24
|
try {
|
|
28
|
-
if (n() !==
|
|
29
|
-
let t = localStorage.getItem(`bf-p-${
|
|
25
|
+
if (n() !== f || window.location.pathname.startsWith("/auth/")) return;
|
|
26
|
+
let t = localStorage.getItem(`bf-p-${f}-tokens`), r = localStorage.getItem(`bf-p-${f}-user`);
|
|
30
27
|
if (!t || !r) return;
|
|
31
28
|
let i = JSON.parse(t);
|
|
32
29
|
if (!(i.accessToken && typeof i.expiresAt == "number" && i.expiresAt - Date.now() > 6e4) || !i.refreshToken) return;
|
|
33
|
-
|
|
34
|
-
let { globalBaseUrl:
|
|
35
|
-
if (!
|
|
36
|
-
|
|
37
|
-
profileId:
|
|
38
|
-
tokens: JSON.stringify(
|
|
30
|
+
l(f);
|
|
31
|
+
let { globalBaseUrl: a } = e(), { tokens: c } = await u(`${a}/global/graphql`, i.refreshToken);
|
|
32
|
+
if (!c) return;
|
|
33
|
+
o(), window.location.replace(s(m, window.location.href, {
|
|
34
|
+
profileId: f,
|
|
35
|
+
tokens: JSON.stringify(c),
|
|
39
36
|
user: r,
|
|
40
37
|
profiles: localStorage.getItem("bf-profiles")
|
|
41
38
|
}));
|
|
42
39
|
} catch {}
|
|
43
|
-
},
|
|
44
|
-
return () => clearTimeout(
|
|
40
|
+
}, p);
|
|
41
|
+
return () => clearTimeout(h);
|
|
45
42
|
}, []);
|
|
46
43
|
}
|
|
47
44
|
//#endregion
|
|
48
|
-
export {
|
|
45
|
+
export { m as useSsoDepositBootGuard };
|
|
@@ -17,5 +17,7 @@ export interface CapacitorConfigLike {
|
|
|
17
17
|
experimental?: Record<string, unknown>;
|
|
18
18
|
[key: string]: unknown;
|
|
19
19
|
}
|
|
20
|
+
/** Valid WebView origin grammar: a hostname with at most one leading `*.` label. */
|
|
21
|
+
export declare function isValidAllowNavigationRule(rule: string): boolean;
|
|
20
22
|
export declare function defineCapacitorConfig(cfg: NativeConfig, overrides?: Partial<CapacitorConfigLike>): CapacitorConfigLike;
|
|
21
23
|
//# sourceMappingURL=capacitor-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capacitor-config.d.ts","sourceRoot":"","sources":["../../src/shell-native/capacitor-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,oEAAoE;AACpE,MAAM,WAAW,mBA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AAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAqBD,oFAAoF;AACpF,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGhE;AA6BD,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,YAAY,EACjB,SAAS,GAAE,OAAO,CAAC,mBAAmB,CAAM,GAC3C,mBAAmB,CAqHrB"}
|
|
@@ -2,47 +2,53 @@
|
|
|
2
2
|
function e(e) {
|
|
3
3
|
return [...new Set(e.filter((e) => e.length > 0))];
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
var t = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?", n = RegExp(`^(?:\\*\\.)?${t}(?:\\.${t})+$`, "i"), r = 253;
|
|
6
|
+
function i(e) {
|
|
7
|
+
return (e.startsWith("*.") ? e.slice(2) : e).length <= r && n.test(e);
|
|
8
|
+
}
|
|
9
|
+
function a(e) {
|
|
10
|
+
let t = e.filter((e) => !i(e));
|
|
11
|
+
if (t.length !== 0) throw Error(`defineCapacitorConfig: server.allowNavigation entries must be host names with at most one leading "*." label (no scheme, port or path). Invalid: ${t.map((e) => JSON.stringify(e)).join(", ")}`);
|
|
12
|
+
}
|
|
13
|
+
function o(e) {
|
|
6
14
|
return globalThis.process?.env?.[e] === "1";
|
|
7
15
|
}
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
appId:
|
|
11
|
-
appName:
|
|
16
|
+
function s(t, n = {}) {
|
|
17
|
+
let r = {
|
|
18
|
+
appId: t.appId,
|
|
19
|
+
appName: t.displayName,
|
|
12
20
|
webDir: "dist",
|
|
13
21
|
server: {
|
|
14
22
|
androidScheme: "https",
|
|
15
23
|
iosScheme: "https",
|
|
16
24
|
allowNavigation: e([
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
...
|
|
21
|
-
"*.burdenoff.com"
|
|
22
|
-
"*.*.burdenoff.com",
|
|
23
|
-
"*.*.*.burdenoff.com"
|
|
25
|
+
t.domains.prodApp,
|
|
26
|
+
t.domains.alphaApp,
|
|
27
|
+
t.domains.website,
|
|
28
|
+
...t.domains.docs ? [t.domains.docs] : [],
|
|
29
|
+
"*.burdenoff.com"
|
|
24
30
|
])
|
|
25
31
|
},
|
|
26
32
|
ios: {
|
|
27
33
|
contentInset: "automatic",
|
|
28
34
|
allowsLinkPreview: !1,
|
|
29
35
|
preferredContentMode: "mobile",
|
|
30
|
-
backgroundColor:
|
|
36
|
+
backgroundColor: t.brandColor,
|
|
31
37
|
scrollEnabled: !0
|
|
32
38
|
},
|
|
33
39
|
android: {
|
|
34
40
|
allowMixedContent: !1,
|
|
35
41
|
overScrollMode: "never",
|
|
36
|
-
webContentsDebuggingEnabled:
|
|
42
|
+
webContentsDebuggingEnabled: o("CAP_DEBUG"),
|
|
37
43
|
minWebViewVersion: "80.0.0",
|
|
38
|
-
backgroundColor:
|
|
44
|
+
backgroundColor: t.brandColor
|
|
39
45
|
},
|
|
40
46
|
plugins: {
|
|
41
47
|
CapacitorUpdater: {
|
|
42
48
|
autoUpdate: !0,
|
|
43
49
|
appReadyTimeout: 1e4,
|
|
44
50
|
directUpdate: !1,
|
|
45
|
-
...
|
|
51
|
+
...t.ota?.channel ? { defaultChannel: t.ota.channel } : {}
|
|
46
52
|
},
|
|
47
53
|
SystemBars: {
|
|
48
54
|
insetsHandling: "css",
|
|
@@ -50,7 +56,7 @@ function n(n, r = {}) {
|
|
|
50
56
|
},
|
|
51
57
|
SplashScreen: {
|
|
52
58
|
launchAutoHide: !1,
|
|
53
|
-
backgroundColor:
|
|
59
|
+
backgroundColor: t.brandColor,
|
|
54
60
|
androidScaleType: "CENTER_CROP",
|
|
55
61
|
showSpinner: !1,
|
|
56
62
|
splashFullScreen: !0,
|
|
@@ -65,38 +71,38 @@ function n(n, r = {}) {
|
|
|
65
71
|
resize: "body",
|
|
66
72
|
resizeOnFullScreen: !0
|
|
67
73
|
},
|
|
68
|
-
...
|
|
74
|
+
...t.push ? { PushNotifications: { presentationOptions: [
|
|
69
75
|
"badge",
|
|
70
76
|
"sound",
|
|
71
77
|
"alert"
|
|
72
78
|
] } } : {}
|
|
73
79
|
},
|
|
74
80
|
experimental: { ios: { spm: { swiftToolsVersion: "5.9" } } }
|
|
75
|
-
}
|
|
76
|
-
return {
|
|
77
|
-
...i,
|
|
81
|
+
}, i = {
|
|
78
82
|
...r,
|
|
83
|
+
...n,
|
|
79
84
|
server: {
|
|
80
|
-
...
|
|
81
|
-
...
|
|
85
|
+
...r.server,
|
|
86
|
+
...n.server
|
|
82
87
|
},
|
|
83
88
|
ios: {
|
|
84
|
-
...
|
|
85
|
-
...
|
|
89
|
+
...r.ios,
|
|
90
|
+
...n.ios
|
|
86
91
|
},
|
|
87
92
|
android: {
|
|
88
|
-
...
|
|
89
|
-
...
|
|
93
|
+
...r.android,
|
|
94
|
+
...n.android
|
|
90
95
|
},
|
|
91
96
|
plugins: {
|
|
92
|
-
...
|
|
93
|
-
...
|
|
97
|
+
...r.plugins,
|
|
98
|
+
...n.plugins
|
|
94
99
|
},
|
|
95
100
|
experimental: {
|
|
96
|
-
...
|
|
97
|
-
...
|
|
101
|
+
...r.experimental,
|
|
102
|
+
...n.experimental
|
|
98
103
|
}
|
|
99
104
|
};
|
|
105
|
+
return a(i.server?.allowNavigation ?? []), i;
|
|
100
106
|
}
|
|
101
107
|
//#endregion
|
|
102
|
-
export {
|
|
108
|
+
export { s as defineCapacitorConfig, i as isValidAllowNavigationRule };
|
|
@@ -48,7 +48,7 @@ export { emitPushToken, installPushNotifications, requestPushPermission, PUSH_TO
|
|
|
48
48
|
export { getWebPushManifestConfig, getWebPushSubscription, installWebPushMessageBridge, isWebPushSupported, requestWebPushPermission, resetWebPushForTests, resolveVapidPublicKey, serializeWebPushSubscription, subscribeWebPush, unsubscribeWebPush, urlBase64ToUint8Array, SW_NOTIFICATION_CLICK_MESSAGE, SW_PUSH_SUBSCRIPTION_CHANGE_MESSAGE, WEB_PUSH_MANIFEST_KEY, type WebPushManifestConfig, type WebPushSubscribeOptions, } from './web-push';
|
|
49
49
|
export { installPwa, installPwaPrompt, isPwaEligibleHost, resetPwaForTests, PWA_INSTALLED_EVENT, PWA_INSTALL_AVAILABLE_EVENT, PWA_UPDATE_READY_EVENT, } from './pwa';
|
|
50
50
|
export { configureElectronGlobalKey, getDesktopBridge, getElectronGlobalKey, getLegacyElectronBridge, isDesktopShell, } from './desktop-bridge';
|
|
51
|
-
export { defineCapacitorConfig, type CapacitorConfigLike } from './capacitor-config';
|
|
51
|
+
export { defineCapacitorConfig, isValidAllowNavigationRule, type CapacitorConfigLike, } from './capacitor-config';
|
|
52
52
|
export { defineWebManifest, type WebManifestIcon, type WebManifestLike, type WebManifestPushConfig, type WebManifestShortcut, } from './web-manifest';
|
|
53
53
|
export { renderServiceWorker, SERVICE_WORKER_TEMPLATE } from './service-worker';
|
|
54
54
|
export type { AuthInterceptOptions, BackButtonHandlers, BeforeInstallPromptEventLike, BootNativeShellOptions, CapacitorListenerHandleLike, CapacitorUpdaterLike, DeepLinkDetail, LegacyElectronBridge, MobileRuntimeHooks, NativeConfig, NativePreviewMode, NativeShellHandle, NativeShellPlatform, NetworkHooks, NetworkStatusDetail, OptionalPluginLoaders, PushActionPerformedLike, PushNotificationSchemaLike, PushNotificationsLike, PushNotificationsLoader, PushOptions, PushPermissionStateLike, PushTokenLike, PwaOptions, SplashOptions, UpdaterLoader, } from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../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xB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAC/F,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,6BAA6B,EAC7B,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,6BAA6B,EAC7B,mCAAmC,EACnC,qBAAqB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,GAC7B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell-native/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAGvE,OAAO,EACL,e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B,EAC3B,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,aAAa,EACb,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/shell-native.js
CHANGED
|
@@ -25,7 +25,7 @@ import { PWA_INSTALLED_EVENT as pe, PWA_INSTALL_AVAILABLE_EVENT as me, PWA_UPDAT
|
|
|
25
25
|
import { APP_READY_EVENT as be, armSplashSafetyTimer as xe, isAppReady as Se, markAppReady as Ce, resetAppReadyForTests as we } from "./shell-native/splash.js";
|
|
26
26
|
import { DARK_FAMILY_THEMES as Te, applyStatusBarTheme as Ee, installStatusBarThemeListener as De, isDarkThemeName as Oe, resolveDocumentIsDark as ke, statusBarDetailIsDark as Ae } from "./shell-native/system-bars.js";
|
|
27
27
|
import { bootNativeShell as je, resetNativeShellBootForTests as Me } from "./shell-native/boot.js";
|
|
28
|
-
import { defineCapacitorConfig as Ne } from "./shell-native/capacitor-config.js";
|
|
29
|
-
import { defineWebManifest as
|
|
30
|
-
import { SERVICE_WORKER_TEMPLATE as
|
|
31
|
-
export { be as APP_READY_EVENT, Te as DARK_FAMILY_THEMES, _ as DEFAULT_AUTH_INTERCEPT_PREFIXES, z as KEYBOARD_HEIGHT_CSS_VAR, B as KEYBOARD_OPEN_CLASS, t as NATIVE_PREVIEW_QUERY_PARAM, n as NATIVE_PREVIEW_STORAGE_KEY, U as NETWORK_STATUS_EVENT, q as PUSH_TOKEN_EVENT, pe as PWA_INSTALLED_EVENT, me as PWA_INSTALL_AVAILABLE_EVENT, he as PWA_UPDATE_READY_EVENT,
|
|
28
|
+
import { defineCapacitorConfig as Ne, isValidAllowNavigationRule as Pe } from "./shell-native/capacitor-config.js";
|
|
29
|
+
import { defineWebManifest as Fe } from "./shell-native/web-manifest.js";
|
|
30
|
+
import { SERVICE_WORKER_TEMPLATE as Ie, renderServiceWorker as Le } from "./shell-native/service-worker.js";
|
|
31
|
+
export { be as APP_READY_EVENT, Te as DARK_FAMILY_THEMES, _ as DEFAULT_AUTH_INTERCEPT_PREFIXES, z as KEYBOARD_HEIGHT_CSS_VAR, B as KEYBOARD_OPEN_CLASS, t as NATIVE_PREVIEW_QUERY_PARAM, n as NATIVE_PREVIEW_STORAGE_KEY, U as NETWORK_STATUS_EVENT, q as PUSH_TOKEN_EVENT, pe as PWA_INSTALLED_EVENT, me as PWA_INSTALL_AVAILABLE_EVENT, he as PWA_UPDATE_READY_EVENT, Ie as SERVICE_WORKER_TEMPLATE, Z as SW_NOTIFICATION_CLICK_MESSAGE, Q as SW_PUSH_SUBSCRIPTION_CHANGE_MESSAGE, $ as WEB_PUSH_MANIFEST_KEY, o as applyNativePlatformClass, r as applyNativePreview, Ee as applyStatusBarTheme, xe as armSplashSafetyTimer, je as bootNativeShell, N as clearDeepLinkNavigator, p as configureElectronGlobalKey, V as configureKeyboard, b as createDefaultBackButtonHandlers, P as deepLinkUrlToPath, Ne as defineCapacitorConfig, Fe as defineWebManifest, J as emitPushToken, i as getActiveNativePreview, e as getDesktopBridge, m as getElectronGlobalKey, W as getLastNetworkStatus, h as getLegacyElectronBridge, s as getNativePlatform, ee as getWebPushManifestConfig, te as getWebPushSubscription, D as impactFeedback, x as installBackButtonHandler, F as installDeepLinkHandler, w as installExternalUrlOpener, f as installMobileRuntimeHooks, v as installNativeAuthNavigationIntercept, M as installNativeBridge, G as installNetworkListener, Y as installPushNotifications, de as installPushOptIn, ge as installPwa, _e as installPwaPrompt, De as installStatusBarThemeListener, ne as installWebPushMessageBridge, Se as isAppReady, Oe as isDarkThemeName, g as isDesktopShell, c as isNativePlatform, l as isNativePluginAvailable, u as isNativePreview, ve as isPwaEligibleHost, d as isRealNativePlatform, Pe as isValidAllowNavigationRule, re as isWebPushSupported, H as keyboardHandlers, Ce as markAppReady, I as navigateDeepLinkPath, O as notificationFeedback, K as notifyOtaReady, T as openExternalUrl, R as populateDeviceInfo, L as registerDeepLinkNavigator, Le as renderServiceWorker, X as requestPushPermission, ie as requestWebPushPermission, we as resetAppReadyForTests, Me as resetNativeShellBootForTests, fe as resetPushOptInForTests, ye as resetPwaForTests, ae as resetWebPushForTests, ke as resolveDocumentIsDark, a as resolveNativePreview, oe as resolveVapidPublicKey, S as runBackButtonPrecedence, k as selectionFeedback, se as serializeWebPushSubscription, j as shareContent, C as showNativeActionSheet, y as showNativeConfirm, A as showNativeToast, Ae as statusBarDetailIsDark, ce as subscribeWebPush, le as unsubscribeWebPush, ue as urlBase64ToUint8Array, E as writeClipboardText };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/fe-libs",
|
|
3
|
-
"version": "2026.1005.
|
|
3
|
+
"version": "2026.1005.4",
|
|
4
4
|
"description": "Burdenoff frontend primitives and domain libraries",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
"type:check": "bash scripts/build-limits.sh tsc --noEmit",
|
|
313
313
|
"test:package-css-exports": "node scripts/validate-package-css-exports.mjs",
|
|
314
314
|
"test:handsfree-browser": "node scripts/handsfree-browser-run.mjs",
|
|
315
|
-
"test": "bun test scripts/graphql-schema-drift/__tests__ scripts/a11y-audit/__tests__ src/credentials src/connections src/storage src/shared/assistant src/shared/components src/shared/graphql/links/sse-link.test.ts src/shared/graphql/fetch.test.ts src/shared/graphql/tourWorkspaceAuth.test.ts src/shared/config/gatewayUrls.test.ts src/shared/config/authBridgeUrls.test.ts src/shared/config/gatewayFallback.test.ts src/shared/config/products.test.ts src/shared/config/productSlug.test.ts src/shared/hooks/shell/useProducts.test.ts src/shared/providers/shell/brandAttribute.test.ts src/chrome/ProductSwitcher.test.ts src/shared/utils/gatewayFetchRewrite.test.ts src/shared/utils/authCookie.test.ts src/shared/providers/AppShellProvider.test.ts src/shared/providers/shell/interpolate.test.ts src/shared/providers/shell/resolveTranslation.test.ts src/shared/providers/shell/I18nProvider.render.test.tsx src/shared/providers/shell/personaSurfaceRemote.test.ts src/shared/providers/shell/workspaceSwitch.client.test.tsx src/shared/events/sinks/RybbitSink.test.ts src/shell-native src/shared/native src/shared/navigation src/shared/tours src/chrome/__tests__ src/ui/__tests__",
|
|
315
|
+
"test": "bun test scripts/graphql-schema-drift/__tests__ scripts/a11y-audit/__tests__ src/credentials src/connections src/storage src/shared/assistant src/shared/components src/shared/graphql/links/sse-link.test.ts src/shared/graphql/fetch.test.ts src/shared/graphql/tourWorkspaceAuth.test.ts src/shared/config/gatewayUrls.test.ts src/shared/config/authBridgeUrls.test.ts src/shared/config/gatewayFallback.test.ts src/shared/config/products.test.ts src/shared/config/productSlug.test.ts src/shared/hooks/shell/useProducts.test.ts src/shared/providers/shell/brandAttribute.test.ts src/chrome/ProductSwitcher.test.ts src/shared/utils/gatewayFetchRewrite.test.ts src/shared/utils/authCookie.test.ts src/shared/providers/AppShellProvider.test.ts src/shared/providers/shell/interpolate.test.ts src/shared/providers/shell/resolveTranslation.test.ts src/shared/providers/shell/I18nProvider.render.test.tsx src/shared/providers/shell/authProvider/ssoRelay.test.ts src/shared/providers/shell/personaSurfaceRemote.test.ts src/shared/providers/shell/workspaceSwitch.client.test.tsx src/shared/events/sinks/RybbitSink.test.ts src/shell-native src/shared/native src/shared/navigation src/shared/tours src/chrome/__tests__ src/ui/__tests__",
|
|
316
316
|
"sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run lint:sanity && bun run format && bun run type:check && bun run test && bun run build'",
|
|
317
317
|
"switch:status": "bun scripts/deps-mode.ts status",
|
|
318
318
|
"switch:remote": "bun scripts/deps-mode.ts remote",
|