fimo 0.3.5-staging.1 → 0.3.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/cli/bundle.json +2 -2
- package/dist/cli/index.js +8 -4
- package/package.json +1 -1
- package/release.json +2 -2
- package/templates/react-router/package.json +1 -1
package/dist/cli/bundle.json
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -103822,7 +103822,8 @@ async function loadPublicTenantLabels(cwd, locale) {
|
|
|
103822
103822
|
try {
|
|
103823
103823
|
const url2 = new URL("/labels", apiUrl);
|
|
103824
103824
|
url2.searchParams.set("locale", locale);
|
|
103825
|
-
const
|
|
103825
|
+
const headers = env2.VITE_FIMO_BRANCH ? { "X-Fimo-Branch": env2.VITE_FIMO_BRANCH } : {};
|
|
103826
|
+
const response = await fetchWithTimeout(url2, 4e3, headers);
|
|
103826
103827
|
if (!response.ok) {
|
|
103827
103828
|
return null;
|
|
103828
103829
|
}
|
|
@@ -103830,17 +103831,17 @@ async function loadPublicTenantLabels(cwd, locale) {
|
|
|
103830
103831
|
if (Array.isArray(body.data)) {
|
|
103831
103832
|
return labelsToRecord(body.data);
|
|
103832
103833
|
}
|
|
103833
|
-
return body.data?.labels ??
|
|
103834
|
+
return body.data?.labels ?? null;
|
|
103834
103835
|
} catch {
|
|
103835
103836
|
return null;
|
|
103836
103837
|
}
|
|
103837
103838
|
}
|
|
103838
103839
|
__name(loadPublicTenantLabels, "loadPublicTenantLabels");
|
|
103839
|
-
async function fetchWithTimeout(url2, timeoutMs) {
|
|
103840
|
+
async function fetchWithTimeout(url2, timeoutMs, headers) {
|
|
103840
103841
|
const controller = new AbortController();
|
|
103841
103842
|
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
103842
103843
|
try {
|
|
103843
|
-
return await fetch(url2, { signal: controller.signal });
|
|
103844
|
+
return await fetch(url2, { signal: controller.signal, headers });
|
|
103844
103845
|
} finally {
|
|
103845
103846
|
clearTimeout(timeout);
|
|
103846
103847
|
}
|
|
@@ -103854,6 +103855,9 @@ async function readProjectEnv(cwd) {
|
|
|
103854
103855
|
if (process.env.VITE_API_URL) {
|
|
103855
103856
|
values.VITE_API_URL = process.env.VITE_API_URL;
|
|
103856
103857
|
}
|
|
103858
|
+
if (process.env.VITE_FIMO_BRANCH) {
|
|
103859
|
+
values.VITE_FIMO_BRANCH = process.env.VITE_FIMO_BRANCH;
|
|
103860
|
+
}
|
|
103857
103861
|
return values;
|
|
103858
103862
|
}
|
|
103859
103863
|
__name(readProjectEnv, "readProjectEnv");
|
package/package.json
CHANGED
package/release.json
CHANGED