@burdenoff/fe-libs 2026.723.4 → 2026.723.5
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/config/index.d.ts +4 -0
- package/dist/shared/config/index.d.ts.map +1 -1
- package/dist/shared/graphql/client.d.ts.map +1 -1
- package/dist/shared/graphql/client.js +67 -62
- package/dist/shared/providers/shell/MultiGatewayProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/MultiGatewayProvider.js +2 -0
- package/dist/shared-config.js +1 -0
- package/package.json +1 -1
|
@@ -28,6 +28,8 @@ export declare const GATEWAYS: {
|
|
|
28
28
|
readonly defaultBaseUrl: "https://gw-global.local.burdenoff.com";
|
|
29
29
|
/** GraphQL endpoint path */
|
|
30
30
|
readonly graphql: "/global/graphql";
|
|
31
|
+
/** SSE endpoint path for subscriptions (same endpoint, gateway detects via Accept header) */
|
|
32
|
+
readonly sse: "/global/graphql";
|
|
31
33
|
/** WebSocket endpoint for subscriptions (if needed) */
|
|
32
34
|
readonly ws: "/global/graphql/ws";
|
|
33
35
|
};
|
|
@@ -53,6 +55,8 @@ export declare function getGatewayConfig(gateway: Gateway): {
|
|
|
53
55
|
readonly defaultBaseUrl: "https://gw-global.local.burdenoff.com";
|
|
54
56
|
/** GraphQL endpoint path */
|
|
55
57
|
readonly graphql: "/global/graphql";
|
|
58
|
+
/** SSE endpoint path for subscriptions (same endpoint, gateway detects via Accept header) */
|
|
59
|
+
readonly sse: "/global/graphql";
|
|
56
60
|
/** WebSocket endpoint for subscriptions (if needed) */
|
|
57
61
|
readonly ws: "/global/graphql/ws";
|
|
58
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;;QAEj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8
|
import { RetryLink as d } from "@apollo/client/link/retry";
|
|
9
9
|
import { setContext as f } from "@apollo/client/link/context";
|
|
10
|
-
import { ApolloClient as ee, ApolloLink as p, InMemoryCache as te, Observable as m, from as
|
|
10
|
+
import { ApolloClient as ee, ApolloLink as p, InMemoryCache as te, Observable as m, from as ne, split as h } from "@apollo/client/core";
|
|
11
11
|
import { getMainDefinition as g } from "@apollo/client/utilities";
|
|
12
12
|
import { print as _ } from "graphql";
|
|
13
13
|
//#region src/shared/graphql/client.ts
|
|
@@ -104,33 +104,33 @@ function le({ uri: e, batchMax: t, batchInterval: n }) {
|
|
|
104
104
|
}));
|
|
105
105
|
}
|
|
106
106
|
function O(a) {
|
|
107
|
-
let { gateway: s, baseUrl: _, authToken: y, workspaceToken: b, locale: x, geography: w, organizationId: T, productId: E, productSlug: D, workspaceId: O, projectId: k, tenantId: A, cache:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
let { gateway: s, baseUrl: _, authToken: y, workspaceToken: b, locale: x, geography: w, organizationId: T, productId: E, productSlug: D, workspaceId: O, projectId: k, tenantId: A, cache: j, enableSubscriptions: M = !1, sseUrl: ue, onAuthError: N, onRefreshToken: P, onNetworkError: F, onNetworkStatusChange: I, onMutationSuccess: L, maxRetryAttempts: de = 3, batchMax: fe = 10, batchInterval: pe, debug: R = !1 } = a, z = null, B = null, me = (e) => {
|
|
108
|
+
B ||= setTimeout(() => {
|
|
109
|
+
B = null, z && z.refetchQueries({ include: "active" }).catch((t) => {
|
|
110
|
+
R && console.warn("[GraphQL] Active query refresh failed after mutation:", {
|
|
111
111
|
gateway: s,
|
|
112
112
|
operationName: e,
|
|
113
113
|
error: t
|
|
114
114
|
});
|
|
115
115
|
});
|
|
116
116
|
}, 0);
|
|
117
|
-
},
|
|
118
|
-
uri:
|
|
119
|
-
batchMax:
|
|
120
|
-
batchInterval:
|
|
121
|
-
}),
|
|
117
|
+
}, V = e[s], H = n(t(_, s)), U = le({
|
|
118
|
+
uri: H,
|
|
119
|
+
batchMax: fe,
|
|
120
|
+
batchInterval: pe
|
|
121
|
+
}), W = f((e, t) => {
|
|
122
122
|
let n = t.headers ?? {}, r = typeof y == "function" ? y() : y;
|
|
123
123
|
return { headers: {
|
|
124
124
|
...n,
|
|
125
125
|
...r ? { authorization: `Bearer ${r}` } : {}
|
|
126
126
|
} };
|
|
127
|
-
}),
|
|
127
|
+
}), G = f((e, t) => {
|
|
128
128
|
let n = t.headers ?? {}, r = typeof x == "function" ? x() : x;
|
|
129
129
|
return { headers: {
|
|
130
130
|
...n,
|
|
131
131
|
...r ? { "accept-language": r } : {}
|
|
132
132
|
} };
|
|
133
|
-
}),
|
|
133
|
+
}), K = f((e, t) => {
|
|
134
134
|
let n = t.headers ?? {}, r = typeof w == "function" ? w() : null;
|
|
135
135
|
return { headers: {
|
|
136
136
|
...n,
|
|
@@ -138,32 +138,32 @@ function O(a) {
|
|
|
138
138
|
...r?.currency ? { "x-geo-currency": r.currency } : {},
|
|
139
139
|
...r?.timezone ? { "x-geo-timezone": r.timezone } : {}
|
|
140
140
|
} };
|
|
141
|
-
}),
|
|
141
|
+
}), q = f((e, t) => {
|
|
142
142
|
let n = t.headers ?? {}, r = typeof T == "function" ? T() : T;
|
|
143
143
|
return { headers: {
|
|
144
144
|
...n,
|
|
145
145
|
...r ? { "x-org-id": r } : {}
|
|
146
146
|
} };
|
|
147
|
-
}),
|
|
147
|
+
}), J = f((e, t) => {
|
|
148
148
|
let n = t.headers ?? {}, r = typeof E == "function" ? E() : E, i = typeof D == "function" ? D() : D;
|
|
149
149
|
return { headers: {
|
|
150
150
|
...n,
|
|
151
151
|
...r ? { "x-product-id": r } : {},
|
|
152
152
|
...i ? { "x-product-slug": i } : {}
|
|
153
153
|
} };
|
|
154
|
-
}),
|
|
154
|
+
}), Y = f((e, t) => {
|
|
155
155
|
let n = t.headers ?? {}, r = (typeof O == "function" ? O() : O) || ae(e.variables);
|
|
156
156
|
return { headers: {
|
|
157
157
|
...n,
|
|
158
158
|
...r ? { "x-workspace-id": r } : {}
|
|
159
159
|
} };
|
|
160
|
-
}),
|
|
160
|
+
}), he = f((e, t) => {
|
|
161
161
|
let n = t.headers ?? {}, r = (typeof k == "function" ? k() : k) || oe(e.variables);
|
|
162
162
|
return { headers: {
|
|
163
163
|
...n,
|
|
164
164
|
...r ? { "x-project-id": r } : {}
|
|
165
165
|
} };
|
|
166
|
-
}),
|
|
166
|
+
}), ge = f((e, t) => {
|
|
167
167
|
let n = t.headers ?? {}, r = typeof A == "function" ? A() : A;
|
|
168
168
|
return { headers: {
|
|
169
169
|
...n,
|
|
@@ -180,7 +180,7 @@ function O(a) {
|
|
|
180
180
|
let t = typeof y == "function" ? y() : y;
|
|
181
181
|
if (t) {
|
|
182
182
|
let n = await Promise.race([c({
|
|
183
|
-
url:
|
|
183
|
+
url: H,
|
|
184
184
|
authToken: t,
|
|
185
185
|
workspaceId: a ?? void 0,
|
|
186
186
|
organizationId: o ?? void 0,
|
|
@@ -201,7 +201,7 @@ function O(a) {
|
|
|
201
201
|
jitter: !0
|
|
202
202
|
},
|
|
203
203
|
attempts: {
|
|
204
|
-
max:
|
|
204
|
+
max: de,
|
|
205
205
|
retryIf: (e) => {
|
|
206
206
|
if (C() || !e) return !1;
|
|
207
207
|
let t = e.message?.toLowerCase?.() ?? "";
|
|
@@ -210,16 +210,16 @@ function O(a) {
|
|
|
210
210
|
}
|
|
211
211
|
}), ye = new p((e, t) => {
|
|
212
212
|
if (C()) {
|
|
213
|
-
|
|
213
|
+
R && console.warn("[CircuitBreaker] Circuit is open, blocking request:", e.operationName);
|
|
214
214
|
let t = Math.max(0, Math.ceil((v.nextRetryTime - Date.now()) / 1e3)), n = /* @__PURE__ */ Error(`Network circuit breaker is open — backend appears unreachable. Retrying in ${t} seconds.`);
|
|
215
|
-
return
|
|
215
|
+
return F?.(n), new m((e) => {
|
|
216
216
|
e.error(n);
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
219
|
return new m((n) => {
|
|
220
220
|
let r = t(e).subscribe({
|
|
221
221
|
next: (e) => {
|
|
222
|
-
S(), v.consecutiveFailures === 0 &&
|
|
222
|
+
S(), v.consecutiveFailures === 0 && I?.(!1), n.next(e);
|
|
223
223
|
},
|
|
224
224
|
error: (e) => {
|
|
225
225
|
n.error(e);
|
|
@@ -240,7 +240,7 @@ function O(a) {
|
|
|
240
240
|
let r = e.errors;
|
|
241
241
|
if (r) {
|
|
242
242
|
let a = r.some((e) => e.extensions?.code === "UNAUTHENTICATED" || e.message.includes("Unauthorized") || e.message.includes("Unauthenticated"));
|
|
243
|
-
for (let e of r)
|
|
243
|
+
for (let e of r) R && console.error("[GraphQL Error]:", e.message);
|
|
244
244
|
i({ errors: r }, { operationName: t.operationName });
|
|
245
245
|
let o = new Set(["STORAGE_QUOTA_EXCEEDED", "RESOURCE_CAP_EXCEEDED"]);
|
|
246
246
|
for (let e of r) {
|
|
@@ -250,43 +250,43 @@ function O(a) {
|
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
if (a &&
|
|
253
|
+
if (a && P) return new m((r) => {
|
|
254
254
|
(async () => {
|
|
255
255
|
if (X) if (await new Promise((e) => {
|
|
256
256
|
Z.push({ resolve: e });
|
|
257
257
|
})) {
|
|
258
258
|
let e = n(t).subscribe(r);
|
|
259
259
|
return () => e.unsubscribe();
|
|
260
|
-
} else return
|
|
260
|
+
} else return N?.(), r.error(e), () => {};
|
|
261
261
|
X = !0;
|
|
262
262
|
try {
|
|
263
|
-
let i = await
|
|
263
|
+
let i = await P();
|
|
264
264
|
if (X = !1, i) {
|
|
265
265
|
Q(!0);
|
|
266
266
|
let e = n(t).subscribe(r);
|
|
267
267
|
return () => e.unsubscribe();
|
|
268
|
-
} else return Q(!1),
|
|
268
|
+
} else return Q(!1), N?.(), r.error(e), () => {};
|
|
269
269
|
} catch {
|
|
270
|
-
return X = !1, Q(!1),
|
|
270
|
+
return X = !1, Q(!1), N?.(), r.error(e), () => {};
|
|
271
271
|
}
|
|
272
272
|
})();
|
|
273
273
|
});
|
|
274
|
-
a &&
|
|
274
|
+
a && N?.(), S();
|
|
275
275
|
} else {
|
|
276
|
-
if (
|
|
276
|
+
if (R && console.error("[Network Error]:", e), ie(e)) {
|
|
277
277
|
S(), e instanceof Error && i(e, {
|
|
278
278
|
operationName: t.operationName,
|
|
279
279
|
fallbackMessage: "Your session is no longer valid. Please sign in again."
|
|
280
280
|
});
|
|
281
281
|
return;
|
|
282
282
|
}
|
|
283
|
-
if (re() &&
|
|
283
|
+
if (re() && I?.(!0), e instanceof Error) F?.(e), i(e, {
|
|
284
284
|
operationName: t.operationName,
|
|
285
285
|
fallbackMessage: "We could not reach the server. Please check your connection and try again."
|
|
286
286
|
});
|
|
287
287
|
else {
|
|
288
288
|
let n = Error(String(e));
|
|
289
|
-
|
|
289
|
+
F?.(n), i(n, {
|
|
290
290
|
operationName: t.operationName,
|
|
291
291
|
fallbackMessage: "We could not reach the server. Please check your connection and try again."
|
|
292
292
|
});
|
|
@@ -299,16 +299,16 @@ function O(a) {
|
|
|
299
299
|
next: (t) => {
|
|
300
300
|
if (i.next(t), ce(t) || (n && o(), !r)) return;
|
|
301
301
|
let a = e.operationName || "anonymous mutation";
|
|
302
|
-
|
|
302
|
+
L ? Promise.resolve(L({
|
|
303
303
|
gateway: s,
|
|
304
304
|
operationName: a
|
|
305
305
|
})).catch((e) => {
|
|
306
|
-
|
|
306
|
+
R && console.warn("[GraphQL] Mutation refresh callback failed:", {
|
|
307
307
|
gateway: s,
|
|
308
308
|
operationName: a,
|
|
309
309
|
error: e
|
|
310
310
|
});
|
|
311
|
-
}) :
|
|
311
|
+
}) : me(a);
|
|
312
312
|
},
|
|
313
313
|
error: (e) => {
|
|
314
314
|
i.error(e);
|
|
@@ -321,46 +321,51 @@ function O(a) {
|
|
|
321
321
|
a.unsubscribe();
|
|
322
322
|
};
|
|
323
323
|
});
|
|
324
|
-
}), $ =
|
|
324
|
+
}), $ = ne([
|
|
325
325
|
ve,
|
|
326
326
|
ye,
|
|
327
327
|
be,
|
|
328
328
|
xe,
|
|
329
|
-
|
|
329
|
+
W,
|
|
330
330
|
_e,
|
|
331
|
-
G,
|
|
332
|
-
K,
|
|
333
331
|
q,
|
|
334
332
|
J,
|
|
335
333
|
Y,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
334
|
+
he,
|
|
335
|
+
ge,
|
|
336
|
+
G,
|
|
337
|
+
K,
|
|
338
|
+
h(({ query: e }) => {
|
|
339
|
+
let t = g(e);
|
|
340
|
+
return t.kind === "OperationDefinition" && t.operation === "subscription";
|
|
341
|
+
}, new p((e) => new m((t) => {
|
|
342
|
+
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.`));
|
|
343
|
+
})), U)
|
|
339
344
|
]);
|
|
340
|
-
if (
|
|
341
|
-
let e =
|
|
342
|
-
|
|
345
|
+
if (M) {
|
|
346
|
+
let e = V.sse, t = ue || (e ? n(_ || V.defaultBaseUrl) + e : void 0);
|
|
347
|
+
t && ($ = ne([
|
|
343
348
|
ve,
|
|
344
349
|
ye,
|
|
345
350
|
be,
|
|
346
351
|
xe,
|
|
347
|
-
|
|
352
|
+
W,
|
|
348
353
|
_e,
|
|
349
|
-
G,
|
|
350
|
-
K,
|
|
351
354
|
q,
|
|
352
355
|
J,
|
|
353
356
|
Y,
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
+
he,
|
|
358
|
+
ge,
|
|
359
|
+
G,
|
|
360
|
+
K,
|
|
361
|
+
h(({ query: e }) => {
|
|
357
362
|
let t = g(e);
|
|
358
363
|
return t.kind === "OperationDefinition" && t.operation === "subscription";
|
|
359
364
|
}, new l({
|
|
360
|
-
url:
|
|
365
|
+
url: t,
|
|
361
366
|
headers: {},
|
|
362
|
-
debug:
|
|
363
|
-
}),
|
|
367
|
+
debug: R
|
|
368
|
+
}), U)
|
|
364
369
|
]));
|
|
365
370
|
}
|
|
366
371
|
let Se = new te({ typePolicies: {
|
|
@@ -398,9 +403,9 @@ function O(a) {
|
|
|
398
403
|
VibecontrolsAgent: { keyFields: ["id"] },
|
|
399
404
|
Query: { fields: { vibes: { keyArgs: ["filter"] } } }
|
|
400
405
|
} });
|
|
401
|
-
return
|
|
406
|
+
return z = new ee({
|
|
402
407
|
link: $,
|
|
403
|
-
cache:
|
|
408
|
+
cache: j ?? Se,
|
|
404
409
|
defaultOptions: {
|
|
405
410
|
watchQuery: {
|
|
406
411
|
fetchPolicy: "cache-and-network",
|
|
@@ -412,10 +417,10 @@ function O(a) {
|
|
|
412
417
|
},
|
|
413
418
|
mutate: { errorPolicy: "all" }
|
|
414
419
|
}
|
|
415
|
-
}),
|
|
420
|
+
}), z;
|
|
416
421
|
}
|
|
417
422
|
var k = null, A = null;
|
|
418
|
-
function
|
|
423
|
+
function j(e) {
|
|
419
424
|
let { workspaceBaseUrl: t, globalBaseUrl: n, authToken: r, enableSubscriptions: i = !1, onAuthError: a, debug: o = !1 } = e;
|
|
420
425
|
k = O({
|
|
421
426
|
gateway: "workspace",
|
|
@@ -432,16 +437,16 @@ function ue(e) {
|
|
|
432
437
|
debug: o
|
|
433
438
|
});
|
|
434
439
|
}
|
|
435
|
-
function
|
|
440
|
+
function M() {
|
|
436
441
|
if (!k) throw Error("Workspace client not initialized. Call initializeAppClients first.");
|
|
437
442
|
return k;
|
|
438
443
|
}
|
|
439
|
-
function
|
|
444
|
+
function ue() {
|
|
440
445
|
if (!A) throw Error("Global client not initialized. Call initializeAppClients first.");
|
|
441
446
|
return A;
|
|
442
447
|
}
|
|
443
|
-
function
|
|
448
|
+
function N() {
|
|
444
449
|
k &&= (k.clearStore(), null), A &&= (A.clearStore(), null);
|
|
445
450
|
}
|
|
446
451
|
//#endregion
|
|
447
|
-
export { O as createGraphQLClient,
|
|
452
|
+
export { O as createGraphQLClient, ue as getGlobalClient, M as getWorkspaceClient, j as initializeAppClients, N as resetAppClients };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiGatewayProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/MultiGatewayProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA2C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAuB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAKzE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACrC,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,yCAAyC;IACzC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACxC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,WAAW,EACX,cAA4B,EAC5B,KAAa,EACb,mBAA2B,EAC3B,WAAW,EACX,cAAc,EACd,cAAc,GACf,EAAE,yBAAyB,
|
|
1
|
+
{"version":3,"file":"MultiGatewayProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/MultiGatewayProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA2C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAuB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAKzE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACrC,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,yCAAyC;IACzC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACxC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,WAAW,EACX,cAA4B,EAC5B,KAAa,EACb,mBAA2B,EAC3B,WAAW,EACX,cAAc,EACd,cAAc,GACf,EAAE,yBAAyB,2CA+R3B"}
|
|
@@ -81,6 +81,7 @@ function u({ children: u, workspaceBaseUrl: d, globalBaseUrl: f, organizationId:
|
|
|
81
81
|
productSlug: m,
|
|
82
82
|
locale: O,
|
|
83
83
|
geography: k,
|
|
84
|
+
enableSubscriptions: _,
|
|
84
85
|
debug: g,
|
|
85
86
|
onAuthError: v,
|
|
86
87
|
onRefreshToken: b,
|
|
@@ -93,6 +94,7 @@ function u({ children: u, workspaceBaseUrl: d, globalBaseUrl: f, organizationId:
|
|
|
93
94
|
m,
|
|
94
95
|
O,
|
|
95
96
|
k,
|
|
97
|
+
_,
|
|
96
98
|
g,
|
|
97
99
|
v,
|
|
98
100
|
b,
|
package/dist/shared-config.js
CHANGED