@burdenoff/fe-libs 2026.1023.10 → 2026.1023.12
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.
|
@@ -2,14 +2,16 @@ import { useHasAuthToken as e } from "../../shared/graphql/useHasAuthToken.js";
|
|
|
2
2
|
import { COUNTS_BY_APP_QUERY as t, DELETE_NOTIFICATION_MUTATION as n, MARK_ALL_READ_MUTATION as r, MARK_READ_MUTATION as i, MY_UNREAD_COUNT_SUBSCRIPTION as a, NOTIFICATIONS_QUERY as o, UNREAD_COUNT_QUERY as s } from "./gql.js";
|
|
3
3
|
import { useCallback as c, useEffect as l, useRef as u, useState as d } from "react";
|
|
4
4
|
//#region src/chrome/notificationCenter/useNotificationCenter.ts
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
var f = { preferWorkspaceAuth: !0 };
|
|
6
|
+
function p({ client: p, isOpen: m, lazy: h, filterTab: g, typeFilter: _, appFilter: v }) {
|
|
7
|
+
let [y, b] = d([]), [x, S] = d(0), [C, w] = d({}), [T, E] = d(0), [D, O] = d(!1), [k, A] = d(null), j = u(p);
|
|
7
8
|
l(() => {
|
|
8
|
-
|
|
9
|
-
}, [
|
|
10
|
-
let
|
|
9
|
+
j.current = p;
|
|
10
|
+
}, [p]);
|
|
11
|
+
let M = c(async () => {
|
|
11
12
|
try {
|
|
12
|
-
let e = (await
|
|
13
|
+
let e = (await j.current.query({
|
|
14
|
+
context: f,
|
|
13
15
|
query: s,
|
|
14
16
|
variables: { filter: {
|
|
15
17
|
channel: "IN_APP",
|
|
@@ -17,11 +19,11 @@ function f({ client: f, isOpen: p, lazy: m, filterTab: h, typeFilter: g, appFilt
|
|
|
17
19
|
} },
|
|
18
20
|
fetchPolicy: "network-only"
|
|
19
21
|
})).data;
|
|
20
|
-
|
|
22
|
+
S(e?.myUnreadNotificationCount ?? 0);
|
|
21
23
|
} catch {}
|
|
22
|
-
}, []), [
|
|
24
|
+
}, []), [N, P] = d(!1);
|
|
23
25
|
l(() => {
|
|
24
|
-
let e = () =>
|
|
26
|
+
let e = () => P(!0);
|
|
25
27
|
if (typeof window < "u" && "requestIdleCallback" in window) {
|
|
26
28
|
let t = window.requestIdleCallback(e, { timeout: 2e3 });
|
|
27
29
|
return () => {
|
|
@@ -31,11 +33,12 @@ function f({ client: f, isOpen: p, lazy: m, filterTab: h, typeFilter: g, appFilt
|
|
|
31
33
|
let t = setTimeout(e, 500);
|
|
32
34
|
return () => clearTimeout(t);
|
|
33
35
|
}, []);
|
|
34
|
-
let
|
|
36
|
+
let F = e();
|
|
35
37
|
l(() => {
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
let e =
|
|
38
|
+
if (h || !N || !F) return;
|
|
39
|
+
M();
|
|
40
|
+
let e = j.current.subscribe({
|
|
41
|
+
context: f,
|
|
39
42
|
query: a,
|
|
40
43
|
variables: { filter: {
|
|
41
44
|
channel: "IN_APP",
|
|
@@ -45,28 +48,29 @@ function f({ client: f, isOpen: p, lazy: m, filterTab: h, typeFilter: g, appFilt
|
|
|
45
48
|
}).subscribe({
|
|
46
49
|
next: (e) => {
|
|
47
50
|
let t = e.data;
|
|
48
|
-
typeof t?.myUnreadNotificationCountStream == "number" &&
|
|
51
|
+
typeof t?.myUnreadNotificationCountStream == "number" && S(t.myUnreadNotificationCountStream);
|
|
49
52
|
},
|
|
50
53
|
error: () => {}
|
|
51
|
-
}), t = setInterval(
|
|
54
|
+
}), t = setInterval(M, 300 * 1e3);
|
|
52
55
|
return () => {
|
|
53
56
|
e.unsubscribe(), clearInterval(t);
|
|
54
57
|
};
|
|
55
58
|
}, [
|
|
56
|
-
j,
|
|
57
|
-
m,
|
|
58
59
|
M,
|
|
59
|
-
|
|
60
|
+
h,
|
|
61
|
+
N,
|
|
62
|
+
F
|
|
60
63
|
]);
|
|
61
|
-
let
|
|
62
|
-
|
|
64
|
+
let I = c(async () => {
|
|
65
|
+
O(!0), A(null);
|
|
63
66
|
try {
|
|
64
67
|
let e = {
|
|
65
68
|
channel: "IN_APP",
|
|
66
69
|
archived: !1
|
|
67
70
|
};
|
|
68
|
-
|
|
69
|
-
let t = (await
|
|
71
|
+
g === "unread" && (e.isRead = !1), g === "read" && (e.isRead = !0), _ !== "ALL" && (e.type = _), v !== "ALL" && (e.appName = v);
|
|
72
|
+
let t = (await j.current.query({
|
|
73
|
+
context: f,
|
|
70
74
|
query: o,
|
|
71
75
|
variables: {
|
|
72
76
|
filter: e,
|
|
@@ -75,79 +79,85 @@ function f({ client: f, isOpen: p, lazy: m, filterTab: h, typeFilter: g, appFilt
|
|
|
75
79
|
},
|
|
76
80
|
fetchPolicy: "network-only"
|
|
77
81
|
})).data?.notifications;
|
|
78
|
-
t && (
|
|
82
|
+
t && (b(t.items ?? []), E(t.total ?? 0));
|
|
79
83
|
} catch (e) {
|
|
80
|
-
|
|
84
|
+
A(e instanceof Error ? e.message : "Failed to load notifications");
|
|
81
85
|
} finally {
|
|
82
|
-
|
|
86
|
+
O(!1);
|
|
83
87
|
}
|
|
84
88
|
}, [
|
|
85
|
-
h,
|
|
86
89
|
g,
|
|
87
|
-
_
|
|
88
|
-
|
|
90
|
+
_,
|
|
91
|
+
v
|
|
92
|
+
]), L = c(async () => {
|
|
89
93
|
try {
|
|
90
|
-
let e = (await
|
|
94
|
+
let e = (await j.current.query({
|
|
95
|
+
context: f,
|
|
91
96
|
query: t,
|
|
92
97
|
fetchPolicy: "network-only"
|
|
93
98
|
})).data;
|
|
94
|
-
|
|
99
|
+
w(e?.myNotificationCountsByApp ?? {});
|
|
95
100
|
} catch {}
|
|
96
101
|
}, []);
|
|
97
102
|
return l(() => {
|
|
98
|
-
|
|
103
|
+
m && (h && M(), I(), L(), M());
|
|
99
104
|
}, [
|
|
100
|
-
|
|
101
|
-
F,
|
|
105
|
+
m,
|
|
102
106
|
I,
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
L,
|
|
108
|
+
M,
|
|
109
|
+
h
|
|
105
110
|
]), {
|
|
106
|
-
notifications:
|
|
107
|
-
unreadCount:
|
|
108
|
-
countsByApp:
|
|
109
|
-
totalCount:
|
|
110
|
-
loading:
|
|
111
|
-
error:
|
|
112
|
-
fetchNotifications:
|
|
111
|
+
notifications: y,
|
|
112
|
+
unreadCount: x,
|
|
113
|
+
countsByApp: C,
|
|
114
|
+
totalCount: T,
|
|
115
|
+
loading: D,
|
|
116
|
+
error: k,
|
|
117
|
+
fetchNotifications: I,
|
|
113
118
|
handleMarkAsRead: c(async (e) => {
|
|
114
119
|
try {
|
|
115
|
-
await
|
|
120
|
+
await j.current.mutate({
|
|
121
|
+
context: f,
|
|
116
122
|
mutation: i,
|
|
117
123
|
variables: { id: e }
|
|
118
|
-
}),
|
|
124
|
+
}), b((t) => t.map((t) => t.id === e ? {
|
|
119
125
|
...t,
|
|
120
126
|
isRead: !0,
|
|
121
127
|
readAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
122
|
-
} : t)),
|
|
128
|
+
} : t)), S((e) => Math.max(0, e - 1));
|
|
123
129
|
} catch (e) {
|
|
124
130
|
console.error("Failed to mark notification as read:", e);
|
|
125
131
|
}
|
|
126
132
|
}, []),
|
|
127
133
|
handleMarkAllAsRead: c(async () => {
|
|
128
134
|
try {
|
|
129
|
-
await
|
|
135
|
+
await j.current.mutate({
|
|
136
|
+
context: f,
|
|
137
|
+
mutation: r
|
|
138
|
+
}), b((e) => e.map((e) => ({
|
|
130
139
|
...e,
|
|
131
140
|
isRead: !0,
|
|
132
141
|
readAt: e.readAt || (/* @__PURE__ */ new Date()).toISOString()
|
|
133
|
-
}))),
|
|
142
|
+
}))), S(0);
|
|
134
143
|
} catch (e) {
|
|
135
144
|
console.error("Failed to mark all notifications as read:", e);
|
|
136
145
|
}
|
|
137
146
|
}, []),
|
|
138
147
|
handleDelete: c(async (e) => {
|
|
139
148
|
try {
|
|
140
|
-
await
|
|
149
|
+
await j.current.mutate({
|
|
150
|
+
context: f,
|
|
141
151
|
mutation: n,
|
|
142
152
|
variables: { id: e }
|
|
143
153
|
});
|
|
144
|
-
let t =
|
|
145
|
-
|
|
154
|
+
let t = y.find((t) => t.id === e);
|
|
155
|
+
b((t) => t.filter((t) => t.id !== e)), E((e) => Math.max(0, e - 1)), t && !t.isRead && S((e) => Math.max(0, e - 1));
|
|
146
156
|
} catch (e) {
|
|
147
157
|
console.error("Failed to delete notification:", e);
|
|
148
158
|
}
|
|
149
|
-
}, [
|
|
159
|
+
}, [y])
|
|
150
160
|
};
|
|
151
161
|
}
|
|
152
162
|
//#endregion
|
|
153
|
-
export {
|
|
163
|
+
export { p as useNotificationCenter };
|
|
@@ -5,42 +5,42 @@ import { isWorkspaceTokenValidForContext as i } from "./workspaceToken.js";
|
|
|
5
5
|
import { WORKSPACE_CONTEXT_MISMATCH_EVENT as a, WORKSPACE_WRITE_REFUSED_EVENT as o, WorkspaceContextChangedError as s, findWorkspaceContextMismatch as c, isWorkspaceContextChangedError as l, normalizeWorkspaceOperationGuardMode as u, refetchActiveQueries as d } from "./workspaceOperationGuard.js";
|
|
6
6
|
import { dispatchBackendErrorEvent as f, markConnectionHealthy as p } from "../utils/backendErrors.js";
|
|
7
7
|
import { clearGraphqlFetchResponseCache as m, enqueueGraphQLFetch as h, ensureWorkspaceToken as ee } from "./fetch.js";
|
|
8
|
-
import { SSELink as
|
|
9
|
-
import { onError as
|
|
10
|
-
import { RetryLink as
|
|
11
|
-
import { setContext as
|
|
12
|
-
import { ApolloClient as
|
|
13
|
-
import { getMainDefinition as
|
|
14
|
-
import { print as
|
|
8
|
+
import { SSELink as g } from "./links/sse-link.js";
|
|
9
|
+
import { onError as te } from "@apollo/client/link/error";
|
|
10
|
+
import { RetryLink as _ } from "@apollo/client/link/retry";
|
|
11
|
+
import { setContext as v } from "@apollo/client/link/context";
|
|
12
|
+
import { ApolloClient as ne, ApolloLink as y, InMemoryCache as re, Observable as b, from as ie, split as ae } from "@apollo/client/core";
|
|
13
|
+
import { getMainDefinition as x } from "@apollo/client/utilities";
|
|
14
|
+
import { print as S } from "graphql";
|
|
15
15
|
//#region src/shared/graphql/client.ts
|
|
16
|
-
var
|
|
16
|
+
var C = {
|
|
17
17
|
consecutiveFailures: 0,
|
|
18
18
|
lastFailureTime: 0,
|
|
19
19
|
isOpen: !1,
|
|
20
20
|
openCount: 0,
|
|
21
21
|
nextRetryTime: 0
|
|
22
|
-
},
|
|
23
|
-
function
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
let e = Math.min(
|
|
27
|
-
|
|
22
|
+
}, w = 20, T = 5e3, E = 3e4;
|
|
23
|
+
function oe() {
|
|
24
|
+
if (C.consecutiveFailures++, C.lastFailureTime = Date.now(), !C.isOpen && C.consecutiveFailures >= w) {
|
|
25
|
+
C.isOpen = !0, C.openCount++;
|
|
26
|
+
let e = Math.min(T * 2 ** (C.openCount - 1), E);
|
|
27
|
+
C.nextRetryTime = Date.now() + e;
|
|
28
28
|
}
|
|
29
|
-
return
|
|
29
|
+
return C.isOpen;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
|
|
31
|
+
function D() {
|
|
32
|
+
C.consecutiveFailures = 0, C.isOpen = !1, C.openCount = 0, C.nextRetryTime = 0, p();
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return !(!
|
|
34
|
+
function O() {
|
|
35
|
+
return !(!C.isOpen || Date.now() >= C.nextRetryTime);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function k(t, n, r) {
|
|
38
38
|
if (r || !t || l(t)) return !1;
|
|
39
39
|
let i = t.message?.toLowerCase?.() ?? "";
|
|
40
40
|
return !(i.includes("401") || i.includes("403") || i.includes("unauthorized") || i.includes("forbidden") || i.includes("unauthenticated") || !e(n));
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return new
|
|
42
|
+
function se({ maxAttempts: e, delay: t }) {
|
|
43
|
+
return new _({
|
|
44
44
|
delay: t ?? {
|
|
45
45
|
initial: 1e3,
|
|
46
46
|
max: 8e3,
|
|
@@ -48,65 +48,65 @@ function oe({ maxAttempts: e, delay: t }) {
|
|
|
48
48
|
},
|
|
49
49
|
attempts: {
|
|
50
50
|
max: e,
|
|
51
|
-
retryIf: (e, t) =>
|
|
51
|
+
retryIf: (e, t) => k(e, t, O())
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
var
|
|
56
|
-
function
|
|
55
|
+
var A = /(?:\b40[13]\b|status code 40[13]|unauthori[sz]ed|unauthenticated|forbidden|invalid email or password)/i;
|
|
56
|
+
function j(e) {
|
|
57
57
|
return typeof e == "number" && Number.isInteger(e) ? e : typeof e == "string" && /^\d{3}$/.test(e) ? Number(e) : null;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function ce(e) {
|
|
60
60
|
let t = /* @__PURE__ */ new Set(), n = (e, r) => {
|
|
61
61
|
if (r > 3 || e == null || t.has(e)) return !1;
|
|
62
|
-
if (typeof e == "string") return
|
|
62
|
+
if (typeof e == "string") return A.test(e);
|
|
63
63
|
if (typeof e != "object") return !1;
|
|
64
64
|
t.add(e);
|
|
65
|
-
let i = e, a =
|
|
65
|
+
let i = e, a = j(i.status) ?? j(i.statusCode) ?? j(i.response?.status);
|
|
66
66
|
if (a === 401 || a === 403) return !0;
|
|
67
67
|
let o = i.message;
|
|
68
|
-
return typeof o == "string" &&
|
|
68
|
+
return typeof o == "string" && A.test(o) ? !0 : n(i.cause, r + 1);
|
|
69
69
|
};
|
|
70
70
|
return n(e, 0);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function le(e) {
|
|
73
73
|
if (!e || typeof e != "object") return null;
|
|
74
74
|
let t = e, n = t.workspaceId || t.input?.workspaceId;
|
|
75
75
|
return typeof n == "string" && n.trim() ? n : null;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function M(e) {
|
|
78
78
|
let t = e.workspaceDecision;
|
|
79
79
|
return t && typeof t == "object" ? t : null;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function ue(e) {
|
|
82
82
|
if (!e || typeof e != "object") return null;
|
|
83
83
|
let t = e.projectId;
|
|
84
84
|
return typeof t == "string" && t.trim() ? t : null;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
let t =
|
|
86
|
+
function de(e) {
|
|
87
|
+
let t = x(e);
|
|
88
88
|
return t.kind === "OperationDefinition" && t.operation === "mutation";
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function fe(e) {
|
|
91
91
|
let t = e.errors;
|
|
92
92
|
return Array.isArray(t) && t.length > 0;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function N(e) {
|
|
95
95
|
let t = e.headers;
|
|
96
96
|
if (!t || typeof t != "object" || Array.isArray(t)) return {};
|
|
97
97
|
let n = {};
|
|
98
98
|
for (let [e, r] of Object.entries(t)) typeof r == "string" && (n[e] = r);
|
|
99
99
|
return n;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function P(e) {
|
|
102
102
|
let t = e.fetchOptions;
|
|
103
103
|
if (!t || typeof t != "object" || !("signal" in t)) return;
|
|
104
104
|
let n = t.signal;
|
|
105
105
|
return n instanceof AbortSignal ? n : void 0;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
return new
|
|
109
|
-
let a = r.getContext(), o = { query:
|
|
107
|
+
function pe({ uri: e, batchMax: t, batchInterval: n }) {
|
|
108
|
+
return new y((r) => new b((i) => {
|
|
109
|
+
let a = r.getContext(), o = { query: S(r.query) };
|
|
110
110
|
r.operationName && (o.operationName = r.operationName);
|
|
111
111
|
let s = r.variables ?? {}, c = r.extensions ?? {};
|
|
112
112
|
Object.keys(s).length > 0 && (o.variables = s), Object.keys(c).length > 0 && (o.extensions = c);
|
|
@@ -114,8 +114,8 @@ function fe({ uri: e, batchMax: t, batchInterval: n }) {
|
|
|
114
114
|
return h(e, {
|
|
115
115
|
"content-type": "application/json",
|
|
116
116
|
"Apollo-Require-Preflight": "true",
|
|
117
|
-
...
|
|
118
|
-
}, o,
|
|
117
|
+
...N(a)
|
|
118
|
+
}, o, P(a), {
|
|
119
119
|
batchMax: t,
|
|
120
120
|
batchInterval: n
|
|
121
121
|
}).then((e) => {
|
|
@@ -127,145 +127,145 @@ function fe({ uri: e, batchMax: t, batchInterval: n }) {
|
|
|
127
127
|
};
|
|
128
128
|
}));
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
let { gateway: p, baseUrl: h, authToken:
|
|
132
|
-
workspaceId: (typeof
|
|
133
|
-
organizationId: (typeof
|
|
134
|
-
tenantId: (typeof
|
|
135
|
-
projectId: (typeof
|
|
136
|
-
}),
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
130
|
+
function F(e) {
|
|
131
|
+
let { gateway: p, baseUrl: h, authToken: _, workspaceToken: S, locale: w, geography: T, organizationId: E, productId: k, productSlug: A, workspaceId: j, projectId: N, tenantId: P, cache: F, enableSubscriptions: I = !1, sseUrl: L, onAuthError: R, onRefreshToken: z, onNetworkError: B, onNetworkStatusChange: V, onMutationSuccess: H, maxRetryAttempts: me = 3, batchMax: he = 10, batchInterval: ge, debug: U = !1 } = e, W = u(e.workspaceOperationGuard), G = null, K = null, q = () => ({
|
|
132
|
+
workspaceId: (typeof j == "function" ? j() : j) || null,
|
|
133
|
+
organizationId: (typeof E == "function" ? E() : E) || null,
|
|
134
|
+
tenantId: (typeof P == "function" ? P() : P) || null,
|
|
135
|
+
projectId: (typeof N == "function" ? N() : N) || null
|
|
136
|
+
}), _e = (e) => {
|
|
137
|
+
K ||= setTimeout(() => {
|
|
138
|
+
K = null, G && d(G, W, () => q().workspaceId).catch((t) => {
|
|
139
|
+
U && console.warn("[GraphQL] Active query refresh failed after mutation:", {
|
|
140
140
|
gateway: p,
|
|
141
141
|
operationName: e,
|
|
142
142
|
error: t
|
|
143
143
|
});
|
|
144
144
|
});
|
|
145
145
|
}, 0);
|
|
146
|
-
},
|
|
146
|
+
}, J = t[p], ve = r(n(h, p)), ye = pe({
|
|
147
147
|
uri: ve,
|
|
148
|
-
batchMax:
|
|
149
|
-
batchInterval:
|
|
150
|
-
}), be =
|
|
151
|
-
let n = t.headers ?? {}, r = typeof
|
|
148
|
+
batchMax: he,
|
|
149
|
+
batchInterval: ge
|
|
150
|
+
}), be = v((e, t) => {
|
|
151
|
+
let n = t.headers ?? {}, r = typeof _ == "function" ? _() : _;
|
|
152
152
|
return { headers: {
|
|
153
153
|
...n,
|
|
154
154
|
...r ? { authorization: `Bearer ${r}` } : {}
|
|
155
155
|
} };
|
|
156
|
-
}), xe =
|
|
157
|
-
let n = t.headers ?? {}, r = typeof
|
|
156
|
+
}), xe = v((e, t) => {
|
|
157
|
+
let n = t.headers ?? {}, r = typeof w == "function" ? w() : w;
|
|
158
158
|
return { headers: {
|
|
159
159
|
...n,
|
|
160
160
|
...r ? { "accept-language": r } : {}
|
|
161
161
|
} };
|
|
162
|
-
}), Se =
|
|
163
|
-
let n = t.headers ?? {}, r = typeof
|
|
162
|
+
}), Se = v((e, t) => {
|
|
163
|
+
let n = t.headers ?? {}, r = typeof T == "function" ? T() : null;
|
|
164
164
|
return { headers: {
|
|
165
165
|
...n,
|
|
166
166
|
...r?.country ? { "x-geo-country": r.country } : {},
|
|
167
167
|
...r?.currency ? { "x-geo-currency": r.currency } : {},
|
|
168
168
|
...r?.timezone ? { "x-geo-timezone": r.timezone } : {}
|
|
169
169
|
} };
|
|
170
|
-
}), Ce =
|
|
171
|
-
let n = t.headers ?? {}, r = typeof
|
|
170
|
+
}), Ce = v((e, t) => {
|
|
171
|
+
let n = t.headers ?? {}, r = typeof E == "function" ? E() : E;
|
|
172
172
|
return { headers: {
|
|
173
173
|
...n,
|
|
174
174
|
...r ? { "x-org-id": r } : {}
|
|
175
175
|
} };
|
|
176
|
-
}), we =
|
|
177
|
-
let n = t.headers ?? {}, r = typeof
|
|
176
|
+
}), we = v((e, t) => {
|
|
177
|
+
let n = t.headers ?? {}, r = typeof k == "function" ? k() : k, i = typeof A == "function" ? A() : A;
|
|
178
178
|
return { headers: {
|
|
179
179
|
...n,
|
|
180
180
|
...r ? { "x-product-id": r } : {},
|
|
181
181
|
...i ? { "x-product-slug": i } : {}
|
|
182
182
|
} };
|
|
183
|
-
}), Te =
|
|
184
|
-
let n = t.headers ?? {}, r =
|
|
183
|
+
}), Te = v((e, t) => {
|
|
184
|
+
let n = t.headers ?? {}, r = M(t), i = (r ? r.workspaceId : typeof j == "function" ? j() : j) || le(e.variables);
|
|
185
185
|
return { headers: {
|
|
186
186
|
...n,
|
|
187
187
|
...i ? { "x-workspace-id": i } : {}
|
|
188
188
|
} };
|
|
189
|
-
}), Ee =
|
|
190
|
-
let n = t.headers ?? {}, r =
|
|
189
|
+
}), Ee = v((e, t) => {
|
|
190
|
+
let n = t.headers ?? {}, r = M(t), i = (r ? r.projectId : typeof N == "function" ? N() : N) || ue(e.variables);
|
|
191
191
|
return { headers: {
|
|
192
192
|
...n,
|
|
193
193
|
...i ? { "x-project-id": i } : {}
|
|
194
194
|
} };
|
|
195
|
-
}), De =
|
|
196
|
-
let n = t.headers ?? {}, r = typeof
|
|
195
|
+
}), De = v((e, t) => {
|
|
196
|
+
let n = t.headers ?? {}, r = typeof P == "function" ? P() : P;
|
|
197
197
|
return { headers: {
|
|
198
198
|
...n,
|
|
199
199
|
...r ? { "x-tenant-id": r } : {}
|
|
200
200
|
} };
|
|
201
201
|
}), Oe = (e, t, n) => {
|
|
202
|
-
if (p !== "workspace" ||
|
|
202
|
+
if (p !== "workspace" || W === "off") return;
|
|
203
203
|
let r = c(e, t, n);
|
|
204
204
|
if (r) {
|
|
205
|
-
if (
|
|
205
|
+
if (W === "enforce") throw new s(r);
|
|
206
206
|
typeof window < "u" && window.dispatchEvent(new CustomEvent(a, { detail: r }));
|
|
207
207
|
}
|
|
208
|
-
}, ke =
|
|
209
|
-
let r = t.headers ?? {}, a = t.requiredWorkspaceAuth === !0;
|
|
210
|
-
if (p === "global" && !a) return { headers: r };
|
|
211
|
-
let
|
|
212
|
-
Oe(e,
|
|
213
|
-
let
|
|
214
|
-
workspaceId:
|
|
215
|
-
organizationId:
|
|
216
|
-
tenantId:
|
|
217
|
-
projectId:
|
|
218
|
-
}) ?
|
|
219
|
-
if (a && t.requiredWorkspaceId && t.requiredWorkspaceId !==
|
|
220
|
-
if (a && !
|
|
221
|
-
if (!
|
|
222
|
-
let t = typeof
|
|
208
|
+
}, ke = v(async (e, t) => {
|
|
209
|
+
let r = t.headers ?? {}, a = t.requiredWorkspaceAuth === !0, o = !a && t.preferWorkspaceAuth === !0;
|
|
210
|
+
if (p === "global" && !a && !o) return { headers: r };
|
|
211
|
+
let s = typeof _ == "function" ? _() : _, c = typeof S == "function" ? S() : S, l = q(), { workspaceId: u, organizationId: d, tenantId: f, projectId: m } = l;
|
|
212
|
+
Oe(e, u, "before-send");
|
|
213
|
+
let h = !1, g = i(c, {
|
|
214
|
+
workspaceId: u,
|
|
215
|
+
organizationId: d,
|
|
216
|
+
tenantId: f,
|
|
217
|
+
projectId: m
|
|
218
|
+
}) ? c : null;
|
|
219
|
+
if (a && t.requiredWorkspaceId && t.requiredWorkspaceId !== u) throw Error("The active workspace changed; retry the request");
|
|
220
|
+
if (a && !u) throw Error("Workspace authentication requires an active workspace");
|
|
221
|
+
if (!g && (p === "workspace" || a || o && u)) try {
|
|
222
|
+
let t = typeof _ == "function" ? _() : _;
|
|
223
223
|
if (t) {
|
|
224
|
-
|
|
224
|
+
h = !0;
|
|
225
225
|
let r = await Promise.race([ee({
|
|
226
226
|
url: p === "workspace" ? ve : n(void 0, "workspace"),
|
|
227
227
|
authToken: t,
|
|
228
|
-
workspaceId:
|
|
229
|
-
organizationId:
|
|
230
|
-
projectId:
|
|
228
|
+
workspaceId: u ?? void 0,
|
|
229
|
+
organizationId: d ?? void 0,
|
|
230
|
+
projectId: m ?? void 0,
|
|
231
231
|
currentQuery: e.operationName ?? ""
|
|
232
232
|
}), new Promise((e) => setTimeout(() => e(null), 4e3))]);
|
|
233
233
|
i(r, {
|
|
234
|
-
workspaceId:
|
|
235
|
-
organizationId:
|
|
236
|
-
tenantId:
|
|
237
|
-
projectId:
|
|
238
|
-
}) && (
|
|
234
|
+
workspaceId: u,
|
|
235
|
+
organizationId: d,
|
|
236
|
+
tenantId: f,
|
|
237
|
+
projectId: m
|
|
238
|
+
}) && (g = r);
|
|
239
239
|
}
|
|
240
240
|
} catch {}
|
|
241
241
|
if (a) {
|
|
242
|
-
if (!
|
|
243
|
-
let e =
|
|
244
|
-
if (
|
|
242
|
+
if (!g) throw Error("Workspace authentication is unavailable; retry the request");
|
|
243
|
+
let e = q();
|
|
244
|
+
if (s !== (typeof _ == "function" ? _() : _) || e.workspaceId !== u || e.organizationId !== d || e.projectId !== m || e.tenantId !== f) throw Error("The active workspace changed; retry the request");
|
|
245
245
|
}
|
|
246
|
-
if (
|
|
247
|
-
let t =
|
|
248
|
-
t !==
|
|
246
|
+
if (h) {
|
|
247
|
+
let t = q().workspaceId;
|
|
248
|
+
t !== u && Oe(e, t, "after-token-mint");
|
|
249
249
|
}
|
|
250
250
|
return {
|
|
251
251
|
headers: {
|
|
252
252
|
...r,
|
|
253
|
-
...
|
|
253
|
+
...g ? { "x-workspace-authorization": `Bearer ${g}` } : {}
|
|
254
254
|
},
|
|
255
|
-
workspaceDecision:
|
|
255
|
+
workspaceDecision: l
|
|
256
256
|
};
|
|
257
|
-
}), Ae =
|
|
258
|
-
if (
|
|
259
|
-
|
|
260
|
-
let t = Math.max(0, Math.ceil((
|
|
261
|
-
return
|
|
257
|
+
}), Ae = se({ maxAttempts: me }), je = new y((e, t) => {
|
|
258
|
+
if (O()) {
|
|
259
|
+
U && console.warn("[CircuitBreaker] Circuit is open, blocking request:", e.operationName);
|
|
260
|
+
let t = Math.max(0, Math.ceil((C.nextRetryTime - Date.now()) / 1e3)), n = /* @__PURE__ */ Error(`Network circuit breaker is open — backend appears unreachable. Retrying in ${t} seconds.`);
|
|
261
|
+
return B?.(n), new b((e) => {
|
|
262
262
|
e.error(n);
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
|
-
return new
|
|
265
|
+
return new b((n) => {
|
|
266
266
|
let r = t(e).subscribe({
|
|
267
267
|
next: (e) => {
|
|
268
|
-
|
|
268
|
+
D(), C.consecutiveFailures === 0 && V?.(!1), n.next(e);
|
|
269
269
|
},
|
|
270
270
|
error: (e) => {
|
|
271
271
|
n.error(e);
|
|
@@ -290,7 +290,7 @@ function I(e) {
|
|
|
290
290
|
Q(e), n.error(e);
|
|
291
291
|
},
|
|
292
292
|
complete: () => n.complete()
|
|
293
|
-
}), Ne =
|
|
293
|
+
}), Ne = te(({ error: e, operation: t, forward: n }) => {
|
|
294
294
|
if (l(e)) {
|
|
295
295
|
Q(e);
|
|
296
296
|
return;
|
|
@@ -298,8 +298,8 @@ function I(e) {
|
|
|
298
298
|
let r = e.errors;
|
|
299
299
|
if (r) {
|
|
300
300
|
let i = r.some((e) => e.extensions?.code === "UNAUTHENTICATED" || e.message.includes("Unauthorized") || e.message.includes("Unauthenticated"));
|
|
301
|
-
for (let e of r)
|
|
302
|
-
i &&
|
|
301
|
+
for (let e of r) U && console.error("[GraphQL Error]:", e.message);
|
|
302
|
+
i && z || f({ errors: r }, { operationName: t.operationName });
|
|
303
303
|
let a = new Set(["STORAGE_QUOTA_EXCEEDED", "RESOURCE_CAP_EXCEEDED"]);
|
|
304
304
|
for (let e of r) {
|
|
305
305
|
let t = e.extensions?.code;
|
|
@@ -308,65 +308,65 @@ function I(e) {
|
|
|
308
308
|
break;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
if (i &&
|
|
311
|
+
if (i && z) return new b((r) => {
|
|
312
312
|
(async () => {
|
|
313
313
|
if (Y) if (await new Promise((e) => {
|
|
314
314
|
X.push({ resolve: e });
|
|
315
315
|
})) {
|
|
316
316
|
let e = Me(t, n, r);
|
|
317
317
|
return () => e.unsubscribe();
|
|
318
|
-
} else return
|
|
318
|
+
} else return R?.(), r.error(e), () => {};
|
|
319
319
|
Y = !0;
|
|
320
320
|
try {
|
|
321
|
-
let i = await
|
|
321
|
+
let i = await z();
|
|
322
322
|
if (Y = !1, i) {
|
|
323
323
|
Z(!0);
|
|
324
324
|
let e = Me(t, n, r);
|
|
325
325
|
return () => e.unsubscribe();
|
|
326
|
-
} else return Z(!1),
|
|
326
|
+
} else return Z(!1), R?.(), r.error(e), () => {};
|
|
327
327
|
} catch {
|
|
328
|
-
return Y = !1, Z(!1),
|
|
328
|
+
return Y = !1, Z(!1), R?.(), r.error(e), () => {};
|
|
329
329
|
}
|
|
330
330
|
})();
|
|
331
331
|
});
|
|
332
|
-
i &&
|
|
332
|
+
i && R?.(), D();
|
|
333
333
|
} else {
|
|
334
|
-
if (
|
|
335
|
-
|
|
334
|
+
if (U && console.error("[Network Error]:", e), ce(e)) {
|
|
335
|
+
D(), e instanceof Error && f(e, {
|
|
336
336
|
operationName: t.operationName,
|
|
337
337
|
fallbackMessage: "Your session is no longer valid. Please sign in again."
|
|
338
338
|
});
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
|
-
if (
|
|
341
|
+
if (oe() && V?.(!0), e instanceof Error) B?.(e), f(e, {
|
|
342
342
|
operationName: t.operationName,
|
|
343
343
|
fallbackMessage: "We could not reach the server. Please check your connection and try again."
|
|
344
344
|
});
|
|
345
345
|
else {
|
|
346
346
|
let n = Error(String(e));
|
|
347
|
-
|
|
347
|
+
B?.(n), f(n, {
|
|
348
348
|
operationName: t.operationName,
|
|
349
349
|
fallbackMessage: "We could not reach the server. Please check your connection and try again."
|
|
350
350
|
});
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
}), Pe = new
|
|
354
|
-
let n =
|
|
355
|
-
return new
|
|
353
|
+
}), Pe = new y((e, t) => {
|
|
354
|
+
let n = de(e.query), r = n && e.getContext().autoRefreshAfterMutation !== !1 && e.getContext().skipMutationAutoRefresh !== !0;
|
|
355
|
+
return new b((i) => {
|
|
356
356
|
let a = t(e).subscribe({
|
|
357
357
|
next: (t) => {
|
|
358
|
-
if (i.next(t),
|
|
358
|
+
if (i.next(t), fe(t) || (n && m(), !r)) return;
|
|
359
359
|
let a = e.operationName || "anonymous mutation";
|
|
360
|
-
|
|
360
|
+
H ? Promise.resolve(H({
|
|
361
361
|
gateway: p,
|
|
362
362
|
operationName: a
|
|
363
363
|
})).catch((e) => {
|
|
364
|
-
|
|
364
|
+
U && console.warn("[GraphQL] Mutation refresh callback failed:", {
|
|
365
365
|
gateway: p,
|
|
366
366
|
operationName: a,
|
|
367
367
|
error: e
|
|
368
368
|
});
|
|
369
|
-
}) :
|
|
369
|
+
}) : _e(a);
|
|
370
370
|
},
|
|
371
371
|
error: (e) => {
|
|
372
372
|
i.error(e);
|
|
@@ -379,7 +379,7 @@ function I(e) {
|
|
|
379
379
|
a.unsubscribe();
|
|
380
380
|
};
|
|
381
381
|
});
|
|
382
|
-
}), $ =
|
|
382
|
+
}), $ = ie([
|
|
383
383
|
Ae,
|
|
384
384
|
je,
|
|
385
385
|
Ne,
|
|
@@ -393,16 +393,16 @@ function I(e) {
|
|
|
393
393
|
De,
|
|
394
394
|
xe,
|
|
395
395
|
Se,
|
|
396
|
-
|
|
397
|
-
let t =
|
|
396
|
+
ae(({ query: e }) => {
|
|
397
|
+
let t = x(e);
|
|
398
398
|
return t.kind === "OperationDefinition" && t.operation === "subscription";
|
|
399
|
-
}, new
|
|
399
|
+
}, new y((e) => new b((t) => {
|
|
400
400
|
t.error(/* @__PURE__ */ Error(`[graphql] Refusing to send subscription "${e.operationName ?? "anonymous"}" over the batched HTTP transport — this gateway client was created without enableSubscriptions/SSE. Enable subscriptions on this client so it routes over SSE.`));
|
|
401
401
|
})), ye)
|
|
402
402
|
]);
|
|
403
|
-
if (
|
|
404
|
-
let e =
|
|
405
|
-
t && ($ =
|
|
403
|
+
if (I) {
|
|
404
|
+
let e = J.sse, t = L || (e ? r(h || J.defaultBaseUrl) + e : void 0);
|
|
405
|
+
t && ($ = ie([
|
|
406
406
|
Ae,
|
|
407
407
|
je,
|
|
408
408
|
Ne,
|
|
@@ -416,17 +416,17 @@ function I(e) {
|
|
|
416
416
|
De,
|
|
417
417
|
xe,
|
|
418
418
|
Se,
|
|
419
|
-
|
|
420
|
-
let t =
|
|
419
|
+
ae(({ query: e }) => {
|
|
420
|
+
let t = x(e);
|
|
421
421
|
return t.kind === "OperationDefinition" && t.operation === "subscription";
|
|
422
|
-
}, new
|
|
422
|
+
}, new g({
|
|
423
423
|
url: t,
|
|
424
424
|
headers: {},
|
|
425
|
-
debug:
|
|
425
|
+
debug: U
|
|
426
426
|
}), ye)
|
|
427
427
|
]));
|
|
428
428
|
}
|
|
429
|
-
let Fe = new
|
|
429
|
+
let Fe = new re({ typePolicies: {
|
|
430
430
|
File: { keyFields: ["id"] },
|
|
431
431
|
Folder: { keyFields: ["id"] },
|
|
432
432
|
Tag: { keyFields: ["id"] },
|
|
@@ -461,9 +461,9 @@ function I(e) {
|
|
|
461
461
|
VibecontrolsAgent: { keyFields: ["id"] },
|
|
462
462
|
Query: { fields: { vibes: { keyArgs: ["filter"] } } }
|
|
463
463
|
} });
|
|
464
|
-
return
|
|
464
|
+
return G = new ne({
|
|
465
465
|
link: $,
|
|
466
|
-
cache:
|
|
466
|
+
cache: F ?? Fe,
|
|
467
467
|
defaultOptions: {
|
|
468
468
|
watchQuery: {
|
|
469
469
|
fetchPolicy: "cache-and-network",
|
|
@@ -475,19 +475,19 @@ function I(e) {
|
|
|
475
475
|
},
|
|
476
476
|
mutate: { errorPolicy: "all" }
|
|
477
477
|
}
|
|
478
|
-
}),
|
|
478
|
+
}), G;
|
|
479
479
|
}
|
|
480
|
-
var
|
|
481
|
-
function
|
|
480
|
+
var I = null, L = null;
|
|
481
|
+
function R(e) {
|
|
482
482
|
let { workspaceBaseUrl: t, globalBaseUrl: n, authToken: r, enableSubscriptions: i = !1, onAuthError: a, debug: o = !1 } = e;
|
|
483
|
-
|
|
483
|
+
I = F({
|
|
484
484
|
gateway: "workspace",
|
|
485
485
|
baseUrl: t,
|
|
486
486
|
authToken: r,
|
|
487
487
|
enableSubscriptions: i,
|
|
488
488
|
onAuthError: a,
|
|
489
489
|
debug: o
|
|
490
|
-
}),
|
|
490
|
+
}), L = F({
|
|
491
491
|
gateway: "global",
|
|
492
492
|
baseUrl: n,
|
|
493
493
|
authToken: r,
|
|
@@ -495,16 +495,16 @@ function z(e) {
|
|
|
495
495
|
debug: o
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
|
+
function z() {
|
|
499
|
+
if (!I) throw Error("Workspace client not initialized. Call initializeAppClients first.");
|
|
500
|
+
return I;
|
|
501
|
+
}
|
|
498
502
|
function B() {
|
|
499
|
-
if (!L) throw Error("
|
|
503
|
+
if (!L) throw Error("Global client not initialized. Call initializeAppClients first.");
|
|
500
504
|
return L;
|
|
501
505
|
}
|
|
502
506
|
function V() {
|
|
503
|
-
|
|
504
|
-
return R;
|
|
505
|
-
}
|
|
506
|
-
function H() {
|
|
507
|
-
L &&= (L.clearStore(), null), R &&= (R.clearStore(), null);
|
|
507
|
+
I &&= (I.clearStore(), null), L &&= (L.clearStore(), null);
|
|
508
508
|
}
|
|
509
509
|
//#endregion
|
|
510
|
-
export {
|
|
510
|
+
export { F as createGraphQLClient, B as getGlobalClient, z as getWorkspaceClient, R as initializeAppClients, V as resetAppClients };
|
|
@@ -655,11 +655,11 @@ function Ue() {
|
|
|
655
655
|
});
|
|
656
656
|
}, [e]), null;
|
|
657
657
|
}
|
|
658
|
-
function We({ config: e, productSlug: t,
|
|
659
|
-
let { pathname:
|
|
658
|
+
function We({ config: e, productSlug: t, productName: r, privacyConsent: i, consentRouteDenylist: a, rybbitSkipRoutes: o }) {
|
|
659
|
+
let { pathname: s } = q(), c = n(s) || a?.(s) === !0;
|
|
660
660
|
return /* @__PURE__ */ K(W, { children: [
|
|
661
661
|
/* @__PURE__ */ G(Ue, {}),
|
|
662
|
-
|
|
662
|
+
i && !c ? /* @__PURE__ */ G(E, { productName: r }) : null,
|
|
663
663
|
e.enabled === !1 ? null : /* @__PURE__ */ K(W, { children: [
|
|
664
664
|
e.devtools ? /* @__PURE__ */ G(C, { enabled: !0 }) : null,
|
|
665
665
|
e.broadcast === !1 ? null : /* @__PURE__ */ G(w, {}),
|
|
@@ -670,8 +670,8 @@ function We({ config: e, productSlug: t, privacyConsent: r, consentRouteDenylist
|
|
|
670
670
|
allowlist: e.rybbit.allowlist,
|
|
671
671
|
identifyOn: e.rybbit.identifyOn,
|
|
672
672
|
rename: e.rybbit.rename,
|
|
673
|
-
skipRoutes:
|
|
674
|
-
pathname:
|
|
673
|
+
skipRoutes: o,
|
|
674
|
+
pathname: s
|
|
675
675
|
}) : null,
|
|
676
676
|
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ G(k, {
|
|
677
677
|
endpoint: e.otel.endpoint,
|
|
@@ -786,6 +786,7 @@ function Ge({ config: t, children: i, clearAuthStore: a }) {
|
|
|
786
786
|
children: /* @__PURE__ */ K(Ce, { children: [/* @__PURE__ */ G(We, {
|
|
787
787
|
config: R,
|
|
788
788
|
productSlug: c,
|
|
789
|
+
productName: s,
|
|
789
790
|
privacyConsent: k,
|
|
790
791
|
consentRouteDenylist: A,
|
|
791
792
|
rybbitSkipRoutes: M
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/fe-libs",
|
|
3
|
-
"version": "2026.1023.
|
|
3
|
+
"version": "2026.1023.12",
|
|
4
4
|
"description": "Burdenoff frontend primitives and domain libraries",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
"test:package-livekit-optional": "node scripts/validate-livekit-optional.mjs",
|
|
331
331
|
"verify:package": "node scripts/verify-package-contents.mjs",
|
|
332
332
|
"test:handsfree-browser": "node scripts/handsfree-browser-run.mjs",
|
|
333
|
-
"test": "bun test scripts/graphql-schema-drift/__tests__ scripts/a11y-audit/__tests__ scripts/i18n/__tests__ src/credentials src/connections src/storage src/shared/assistant src/shared/feature-flags src/platform-pages src/admin-overview src/shared/components src/shared/graphql/links/sse-link.test.ts src/shared/graphql/fetch.test.ts src/shared/graphql/prepareWorkspaceRequest.test.ts src/shared/graphql/client.test.ts src/shared/utils/apollo.test.ts src/shared/utils/canvasTokens.test.ts src/shared/utils/brandContrast.test.ts src/shared/graphql/tourWorkspaceAuth.test.ts src/shared/config/gatewayUrls.test.ts src/shared/config/authBridgeUrls.test.ts src/shared/config/shellRoutes.test.ts src/shared/config/gatewayFallback.test.ts scripts/__tests__ src/shared/config/products.test.ts src/shared/config/docsUrls.test.ts src/shared/config/productSlug.test.ts src/shared/hooks/shell/useProducts.test.ts src/shared/hooks/shell/useGlobalSearch.test.ts src/shared/providers/shell/brandAttribute.test.ts src/chrome/ProductSwitcher.test.ts src/shared/utils/backendErrors.test.ts src/shared/utils/gatewayFetchRewrite.test.ts src/shared/utils/authCookie.test.ts src/shared/utils/redirectAllowlist.test.ts src/shared/providers/shell/ProfileStorageManager.test.ts src/shared/providers/shell/ActiveContextProvider.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/I18nProvider.client.test.tsx src/shared/providers/shell/translationStore.test.ts src/shared/providers/shell/translationLayers.test.ts src/shared/providers/shell/directionMode.test.ts src/shared/providers/shell/authProvider/ssoRelay.test.ts src/shared/providers/shell/authProvider/useAuthActions.signOut.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/shared/events/sinks/RybbitSink.client.test.tsx src/shell-native src/shared/native src/shared/navigation src/shared/tours src/chrome/__tests__ src/ui/__tests__ src/shared/graphql/workspaceSwitchGuard.test.ts",
|
|
333
|
+
"test": "bun test scripts/graphql-schema-drift/__tests__ scripts/a11y-audit/__tests__ scripts/i18n/__tests__ src/credentials src/connections src/storage src/shared/assistant src/shared/feature-flags src/platform-pages src/admin-overview src/shared/components src/shared/graphql/links/sse-link.test.ts src/shared/graphql/fetch.test.ts src/shared/graphql/prepareWorkspaceRequest.test.ts src/shared/graphql/client.test.ts src/shared/utils/apollo.test.ts src/shared/utils/canvasTokens.test.ts src/shared/utils/brandContrast.test.ts src/shared/graphql/tourWorkspaceAuth.test.ts src/shared/graphql/preferWorkspaceAuth.test.ts src/shared/config/gatewayUrls.test.ts src/shared/config/authBridgeUrls.test.ts src/shared/config/shellRoutes.test.ts src/shared/config/gatewayFallback.test.ts scripts/__tests__ src/shared/config/products.test.ts src/shared/config/docsUrls.test.ts src/shared/config/productSlug.test.ts src/shared/hooks/shell/useProducts.test.ts src/shared/hooks/shell/useGlobalSearch.test.ts src/shared/providers/shell/brandAttribute.test.ts src/chrome/ProductSwitcher.test.ts src/shared/utils/backendErrors.test.ts src/shared/utils/gatewayFetchRewrite.test.ts src/shared/utils/authCookie.test.ts src/shared/utils/redirectAllowlist.test.ts src/shared/providers/shell/ProfileStorageManager.test.ts src/shared/providers/shell/ActiveContextProvider.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/I18nProvider.client.test.tsx src/shared/providers/shell/translationStore.test.ts src/shared/providers/shell/translationLayers.test.ts src/shared/providers/shell/directionMode.test.ts src/shared/providers/shell/authProvider/ssoRelay.test.ts src/shared/providers/shell/authProvider/useAuthActions.signOut.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/shared/events/sinks/RybbitSink.client.test.tsx src/shell-native src/shared/native src/shared/navigation src/shared/tours src/chrome/__tests__ src/ui/__tests__ src/shared/graphql/workspaceSwitchGuard.test.ts",
|
|
334
334
|
"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 && bun run verify:package'",
|
|
335
335
|
"switch:status": "bun scripts/deps-mode.ts status",
|
|
336
336
|
"switch:remote": "bun scripts/deps-mode.ts remote",
|