@bagelink/blox 1.18.8 → 1.18.9
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/{shard-runner-2Aga3U5Y.cjs → shard-runner-BJ9PEpxo.cjs} +3 -3
- package/dist/{shard-runner-x08zpfHx.js → shard-runner-D1dDFt2v.js} +3 -3
- package/dist/ssg/cli.cjs +2 -2
- package/dist/ssg/cli.mjs +2 -2
- package/dist/ssg/index.cjs +6 -3
- package/dist/ssg/index.mjs +21 -18
- package/dist/ssg/prerender.d.ts +7 -0
- package/dist/ssg/prerender.d.ts.map +1 -1
- package/dist/ssg/render-resolved-page.d.ts +2 -0
- package/dist/ssg/render-resolved-page.d.ts.map +1 -1
- package/dist/ssg/shard-runner.d.ts +1 -0
- package/dist/ssg/shard-runner.d.ts.map +1 -1
- package/dist/{validate-output-C2ObdhO5.js → validate-output-B0ZK_S-l.js} +34 -28
- package/dist/{validate-output-Dtdsu9EM.cjs → validate-output-C48vY_9-.cjs} +16 -10
- package/package.json +1 -1
|
@@ -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-C48vY_9-.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";
|
|
@@ -40,7 +40,7 @@ function matchesCmsPath(pathname, cmsPaths) {
|
|
|
40
40
|
return false;
|
|
41
41
|
}
|
|
42
42
|
function sitemapRoutesForWebsite(routes, siteNoindex) {
|
|
43
|
-
return
|
|
43
|
+
return routes.filter((route) => !route.noindex && !llmArtifacts.isErrorPagePath(route.url));
|
|
44
44
|
}
|
|
45
45
|
function resolveShardCount(shards) {
|
|
46
46
|
if (shards === "auto") {
|
|
@@ -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-C48vY_9-.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, i as isErrorPagePath } from "./validate-output-B0ZK_S-l.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";
|
|
@@ -16,7 +16,7 @@ function matchesCmsPath(pathname, cmsPaths) {
|
|
|
16
16
|
return false;
|
|
17
17
|
}
|
|
18
18
|
function sitemapRoutesForWebsite(routes, siteNoindex) {
|
|
19
|
-
return
|
|
19
|
+
return routes.filter((route) => !route.noindex && !isErrorPagePath(route.url));
|
|
20
20
|
}
|
|
21
21
|
function resolveShardCount(shards) {
|
|
22
22
|
if (shards === "auto") {
|
|
@@ -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-B0ZK_S-l.js").then((n) => n.E);
|
|
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-C48vY_9-.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-BJ9PEpxo.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-B0ZK_S-l.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-D1dDFt2v.js");
|
|
151
151
|
const code = await runSharded({
|
|
152
152
|
shards: shardsOpt ?? "auto",
|
|
153
153
|
mode,
|
package/dist/ssg/index.cjs
CHANGED
|
@@ -22,7 +22,7 @@ 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-C48vY_9-.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");
|
|
@@ -30,7 +30,7 @@ const appRuntime = require("../appRuntime-DQRKuyja.cjs");
|
|
|
30
30
|
const localeStrategy = require("../localeStrategy-OwRIn35C.cjs");
|
|
31
31
|
const index = require("../index-DUjEj7ts.cjs");
|
|
32
32
|
async function renderBloxSsgPage(options) {
|
|
33
|
-
var _a, _b, _c, _d;
|
|
33
|
+
var _a, _b, _c, _d, _e;
|
|
34
34
|
const {
|
|
35
35
|
url,
|
|
36
36
|
resolvedData,
|
|
@@ -113,7 +113,10 @@ ${jsonLd}`;
|
|
|
113
113
|
}
|
|
114
114
|
const lang = locale || (website == null ? void 0 : website.default_locale) || "en";
|
|
115
115
|
const htmlAttrs = `lang="${lang}"`;
|
|
116
|
-
|
|
116
|
+
const pageNoindex = Boolean(
|
|
117
|
+
((_e = seoData == null ? void 0 : seoData.page) == null ? void 0 : _e.noindex) || (seoOverride == null ? void 0 : seoOverride.noindex)
|
|
118
|
+
);
|
|
119
|
+
return { html, head, htmlAttrs, teleports: ssrContext.teleports, llm: llmEntry, noindex: pageNoindex };
|
|
117
120
|
}
|
|
118
121
|
function safeJson(value) {
|
|
119
122
|
return JSON.stringify(value).replace(/</g, "\\u003c");
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as buildPageHead, h as primaryContextEntry,
|
|
2
|
-
import {
|
|
1
|
+
import { e as buildPageHead, h as primaryContextEntry, j as buildJsonLd, k as extractPageText, B as BloxBuildResponseError, l as bloxBuildJson } from "../validate-output-B0ZK_S-l.js";
|
|
2
|
+
import { m, n, f, o, q, r, s, g, t, w, x, y, z, A, p, a, C, D, u, c, v } from "../validate-output-B0ZK_S-l.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";
|
|
@@ -7,7 +7,7 @@ import { c as collectBloxData, a as collectBloxSeo, s as setSsrPageLocale, p as
|
|
|
7
7
|
import { s as setPageSlugMap } from "../localeStrategy-hXlNof1E.js";
|
|
8
8
|
import { provideBloxApi, getCollectionResolver } from "../index-I81QTzv-.js";
|
|
9
9
|
async function renderBloxSsgPage(options) {
|
|
10
|
-
var _a, _b, _c, _d;
|
|
10
|
+
var _a, _b, _c, _d, _e;
|
|
11
11
|
const {
|
|
12
12
|
url,
|
|
13
13
|
resolvedData,
|
|
@@ -90,7 +90,10 @@ ${jsonLd}`;
|
|
|
90
90
|
}
|
|
91
91
|
const lang = locale || (website == null ? void 0 : website.default_locale) || "en";
|
|
92
92
|
const htmlAttrs = `lang="${lang}"`;
|
|
93
|
-
|
|
93
|
+
const pageNoindex = Boolean(
|
|
94
|
+
((_e = seoData == null ? void 0 : seoData.page) == null ? void 0 : _e.noindex) || (seoOverride == null ? void 0 : seoOverride.noindex)
|
|
95
|
+
);
|
|
96
|
+
return { html, head, htmlAttrs, teleports: ssrContext.teleports, llm: llmEntry, noindex: pageNoindex };
|
|
94
97
|
}
|
|
95
98
|
function safeJson(value) {
|
|
96
99
|
return JSON.stringify(value).replace(/</g, "\\u003c");
|
|
@@ -419,34 +422,34 @@ export {
|
|
|
419
422
|
BLOX_HYDRATION_WINDOW_KEY,
|
|
420
423
|
BloxBuildResponseError,
|
|
421
424
|
bloxBuildJson,
|
|
422
|
-
|
|
425
|
+
m as bloxBuildRequest,
|
|
423
426
|
buildJsonLd,
|
|
424
427
|
buildPageHead,
|
|
425
|
-
|
|
428
|
+
n as buildSiteHead,
|
|
426
429
|
createBloxSSREntry,
|
|
427
430
|
extractPageText,
|
|
428
431
|
f as fetchCmsSiteData,
|
|
429
432
|
fetchDatastoreSnapshot,
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
433
|
+
o as generateLlmsFullTxt,
|
|
434
|
+
q as generateLlmsTxt,
|
|
435
|
+
r as generateNetlifyRedirects,
|
|
436
|
+
s as generateRobotsTxt,
|
|
434
437
|
g as generateSitemapArtifacts,
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
438
|
+
t as generateSitemapIndexXml,
|
|
439
|
+
w as generateSitemapXml,
|
|
440
|
+
x as getBloxBuildRequestOptions,
|
|
441
|
+
y as getSiteIconFlags,
|
|
442
|
+
z as localeSitemapPath,
|
|
443
|
+
A as mergeLlmParts,
|
|
441
444
|
parseBloxBuildGrantBody,
|
|
442
445
|
p as polyfillBloxSsgGlobals,
|
|
443
446
|
a as prerender,
|
|
444
447
|
querySnapshotRows,
|
|
445
448
|
renderBloxSsgPage,
|
|
446
449
|
resolveBloxBuildGrant,
|
|
447
|
-
|
|
450
|
+
C as resolveManifestProvenance,
|
|
448
451
|
snapshotRows,
|
|
449
|
-
|
|
452
|
+
D as splitSitemapPathsByLocale,
|
|
450
453
|
u as uploadBloxManifest,
|
|
451
454
|
c as validateInternalLinks,
|
|
452
455
|
v as validateSsgOutput
|
package/dist/ssg/prerender.d.ts
CHANGED
|
@@ -67,6 +67,8 @@ export interface RenderResult {
|
|
|
67
67
|
state?: unknown;
|
|
68
68
|
/** Optional ISO last-modified for this page → sitemap <lastmod>. */
|
|
69
69
|
lastmod?: string;
|
|
70
|
+
/** Page-level noindex (excluded from the sitemap); site-wide noindex is separate. */
|
|
71
|
+
noindex?: boolean;
|
|
70
72
|
/** Per-page LLM extract (title/description/text) for llms.txt artifacts. */
|
|
71
73
|
llm?: LlmPageEntry;
|
|
72
74
|
}
|
|
@@ -116,5 +118,10 @@ resolvePrefetchConcurrency, appPaths, includeRoot, routePartsFile, mode, website
|
|
|
116
118
|
export declare function discoverFontPreloads(clientOutDir: string): Promise<string>;
|
|
117
119
|
export declare function injectIntoTemplate(template: string, head: string, appHtml: string, fontPreloads: string, htmlAttrs?: string, teleports?: Record<string, string>): string;
|
|
118
120
|
export declare function injectTeleports(html: string, teleports: Record<string, string>): string;
|
|
121
|
+
/**
|
|
122
|
+
* True for error-page routes (`/404`, `/es/404`, …). These are served with a 404
|
|
123
|
+
* status and must never be advertised in a sitemap.
|
|
124
|
+
*/
|
|
125
|
+
export declare function isErrorPagePath(urlPath: string): boolean;
|
|
119
126
|
export {};
|
|
120
127
|
//# sourceMappingURL=prerender.d.ts.map
|
|
@@ -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,OAAO,CAAA;IAC3B,6FAA6F;IAC7F,0BAA0B,CAAC,EAAE,MAAM,CAAA;IACnC,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,wEAAwE;IACxE,WAAW,CAAC,EAAE,OAAO,CAA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,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAyDhF;AAED,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,SAAS,SAAK,EACd,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACpC,MAAM,CA8DR;AAED,wBAAgB,eAAe,CAC9B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,MAAM,CA2BR;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAGxD"}
|
|
@@ -49,6 +49,8 @@ export declare function renderBloxSsgPage<TApp>(options: {
|
|
|
49
49
|
htmlAttrs?: string;
|
|
50
50
|
teleports?: Record<string, string>;
|
|
51
51
|
llm?: LlmPageEntry;
|
|
52
|
+
/** Page-level noindex (CMS page flag or `useSeo({ noindex })`), not site-wide. */
|
|
53
|
+
noindex?: boolean;
|
|
52
54
|
}>;
|
|
53
55
|
/** JSON for embedding in a <script> tag — escapes `<` so `</script>` can't break out. */
|
|
54
56
|
export declare function safeJson(value: unknown): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-resolved-page.d.ts","sourceRoot":"","sources":["../../src/ssg/render-resolved-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAGvE,UAAU,cAAc;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAClC;AAED,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,CAAC,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QAAQ,EAAE,gBAAgB,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrE,sEAAsE;IACtE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,WAAW,CAAA;IACxD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+EAA+E;IAC/E,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC5B,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACpD,8EAA8E;IAC9E,GAAG,CAAC,EAAE,kBAAkB,CAAA;CACxB,GAAG,OAAO,CAAC;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,GAAG,CAAC,EAAE,YAAY,CAAA;IAClB,kFAAkF;IAClF,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC,CAyHD;AAED,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE/C"}
|
|
@@ -25,6 +25,7 @@ export interface ShardRunnerOptions {
|
|
|
25
25
|
export declare function matchesCmsPath(pathname: string, cmsPaths: Set<string>): boolean;
|
|
26
26
|
export declare function sitemapRoutesForWebsite<T extends {
|
|
27
27
|
noindex: boolean;
|
|
28
|
+
url: string;
|
|
28
29
|
}>(routes: T[], siteNoindex: boolean | undefined): T[];
|
|
29
30
|
/**
|
|
30
31
|
* Coordinate a sharded prerender. Returns the process exit code.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shard-runner.d.ts","sourceRoot":"","sources":["../../src/ssg/shard-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"shard-runner.d.ts","sourceRoot":"","sources":["../../src/ssg/shard-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAM9D,MAAM,WAAW,kBAAkB;IAClC,qDAAqD;IACrD,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAA;IACZ,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAA;IACf,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAA;IACnB,yEAAyE;IACzE,YAAY,CAAC,EAAE,uBAAuB,CAAA;IACtC,iFAAiF;IACjF,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,8FAA8F;IAC9F,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAWD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAQ/E;AAED,wBAAgB,uBAAuB,CAAC,CAAC,SAAS;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAClF,MAAM,EAAE,CAAC,EAAE,EACX,WAAW,EAAE,OAAO,GAAG,SAAS,GAC9B,CAAC,EAAE,CAOL;AAsED;;GAEG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgK1E"}
|
|
@@ -1025,7 +1025,7 @@ async function prerender({
|
|
|
1025
1025
|
pageSlugMap = {},
|
|
1026
1026
|
llm = {}
|
|
1027
1027
|
} = {}) {
|
|
1028
|
-
var _a, _b, _c, _d, _e
|
|
1028
|
+
var _a, _b, _c, _d, _e;
|
|
1029
1029
|
const absRoot = path.resolve(root);
|
|
1030
1030
|
const absClient = path.resolve(absRoot, clientOutDir);
|
|
1031
1031
|
const absServerEntry = path.resolve(absRoot, serverEntry);
|
|
@@ -1118,13 +1118,15 @@ async function prerender({
|
|
|
1118
1118
|
);
|
|
1119
1119
|
}
|
|
1120
1120
|
async function renderOne(urlPath) {
|
|
1121
|
+
var _a2;
|
|
1121
1122
|
const {
|
|
1122
1123
|
html,
|
|
1123
1124
|
head = "",
|
|
1124
1125
|
htmlAttrs = "",
|
|
1125
1126
|
teleports = {},
|
|
1126
1127
|
lastmod: pageLastmod,
|
|
1127
|
-
llm: pageLlm
|
|
1128
|
+
llm: pageLlm,
|
|
1129
|
+
noindex: pageNoindex
|
|
1128
1130
|
} = await serverMod.render(urlPath, {
|
|
1129
1131
|
manifest,
|
|
1130
1132
|
template,
|
|
@@ -1141,9 +1143,8 @@ async function prerender({
|
|
|
1141
1143
|
rendered.push(urlPath);
|
|
1142
1144
|
if (pageLastmod) lastmod[urlPath] = pageLastmod;
|
|
1143
1145
|
if (llmEnabled && pageLlm) llmPages.push(pageLlm);
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
}
|
|
1146
|
+
const noindexForPage = pageNoindex ?? (!((_a2 = website == null ? void 0 : website.seo) == null ? void 0 : _a2.noindex) && /<meta[^>]+name=["']robots["'][^>]*noindex/i.test(head));
|
|
1147
|
+
if (noindexForPage) noindexPaths.add(urlPath);
|
|
1147
1148
|
if (crawl) {
|
|
1148
1149
|
for (const p of discoverInternalLinks(outHtml)) {
|
|
1149
1150
|
enqueue(p, queue, seen, isExcluded);
|
|
@@ -1180,7 +1181,7 @@ async function prerender({
|
|
|
1180
1181
|
}
|
|
1181
1182
|
const canonicalBase = (((_a = website == null ? void 0 : website.seo) == null ? void 0 : _a.canonical_base_url) || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
1182
1183
|
if (writeSharedAssets) {
|
|
1183
|
-
const sitemapPaths =
|
|
1184
|
+
const sitemapPaths = rendered.filter((p) => !noindexPaths.has(p) && !isErrorPagePath(p));
|
|
1184
1185
|
if (canonicalBase && sitemapPaths.length > 0) {
|
|
1185
1186
|
const artifacts = generateSitemapArtifacts({
|
|
1186
1187
|
routes: sitemapPaths.map((routePath) => ({
|
|
@@ -1190,7 +1191,7 @@ async function prerender({
|
|
|
1190
1191
|
canonicalBase,
|
|
1191
1192
|
defaultLocale: (website == null ? void 0 : website.default_locale) ?? "en",
|
|
1192
1193
|
supportedLocales: (website == null ? void 0 : website.supported_locales) ?? [(website == null ? void 0 : website.default_locale) ?? "en"],
|
|
1193
|
-
splitByLocale: (
|
|
1194
|
+
splitByLocale: (_b = website == null ? void 0 : website.seo) == null ? void 0 : _b.sitemap_split_by_locale
|
|
1194
1195
|
});
|
|
1195
1196
|
for (const artifact of artifacts) {
|
|
1196
1197
|
await fs.writeFile(
|
|
@@ -1205,11 +1206,11 @@ async function prerender({
|
|
|
1205
1206
|
const robotsTxt = generateRobotsTxt({
|
|
1206
1207
|
robotsTxt: website == null ? void 0 : website.robots_txt,
|
|
1207
1208
|
canonicalBase,
|
|
1208
|
-
noindex: (
|
|
1209
|
+
noindex: (_c = website == null ? void 0 : website.seo) == null ? void 0 : _c.noindex
|
|
1209
1210
|
});
|
|
1210
1211
|
await fs.writeFile(path.join(absClient, "robots.txt"), robotsTxt, "utf8");
|
|
1211
1212
|
console.log(" Generated robots.txt");
|
|
1212
|
-
if ((
|
|
1213
|
+
if ((_d = website == null ? void 0 : website.seo) == null ? void 0 : _d.noindex) {
|
|
1213
1214
|
const headersPath = path.join(absClient, "_headers");
|
|
1214
1215
|
let existing = "";
|
|
1215
1216
|
try {
|
|
@@ -1238,7 +1239,7 @@ ${existing}`,
|
|
|
1238
1239
|
await fs.writeFile(redirectsPath, redirectsContent + existing, "utf8");
|
|
1239
1240
|
console.log(` Generated _redirects (${redirects.length} rules)`);
|
|
1240
1241
|
}
|
|
1241
|
-
if (!((
|
|
1242
|
+
if (!((_e = website == null ? void 0 : website.seo) == null ? void 0 : _e.noindex) && llmEnabled && llm.writeIndex !== false && llmPages.length > 0) {
|
|
1242
1243
|
const indexable = llmPages.filter((p) => !noindexPaths.has(p.url));
|
|
1243
1244
|
const llmsTxt = generateLlmsTxt({ website, pages: indexable, config: llm });
|
|
1244
1245
|
await fs.writeFile(path.join(absClient, "llms.txt"), llmsTxt, "utf8");
|
|
@@ -1494,6 +1495,10 @@ function injectTeleports(html, teleports) {
|
|
|
1494
1495
|
}
|
|
1495
1496
|
return out;
|
|
1496
1497
|
}
|
|
1498
|
+
function isErrorPagePath(urlPath) {
|
|
1499
|
+
const segments = urlPath.split(/[?#]/)[0].split("/").filter(Boolean);
|
|
1500
|
+
return segments.length > 0 && segments[segments.length - 1] === "404";
|
|
1501
|
+
}
|
|
1497
1502
|
function outFilePath(absClientDir, urlPath, mode) {
|
|
1498
1503
|
const [pathname] = urlPath.split("?");
|
|
1499
1504
|
const safe = pathname === "/" ? "/" : pathname;
|
|
@@ -1744,10 +1749,11 @@ async function validateSitemap(outDir, content) {
|
|
|
1744
1749
|
return failures;
|
|
1745
1750
|
}
|
|
1746
1751
|
export {
|
|
1747
|
-
|
|
1752
|
+
mergeLlmParts as A,
|
|
1748
1753
|
BloxBuildResponseError as B,
|
|
1749
|
-
|
|
1750
|
-
|
|
1754
|
+
resolveManifestProvenance as C,
|
|
1755
|
+
splitSitemapPathsByLocale as D,
|
|
1756
|
+
llmArtifacts as E,
|
|
1751
1757
|
prerender as a,
|
|
1752
1758
|
buildCollectionResolver as b,
|
|
1753
1759
|
validateInternalLinks as c,
|
|
@@ -1756,22 +1762,22 @@ export {
|
|
|
1756
1762
|
fetchCmsSiteData as f,
|
|
1757
1763
|
generateSitemapArtifacts as g,
|
|
1758
1764
|
primaryContextEntry as h,
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1765
|
+
isErrorPagePath as i,
|
|
1766
|
+
buildJsonLd as j,
|
|
1767
|
+
extractPageText as k,
|
|
1768
|
+
bloxBuildJson as l,
|
|
1769
|
+
bloxBuildRequest as m,
|
|
1770
|
+
buildSiteHead as n,
|
|
1771
|
+
generateLlmsFullTxt as o,
|
|
1766
1772
|
polyfillBloxSsgGlobals as p,
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1773
|
+
generateLlmsTxt as q,
|
|
1774
|
+
generateNetlifyRedirects as r,
|
|
1775
|
+
generateRobotsTxt as s,
|
|
1776
|
+
generateSitemapIndexXml as t,
|
|
1771
1777
|
uploadBloxManifest as u,
|
|
1772
1778
|
validateSsgOutput as v,
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1779
|
+
generateSitemapXml as w,
|
|
1780
|
+
getBloxBuildRequestOptions as x,
|
|
1781
|
+
getSiteIconFlags as y,
|
|
1782
|
+
localeSitemapPath as z
|
|
1777
1783
|
};
|
|
@@ -1048,7 +1048,7 @@ async function prerender({
|
|
|
1048
1048
|
pageSlugMap = {},
|
|
1049
1049
|
llm = {}
|
|
1050
1050
|
} = {}) {
|
|
1051
|
-
var _a, _b, _c, _d, _e
|
|
1051
|
+
var _a, _b, _c, _d, _e;
|
|
1052
1052
|
const absRoot = path.resolve(root);
|
|
1053
1053
|
const absClient = path.resolve(absRoot, clientOutDir);
|
|
1054
1054
|
const absServerEntry = path.resolve(absRoot, serverEntry);
|
|
@@ -1141,13 +1141,15 @@ async function prerender({
|
|
|
1141
1141
|
);
|
|
1142
1142
|
}
|
|
1143
1143
|
async function renderOne(urlPath) {
|
|
1144
|
+
var _a2;
|
|
1144
1145
|
const {
|
|
1145
1146
|
html,
|
|
1146
1147
|
head = "",
|
|
1147
1148
|
htmlAttrs = "",
|
|
1148
1149
|
teleports = {},
|
|
1149
1150
|
lastmod: pageLastmod,
|
|
1150
|
-
llm: pageLlm
|
|
1151
|
+
llm: pageLlm,
|
|
1152
|
+
noindex: pageNoindex
|
|
1151
1153
|
} = await serverMod.render(urlPath, {
|
|
1152
1154
|
manifest,
|
|
1153
1155
|
template,
|
|
@@ -1164,9 +1166,8 @@ async function prerender({
|
|
|
1164
1166
|
rendered.push(urlPath);
|
|
1165
1167
|
if (pageLastmod) lastmod[urlPath] = pageLastmod;
|
|
1166
1168
|
if (llmEnabled && pageLlm) llmPages.push(pageLlm);
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
}
|
|
1169
|
+
const noindexForPage = pageNoindex ?? (!((_a2 = website == null ? void 0 : website.seo) == null ? void 0 : _a2.noindex) && /<meta[^>]+name=["']robots["'][^>]*noindex/i.test(head));
|
|
1170
|
+
if (noindexForPage) noindexPaths.add(urlPath);
|
|
1170
1171
|
if (crawl) {
|
|
1171
1172
|
for (const p of discoverInternalLinks(outHtml)) {
|
|
1172
1173
|
enqueue(p, queue, seen, isExcluded);
|
|
@@ -1203,7 +1204,7 @@ async function prerender({
|
|
|
1203
1204
|
}
|
|
1204
1205
|
const canonicalBase = (((_a = website == null ? void 0 : website.seo) == null ? void 0 : _a.canonical_base_url) || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
1205
1206
|
if (writeSharedAssets) {
|
|
1206
|
-
const sitemapPaths =
|
|
1207
|
+
const sitemapPaths = rendered.filter((p) => !noindexPaths.has(p) && !isErrorPagePath(p));
|
|
1207
1208
|
if (canonicalBase && sitemapPaths.length > 0) {
|
|
1208
1209
|
const artifacts = generateSitemapArtifacts({
|
|
1209
1210
|
routes: sitemapPaths.map((routePath) => ({
|
|
@@ -1213,7 +1214,7 @@ async function prerender({
|
|
|
1213
1214
|
canonicalBase,
|
|
1214
1215
|
defaultLocale: (website == null ? void 0 : website.default_locale) ?? "en",
|
|
1215
1216
|
supportedLocales: (website == null ? void 0 : website.supported_locales) ?? [(website == null ? void 0 : website.default_locale) ?? "en"],
|
|
1216
|
-
splitByLocale: (
|
|
1217
|
+
splitByLocale: (_b = website == null ? void 0 : website.seo) == null ? void 0 : _b.sitemap_split_by_locale
|
|
1217
1218
|
});
|
|
1218
1219
|
for (const artifact of artifacts) {
|
|
1219
1220
|
await fs.writeFile(
|
|
@@ -1228,11 +1229,11 @@ async function prerender({
|
|
|
1228
1229
|
const robotsTxt = generateRobotsTxt({
|
|
1229
1230
|
robotsTxt: website == null ? void 0 : website.robots_txt,
|
|
1230
1231
|
canonicalBase,
|
|
1231
|
-
noindex: (
|
|
1232
|
+
noindex: (_c = website == null ? void 0 : website.seo) == null ? void 0 : _c.noindex
|
|
1232
1233
|
});
|
|
1233
1234
|
await fs.writeFile(path.join(absClient, "robots.txt"), robotsTxt, "utf8");
|
|
1234
1235
|
console.log(" Generated robots.txt");
|
|
1235
|
-
if ((
|
|
1236
|
+
if ((_d = website == null ? void 0 : website.seo) == null ? void 0 : _d.noindex) {
|
|
1236
1237
|
const headersPath = path.join(absClient, "_headers");
|
|
1237
1238
|
let existing = "";
|
|
1238
1239
|
try {
|
|
@@ -1261,7 +1262,7 @@ ${existing}`,
|
|
|
1261
1262
|
await fs.writeFile(redirectsPath, redirectsContent + existing, "utf8");
|
|
1262
1263
|
console.log(` Generated _redirects (${redirects.length} rules)`);
|
|
1263
1264
|
}
|
|
1264
|
-
if (!((
|
|
1265
|
+
if (!((_e = website == null ? void 0 : website.seo) == null ? void 0 : _e.noindex) && llmEnabled && llm.writeIndex !== false && llmPages.length > 0) {
|
|
1265
1266
|
const indexable = llmPages.filter((p) => !noindexPaths.has(p.url));
|
|
1266
1267
|
const llmsTxt = generateLlmsTxt({ website, pages: indexable, config: llm });
|
|
1267
1268
|
await fs.writeFile(path.join(absClient, "llms.txt"), llmsTxt, "utf8");
|
|
@@ -1517,6 +1518,10 @@ function injectTeleports(html, teleports) {
|
|
|
1517
1518
|
}
|
|
1518
1519
|
return out;
|
|
1519
1520
|
}
|
|
1521
|
+
function isErrorPagePath(urlPath) {
|
|
1522
|
+
const segments = urlPath.split(/[?#]/)[0].split("/").filter(Boolean);
|
|
1523
|
+
return segments.length > 0 && segments[segments.length - 1] === "404";
|
|
1524
|
+
}
|
|
1520
1525
|
function outFilePath(absClientDir, urlPath, mode) {
|
|
1521
1526
|
const [pathname] = urlPath.split("?");
|
|
1522
1527
|
const safe = pathname === "/" ? "/" : pathname;
|
|
@@ -1784,6 +1789,7 @@ exports.generateSitemapIndexXml = generateSitemapIndexXml;
|
|
|
1784
1789
|
exports.generateSitemapXml = generateSitemapXml;
|
|
1785
1790
|
exports.getBloxBuildRequestOptions = getBloxBuildRequestOptions;
|
|
1786
1791
|
exports.getSiteIconFlags = getSiteIconFlags;
|
|
1792
|
+
exports.isErrorPagePath = isErrorPagePath;
|
|
1787
1793
|
exports.llmArtifacts = llmArtifacts;
|
|
1788
1794
|
exports.localeSitemapPath = localeSitemapPath;
|
|
1789
1795
|
exports.mergeLlmParts = mergeLlmParts;
|
package/package.json
CHANGED