@burdenoff/fe-libs 2026.716.2 → 2026.717.2

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.
@@ -25,10 +25,18 @@ function a(e) {
25
25
  function o(e) {
26
26
  return Array.isArray(e) && e.some((e) => a(e));
27
27
  }
28
- async function s(t) {
28
+ var s = { current: !1 }, c = { current: null };
29
+ function l() {
30
+ return {
31
+ isRefreshing: s,
32
+ refreshPromise: c
33
+ };
34
+ }
35
+ var u = !1;
36
+ async function d(t) {
29
37
  let { globalBaseUrl: r, isRefreshing: i, refreshPromise: a } = t;
30
38
  if (i.current && a.current) try {
31
- return await a.current, !0;
39
+ return await a.current, u;
32
40
  } catch {
33
41
  return !1;
34
42
  }
@@ -52,6 +60,8 @@ async function s(t) {
52
60
  gateway: "global",
53
61
  baseUrl: r,
54
62
  authToken: "",
63
+ skipAuthRetry: !0,
64
+ suppressGlobalErrorEvent: !0,
55
65
  query: "mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n expiresIn\n }\n }",
56
66
  variables: { token: s }
57
67
  });
@@ -70,21 +80,21 @@ async function s(t) {
70
80
  } catch (e) {
71
81
  return console.warn("[Auth] Token refresh attempt failed (will retry):", e), "transient";
72
82
  }
73
- }, u = (async () => {
83
+ }, d = (async () => {
74
84
  try {
75
85
  let e = await l();
76
- return e === "transient" && (await new Promise((e) => setTimeout(e, 800)), e = await l()), e !== "ok" && console.error("[Auth] Token refresh failed:", e), e === "ok";
86
+ return e === "transient" && (await new Promise((e) => setTimeout(e, 800)), e = await l()), e !== "ok" && console.error("[Auth] Token refresh failed:", e), u = e === "ok", e === "ok";
77
87
  } finally {
78
88
  i.current = !1, a.current = null;
79
89
  }
80
90
  })();
81
- return a.current = u.then(() => {}), u;
91
+ return a.current = d.then(() => {}), d;
82
92
  }
83
- function c(e, t = "/auth/login") {
93
+ function f(e, t = "/auth/login") {
84
94
  if (window.location.pathname.startsWith("/auth/")) return;
85
95
  r(e);
86
96
  let n = `${window.location.pathname}${window.location.search}`, i = `${t}?reason=session-expired&returnTo=${encodeURIComponent(n)}`;
87
97
  window.location.replace(i);
88
98
  }
89
99
  //#endregion
90
- export { s as attemptTokenRefresh, r as clearAuthSessionStorage, o as hasAuthGraphQLErrors, a as isAuthGraphQLError, i as isAuthNetworkError, c as redirectToLogin };
100
+ export { d as attemptTokenRefresh, r as clearAuthSessionStorage, l as getSharedTokenRefreshRefs, o as hasAuthGraphQLErrors, a as isAuthGraphQLError, i as isAuthNetworkError, f as redirectToLogin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.716.2",
3
+ "version": "2026.717.2",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "imports": {