@burdenoff/fe-libs 2026.715.5 → 2026.715.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.
|
@@ -28,10 +28,10 @@ export declare function getCurrentHostname(): string;
|
|
|
28
28
|
*
|
|
29
29
|
* Priority:
|
|
30
30
|
* 1. Known production domains → PROD_GATEWAYS (hostname always wins for real deploys)
|
|
31
|
-
* 2. Known alpha/staging domains →
|
|
31
|
+
* 2. Known alpha/staging domains → same-origin alpha Worker proxy
|
|
32
32
|
* 3. Localhost-like host: `VITE_GATEWAY_TARGET` env var, case-insensitive
|
|
33
33
|
* - `'prod'` → PROD_GATEWAYS (emits a one-time console warning — mutations write to real data)
|
|
34
|
-
* - `'alpha'` →
|
|
34
|
+
* - `'alpha'` → remote alpha gateways
|
|
35
35
|
* - `'local'` or anything else → LOCAL_DEFAULTS
|
|
36
36
|
* 4. Everything else (unknown deployed domain, or localhost with no env):
|
|
37
37
|
* LOCAL_DEFAULTS (fails loud against a missing local stack rather than
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gatewayUrls.d.ts","sourceRoot":"","sources":["../../../src/shared/config/gatewayUrls.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAoBD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"gatewayUrls.d.ts","sourceRoot":"","sources":["../../../src/shared/config/gatewayUrls.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAoBD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,UA0C/B,CAAC;AAEF,eAAO,MAAM,UAAU,aAGrB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW,aAOtB,CAAC;AAEH,wBAAgB,kBAAkB,IAAI,MAAM,CAG3C;AAuCD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,IAAI,kBAAkB,CA6BvD"}
|
|
@@ -16,21 +16,29 @@ function o() {
|
|
|
16
16
|
return typeof window > "u" ? "" : window.location.hostname.toLowerCase();
|
|
17
17
|
}
|
|
18
18
|
function s(e) {
|
|
19
|
+
let t = `https://${e}`;
|
|
20
|
+
return {
|
|
21
|
+
workspaceBaseUrl: t,
|
|
22
|
+
globalBaseUrl: t,
|
|
23
|
+
publicStoreBaseUrl: t
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function c(e) {
|
|
19
27
|
return e ? e === "localhost" || e === "127.0.0.1" || e === "0.0.0.0" || e === "[::1]" || e === "::1" || e.endsWith(".localhost") || e.endsWith(".local.burdenoff.com") : !1;
|
|
20
28
|
}
|
|
21
|
-
var
|
|
22
|
-
function
|
|
29
|
+
var l = !1;
|
|
30
|
+
function u() {
|
|
23
31
|
let r = o();
|
|
24
32
|
if (i.has(r)) return t;
|
|
25
|
-
if (a.has(r)) return
|
|
26
|
-
if (
|
|
27
|
-
let n =
|
|
28
|
-
if (n === "prod") return
|
|
33
|
+
if (a.has(r)) return s(r);
|
|
34
|
+
if (c(r)) {
|
|
35
|
+
let n = d();
|
|
36
|
+
if (n === "prod") return l || (l = !0, console.warn("[gatewayUrls] WARNING: localhost dev server is configured to hit PRODUCTION backends (VITE_GATEWAY_TARGET=prod). Any mutation will modify real prod data. Remove the env var or delete .env.local to disable.")), t;
|
|
29
37
|
if (n === "alpha") return e;
|
|
30
38
|
}
|
|
31
39
|
return n;
|
|
32
40
|
}
|
|
33
|
-
function
|
|
41
|
+
function d() {
|
|
34
42
|
try {
|
|
35
43
|
return {
|
|
36
44
|
BASE_URL: "/",
|
|
@@ -44,4 +52,4 @@ function u() {
|
|
|
44
52
|
}
|
|
45
53
|
}
|
|
46
54
|
//#endregion
|
|
47
|
-
export { r as ALL_PRODUCT_DOMAINS, a as ALPHA_HOSTS, i as PROD_HOSTS, o as getCurrentHostname,
|
|
55
|
+
export { r as ALL_PRODUCT_DOMAINS, a as ALPHA_HOSTS, i as PROD_HOSTS, o as getCurrentHostname, u as resolveGatewayUrls };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gatewayFetchRewrite.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/gatewayFetchRewrite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,YAAY,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"gatewayFetchRewrite.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/gatewayFetchRewrite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,YAAY,CAAC;CACrB;AAyGD,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD;AAkPD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,kBAAkB,EAAE,EACpC,aAAa,CAAC,EAAE,YAAY,GAC3B,YAAY,CAad;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAET;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,YAAY,EACnB,QAAQ,CAAC,EAAE,0BAA0B,GACpC,IAAI,CA6HN;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,SAAyB,GAAG,IAAI,CAQtE"}
|
|
@@ -3,16 +3,21 @@ import { ALL_PRODUCT_DOMAINS as e } from "../config/gatewayUrls.js";
|
|
|
3
3
|
var t = {
|
|
4
4
|
globalBase: "https://graphql.burdenoff.com",
|
|
5
5
|
workspaceBase: "https://graphqlworkspaces.burdenoff.com"
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
};
|
|
7
|
+
function n(e) {
|
|
8
|
+
let t = `https://${e}`;
|
|
9
|
+
return {
|
|
10
|
+
globalBase: t,
|
|
11
|
+
workspaceBase: t
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
var r = [
|
|
10
15
|
...e.flatMap((e) => [{
|
|
11
16
|
hostname: `app.${e}`,
|
|
12
17
|
bases: t
|
|
13
18
|
}, {
|
|
14
19
|
hostname: `alphaapp.${e}`,
|
|
15
|
-
bases: n
|
|
20
|
+
bases: n(`alphaapp.${e}`)
|
|
16
21
|
}]),
|
|
17
22
|
{
|
|
18
23
|
hostname: "admin.burdenoff.com",
|
|
@@ -20,7 +25,7 @@ var t = {
|
|
|
20
25
|
},
|
|
21
26
|
{
|
|
22
27
|
hostname: "alphaadmin.burdenoff.com",
|
|
23
|
-
bases: n
|
|
28
|
+
bases: n("alphaadmin.burdenoff.com")
|
|
24
29
|
}
|
|
25
30
|
], i = {
|
|
26
31
|
globalBase: "https://gw-global.local.burdenoff.com",
|