@bagelink/blox 1.15.651 → 1.15.655
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/CmsPageView.vue.d.ts.map +1 -1
- package/dist/{PreviewApp-7BXiNjwg.cjs → PreviewApp-CACfRxeF.cjs} +1 -1
- package/dist/{PreviewApp-hLsU5HKs.js → PreviewApp-D2UH5Z5c.js} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-BzGw32LW.js → PreviewApp.vue_vue_type_style_index_0_lang-C4QRUJtN.js} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-CRaNO3wo.cjs → PreviewApp.vue_vue_type_style_index_0_lang-DW84Blfc.cjs} +1 -1
- package/dist/{appRuntime-Cay272e9.cjs → appRuntime-CZtNzHTb.cjs} +7 -6
- package/dist/{appRuntime-BKUaccqq.js → appRuntime-lCWtPnUw.js} +8 -7
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +3 -3
- package/dist/{shard-runner-CTCqpTrW.cjs → shard-runner-C4JE4ywf.cjs} +2 -2
- package/dist/{shard-runner-PsawGL3I.js → shard-runner-CtJLkov_.js} +2 -2
- package/dist/ssg/cli.cjs +2 -2
- package/dist/ssg/cli.mjs +2 -2
- package/dist/ssg/index.cjs +2 -2
- package/dist/ssg/index.mjs +3 -3
- package/dist/ssg/prerender.d.ts.map +1 -1
- package/dist/ssg/validate-output.d.ts.map +1 -1
- package/dist/{validate-output-DUqTdLHI.cjs → validate-output-BdzD7fIN.cjs} +35 -6
- package/dist/{validate-output-DcEQIZns.js → validate-output-CgacFje9.js} +35 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsPageView.vue.d.ts","sourceRoot":"","sources":["../src/CmsPageView.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CmsPageView.vue.d.ts","sourceRoot":"","sources":["../src/CmsPageView.vue"],"names":[],"mappings":";AA+iBA,wBAMG"}
|
|
@@ -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-DW84Blfc.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 { d as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, e as BLOX_RUNTIME_KEY } from "./appRuntime-
|
|
2
|
+
import { d as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, e as BLOX_RUNTIME_KEY } from "./appRuntime-lCWtPnUw.js";
|
|
3
3
|
function sendToEditor(msg) {
|
|
4
4
|
window.parent.postMessage(cloneForPostMessage(msg), "*");
|
|
5
5
|
}
|
|
@@ -290,7 +290,6 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
290
290
|
setup(__props) {
|
|
291
291
|
var _a;
|
|
292
292
|
const route = vueRouter.useRoute();
|
|
293
|
-
const router = vueRouter.useRouter();
|
|
294
293
|
const { locale: locale2, setLocale, setAlternates } = useLocale();
|
|
295
294
|
const strategy = vue.inject(BLOX_LOCALE_STRATEGY_KEY, null);
|
|
296
295
|
const config = vue.inject(BLOX_CONFIG_KEY, null);
|
|
@@ -365,8 +364,11 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
365
364
|
return;
|
|
366
365
|
}
|
|
367
366
|
if ((config == null ? void 0 : config.navigation) === "document" && hasPrerenderedRouteState && typeof window !== "undefined") {
|
|
368
|
-
|
|
369
|
-
|
|
367
|
+
const target = currentRouteTarget(slug);
|
|
368
|
+
if (target !== `${window.location.pathname}${window.location.search}${window.location.hash}`) {
|
|
369
|
+
window.location.assign(target);
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
370
372
|
}
|
|
371
373
|
navigating.value = true;
|
|
372
374
|
try {
|
|
@@ -379,8 +381,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
379
381
|
} catch (e) {
|
|
380
382
|
const msg = e instanceof Error ? e.message : String(e);
|
|
381
383
|
if (msg.includes("404")) {
|
|
382
|
-
|
|
383
|
-
router.replace(home);
|
|
384
|
+
notFound.value = true;
|
|
384
385
|
} else {
|
|
385
386
|
error.value = msg;
|
|
386
387
|
}
|
|
@@ -870,7 +871,7 @@ class BloxInstance {
|
|
|
870
871
|
router.addRoute({
|
|
871
872
|
path: "/_blox_preview",
|
|
872
873
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
873
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
874
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-CACfRxeF.cjs")),
|
|
874
875
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
875
876
|
});
|
|
876
877
|
}
|
|
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
import { createPinia } from "pinia";
|
|
5
5
|
import { inject, computed, ref, defineComponent, onMounted, unref, openBlock, createElementBlock, createElementVNode, createCommentVNode, getCurrentInstance, h, provide, watch, resolveComponent, toDisplayString, createVNode, withCtx, createTextVNode, Fragment, createBlock, shallowRef, onServerPrefetch, toValue, markRaw, resolveDynamicComponent } from "vue";
|
|
6
6
|
import { useBloxApi, getWebsiteIdSync, getWebsiteId, resolvePath, configureApi, listItemsFromActiveApi, getItemBySlug, getItemById } from "./index-I81QTzv-.js";
|
|
7
|
-
import { useRoute
|
|
7
|
+
import { useRoute } from "vue-router";
|
|
8
8
|
import { getI18n } from "@bagelink/vue";
|
|
9
9
|
import { r as resolvePageTitle, s as siteNameFromContexts, a as preserveCurrentSiteSuffix } from "./pageTitle-B1mtDJKn.js";
|
|
10
10
|
import { r as readBloxHydration } from "./client-Ce9fRCGH.js";
|
|
@@ -289,7 +289,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
289
289
|
setup(__props) {
|
|
290
290
|
var _a;
|
|
291
291
|
const route = useRoute();
|
|
292
|
-
const router = useRouter();
|
|
293
292
|
const { locale: locale2, setLocale, setAlternates } = useLocale();
|
|
294
293
|
const strategy = inject(BLOX_LOCALE_STRATEGY_KEY, null);
|
|
295
294
|
const config = inject(BLOX_CONFIG_KEY, null);
|
|
@@ -364,8 +363,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
364
363
|
return;
|
|
365
364
|
}
|
|
366
365
|
if ((config == null ? void 0 : config.navigation) === "document" && hasPrerenderedRouteState && typeof window !== "undefined") {
|
|
367
|
-
|
|
368
|
-
|
|
366
|
+
const target = currentRouteTarget(slug);
|
|
367
|
+
if (target !== `${window.location.pathname}${window.location.search}${window.location.hash}`) {
|
|
368
|
+
window.location.assign(target);
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
369
371
|
}
|
|
370
372
|
navigating.value = true;
|
|
371
373
|
try {
|
|
@@ -378,8 +380,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
378
380
|
} catch (e) {
|
|
379
381
|
const msg = e instanceof Error ? e.message : String(e);
|
|
380
382
|
if (msg.includes("404")) {
|
|
381
|
-
|
|
382
|
-
router.replace(home);
|
|
383
|
+
notFound.value = true;
|
|
383
384
|
} else {
|
|
384
385
|
error.value = msg;
|
|
385
386
|
}
|
|
@@ -869,7 +870,7 @@ class BloxInstance {
|
|
|
869
870
|
router.addRoute({
|
|
870
871
|
path: "/_blox_preview",
|
|
871
872
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
872
|
-
component: () => import("./PreviewApp-
|
|
873
|
+
component: () => import("./PreviewApp-D2UH5Z5c.js"),
|
|
873
874
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
874
875
|
});
|
|
875
876
|
}
|
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-DW84Blfc.cjs");
|
|
5
|
+
const appRuntime = require("./appRuntime-CZtNzHTb.cjs");
|
|
6
6
|
const vue = require("vue");
|
|
7
7
|
const ssg_client = require("./client-AoDTJJXJ.cjs");
|
|
8
8
|
const vueRouter = require("vue-router");
|
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 { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, e as BLOX_RUNTIME_KEY, g as useSeo, h as getRegistryData, j as getContentRoute, p as provideBloxData, b as provideBloxLocale, i as installBloxRuntime, s as setActiveLocale, k as installSmartLinks, l as consumePendingLocaleSwitch } from "./appRuntime-
|
|
5
|
-
import { _ as _2, m, o, q, t, v, w, x, y, P as P2, z, A, c, a as a2, C, D, E, F, G, H, I, J, K, L, M, r, N, O, Q, R } from "./appRuntime-
|
|
3
|
+
import { _, P, s, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-C4QRUJtN.js";
|
|
4
|
+
import { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, e as BLOX_RUNTIME_KEY, g as useSeo, h as getRegistryData, j as getContentRoute, p as provideBloxData, b as provideBloxLocale, i as installBloxRuntime, s as setActiveLocale, k as installSmartLinks, l as consumePendingLocaleSwitch } from "./appRuntime-lCWtPnUw.js";
|
|
5
|
+
import { _ as _2, m, o, q, t, v, w, x, y, P as P2, z, A, c, a as a2, C, D, E, F, G, H, I, J, K, L, M, r, N, O, Q, R } from "./appRuntime-lCWtPnUw.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";
|
|
@@ -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-BdzD7fIN.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";
|
|
@@ -166,7 +166,7 @@ async function runSharded(opts) {
|
|
|
166
166
|
}
|
|
167
167
|
if (process.env.BLOX_SSG_LLM !== "0") {
|
|
168
168
|
try {
|
|
169
|
-
const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-
|
|
169
|
+
const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-BdzD7fIN.cjs")).then((n) => n.llmArtifacts);
|
|
170
170
|
const mergeWebsite = website;
|
|
171
171
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
172
172
|
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 } from "./validate-output-
|
|
5
|
+
import { f as fetchCmsSiteData, g as generateSitemapArtifacts } from "./validate-output-CgacFje9.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";
|
|
@@ -142,7 +142,7 @@ async function runSharded(opts) {
|
|
|
142
142
|
}
|
|
143
143
|
if (process.env.BLOX_SSG_LLM !== "0") {
|
|
144
144
|
try {
|
|
145
|
-
const { mergeLlmParts } = await import("./validate-output-
|
|
145
|
+
const { mergeLlmParts } = await import("./validate-output-CgacFje9.js").then((n) => n.C);
|
|
146
146
|
const mergeWebsite = website;
|
|
147
147
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
148
148
|
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-BdzD7fIN.cjs");
|
|
7
7
|
function installFetchTimeout() {
|
|
8
8
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
9
9
|
const original = globalThis.fetch;
|
|
@@ -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 Promise.resolve().then(() => require("../shard-runner-
|
|
150
|
+
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-C4JE4ywf.cjs"));
|
|
151
151
|
const code = await runSharded({
|
|
152
152
|
shards: shardsOpt ?? "auto",
|
|
153
153
|
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 } 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 } from "../validate-output-CgacFje9.js";
|
|
6
6
|
function installFetchTimeout() {
|
|
7
7
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
8
8
|
const original = globalThis.fetch;
|
|
@@ -146,7 +146,7 @@ Environment:
|
|
|
146
146
|
if (shardsOpt !== null || routesCmd) {
|
|
147
147
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
148
148
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
149
|
-
const { runSharded } = await import("../shard-runner-
|
|
149
|
+
const { runSharded } = await import("../shard-runner-CtJLkov_.js");
|
|
150
150
|
const code = await runSharded({
|
|
151
151
|
shards: shardsOpt ?? "auto",
|
|
152
152
|
mode,
|
package/dist/ssg/index.cjs
CHANGED
|
@@ -22,11 +22,11 @@ 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-BdzD7fIN.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-CZtNzHTb.cjs");
|
|
30
30
|
const index = require("../index-DUjEj7ts.cjs");
|
|
31
31
|
async function renderBloxSsgPage(options) {
|
|
32
32
|
var _a, _b, _c, _d;
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as buildPageHead, e as primaryContextEntry, h as buildJsonLd, i as extractPageText, B as BloxBuildResponseError, j as bloxBuildJson } from "../validate-output-
|
|
2
|
-
import { k, l, f, m, n, o, q, g, r, s, t, w, x, y, p, a, z, A, u, c, v } from "../validate-output-
|
|
1
|
+
import { d as buildPageHead, e as primaryContextEntry, h as buildJsonLd, i as extractPageText, B as BloxBuildResponseError, j as bloxBuildJson } from "../validate-output-CgacFje9.js";
|
|
2
|
+
import { k, l, f, m, n, o, q, g, r, s, t, w, x, y, p, a, z, A, u, c, v } from "../validate-output-CgacFje9.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, s as setActiveLocale } from "../appRuntime-
|
|
6
|
+
import { c as collectBloxData, a as collectBloxSeo, p as provideBloxData, b as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, s as setActiveLocale } from "../appRuntime-lCWtPnUw.js";
|
|
7
7
|
import { provideBloxApi, getCollectionResolver } from "../index-I81QTzv-.js";
|
|
8
8
|
async function renderBloxSsgPage(options) {
|
|
9
9
|
var _a, _b, _c, _d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prerender.d.ts","sourceRoot":"","sources":["../../src/ssg/prerender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAiBvE,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAA;AAEhE,MAAM,WAAW,gBAAgB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,YAAY,CAAC,EAAE,WAAW,GAAG,WAAW,EAAE,CAAA;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE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["../../src/ssg/validate-output.ts"],"names":[],"mappings":"AASA;;;;;;;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;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC5B;
|
|
1
|
+
{"version":3,"file":"validate-output.d.ts","sourceRoot":"","sources":["../../src/ssg/validate-output.ts"],"names":[],"mappings":"AASA;;;;;;;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;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC5B;AAqBD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmExF"}
|
|
@@ -924,7 +924,7 @@ async function prerender({
|
|
|
924
924
|
redirects = [],
|
|
925
925
|
llm = {}
|
|
926
926
|
} = {}) {
|
|
927
|
-
var _a, _b, _c;
|
|
927
|
+
var _a, _b, _c, _d, _e, _f;
|
|
928
928
|
const absRoot = path.resolve(root);
|
|
929
929
|
const absClient = path.resolve(absRoot, clientOutDir);
|
|
930
930
|
const absServerEntry = path.resolve(absRoot, serverEntry);
|
|
@@ -1079,7 +1079,7 @@ async function prerender({
|
|
|
1079
1079
|
const canonicalBase = (((_a = website == null ? void 0 : website.seo) == null ? void 0 : _a.canonical_base_url) || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
1080
1080
|
if (writeSharedAssets) {
|
|
1081
1081
|
const sitemapPaths = rendered.filter((p) => !noindexPaths.has(p));
|
|
1082
|
-
if (canonicalBase && sitemapPaths.length > 0) {
|
|
1082
|
+
if (!((_b = website == null ? void 0 : website.seo) == null ? void 0 : _b.noindex) && canonicalBase && sitemapPaths.length > 0) {
|
|
1083
1083
|
const artifacts = generateSitemapArtifacts({
|
|
1084
1084
|
routes: sitemapPaths.map((routePath) => ({
|
|
1085
1085
|
path: routePath,
|
|
@@ -1088,7 +1088,7 @@ async function prerender({
|
|
|
1088
1088
|
canonicalBase,
|
|
1089
1089
|
defaultLocale: (website == null ? void 0 : website.default_locale) ?? "en",
|
|
1090
1090
|
supportedLocales: (website == null ? void 0 : website.supported_locales) ?? [(website == null ? void 0 : website.default_locale) ?? "en"],
|
|
1091
|
-
splitByLocale: (
|
|
1091
|
+
splitByLocale: (_c = website == null ? void 0 : website.seo) == null ? void 0 : _c.sitemap_split_by_locale
|
|
1092
1092
|
});
|
|
1093
1093
|
for (const artifact of artifacts) {
|
|
1094
1094
|
await fs.writeFile(
|
|
@@ -1103,10 +1103,28 @@ async function prerender({
|
|
|
1103
1103
|
const robotsTxt = generateRobotsTxt({
|
|
1104
1104
|
robotsTxt: website == null ? void 0 : website.robots_txt,
|
|
1105
1105
|
canonicalBase,
|
|
1106
|
-
noindex: (
|
|
1106
|
+
noindex: (_d = website == null ? void 0 : website.seo) == null ? void 0 : _d.noindex
|
|
1107
1107
|
});
|
|
1108
1108
|
await fs.writeFile(path.join(absClient, "robots.txt"), robotsTxt, "utf8");
|
|
1109
1109
|
console.log(" Generated robots.txt");
|
|
1110
|
+
if ((_e = website == null ? void 0 : website.seo) == null ? void 0 : _e.noindex) {
|
|
1111
|
+
const headersPath = path.join(absClient, "_headers");
|
|
1112
|
+
let existing = "";
|
|
1113
|
+
try {
|
|
1114
|
+
existing = await fs.readFile(headersPath, "utf8");
|
|
1115
|
+
} catch {
|
|
1116
|
+
}
|
|
1117
|
+
if (!existing.includes("X-Robots-Tag")) {
|
|
1118
|
+
await fs.writeFile(
|
|
1119
|
+
headersPath,
|
|
1120
|
+
`/*
|
|
1121
|
+
X-Robots-Tag: noindex, nofollow
|
|
1122
|
+
${existing}`,
|
|
1123
|
+
"utf8"
|
|
1124
|
+
);
|
|
1125
|
+
console.log(" Generated _headers (X-Robots-Tag: noindex)");
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1110
1128
|
if (redirects.length > 0) {
|
|
1111
1129
|
const redirectsContent = generateNetlifyRedirects(redirects);
|
|
1112
1130
|
const redirectsPath = path.join(absClient, "_redirects");
|
|
@@ -1118,7 +1136,7 @@ async function prerender({
|
|
|
1118
1136
|
await fs.writeFile(redirectsPath, redirectsContent + existing, "utf8");
|
|
1119
1137
|
console.log(` Generated _redirects (${redirects.length} rules)`);
|
|
1120
1138
|
}
|
|
1121
|
-
if (llmEnabled && llm.writeIndex !== false && llmPages.length > 0) {
|
|
1139
|
+
if (!((_f = website == null ? void 0 : website.seo) == null ? void 0 : _f.noindex) && llmEnabled && llm.writeIndex !== false && llmPages.length > 0) {
|
|
1122
1140
|
const indexable = llmPages.filter((p) => !noindexPaths.has(p.url));
|
|
1123
1141
|
const llmsTxt = generateLlmsTxt({ website, pages: indexable, config: llm });
|
|
1124
1142
|
await fs.writeFile(path.join(absClient, "llms.txt"), llmsTxt, "utf8");
|
|
@@ -1339,6 +1357,14 @@ ${failures.map((item) => ` - ${item}`).join("\n")}`);
|
|
|
1339
1357
|
}
|
|
1340
1358
|
const anchorHref = /<a\b[^>]*\shref=["']([^"']*)["']/gi;
|
|
1341
1359
|
const ABSOLUTE_OR_SPECIAL = /^(?:[a-z][a-z0-9+.-]*:|\/\/|\/|#|\?|$)/i;
|
|
1360
|
+
async function readSiteNoindex(outDir) {
|
|
1361
|
+
try {
|
|
1362
|
+
const robots = await fs.readFile(path.join(outDir, "robots.txt"), "utf8");
|
|
1363
|
+
return /^\s*Disallow:\s*\/\s*$/im.test(robots);
|
|
1364
|
+
} catch {
|
|
1365
|
+
return false;
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1342
1368
|
async function validateSsgOutput(options) {
|
|
1343
1369
|
const outDir = path.resolve(options.outDir);
|
|
1344
1370
|
const failures = [];
|
|
@@ -1374,10 +1400,13 @@ async function validateSsgOutput(options) {
|
|
|
1374
1400
|
}
|
|
1375
1401
|
if (!htmlFiles.length) failures.push("output contains no HTML files");
|
|
1376
1402
|
if (!hydratedFiles) failures.push("output contains no prerendered Blox hydration state");
|
|
1403
|
+
const siteNoindex = await readSiteNoindex(outDir);
|
|
1404
|
+
const optionalWhenNoindex = /* @__PURE__ */ new Set(["sitemap.xml", "llms.txt", "llms-full.txt"]);
|
|
1377
1405
|
for (const required of requiredFiles) {
|
|
1406
|
+
if (siteNoindex && optionalWhenNoindex.has(required)) continue;
|
|
1378
1407
|
try {
|
|
1379
1408
|
const content = await fs.readFile(path.join(outDir, required), "utf8");
|
|
1380
|
-
if (required === "robots.txt" && /^Disallow:\s*\/\s*$/im.test(content)) {
|
|
1409
|
+
if (required === "robots.txt" && !siteNoindex && /^Disallow:\s*\/\s*$/im.test(content)) {
|
|
1381
1410
|
failures.push("robots.txt blocks the entire site");
|
|
1382
1411
|
}
|
|
1383
1412
|
if (required === "llms.txt" && !/^- \[[^\]]+\]\([^)]+\)/m.test(content)) {
|
|
@@ -901,7 +901,7 @@ async function prerender({
|
|
|
901
901
|
redirects = [],
|
|
902
902
|
llm = {}
|
|
903
903
|
} = {}) {
|
|
904
|
-
var _a, _b, _c;
|
|
904
|
+
var _a, _b, _c, _d, _e, _f;
|
|
905
905
|
const absRoot = path.resolve(root);
|
|
906
906
|
const absClient = path.resolve(absRoot, clientOutDir);
|
|
907
907
|
const absServerEntry = path.resolve(absRoot, serverEntry);
|
|
@@ -1056,7 +1056,7 @@ async function prerender({
|
|
|
1056
1056
|
const canonicalBase = (((_a = website == null ? void 0 : website.seo) == null ? void 0 : _a.canonical_base_url) || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
1057
1057
|
if (writeSharedAssets) {
|
|
1058
1058
|
const sitemapPaths = rendered.filter((p) => !noindexPaths.has(p));
|
|
1059
|
-
if (canonicalBase && sitemapPaths.length > 0) {
|
|
1059
|
+
if (!((_b = website == null ? void 0 : website.seo) == null ? void 0 : _b.noindex) && canonicalBase && sitemapPaths.length > 0) {
|
|
1060
1060
|
const artifacts = generateSitemapArtifacts({
|
|
1061
1061
|
routes: sitemapPaths.map((routePath) => ({
|
|
1062
1062
|
path: routePath,
|
|
@@ -1065,7 +1065,7 @@ async function prerender({
|
|
|
1065
1065
|
canonicalBase,
|
|
1066
1066
|
defaultLocale: (website == null ? void 0 : website.default_locale) ?? "en",
|
|
1067
1067
|
supportedLocales: (website == null ? void 0 : website.supported_locales) ?? [(website == null ? void 0 : website.default_locale) ?? "en"],
|
|
1068
|
-
splitByLocale: (
|
|
1068
|
+
splitByLocale: (_c = website == null ? void 0 : website.seo) == null ? void 0 : _c.sitemap_split_by_locale
|
|
1069
1069
|
});
|
|
1070
1070
|
for (const artifact of artifacts) {
|
|
1071
1071
|
await fs.writeFile(
|
|
@@ -1080,10 +1080,28 @@ async function prerender({
|
|
|
1080
1080
|
const robotsTxt = generateRobotsTxt({
|
|
1081
1081
|
robotsTxt: website == null ? void 0 : website.robots_txt,
|
|
1082
1082
|
canonicalBase,
|
|
1083
|
-
noindex: (
|
|
1083
|
+
noindex: (_d = website == null ? void 0 : website.seo) == null ? void 0 : _d.noindex
|
|
1084
1084
|
});
|
|
1085
1085
|
await fs.writeFile(path.join(absClient, "robots.txt"), robotsTxt, "utf8");
|
|
1086
1086
|
console.log(" Generated robots.txt");
|
|
1087
|
+
if ((_e = website == null ? void 0 : website.seo) == null ? void 0 : _e.noindex) {
|
|
1088
|
+
const headersPath = path.join(absClient, "_headers");
|
|
1089
|
+
let existing = "";
|
|
1090
|
+
try {
|
|
1091
|
+
existing = await fs.readFile(headersPath, "utf8");
|
|
1092
|
+
} catch {
|
|
1093
|
+
}
|
|
1094
|
+
if (!existing.includes("X-Robots-Tag")) {
|
|
1095
|
+
await fs.writeFile(
|
|
1096
|
+
headersPath,
|
|
1097
|
+
`/*
|
|
1098
|
+
X-Robots-Tag: noindex, nofollow
|
|
1099
|
+
${existing}`,
|
|
1100
|
+
"utf8"
|
|
1101
|
+
);
|
|
1102
|
+
console.log(" Generated _headers (X-Robots-Tag: noindex)");
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1087
1105
|
if (redirects.length > 0) {
|
|
1088
1106
|
const redirectsContent = generateNetlifyRedirects(redirects);
|
|
1089
1107
|
const redirectsPath = path.join(absClient, "_redirects");
|
|
@@ -1095,7 +1113,7 @@ async function prerender({
|
|
|
1095
1113
|
await fs.writeFile(redirectsPath, redirectsContent + existing, "utf8");
|
|
1096
1114
|
console.log(` Generated _redirects (${redirects.length} rules)`);
|
|
1097
1115
|
}
|
|
1098
|
-
if (llmEnabled && llm.writeIndex !== false && llmPages.length > 0) {
|
|
1116
|
+
if (!((_f = website == null ? void 0 : website.seo) == null ? void 0 : _f.noindex) && llmEnabled && llm.writeIndex !== false && llmPages.length > 0) {
|
|
1099
1117
|
const indexable = llmPages.filter((p) => !noindexPaths.has(p.url));
|
|
1100
1118
|
const llmsTxt = generateLlmsTxt({ website, pages: indexable, config: llm });
|
|
1101
1119
|
await fs.writeFile(path.join(absClient, "llms.txt"), llmsTxt, "utf8");
|
|
@@ -1316,6 +1334,14 @@ ${failures.map((item) => ` - ${item}`).join("\n")}`);
|
|
|
1316
1334
|
}
|
|
1317
1335
|
const anchorHref = /<a\b[^>]*\shref=["']([^"']*)["']/gi;
|
|
1318
1336
|
const ABSOLUTE_OR_SPECIAL = /^(?:[a-z][a-z0-9+.-]*:|\/\/|\/|#|\?|$)/i;
|
|
1337
|
+
async function readSiteNoindex(outDir) {
|
|
1338
|
+
try {
|
|
1339
|
+
const robots = await fs.readFile(path.join(outDir, "robots.txt"), "utf8");
|
|
1340
|
+
return /^\s*Disallow:\s*\/\s*$/im.test(robots);
|
|
1341
|
+
} catch {
|
|
1342
|
+
return false;
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1319
1345
|
async function validateSsgOutput(options) {
|
|
1320
1346
|
const outDir = path.resolve(options.outDir);
|
|
1321
1347
|
const failures = [];
|
|
@@ -1351,10 +1377,13 @@ async function validateSsgOutput(options) {
|
|
|
1351
1377
|
}
|
|
1352
1378
|
if (!htmlFiles.length) failures.push("output contains no HTML files");
|
|
1353
1379
|
if (!hydratedFiles) failures.push("output contains no prerendered Blox hydration state");
|
|
1380
|
+
const siteNoindex = await readSiteNoindex(outDir);
|
|
1381
|
+
const optionalWhenNoindex = /* @__PURE__ */ new Set(["sitemap.xml", "llms.txt", "llms-full.txt"]);
|
|
1354
1382
|
for (const required of requiredFiles) {
|
|
1383
|
+
if (siteNoindex && optionalWhenNoindex.has(required)) continue;
|
|
1355
1384
|
try {
|
|
1356
1385
|
const content = await fs.readFile(path.join(outDir, required), "utf8");
|
|
1357
|
-
if (required === "robots.txt" && /^Disallow:\s*\/\s*$/im.test(content)) {
|
|
1386
|
+
if (required === "robots.txt" && !siteNoindex && /^Disallow:\s*\/\s*$/im.test(content)) {
|
|
1358
1387
|
failures.push("robots.txt blocks the entire site");
|
|
1359
1388
|
}
|
|
1360
1389
|
if (required === "llms.txt" && !/^- \[[^\]]+\]\([^)]+\)/m.test(content)) {
|
package/package.json
CHANGED