@bagelink/blox 1.18.7 → 1.18.8
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/{PreviewApp-D8ZBTG0j.cjs → PreviewApp-DJ-zFK64.cjs} +1 -1
- package/dist/{PreviewApp-9H9-jLVN.js → PreviewApp-Eu1N9XYe.js} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-BYCayJs0.cjs → PreviewApp.vue_vue_type_style_index_0_lang-BF52PPjt.cjs} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-BwiLyRBw.js → PreviewApp.vue_vue_type_style_index_0_lang-zkP_L9cF.js} +1 -1
- package/dist/{appRuntime-DZSCSsnS.js → appRuntime-Cmns1A7C.js} +60 -38
- package/dist/{appRuntime-Z0AxTPxf.cjs → appRuntime-DQRKuyja.cjs} +24 -2
- package/dist/composables/useLocale.d.ts +2 -0
- package/dist/composables/useLocale.d.ts.map +1 -1
- package/dist/content/routes.d.ts.map +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +30 -28
- package/dist/{shard-runner-Bz46UqN8.cjs → shard-runner-2Aga3U5Y.cjs} +2 -2
- package/dist/{shard-runner-CoFcUVGe.js → shard-runner-x08zpfHx.js} +2 -2
- package/dist/ssg/cli.cjs +2 -2
- package/dist/ssg/cli.mjs +2 -2
- package/dist/ssg/createSSREntry.d.ts.map +1 -1
- package/dist/ssg/index.cjs +5 -2
- package/dist/ssg/index.mjs +6 -3
- package/dist/ssg/validate-output.d.ts.map +1 -1
- package/dist/{validate-output-B8pmE7hf.js → validate-output-C2ObdhO5.js} +4 -0
- package/dist/{validate-output-CbIQrCwa.cjs → validate-output-Dtdsu9EM.cjs} +4 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
3
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-BF52PPjt.cjs");
|
|
4
4
|
exports.default = PreviewApp_vue_vue_type_style_index_0_lang._sfc_main;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, h, provide, onMounted, onUnmounted, openBlock, createElementBlock, createVNode, unref, nextTick } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { e as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, f as BLOX_RUNTIME_KEY } from "./appRuntime-Cmns1A7C.js";
|
|
3
3
|
function sendToEditor(msg) {
|
|
4
4
|
window.parent.postMessage(cloneForPostMessage(msg), "*");
|
|
5
5
|
}
|
|
@@ -128,8 +128,16 @@ function localeState() {
|
|
|
128
128
|
}
|
|
129
129
|
return { locale, currentAlternates, currentLocaleFallbacks };
|
|
130
130
|
}
|
|
131
|
+
let _ssrPageLocale = null;
|
|
132
|
+
function setSsrPageLocale(locale2) {
|
|
133
|
+
_ssrPageLocale = locale2 ? String(locale2).slice(0, 2).toLowerCase() : null;
|
|
134
|
+
}
|
|
135
|
+
function getSsrPageLocale() {
|
|
136
|
+
return _ssrPageLocale;
|
|
137
|
+
}
|
|
131
138
|
function setActiveLocale(l, state = localeState()) {
|
|
132
139
|
state.locale.value = l;
|
|
140
|
+
locale.value = l;
|
|
133
141
|
try {
|
|
134
142
|
const i18n = getI18n();
|
|
135
143
|
if (i18n == null ? void 0 : i18n.global) i18n.global.locale.value = l;
|
|
@@ -801,7 +809,7 @@ class BloxInstance {
|
|
|
801
809
|
router.addRoute({
|
|
802
810
|
path: "/_blox_preview",
|
|
803
811
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
804
|
-
component: () => import("./PreviewApp-
|
|
812
|
+
component: () => import("./PreviewApp-Eu1N9XYe.js"),
|
|
805
813
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
806
814
|
});
|
|
807
815
|
}
|
|
@@ -1036,12 +1044,24 @@ function installLocaleAwareResolve(router, strategy, activeLocaleRef) {
|
|
|
1036
1044
|
const supported = strategy.locales;
|
|
1037
1045
|
const defaultLocale = strategy.defaultLocale;
|
|
1038
1046
|
const activeLocale = () => String(locale2.value || "").slice(0, 2).toLowerCase() || defaultLocale;
|
|
1047
|
+
const routeLocale = () => {
|
|
1048
|
+
var _a, _b, _c;
|
|
1049
|
+
const ssr = getSsrPageLocale();
|
|
1050
|
+
if (ssr) return ssr;
|
|
1051
|
+
const path = String(((_b = (_a = router.currentRoute) == null ? void 0 : _a.value) == null ? void 0 : _b.path) || "");
|
|
1052
|
+
const first = (_c = path.replace(/^\/+/, "").split("/")[0]) == null ? void 0 : _c.toLowerCase();
|
|
1053
|
+
return first && supported.includes(first) ? first : activeLocale();
|
|
1054
|
+
};
|
|
1039
1055
|
const originalResolve = router.resolve.bind(router);
|
|
1040
1056
|
router.resolve = (to, currentLocation) => {
|
|
1057
|
+
var _a;
|
|
1041
1058
|
if (typeof to === "string") {
|
|
1042
1059
|
const href = normalizeLink(to) ?? to;
|
|
1043
1060
|
if (classifyLink(href) === "internal") {
|
|
1044
|
-
|
|
1061
|
+
const firstSegment = (_a = href.replace(/^\/+/, "").split("/")[0]) == null ? void 0 : _a.toLowerCase();
|
|
1062
|
+
if (!(firstSegment && supported.includes(firstSegment))) {
|
|
1063
|
+
to = strategy.toPath(href, routeLocale());
|
|
1064
|
+
}
|
|
1045
1065
|
}
|
|
1046
1066
|
} else if (to && typeof to === "object" && typeof to.path === "string" && typeof to.locale === "string") {
|
|
1047
1067
|
const href = normalizeLink(to.path) ?? to.path;
|
|
@@ -1191,51 +1211,53 @@ function installBloxRuntime(options) {
|
|
|
1191
1211
|
return blox;
|
|
1192
1212
|
}
|
|
1193
1213
|
export {
|
|
1194
|
-
_sfc_main as A,
|
|
1214
|
+
_sfc_main$1 as A,
|
|
1195
1215
|
BLOX_SSR_ROUTE_STATE_KEY as B,
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1216
|
+
_sfc_main as C,
|
|
1217
|
+
applyLayoutChrome as D,
|
|
1218
|
+
classifyLink as E,
|
|
1219
|
+
contentRoutes as F,
|
|
1220
|
+
createBlox as G,
|
|
1221
|
+
defineContent as H,
|
|
1222
|
+
generateContentRoutes as I,
|
|
1223
|
+
getContentRouteByCollection as J,
|
|
1224
|
+
getSsrPageLocale as K,
|
|
1225
|
+
installContentFallback as L,
|
|
1226
|
+
isAbsoluteExternal as M,
|
|
1227
|
+
isSoloContentPage as N,
|
|
1228
|
+
isSpecialScheme as O,
|
|
1209
1229
|
PageRenderer as P,
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1230
|
+
normalizeTo as Q,
|
|
1231
|
+
provideContentItem as R,
|
|
1232
|
+
toInternalPath as S,
|
|
1233
|
+
useBloxEdit as T,
|
|
1234
|
+
useContentItem as U,
|
|
1235
|
+
useData as V,
|
|
1214
1236
|
_sfc_main$3 as _,
|
|
1215
1237
|
collectBloxSeo as a,
|
|
1216
1238
|
provideBloxLocale as b,
|
|
1217
1239
|
collectBloxData as c,
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1240
|
+
setActiveLocale as d,
|
|
1241
|
+
BLOX_REGISTRY_KEY as e,
|
|
1242
|
+
BLOX_RUNTIME_KEY as f,
|
|
1243
|
+
BLOX_LOCALE_STRATEGY_KEY as g,
|
|
1244
|
+
useSeo as h,
|
|
1223
1245
|
installBloxRuntime as i,
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1246
|
+
getRegistryData as j,
|
|
1247
|
+
getContentRoute as k,
|
|
1248
|
+
isMissingPageDocument as l,
|
|
1249
|
+
installSmartLinks as m,
|
|
1228
1250
|
normalizeLink as n,
|
|
1229
|
-
|
|
1251
|
+
BLOX_CMS_ROUTE_NAME as o,
|
|
1230
1252
|
provideBloxData as p,
|
|
1231
|
-
|
|
1253
|
+
BLOX_PREVIEW_ROUTE_NAME as q,
|
|
1232
1254
|
resolveBlockProps as r,
|
|
1233
|
-
|
|
1234
|
-
|
|
1255
|
+
setSsrPageLocale as s,
|
|
1256
|
+
BLOX_ADMIN_CONFIG_KEY as t,
|
|
1235
1257
|
useLocale as u,
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
_sfc_main$
|
|
1258
|
+
BLOX_CONFIG_KEY as v,
|
|
1259
|
+
BLOX_DATA_KEY as w,
|
|
1260
|
+
BLOX_LAYOUT_KEY as x,
|
|
1261
|
+
BloxInstance as y,
|
|
1262
|
+
_sfc_main$2 as z
|
|
1241
1263
|
};
|
|
@@ -129,8 +129,16 @@ function localeState() {
|
|
|
129
129
|
}
|
|
130
130
|
return { locale, currentAlternates, currentLocaleFallbacks };
|
|
131
131
|
}
|
|
132
|
+
let _ssrPageLocale = null;
|
|
133
|
+
function setSsrPageLocale(locale2) {
|
|
134
|
+
_ssrPageLocale = locale2 ? String(locale2).slice(0, 2).toLowerCase() : null;
|
|
135
|
+
}
|
|
136
|
+
function getSsrPageLocale() {
|
|
137
|
+
return _ssrPageLocale;
|
|
138
|
+
}
|
|
132
139
|
function setActiveLocale(l, state = localeState()) {
|
|
133
140
|
state.locale.value = l;
|
|
141
|
+
locale.value = l;
|
|
134
142
|
try {
|
|
135
143
|
const i18n = vue$1.getI18n();
|
|
136
144
|
if (i18n == null ? void 0 : i18n.global) i18n.global.locale.value = l;
|
|
@@ -802,7 +810,7 @@ class BloxInstance {
|
|
|
802
810
|
router.addRoute({
|
|
803
811
|
path: "/_blox_preview",
|
|
804
812
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
805
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
813
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-DJ-zFK64.cjs")),
|
|
806
814
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
807
815
|
});
|
|
808
816
|
}
|
|
@@ -1037,12 +1045,24 @@ function installLocaleAwareResolve(router, strategy, activeLocaleRef) {
|
|
|
1037
1045
|
const supported = strategy.locales;
|
|
1038
1046
|
const defaultLocale = strategy.defaultLocale;
|
|
1039
1047
|
const activeLocale = () => String(locale2.value || "").slice(0, 2).toLowerCase() || defaultLocale;
|
|
1048
|
+
const routeLocale = () => {
|
|
1049
|
+
var _a, _b, _c;
|
|
1050
|
+
const ssr = getSsrPageLocale();
|
|
1051
|
+
if (ssr) return ssr;
|
|
1052
|
+
const path = String(((_b = (_a = router.currentRoute) == null ? void 0 : _a.value) == null ? void 0 : _b.path) || "");
|
|
1053
|
+
const first = (_c = path.replace(/^\/+/, "").split("/")[0]) == null ? void 0 : _c.toLowerCase();
|
|
1054
|
+
return first && supported.includes(first) ? first : activeLocale();
|
|
1055
|
+
};
|
|
1040
1056
|
const originalResolve = router.resolve.bind(router);
|
|
1041
1057
|
router.resolve = (to, currentLocation) => {
|
|
1058
|
+
var _a;
|
|
1042
1059
|
if (typeof to === "string") {
|
|
1043
1060
|
const href = normalizeLink(to) ?? to;
|
|
1044
1061
|
if (classifyLink(href) === "internal") {
|
|
1045
|
-
|
|
1062
|
+
const firstSegment = (_a = href.replace(/^\/+/, "").split("/")[0]) == null ? void 0 : _a.toLowerCase();
|
|
1063
|
+
if (!(firstSegment && supported.includes(firstSegment))) {
|
|
1064
|
+
to = strategy.toPath(href, routeLocale());
|
|
1065
|
+
}
|
|
1046
1066
|
}
|
|
1047
1067
|
} else if (to && typeof to === "object" && typeof to.path === "string" && typeof to.locale === "string") {
|
|
1048
1068
|
const href = normalizeLink(to.path) ?? to.path;
|
|
@@ -1218,6 +1238,7 @@ exports.generateContentRoutes = generateContentRoutes;
|
|
|
1218
1238
|
exports.getContentRoute = getContentRoute;
|
|
1219
1239
|
exports.getContentRouteByCollection = getContentRouteByCollection;
|
|
1220
1240
|
exports.getRegistryData = getRegistryData;
|
|
1241
|
+
exports.getSsrPageLocale = getSsrPageLocale;
|
|
1221
1242
|
exports.installBloxRuntime = installBloxRuntime;
|
|
1222
1243
|
exports.installContentFallback = installContentFallback;
|
|
1223
1244
|
exports.installSmartLinks = installSmartLinks;
|
|
@@ -1232,6 +1253,7 @@ exports.provideBloxLocale = provideBloxLocale;
|
|
|
1232
1253
|
exports.provideContentItem = provideContentItem;
|
|
1233
1254
|
exports.resolveBlockProps = resolveBlockProps;
|
|
1234
1255
|
exports.setActiveLocale = setActiveLocale;
|
|
1256
|
+
exports.setSsrPageLocale = setSsrPageLocale;
|
|
1235
1257
|
exports.toInternalPath = toInternalPath;
|
|
1236
1258
|
exports.useBloxEdit = useBloxEdit;
|
|
1237
1259
|
exports.useContentItem = useContentItem;
|
|
@@ -7,6 +7,8 @@ export interface BloxLocaleState {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const BLOX_LOCALE_KEY: InjectionKey<BloxLocaleState>;
|
|
9
9
|
export declare function provideBloxLocale(app: App, initialLocale: Locale): BloxLocaleState;
|
|
10
|
+
export declare function setSsrPageLocale(locale: string | null): void;
|
|
11
|
+
export declare function getSsrPageLocale(): string | null;
|
|
10
12
|
/**
|
|
11
13
|
* Set the active locale ref directly, without touching `localStorage`/`document`.
|
|
12
14
|
* Used by the SSG entry to align `useLocale()` with the URL-detected render
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../src/composables/useLocale.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AA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,MAAM,EAAE,KAAK,GAAE,eAA+B,GAAG,IAAI,CAcvF;AAED,wBAAgB,SAAS;;;mBAIF,MAAM;;gCAgBO,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;oCAIlB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;EAa/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/content/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAQ3C;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACpC,gBAAgB,EAAE,MAAM,EAAE,EAC1B,aAAa,EAAE,MAAM,GACnB,cAAc,EAAE,CA4BlB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,cAAc,EACxB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAC3B,IAAI,
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/content/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAQ3C;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACpC,gBAAgB,EAAE,MAAM,EAAE,EAC1B,aAAa,EAAE,MAAM,GACnB,cAAc,EAAE,CA4BlB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,cAAc,EACxB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAC3B,IAAI,CA4DN;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EAAE,EAC1B,aAAa,EAAE,MAAM,EACrB,GAAG,CAAC,EAAE,aAAa,GACjB,IAAI,CAmFN"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("./index-DUjEj7ts.cjs");
|
|
4
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
5
|
-
const appRuntime = require("./appRuntime-
|
|
4
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-BF52PPjt.cjs");
|
|
5
|
+
const appRuntime = require("./appRuntime-DQRKuyja.cjs");
|
|
6
6
|
const vue = require("vue");
|
|
7
7
|
const ssg_client = require("./client-AoDTJJXJ.cjs");
|
|
8
8
|
const vueRouter = require("vue-router");
|
|
@@ -535,6 +535,7 @@ exports.defineContent = appRuntime.defineContent;
|
|
|
535
535
|
exports.generateContentRoutes = appRuntime.generateContentRoutes;
|
|
536
536
|
exports.getContentRoute = appRuntime.getContentRoute;
|
|
537
537
|
exports.getContentRouteByCollection = appRuntime.getContentRouteByCollection;
|
|
538
|
+
exports.getSsrPageLocale = appRuntime.getSsrPageLocale;
|
|
538
539
|
exports.installContentFallback = appRuntime.installContentFallback;
|
|
539
540
|
exports.installSmartLinks = appRuntime.installSmartLinks;
|
|
540
541
|
exports.isAbsoluteExternal = appRuntime.isAbsoluteExternal;
|
|
@@ -545,6 +546,7 @@ exports.normalizeTo = appRuntime.normalizeTo;
|
|
|
545
546
|
exports.provideBloxData = appRuntime.provideBloxData;
|
|
546
547
|
exports.provideContentItem = appRuntime.provideContentItem;
|
|
547
548
|
exports.resolveBlockProps = appRuntime.resolveBlockProps;
|
|
549
|
+
exports.setSsrPageLocale = appRuntime.setSsrPageLocale;
|
|
548
550
|
exports.toInternalPath = appRuntime.toInternalPath;
|
|
549
551
|
exports.useBloxEdit = appRuntime.useBloxEdit;
|
|
550
552
|
exports.useContentItem = appRuntime.useContentItem;
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export type { BloxSiteConfig } from './siteConfig';
|
|
|
32
32
|
export { defineBlock } from './defineBlock';
|
|
33
33
|
export type { BlockMeta, BlockModule, BlockDataSource, BlockDataSourceConfig } from './defineBlock';
|
|
34
34
|
export type { LocaleStrategy, PageSlugMap } from './localeStrategy';
|
|
35
|
+
export { getSsrPageLocale, setSsrPageLocale } from './composables/useLocale';
|
|
35
36
|
export { getPageSlugMap, localizePageSlug, setPageSlugMap } from './localeStrategy';
|
|
36
37
|
export { withLocaleRoutes } from './localeRoutes';
|
|
37
38
|
export { defineContent, contentRoutes, getContentRoute, getContentRouteByCollection, generateContentRoutes, installContentFallback, provideContentItem, useContentItem, useContentSeo, getItemBySlug, getItemById, ContentHost, ContentDetailView, } from './content';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACzL,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,YAAY,EAAE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,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAEhG,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAK1E,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACjE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAKlE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAI5E,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,eAAe,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC/H,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAClG,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useBloxApi, getItemBySlug, getItemById, provideBloxApi } from "./index-I81QTzv-.js";
|
|
2
2
|
import { configureApi, createBloxApi, getCollectionResolver, getWebsiteId, getWebsiteIdSync, listItems, resolvePath, setApiOrigin, setCollectionResolver } from "./index-I81QTzv-.js";
|
|
3
|
-
import { _, P, s, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
4
|
-
import {
|
|
5
|
-
import { _ as _2,
|
|
3
|
+
import { _, P, s, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-zkP_L9cF.js";
|
|
4
|
+
import { g as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, f as BLOX_RUNTIME_KEY, h as useSeo, j as getRegistryData, k as getContentRoute, p as provideBloxData, b as provideBloxLocale, i as installBloxRuntime, d as setActiveLocale, l as isMissingPageDocument, m as installSmartLinks, o as BLOX_CMS_ROUTE_NAME, q as BLOX_PREVIEW_ROUTE_NAME } from "./appRuntime-Cmns1A7C.js";
|
|
5
|
+
import { _ as _2, t, v, w, x, y, z, A, C, P as P2, D, E, c, a as a2, F, G, H, I, J, K, L, M, N, O, Q, R, r, s as s2, S, T, U, V } from "./appRuntime-Cmns1A7C.js";
|
|
6
6
|
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, Transition, resolveDynamicComponent, inject, ref, watch, onMounted, onUnmounted, computed, onServerPrefetch, toValue, h, Suspense, createSSRApp, createApp } from "vue";
|
|
7
7
|
import { r as readBloxHydration } from "./client-Ce9fRCGH.js";
|
|
8
8
|
import { useRouter, useRoute } from "vue-router";
|
|
@@ -500,58 +500,59 @@ function buildBloxManifest(blox) {
|
|
|
500
500
|
}
|
|
501
501
|
export {
|
|
502
502
|
_2 as AdminEditBar,
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
503
|
+
t as BLOX_ADMIN_CONFIG_KEY,
|
|
504
|
+
v as BLOX_CONFIG_KEY,
|
|
505
|
+
w as BLOX_DATA_KEY,
|
|
506
|
+
x as BLOX_LAYOUT_KEY,
|
|
507
507
|
BLOX_LOCALE_STRATEGY_KEY,
|
|
508
508
|
BLOX_RUNTIME_KEY,
|
|
509
|
-
|
|
509
|
+
y as BloxInstance,
|
|
510
510
|
_sfc_main as BloxRouterView,
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
511
|
+
z as CmsPageView,
|
|
512
|
+
A as ContentDetailView,
|
|
513
|
+
C as ContentHost,
|
|
514
514
|
P2 as PageRenderer,
|
|
515
515
|
_ as PreviewApp,
|
|
516
516
|
P as PreviewRenderer,
|
|
517
|
-
|
|
517
|
+
D as applyLayoutChrome,
|
|
518
518
|
buildBloxManifest,
|
|
519
|
-
|
|
519
|
+
E as classifyLink,
|
|
520
520
|
c as collectBloxData,
|
|
521
521
|
a2 as collectBloxSeo,
|
|
522
522
|
configureApi,
|
|
523
|
-
|
|
524
|
-
|
|
523
|
+
F as contentRoutes,
|
|
524
|
+
G as createBlox,
|
|
525
525
|
createBloxApi,
|
|
526
526
|
createBloxApp,
|
|
527
527
|
defineBlock,
|
|
528
528
|
defineBloxSite,
|
|
529
|
-
|
|
530
|
-
|
|
529
|
+
H as defineContent,
|
|
530
|
+
I as generateContentRoutes,
|
|
531
531
|
getCollectionResolver,
|
|
532
532
|
getContentRoute,
|
|
533
|
-
|
|
533
|
+
J as getContentRouteByCollection,
|
|
534
534
|
getItemById,
|
|
535
535
|
getItemBySlug,
|
|
536
536
|
g as getPageSlugMap,
|
|
537
|
+
K as getSsrPageLocale,
|
|
537
538
|
getWebsiteId,
|
|
538
539
|
getWebsiteIdSync,
|
|
539
540
|
injectGtm,
|
|
540
541
|
injectPlausible,
|
|
541
|
-
|
|
542
|
+
L as installContentFallback,
|
|
542
543
|
installDocumentNavigation,
|
|
543
544
|
installGtm,
|
|
544
545
|
installSmartLinks,
|
|
545
|
-
|
|
546
|
+
M as isAbsoluteExternal,
|
|
546
547
|
isGtmInstalled,
|
|
547
|
-
|
|
548
|
-
|
|
548
|
+
N as isSoloContentPage,
|
|
549
|
+
O as isSpecialScheme,
|
|
549
550
|
listItems,
|
|
550
551
|
l as localizePageSlug,
|
|
551
552
|
normalizeLink,
|
|
552
|
-
|
|
553
|
+
Q as normalizeTo,
|
|
553
554
|
provideBloxData,
|
|
554
|
-
|
|
555
|
+
R as provideContentItem,
|
|
555
556
|
readBloxHydration,
|
|
556
557
|
r as resolveBlockProps,
|
|
557
558
|
resolvePath,
|
|
@@ -561,13 +562,14 @@ export {
|
|
|
561
562
|
setApiOrigin,
|
|
562
563
|
setCollectionResolver,
|
|
563
564
|
setPageSlugMap,
|
|
564
|
-
|
|
565
|
+
s2 as setSsrPageLocale,
|
|
566
|
+
S as toInternalPath,
|
|
565
567
|
useBloxApi,
|
|
566
|
-
|
|
568
|
+
T as useBloxEdit,
|
|
567
569
|
useBloxRuntime,
|
|
568
|
-
|
|
570
|
+
U as useContentItem,
|
|
569
571
|
useContentSeo,
|
|
570
|
-
|
|
572
|
+
V as useData,
|
|
571
573
|
useGlobalBlock,
|
|
572
574
|
useLocale,
|
|
573
575
|
useLocaleNav,
|
|
@@ -26,7 +26,7 @@ const node_child_process = require("node:child_process");
|
|
|
26
26
|
const os = require("node:os");
|
|
27
27
|
const path = require("node:path");
|
|
28
28
|
const process = require("node:process");
|
|
29
|
-
const llmArtifacts = require("./validate-output-
|
|
29
|
+
const llmArtifacts = require("./validate-output-Dtdsu9EM.cjs");
|
|
30
30
|
const AUTO_SHARD_CAP = Number(process.env.BLOX_SSG_SHARD_CAP) || 6;
|
|
31
31
|
const PREFETCH_BUDGET = Number(process.env.BLOX_SSG_PREFETCH_BUDGET) || 24;
|
|
32
32
|
const SEQUENTIAL_SHARDS = process.env.BLOX_SSG_SEQUENTIAL === "1";
|
|
@@ -169,7 +169,7 @@ async function runSharded(opts) {
|
|
|
169
169
|
}
|
|
170
170
|
if (process.env.BLOX_SSG_LLM !== "0" && !((_a = website == null ? void 0 : website.seo) == null ? void 0 : _a.noindex)) {
|
|
171
171
|
try {
|
|
172
|
-
const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-
|
|
172
|
+
const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-Dtdsu9EM.cjs")).then((n) => n.llmArtifacts);
|
|
173
173
|
const mergeWebsite = website;
|
|
174
174
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
175
175
|
const { pages } = await mergeLlmParts({
|
|
@@ -2,7 +2,7 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import process from "node:process";
|
|
5
|
-
import { f as fetchCmsSiteData, g as generateSitemapArtifacts, d as validateNoRedirectingLinks } from "./validate-output-
|
|
5
|
+
import { f as fetchCmsSiteData, g as generateSitemapArtifacts, d as validateNoRedirectingLinks } from "./validate-output-C2ObdhO5.js";
|
|
6
6
|
const AUTO_SHARD_CAP = Number(process.env.BLOX_SSG_SHARD_CAP) || 6;
|
|
7
7
|
const PREFETCH_BUDGET = Number(process.env.BLOX_SSG_PREFETCH_BUDGET) || 24;
|
|
8
8
|
const SEQUENTIAL_SHARDS = process.env.BLOX_SSG_SEQUENTIAL === "1";
|
|
@@ -145,7 +145,7 @@ async function runSharded(opts) {
|
|
|
145
145
|
}
|
|
146
146
|
if (process.env.BLOX_SSG_LLM !== "0" && !((_a = website == null ? void 0 : website.seo) == null ? void 0 : _a.noindex)) {
|
|
147
147
|
try {
|
|
148
|
-
const { mergeLlmParts } = await import("./validate-output-
|
|
148
|
+
const { mergeLlmParts } = await import("./validate-output-C2ObdhO5.js").then((n) => n.D);
|
|
149
149
|
const mergeWebsite = website;
|
|
150
150
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
151
151
|
const { pages } = await mergeLlmParts({
|
package/dist/ssg/cli.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const process = require("node:process");
|
|
4
4
|
const fs = require("node:fs/promises");
|
|
5
5
|
const ssg_buildGrant = require("./build-grant.cjs");
|
|
6
|
-
const llmArtifacts = require("../validate-output-
|
|
6
|
+
const llmArtifacts = require("../validate-output-Dtdsu9EM.cjs");
|
|
7
7
|
const localeStrategy = require("../localeStrategy-OwRIn35C.cjs");
|
|
8
8
|
function installFetchTimeout() {
|
|
9
9
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
@@ -148,7 +148,7 @@ Environment:
|
|
|
148
148
|
if (shardsOpt !== null || routesCmd) {
|
|
149
149
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
150
150
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
151
|
-
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-
|
|
151
|
+
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-2Aga3U5Y.cjs"));
|
|
152
152
|
const code = await runSharded({
|
|
153
153
|
shards: shardsOpt ?? "auto",
|
|
154
154
|
mode,
|
package/dist/ssg/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import { resolveBloxBuildGrant } from "./build-grant.mjs";
|
|
5
|
-
import { v as validateSsgOutput, u as uploadBloxManifest, p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, b as buildCollectionResolver, a as prerender, c as validateInternalLinks, d as validateNoRedirectingLinks } from "../validate-output-
|
|
5
|
+
import { v as validateSsgOutput, u as uploadBloxManifest, p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, b as buildCollectionResolver, a as prerender, c as validateInternalLinks, d as validateNoRedirectingLinks } from "../validate-output-C2ObdhO5.js";
|
|
6
6
|
import { s as setPageSlugMap } from "../localeStrategy-hXlNof1E.js";
|
|
7
7
|
function installFetchTimeout() {
|
|
8
8
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
@@ -147,7 +147,7 @@ Environment:
|
|
|
147
147
|
if (shardsOpt !== null || routesCmd) {
|
|
148
148
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
149
149
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
150
|
-
const { runSharded } = await import("../shard-runner-
|
|
150
|
+
const { runSharded } = await import("../shard-runner-x08zpfHx.js");
|
|
151
151
|
const code = await runSharded({
|
|
152
152
|
shards: shardsOpt ?? "auto",
|
|
153
153
|
mode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSSREntry.d.ts","sourceRoot":"","sources":["../../src/ssg/createSSREntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"createSSREntry.d.ts","sourceRoot":"","sources":["../../src/ssg/createSSREntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAM9D,OAAO,EAAyC,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAMrF,MAAM,WAAW,yBAAyB;IACzC,oCAAoC;IACpC,aAAa,EAAE,SAAS,CAAA;IACxB;;;;OAIG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IAC9D;;;OAGG;IACH,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACpD,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,oGAAoG;IAC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IAAI,CAAC,CAoFR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,YAAY,CAsNnF"}
|
package/dist/ssg/index.cjs
CHANGED
|
@@ -22,11 +22,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
25
|
-
const llmArtifacts = require("../validate-output-
|
|
25
|
+
const llmArtifacts = require("../validate-output-Dtdsu9EM.cjs");
|
|
26
26
|
const ssg_buildGrant = require("./build-grant.cjs");
|
|
27
27
|
const ssg_client = require("../client-AoDTJJXJ.cjs");
|
|
28
28
|
const vue = require("vue");
|
|
29
|
-
const appRuntime = require("../appRuntime-
|
|
29
|
+
const appRuntime = require("../appRuntime-DQRKuyja.cjs");
|
|
30
|
+
const localeStrategy = require("../localeStrategy-OwRIn35C.cjs");
|
|
30
31
|
const index = require("../index-DUjEj7ts.cjs");
|
|
31
32
|
async function renderBloxSsgPage(options) {
|
|
32
33
|
var _a, _b, _c, _d;
|
|
@@ -298,6 +299,7 @@ function createBloxSSREntry(options) {
|
|
|
298
299
|
}
|
|
299
300
|
function buildApp(url, resolvedData, stateKey) {
|
|
300
301
|
const pageLocale = detectLocale(url).locale;
|
|
302
|
+
appRuntime.setSsrPageLocale(pageLocale);
|
|
301
303
|
const router = createRouter("memory", url);
|
|
302
304
|
const app = vue.createSSRApp({
|
|
303
305
|
name: "BloxSsgRoot",
|
|
@@ -336,6 +338,7 @@ function createBloxSSREntry(options) {
|
|
|
336
338
|
async function render(url, ctx) {
|
|
337
339
|
var _a2;
|
|
338
340
|
const { locale: pageLocale, slug } = detectLocale(url);
|
|
341
|
+
if (ctx.pageSlugMap) localeStrategy.setPageSlugMap(ctx.pageSlugMap);
|
|
339
342
|
let resolvedData = null;
|
|
340
343
|
if ((_a2 = ctx.resolveCache) == null ? void 0 : _a2.has(url)) {
|
|
341
344
|
resolvedData = ctx.resolveCache.get(url) ?? null;
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { e as buildPageHead, h as primaryContextEntry, i as buildJsonLd, j as extractPageText, B as BloxBuildResponseError, k as bloxBuildJson } from "../validate-output-
|
|
2
|
-
import { l, m, f, n, o, q, r, g, s, t, w, x, y, z, p, a, A, C, u, c, v } from "../validate-output-
|
|
1
|
+
import { e as buildPageHead, h as primaryContextEntry, i as buildJsonLd, j as extractPageText, B as BloxBuildResponseError, k as bloxBuildJson } from "../validate-output-C2ObdhO5.js";
|
|
2
|
+
import { l, m, f, n, o, q, r, g, s, t, w, x, y, z, p, a, A, C, u, c, v } from "../validate-output-C2ObdhO5.js";
|
|
3
3
|
import { parseBloxBuildGrantBody, resolveBloxBuildGrant } from "./build-grant.mjs";
|
|
4
4
|
import { a as BLOX_HYDRATION_WINDOW_KEY } from "../client-Ce9fRCGH.js";
|
|
5
5
|
import { createSSRApp, h, Suspense } from "vue";
|
|
6
|
-
import { c as collectBloxData, a as collectBloxSeo, p as provideBloxData, b as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime,
|
|
6
|
+
import { c as collectBloxData, a as collectBloxSeo, s as setSsrPageLocale, p as provideBloxData, b as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, d as setActiveLocale } from "../appRuntime-Cmns1A7C.js";
|
|
7
|
+
import { s as setPageSlugMap } from "../localeStrategy-hXlNof1E.js";
|
|
7
8
|
import { provideBloxApi, getCollectionResolver } from "../index-I81QTzv-.js";
|
|
8
9
|
async function renderBloxSsgPage(options) {
|
|
9
10
|
var _a, _b, _c, _d;
|
|
@@ -275,6 +276,7 @@ function createBloxSSREntry(options) {
|
|
|
275
276
|
}
|
|
276
277
|
function buildApp(url, resolvedData, stateKey) {
|
|
277
278
|
const pageLocale = detectLocale(url).locale;
|
|
279
|
+
setSsrPageLocale(pageLocale);
|
|
278
280
|
const router = createRouter("memory", url);
|
|
279
281
|
const app = createSSRApp({
|
|
280
282
|
name: "BloxSsgRoot",
|
|
@@ -313,6 +315,7 @@ function createBloxSSREntry(options) {
|
|
|
313
315
|
async function render(url, ctx) {
|
|
314
316
|
var _a2;
|
|
315
317
|
const { locale: pageLocale, slug } = detectLocale(url);
|
|
318
|
+
if (ctx.pageSlugMap) setPageSlugMap(ctx.pageSlugMap);
|
|
316
319
|
let resolvedData = null;
|
|
317
320
|
if ((_a2 = ctx.resolveCache) == null ? void 0 : _a2.has(url)) {
|
|
318
321
|
resolvedData = ctx.resolveCache.get(url) ?? null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-output.d.ts","sourceRoot":"","sources":["../../src/ssg/validate-output.ts"],"names":[],"mappings":"AAWA;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBzE;AAED,MAAM,WAAW,wBAAwB;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"validate-output.d.ts","sourceRoot":"","sources":["../../src/ssg/validate-output.ts"],"names":[],"mappings":"AAWA;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBzE;AAED,MAAM,WAAW,wBAAwB;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B9E;AAqED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2ExF"}
|
|
@@ -1547,6 +1547,10 @@ ${failures.map((item) => ` - ${item}`).join("\n")}`);
|
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
1549
|
async function validateNoRedirectingLinks(outDir) {
|
|
1550
|
+
if (process.env.BLOX_SSG_ASSERT_LINKS === "0") {
|
|
1551
|
+
console.warn("[blox-ssg] BLOX_SSG_ASSERT_LINKS=0 — skipping redirect-link validation");
|
|
1552
|
+
return;
|
|
1553
|
+
}
|
|
1550
1554
|
const root = path.resolve(outDir);
|
|
1551
1555
|
const redirectSources = await readRedirectSources(root, "301", "302", "307", "308");
|
|
1552
1556
|
if (!redirectSources.size) return;
|
|
@@ -1570,6 +1570,10 @@ ${failures.map((item) => ` - ${item}`).join("\n")}`);
|
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
1572
|
async function validateNoRedirectingLinks(outDir) {
|
|
1573
|
+
if (process.env.BLOX_SSG_ASSERT_LINKS === "0") {
|
|
1574
|
+
console.warn("[blox-ssg] BLOX_SSG_ASSERT_LINKS=0 — skipping redirect-link validation");
|
|
1575
|
+
return;
|
|
1576
|
+
}
|
|
1573
1577
|
const root = path.resolve(outDir);
|
|
1574
1578
|
const redirectSources = await readRedirectSources(root, "301", "302", "307", "308");
|
|
1575
1579
|
if (!redirectSources.size) return;
|
package/package.json
CHANGED