@burdenoff/fe-libs 2026.717.5 → 2026.717.6
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/shared/graphql/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAY,KAAK,OAAO,EAAsB,MAAM,WAAW,CAAC;AAuBvE,MAAM,WAAW,mBAAmB;IAClC,wBAAwB;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,mCAAmC;IACnC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;;;OAQG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;;;;OAMG;I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G,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAuFzB;AAED,uCAAuC;AACvC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ5E;AAmBD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAqCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,8BAA8B,IAAI,IAAI,CAIrD;AA6ND,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,OAAO,CAAC,CAyElB;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,YAAY,CAAC,CAAC,GAAG,OAAO,EAC5C,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAqP7B"}
|
|
@@ -35,6 +35,16 @@ function x() {
|
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
function ee() {
|
|
39
|
+
try {
|
|
40
|
+
let e = sessionStorage.getItem("bf-active-profile");
|
|
41
|
+
if (!e) return !1;
|
|
42
|
+
let t = localStorage.getItem(`bf-p-${e}-tokens`);
|
|
43
|
+
return !t || !JSON.parse(t)?.accessToken ? !1 : c(t) === null;
|
|
44
|
+
} catch {
|
|
45
|
+
return !1;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
38
48
|
function S(e) {
|
|
39
49
|
try {
|
|
40
50
|
let [, t] = e.split(".");
|
|
@@ -169,30 +179,30 @@ function R() {
|
|
|
169
179
|
function z() {
|
|
170
180
|
L().clear(), R().clear(), n();
|
|
171
181
|
}
|
|
172
|
-
var B = 10, V = 600, H = 100, U = 1e4, W = 15e3,
|
|
182
|
+
var B = 10, V = 600, H = 100, U = 1e4, W = 15e3, te = new Set([
|
|
173
183
|
"traceparent",
|
|
174
184
|
"tracestate",
|
|
175
185
|
"baggage"
|
|
176
186
|
]), G = "Apollo-Require-Preflight";
|
|
177
|
-
function
|
|
187
|
+
function ne() {
|
|
178
188
|
if (typeof performance > "u") return H;
|
|
179
189
|
let e = F();
|
|
180
190
|
return e.__graphqlFetchBurstStartedAt ??= performance.now(), performance.now() - e.__graphqlFetchBurstStartedAt < U ? V : H;
|
|
181
191
|
}
|
|
182
|
-
function
|
|
192
|
+
function re(e) {
|
|
183
193
|
return typeof e.query == "string" ? /^\s*query\b/.test(e.query) : !1;
|
|
184
194
|
}
|
|
185
|
-
function
|
|
195
|
+
function ie(e) {
|
|
186
196
|
return typeof e.operationName == "string" && e.operationName.length > 0 ? {
|
|
187
197
|
operationName: e.operationName,
|
|
188
198
|
variables: e.variables ?? null
|
|
189
199
|
} : e;
|
|
190
200
|
}
|
|
191
|
-
function
|
|
201
|
+
function ae(e) {
|
|
192
202
|
let t = /* @__PURE__ */ new Map();
|
|
193
203
|
for (let [n, r] of Object.entries(e)) {
|
|
194
204
|
let e = n.toLowerCase();
|
|
195
|
-
|
|
205
|
+
te.has(e) || t.set(e, r);
|
|
196
206
|
}
|
|
197
207
|
return Object.fromEntries(Array.from(t.entries()).sort(([e], [t]) => e.localeCompare(t)));
|
|
198
208
|
}
|
|
@@ -205,13 +215,13 @@ function K(t) {
|
|
|
205
215
|
};
|
|
206
216
|
}
|
|
207
217
|
function q(e) {
|
|
208
|
-
return
|
|
218
|
+
return oe(e) && Array.isArray(e.errors);
|
|
209
219
|
}
|
|
210
220
|
function J(e) {
|
|
211
221
|
let t = e.status;
|
|
212
222
|
return t === 401 ? "Invalid email or password." : t === 403 ? "You do not have permission to do that." : t === 404 ? "We could not find what you were looking for." : t === 408 || t === 504 ? "The server took too long to respond. Please try again." : t === 429 ? "Too many requests. Please wait a moment and try again." : t >= 500 && t < 600 ? "The server is having trouble right now. Please try again in a moment." : t >= 400 && t < 500 ? "The request could not be processed. Please refresh and try again." : "We could not reach the server. Please check your connection and try again.";
|
|
213
223
|
}
|
|
214
|
-
function
|
|
224
|
+
function oe(e) {
|
|
215
225
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
216
226
|
}
|
|
217
227
|
async function Y(e) {
|
|
@@ -269,7 +279,7 @@ async function X(e, t, n) {
|
|
|
269
279
|
}
|
|
270
280
|
}
|
|
271
281
|
function Z(e, t, n, r, i) {
|
|
272
|
-
let a =
|
|
282
|
+
let a = ae(t), o = Math.max(1, i?.batchMax ?? B), s = Math.max(0, i?.batchInterval ?? ne()), c = `${e}|${JSON.stringify(a)}`, l = re(n) ? `${c}|${JSON.stringify(ie(n))}` : void 0;
|
|
273
283
|
if (l) {
|
|
274
284
|
let e = L(), t = e.get(l);
|
|
275
285
|
if (t) {
|
|
@@ -317,7 +327,18 @@ function Q(e, t, n) {
|
|
|
317
327
|
i && (r.delete(n), i.timer &&= (clearTimeout(i.timer), null), X(e, t, i.requests));
|
|
318
328
|
}
|
|
319
329
|
async function $(e) {
|
|
320
|
-
let { gateway: n, query: r, variables: i, operationName: a, authToken: o, workspaceToken: s, workspaceId: c, organizationId: u, tenantId: h, projectId: _, locale: v, baseUrl: x, extraHeaders: S, signal: E, suppressGlobalErrorEvent: D } = e, k = d(P(n, x)), A = o && !C(o) ? o : y()
|
|
330
|
+
let { gateway: n, query: r, variables: i, operationName: a, authToken: o, workspaceToken: s, workspaceId: c, organizationId: u, tenantId: h, projectId: _, locale: v, baseUrl: x, extraHeaders: S, signal: E, suppressGlobalErrorEvent: D } = e, k = d(P(n, x)), A = o && !C(o) ? o : y();
|
|
331
|
+
if (!A && !e.skipAuthRetry && typeof window < "u" && !window.location.pathname.startsWith("/auth/") && ee()) {
|
|
332
|
+
let e = await import("../utils/authErrorHandling.js");
|
|
333
|
+
await e.attemptTokenRefresh({
|
|
334
|
+
globalBaseUrl: n === "global" && x ? x : t().globalBaseUrl,
|
|
335
|
+
...e.getSharedTokenRefreshRefs()
|
|
336
|
+
}) ? A = y() : g({
|
|
337
|
+
operationName: a,
|
|
338
|
+
gateway: n
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
let M = v ?? T(), F = j({
|
|
321
342
|
workspaceId: c,
|
|
322
343
|
organizationId: u,
|
|
323
344
|
tenantId: h,
|