@bagelink/blox 1.15.531 → 1.15.535
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-JAI_Tb4S.js → shard-runner-Aw77Pe6C.js} +15 -30
- package/dist/{shard-runner-Bn4JyeQC.cjs → shard-runner-C-OeWaVM.cjs} +15 -30
- package/dist/ssg/cli.cjs +13 -2
- package/dist/ssg/cli.mjs +13 -2
- package/dist/ssg/datastore-snapshot.d.ts +28 -0
- package/dist/ssg/datastore-snapshot.d.ts.map +1 -0
- package/dist/ssg/index.cjs +76 -1
- package/dist/ssg/index.d.ts +6 -2
- package/dist/ssg/index.d.ts.map +1 -1
- package/dist/ssg/index.mjs +93 -18
- package/dist/ssg/prerender.d.ts.map +1 -1
- package/dist/ssg/seo.d.ts +17 -0
- package/dist/ssg/seo.d.ts.map +1 -1
- package/dist/ssg/shard-runner.d.ts.map +1 -1
- package/dist/ssg/validate-output.d.ts +6 -0
- package/dist/ssg/validate-output.d.ts.map +1 -0
- package/dist/{prerender-Dc2Zl2PC.cjs → validate-output-2iH8f9ql.cjs} +144 -27
- package/dist/{prerender-VtzdjvzI.js → validate-output-CfHo6w9k.js} +165 -48
- package/package.json +2 -2
|
@@ -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,
|
|
5
|
+
import { f as fetchCmsSiteData, g as generateSitemapArtifacts } from "./validate-output-CfHo6w9k.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
|
function resolveShardCount(shards) {
|
|
@@ -109,7 +109,7 @@ async function runSharded(opts) {
|
|
|
109
109
|
}
|
|
110
110
|
if (process.env.BLOX_SSG_LLM !== "0") {
|
|
111
111
|
try {
|
|
112
|
-
const { mergeLlmParts } = await import("./
|
|
112
|
+
const { mergeLlmParts } = await import("./validate-output-CfHo6w9k.js").then((n) => n.A);
|
|
113
113
|
const mergeWebsite = website;
|
|
114
114
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
115
115
|
const { pages } = await mergeLlmParts({
|
|
@@ -131,37 +131,22 @@ async function runSharded(opts) {
|
|
|
131
131
|
const canonicalBase = (((_a = website.seo) == null ? void 0 : _a.canonical_base_url) || website.domain || "").replace(/\/$/, "");
|
|
132
132
|
const indexableRoutes = [...byUrl.values()].filter((route) => !route.noindex);
|
|
133
133
|
if (canonicalBase && indexableRoutes.length > 0) {
|
|
134
|
-
const
|
|
135
|
-
indexableRoutes.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
for (const [locale, localePaths] of pathsByLocale) {
|
|
146
|
-
const sitemapPath = localeSitemapPath(locale);
|
|
147
|
-
await fs.writeFile(path.resolve("dist", sitemapPath.slice(1)), generateSitemapXml({
|
|
148
|
-
renderedPaths: localePaths,
|
|
149
|
-
canonicalBase,
|
|
150
|
-
lastmod
|
|
151
|
-
}), "utf8");
|
|
152
|
-
sitemapPaths.push(sitemapPath);
|
|
153
|
-
}
|
|
134
|
+
const artifacts = generateSitemapArtifacts({
|
|
135
|
+
routes: indexableRoutes.map((route) => ({
|
|
136
|
+
path: route.url,
|
|
137
|
+
lastmod: route.lastmod
|
|
138
|
+
})),
|
|
139
|
+
canonicalBase,
|
|
140
|
+
defaultLocale: website.default_locale,
|
|
141
|
+
supportedLocales: website.supported_locales,
|
|
142
|
+
splitByLocale: (_b = website.seo) == null ? void 0 : _b.sitemap_split_by_locale
|
|
143
|
+
});
|
|
144
|
+
for (const artifact of artifacts) {
|
|
154
145
|
await fs.writeFile(
|
|
155
|
-
path.resolve("dist",
|
|
156
|
-
|
|
146
|
+
path.resolve("dist", artifact.path.slice(1)),
|
|
147
|
+
artifact.content,
|
|
157
148
|
"utf8"
|
|
158
149
|
);
|
|
159
|
-
} else {
|
|
160
|
-
await fs.writeFile(path.resolve("dist", "sitemap.xml"), generateSitemapXml({
|
|
161
|
-
renderedPaths,
|
|
162
|
-
canonicalBase,
|
|
163
|
-
lastmod
|
|
164
|
-
}), "utf8");
|
|
165
150
|
}
|
|
166
151
|
}
|
|
167
152
|
await fs.rm(routePartsDir, { recursive: true, force: true });
|
|
@@ -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("./
|
|
29
|
+
const llmArtifacts = require("./validate-output-2iH8f9ql.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
|
function resolveShardCount(shards) {
|
|
@@ -133,7 +133,7 @@ async function runSharded(opts) {
|
|
|
133
133
|
}
|
|
134
134
|
if (process.env.BLOX_SSG_LLM !== "0") {
|
|
135
135
|
try {
|
|
136
|
-
const { mergeLlmParts } = await Promise.resolve().then(() => require("./
|
|
136
|
+
const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-2iH8f9ql.cjs")).then((n) => n.llmArtifacts);
|
|
137
137
|
const mergeWebsite = website;
|
|
138
138
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
139
139
|
const { pages } = await mergeLlmParts({
|
|
@@ -155,37 +155,22 @@ async function runSharded(opts) {
|
|
|
155
155
|
const canonicalBase = (((_a = website.seo) == null ? void 0 : _a.canonical_base_url) || website.domain || "").replace(/\/$/, "");
|
|
156
156
|
const indexableRoutes = [...byUrl.values()].filter((route) => !route.noindex);
|
|
157
157
|
if (canonicalBase && indexableRoutes.length > 0) {
|
|
158
|
-
const
|
|
159
|
-
indexableRoutes.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
for (const [locale, localePaths] of pathsByLocale) {
|
|
170
|
-
const sitemapPath = llmArtifacts.localeSitemapPath(locale);
|
|
171
|
-
await fs.writeFile(path.resolve("dist", sitemapPath.slice(1)), llmArtifacts.generateSitemapXml({
|
|
172
|
-
renderedPaths: localePaths,
|
|
173
|
-
canonicalBase,
|
|
174
|
-
lastmod
|
|
175
|
-
}), "utf8");
|
|
176
|
-
sitemapPaths.push(sitemapPath);
|
|
177
|
-
}
|
|
158
|
+
const artifacts = llmArtifacts.generateSitemapArtifacts({
|
|
159
|
+
routes: indexableRoutes.map((route) => ({
|
|
160
|
+
path: route.url,
|
|
161
|
+
lastmod: route.lastmod
|
|
162
|
+
})),
|
|
163
|
+
canonicalBase,
|
|
164
|
+
defaultLocale: website.default_locale,
|
|
165
|
+
supportedLocales: website.supported_locales,
|
|
166
|
+
splitByLocale: (_b = website.seo) == null ? void 0 : _b.sitemap_split_by_locale
|
|
167
|
+
});
|
|
168
|
+
for (const artifact of artifacts) {
|
|
178
169
|
await fs.writeFile(
|
|
179
|
-
path.resolve("dist",
|
|
180
|
-
|
|
170
|
+
path.resolve("dist", artifact.path.slice(1)),
|
|
171
|
+
artifact.content,
|
|
181
172
|
"utf8"
|
|
182
173
|
);
|
|
183
|
-
} else {
|
|
184
|
-
await fs.writeFile(path.resolve("dist", "sitemap.xml"), llmArtifacts.generateSitemapXml({
|
|
185
|
-
renderedPaths,
|
|
186
|
-
canonicalBase,
|
|
187
|
-
lastmod
|
|
188
|
-
}), "utf8");
|
|
189
174
|
}
|
|
190
175
|
}
|
|
191
176
|
await fs.rm(routePartsDir, { recursive: true, force: true });
|
package/dist/ssg/cli.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
const process = require("node:process");
|
|
4
4
|
const fs = require("node:fs/promises");
|
|
5
|
-
const llmArtifacts = require("../
|
|
5
|
+
const llmArtifacts = require("../validate-output-2iH8f9ql.cjs");
|
|
6
6
|
function installFetchTimeout() {
|
|
7
7
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
8
8
|
const original = globalThis.fetch;
|
|
@@ -56,6 +56,7 @@ async function main() {
|
|
|
56
56
|
let shardsOpt = null;
|
|
57
57
|
let routesCmd = "";
|
|
58
58
|
let siteDataFile = "";
|
|
59
|
+
let validateOutDir = "";
|
|
59
60
|
const passthroughArgs = [];
|
|
60
61
|
const excludePaths = ["/_blox_preview"];
|
|
61
62
|
for (const a of argv) {
|
|
@@ -71,6 +72,10 @@ async function main() {
|
|
|
71
72
|
routesCmd = a.slice("--routes-cmd=".length);
|
|
72
73
|
} else if (a.startsWith("--site-data=")) {
|
|
73
74
|
siteDataFile = a.slice("--site-data=".length);
|
|
75
|
+
} else if (a === "--validate") {
|
|
76
|
+
validateOutDir = "dist";
|
|
77
|
+
} else if (a.startsWith("--validate=")) {
|
|
78
|
+
validateOutDir = a.slice("--validate=".length);
|
|
74
79
|
} else if (a.startsWith("--shard=")) {
|
|
75
80
|
const [i, n] = a.slice("--shard=".length).split("/").map(Number);
|
|
76
81
|
if (Number.isInteger(i) && Number.isInteger(n) && n > 0 && i >= 0 && i < n) {
|
|
@@ -95,6 +100,7 @@ Options:
|
|
|
95
100
|
--shard=<i/n> (internal) Render only this shard's slice — set by --shards.
|
|
96
101
|
--routes-cmd=<cmd> Shell command whose stdout (whitespace-separated) is the
|
|
97
102
|
route list. For router-driven sites with no CMS pages.
|
|
103
|
+
--validate[=dir] Validate generated SSG assets (default directory: dist).
|
|
98
104
|
--help, -h Show this help
|
|
99
105
|
|
|
100
106
|
Environment:
|
|
@@ -120,10 +126,15 @@ Environment:
|
|
|
120
126
|
extraPaths.push(a);
|
|
121
127
|
}
|
|
122
128
|
}
|
|
129
|
+
if (validateOutDir) {
|
|
130
|
+
await llmArtifacts.validateSsgOutput({ outDir: validateOutDir });
|
|
131
|
+
console.log(`[blox-ssg] validated output in ${validateOutDir}`);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
123
134
|
if (shardsOpt !== null || routesCmd) {
|
|
124
135
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
125
136
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
126
|
-
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-
|
|
137
|
+
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-C-OeWaVM.cjs"));
|
|
127
138
|
const code = await runSharded({
|
|
128
139
|
shards: shardsOpt ?? "auto",
|
|
129
140
|
mode,
|
package/dist/ssg/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
|
-
import { u as uploadBloxManifest, p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, a as prerender } from "../
|
|
4
|
+
import { v as validateSsgOutput, u as uploadBloxManifest, p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, a as prerender } from "../validate-output-CfHo6w9k.js";
|
|
5
5
|
function installFetchTimeout() {
|
|
6
6
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
7
7
|
const original = globalThis.fetch;
|
|
@@ -55,6 +55,7 @@ async function main() {
|
|
|
55
55
|
let shardsOpt = null;
|
|
56
56
|
let routesCmd = "";
|
|
57
57
|
let siteDataFile = "";
|
|
58
|
+
let validateOutDir = "";
|
|
58
59
|
const passthroughArgs = [];
|
|
59
60
|
const excludePaths = ["/_blox_preview"];
|
|
60
61
|
for (const a of argv) {
|
|
@@ -70,6 +71,10 @@ async function main() {
|
|
|
70
71
|
routesCmd = a.slice("--routes-cmd=".length);
|
|
71
72
|
} else if (a.startsWith("--site-data=")) {
|
|
72
73
|
siteDataFile = a.slice("--site-data=".length);
|
|
74
|
+
} else if (a === "--validate") {
|
|
75
|
+
validateOutDir = "dist";
|
|
76
|
+
} else if (a.startsWith("--validate=")) {
|
|
77
|
+
validateOutDir = a.slice("--validate=".length);
|
|
73
78
|
} else if (a.startsWith("--shard=")) {
|
|
74
79
|
const [i, n] = a.slice("--shard=".length).split("/").map(Number);
|
|
75
80
|
if (Number.isInteger(i) && Number.isInteger(n) && n > 0 && i >= 0 && i < n) {
|
|
@@ -94,6 +99,7 @@ Options:
|
|
|
94
99
|
--shard=<i/n> (internal) Render only this shard's slice — set by --shards.
|
|
95
100
|
--routes-cmd=<cmd> Shell command whose stdout (whitespace-separated) is the
|
|
96
101
|
route list. For router-driven sites with no CMS pages.
|
|
102
|
+
--validate[=dir] Validate generated SSG assets (default directory: dist).
|
|
97
103
|
--help, -h Show this help
|
|
98
104
|
|
|
99
105
|
Environment:
|
|
@@ -119,10 +125,15 @@ Environment:
|
|
|
119
125
|
extraPaths.push(a);
|
|
120
126
|
}
|
|
121
127
|
}
|
|
128
|
+
if (validateOutDir) {
|
|
129
|
+
await validateSsgOutput({ outDir: validateOutDir });
|
|
130
|
+
console.log(`[blox-ssg] validated output in ${validateOutDir}`);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
122
133
|
if (shardsOpt !== null || routesCmd) {
|
|
123
134
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
124
135
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
125
|
-
const { runSharded } = await import("../shard-runner-
|
|
136
|
+
const { runSharded } = await import("../shard-runner-Aw77Pe6C.js");
|
|
126
137
|
const code = await runSharded({
|
|
127
138
|
shards: shardsOpt ?? "auto",
|
|
128
139
|
mode,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BloxBuildRequestOptions } from './build-request';
|
|
2
|
+
export interface DatastoreSnapshot {
|
|
3
|
+
version: 1;
|
|
4
|
+
generatedAt: string;
|
|
5
|
+
apiBase: string;
|
|
6
|
+
store: string;
|
|
7
|
+
collections: Record<string, Record<string, Array<Record<string, unknown>>>>;
|
|
8
|
+
}
|
|
9
|
+
export declare function fetchDatastoreSnapshot(options: {
|
|
10
|
+
apiBase: string;
|
|
11
|
+
store: string;
|
|
12
|
+
collections: readonly string[];
|
|
13
|
+
locales: readonly string[];
|
|
14
|
+
endpointPrefix?: string;
|
|
15
|
+
limit?: number;
|
|
16
|
+
requestOptions?: BloxBuildRequestOptions;
|
|
17
|
+
onCollection?: (collection: string, counts: Record<string, number>) => void;
|
|
18
|
+
}): Promise<DatastoreSnapshot>;
|
|
19
|
+
export declare function snapshotRows(snapshot: DatastoreSnapshot, collection: string, locale: string): Array<Record<string, unknown>>;
|
|
20
|
+
export declare function querySnapshotRows(snapshot: DatastoreSnapshot, options: {
|
|
21
|
+
collection: string;
|
|
22
|
+
locale: string;
|
|
23
|
+
q?: string;
|
|
24
|
+
select?: string[];
|
|
25
|
+
offset?: number;
|
|
26
|
+
limit?: number;
|
|
27
|
+
}): Array<Record<string, unknown>>;
|
|
28
|
+
//# sourceMappingURL=datastore-snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datastore-snapshot.d.ts","sourceRoot":"","sources":["../../src/ssg/datastore-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAG9D,MAAM,WAAW,iBAAiB;IACjC,OAAO,EAAE,CAAC,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;CAC3E;AAED,wBAAsB,sBAAsB,CAAC,OAAO,EAAE;IACrD,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,SAAS,MAAM,EAAE,CAAA;IAC9B,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,uBAAuB,CAAA;IACxC,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAA;CAC3E,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA4C7B;AAED,wBAAgB,YAAY,CAC3B,QAAQ,EAAE,iBAAiB,EAC3B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACZ,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAIhC;AAED,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,EAAE;IACR,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,GACC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAiBhC"}
|
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("../
|
|
25
|
+
const llmArtifacts = require("../validate-output-2iH8f9ql.cjs");
|
|
26
26
|
const ssg_client = require("./client.cjs");
|
|
27
27
|
const pinia = require("pinia");
|
|
28
28
|
const vue = require("vue");
|
|
@@ -255,6 +255,76 @@ function createBloxSSREntry(options) {
|
|
|
255
255
|
}
|
|
256
256
|
return { render, prefetchResolve };
|
|
257
257
|
}
|
|
258
|
+
async function fetchDatastoreSnapshot(options) {
|
|
259
|
+
var _a;
|
|
260
|
+
const endpointPrefix = options.endpointPrefix ?? "/datastore";
|
|
261
|
+
const limit = options.limit ?? 2e3;
|
|
262
|
+
const collections = {};
|
|
263
|
+
for (const collection of options.collections) {
|
|
264
|
+
collections[collection] = {};
|
|
265
|
+
const localized = await Promise.all(options.locales.map(async (locale) => {
|
|
266
|
+
const rows = [];
|
|
267
|
+
for (let offset = 0; ; offset += limit) {
|
|
268
|
+
const url = new URL(
|
|
269
|
+
`${endpointPrefix}/${encodeURIComponent(options.store)}/collections/${encodeURIComponent(collection)}`,
|
|
270
|
+
options.apiBase
|
|
271
|
+
);
|
|
272
|
+
url.searchParams.set("locale", locale);
|
|
273
|
+
url.searchParams.set("limit", String(limit));
|
|
274
|
+
url.searchParams.set("offset", String(offset));
|
|
275
|
+
const page = await llmArtifacts.bloxBuildJson(
|
|
276
|
+
url,
|
|
277
|
+
{},
|
|
278
|
+
options.requestOptions
|
|
279
|
+
);
|
|
280
|
+
if (!Array.isArray(page)) {
|
|
281
|
+
throw new TypeError(`Datastore snapshot response is not an array: ${collection}/${locale}`);
|
|
282
|
+
}
|
|
283
|
+
rows.push(...page);
|
|
284
|
+
if (page.length < limit) break;
|
|
285
|
+
}
|
|
286
|
+
return [locale, rows];
|
|
287
|
+
}));
|
|
288
|
+
for (const [locale, rows] of localized) collections[collection][locale] = rows;
|
|
289
|
+
(_a = options.onCollection) == null ? void 0 : _a.call(
|
|
290
|
+
options,
|
|
291
|
+
collection,
|
|
292
|
+
Object.fromEntries(localized.map(([locale, rows]) => [locale, rows.length]))
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
return {
|
|
296
|
+
version: 1,
|
|
297
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
298
|
+
apiBase: options.apiBase,
|
|
299
|
+
store: options.store,
|
|
300
|
+
collections
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
function snapshotRows(snapshot, collection, locale) {
|
|
304
|
+
var _a;
|
|
305
|
+
const rows = (_a = snapshot.collections[collection]) == null ? void 0 : _a[locale];
|
|
306
|
+
if (!rows) throw new Error(`Datastore snapshot miss: ${collection}/${locale}`);
|
|
307
|
+
return rows;
|
|
308
|
+
}
|
|
309
|
+
function querySnapshotRows(snapshot, options) {
|
|
310
|
+
var _a;
|
|
311
|
+
let rows = snapshotRows(snapshot, options.collection, options.locale);
|
|
312
|
+
if (options.q) {
|
|
313
|
+
const match = options.q.match(/^\s*([A-Za-z0-9_.-]+)\s+eq\s+"((?:\\.|[^"])*)"\s*$/);
|
|
314
|
+
if (!match) throw new Error(`Unsupported snapshot SCIM query: ${options.q}`);
|
|
315
|
+
const [, field, raw] = match;
|
|
316
|
+
const expected = raw.replace(/\\"/g, '"').replace(/\\\\/g, "\\");
|
|
317
|
+
rows = rows.filter((row) => String(row[field]) === expected);
|
|
318
|
+
}
|
|
319
|
+
const offset = options.offset ?? 0;
|
|
320
|
+
rows = rows.slice(offset, offset + (options.limit ?? 100));
|
|
321
|
+
if ((_a = options.select) == null ? void 0 : _a.length) {
|
|
322
|
+
return rows.map((row) => Object.fromEntries(
|
|
323
|
+
options.select.filter((key) => key in row).map((key) => [key, row[key]])
|
|
324
|
+
));
|
|
325
|
+
}
|
|
326
|
+
return rows;
|
|
327
|
+
}
|
|
258
328
|
exports.BloxBuildResponseError = llmArtifacts.BloxBuildResponseError;
|
|
259
329
|
exports.bloxBuildJson = llmArtifacts.bloxBuildJson;
|
|
260
330
|
exports.bloxBuildRequest = llmArtifacts.bloxBuildRequest;
|
|
@@ -268,6 +338,7 @@ exports.generateLlmsFullTxt = llmArtifacts.generateLlmsFullTxt;
|
|
|
268
338
|
exports.generateLlmsTxt = llmArtifacts.generateLlmsTxt;
|
|
269
339
|
exports.generateNetlifyRedirects = llmArtifacts.generateNetlifyRedirects;
|
|
270
340
|
exports.generateRobotsTxt = llmArtifacts.generateRobotsTxt;
|
|
341
|
+
exports.generateSitemapArtifacts = llmArtifacts.generateSitemapArtifacts;
|
|
271
342
|
exports.generateSitemapIndexXml = llmArtifacts.generateSitemapIndexXml;
|
|
272
343
|
exports.generateSitemapXml = llmArtifacts.generateSitemapXml;
|
|
273
344
|
exports.getBloxBuildRequestOptions = llmArtifacts.getBloxBuildRequestOptions;
|
|
@@ -279,6 +350,7 @@ exports.prerender = llmArtifacts.prerender;
|
|
|
279
350
|
exports.resolveManifestProvenance = llmArtifacts.resolveManifestProvenance;
|
|
280
351
|
exports.splitSitemapPathsByLocale = llmArtifacts.splitSitemapPathsByLocale;
|
|
281
352
|
exports.uploadBloxManifest = llmArtifacts.uploadBloxManifest;
|
|
353
|
+
exports.validateSsgOutput = llmArtifacts.validateSsgOutput;
|
|
282
354
|
exports.BLOX_COLLECTIONS_WINDOW_KEY = ssg_client.BLOX_COLLECTIONS_WINDOW_KEY;
|
|
283
355
|
exports.BLOX_DATA_WINDOW_KEY = ssg_client.BLOX_DATA_WINDOW_KEY;
|
|
284
356
|
exports.BLOX_PAGE_SEO_WINDOW_KEY = ssg_client.BLOX_PAGE_SEO_WINDOW_KEY;
|
|
@@ -289,4 +361,7 @@ exports.getEmbeddedWebsiteId = ssg_client.getEmbeddedWebsiteId;
|
|
|
289
361
|
exports.installBloxStateCache = ssg_client.installBloxStateCache;
|
|
290
362
|
exports.installCollectionCache = ssg_client.installCollectionCache;
|
|
291
363
|
exports.createBloxSSREntry = createBloxSSREntry;
|
|
364
|
+
exports.fetchDatastoreSnapshot = fetchDatastoreSnapshot;
|
|
365
|
+
exports.querySnapshotRows = querySnapshotRows;
|
|
292
366
|
exports.renderBloxSsgPage = renderBloxSsgPage;
|
|
367
|
+
exports.snapshotRows = snapshotRows;
|
package/dist/ssg/index.d.ts
CHANGED
|
@@ -17,16 +17,20 @@ export { getCollectionCache, getEmbeddedWebsiteId, installCollectionCache } from
|
|
|
17
17
|
export { BLOX_COLLECTIONS_WINDOW_KEY, BLOX_DATA_WINDOW_KEY, BLOX_PAGE_SEO_WINDOW_KEY, BLOX_STATE_WINDOW_KEY, BLOX_WEBSITE_ID_WINDOW_KEY } from './constants';
|
|
18
18
|
export { createBloxSSREntry } from './createSSREntry';
|
|
19
19
|
export type { BloxSSREntry, CreateBloxSSREntryOptions } from './createSSREntry';
|
|
20
|
+
export { fetchDatastoreSnapshot, querySnapshotRows, snapshotRows } from './datastore-snapshot';
|
|
21
|
+
export type { DatastoreSnapshot } from './datastore-snapshot';
|
|
20
22
|
export { polyfillBloxSsgGlobals } from './polyfill-node';
|
|
21
23
|
export { prerender } from './prerender';
|
|
22
24
|
export type { PrerenderOptions, PrerenderResult, RenderContext, RenderResult } from './prerender';
|
|
23
25
|
export { renderBloxSsgPage } from './render-resolved-page';
|
|
24
26
|
export type { BloxSsgRouterLike } from './render-resolved-page';
|
|
25
|
-
export { buildPageHead, buildSiteHead, generateNetlifyRedirects, generateRobotsTxt, generateSitemapIndexXml, generateSitemapXml, getSiteIconFlags, localeSitemapPath, splitSitemapPathsByLocale } from './seo';
|
|
26
|
-
export type { RedirectEntry, SeoPageData } from './seo';
|
|
27
|
+
export { buildPageHead, buildSiteHead, generateNetlifyRedirects, generateRobotsTxt, generateSitemapArtifacts, generateSitemapIndexXml, generateSitemapXml, getSiteIconFlags, localeSitemapPath, splitSitemapPathsByLocale } from './seo';
|
|
28
|
+
export type { RedirectEntry, SeoPageData, SitemapArtifact, SitemapRoute } from './seo';
|
|
27
29
|
export { buildJsonLd, extractPageText, generateLlmsFullTxt, generateLlmsTxt, mergeLlmParts } from './llm-artifacts';
|
|
28
30
|
export type { LlmArtifactsConfig, LlmPageEntry } from './llm-artifacts';
|
|
29
31
|
export { installBloxStateCache } from './state-cache';
|
|
30
32
|
export { resolveManifestProvenance, uploadBloxManifest } from './manifest-upload';
|
|
31
33
|
export type { ManifestProvenance, ManifestUpload } from './manifest-upload';
|
|
34
|
+
export { validateSsgOutput } from './validate-output';
|
|
35
|
+
export type { ValidateSsgOutputOptions } from './validate-output';
|
|
32
36
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ssg/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ssg/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACvE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAA;AACrH,YAAY,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AACrG;;;;;;;;;;GAUG;AACH,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAC5J,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,YAAY,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;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AE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,OAAO,CAAA;AACxO,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACtF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACnH,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACjF,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,YAAY,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA"}
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { j, k,
|
|
1
|
+
import { b as buildPageHead, c as primaryContextEntry, d as buildJsonLd, e as extractPageText, B as BloxBuildResponseError, h as bloxBuildJson } from "../validate-output-CfHo6w9k.js";
|
|
2
|
+
import { i, j, k, f, l, m, n, o, g, q, r, s, t, w, x, p, a, y, z, u, v } from "../validate-output-CfHo6w9k.js";
|
|
3
3
|
import { BLOX_STATE_WINDOW_KEY, BLOX_WEBSITE_ID_WINDOW_KEY } from "./client.mjs";
|
|
4
4
|
import { BLOX_COLLECTIONS_WINDOW_KEY, BLOX_DATA_WINDOW_KEY, BLOX_PAGE_SEO_WINDOW_KEY, getCollectionCache, getEmbeddedWebsiteId, installBloxStateCache, installCollectionCache } from "./client.mjs";
|
|
5
5
|
import { createPinia } from "pinia";
|
|
@@ -233,6 +233,76 @@ function createBloxSSREntry(options) {
|
|
|
233
233
|
}
|
|
234
234
|
return { render, prefetchResolve };
|
|
235
235
|
}
|
|
236
|
+
async function fetchDatastoreSnapshot(options) {
|
|
237
|
+
var _a;
|
|
238
|
+
const endpointPrefix = options.endpointPrefix ?? "/datastore";
|
|
239
|
+
const limit = options.limit ?? 2e3;
|
|
240
|
+
const collections = {};
|
|
241
|
+
for (const collection of options.collections) {
|
|
242
|
+
collections[collection] = {};
|
|
243
|
+
const localized = await Promise.all(options.locales.map(async (locale) => {
|
|
244
|
+
const rows = [];
|
|
245
|
+
for (let offset = 0; ; offset += limit) {
|
|
246
|
+
const url = new URL(
|
|
247
|
+
`${endpointPrefix}/${encodeURIComponent(options.store)}/collections/${encodeURIComponent(collection)}`,
|
|
248
|
+
options.apiBase
|
|
249
|
+
);
|
|
250
|
+
url.searchParams.set("locale", locale);
|
|
251
|
+
url.searchParams.set("limit", String(limit));
|
|
252
|
+
url.searchParams.set("offset", String(offset));
|
|
253
|
+
const page = await bloxBuildJson(
|
|
254
|
+
url,
|
|
255
|
+
{},
|
|
256
|
+
options.requestOptions
|
|
257
|
+
);
|
|
258
|
+
if (!Array.isArray(page)) {
|
|
259
|
+
throw new TypeError(`Datastore snapshot response is not an array: ${collection}/${locale}`);
|
|
260
|
+
}
|
|
261
|
+
rows.push(...page);
|
|
262
|
+
if (page.length < limit) break;
|
|
263
|
+
}
|
|
264
|
+
return [locale, rows];
|
|
265
|
+
}));
|
|
266
|
+
for (const [locale, rows] of localized) collections[collection][locale] = rows;
|
|
267
|
+
(_a = options.onCollection) == null ? void 0 : _a.call(
|
|
268
|
+
options,
|
|
269
|
+
collection,
|
|
270
|
+
Object.fromEntries(localized.map(([locale, rows]) => [locale, rows.length]))
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
return {
|
|
274
|
+
version: 1,
|
|
275
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
276
|
+
apiBase: options.apiBase,
|
|
277
|
+
store: options.store,
|
|
278
|
+
collections
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
function snapshotRows(snapshot, collection, locale) {
|
|
282
|
+
var _a;
|
|
283
|
+
const rows = (_a = snapshot.collections[collection]) == null ? void 0 : _a[locale];
|
|
284
|
+
if (!rows) throw new Error(`Datastore snapshot miss: ${collection}/${locale}`);
|
|
285
|
+
return rows;
|
|
286
|
+
}
|
|
287
|
+
function querySnapshotRows(snapshot, options) {
|
|
288
|
+
var _a;
|
|
289
|
+
let rows = snapshotRows(snapshot, options.collection, options.locale);
|
|
290
|
+
if (options.q) {
|
|
291
|
+
const match = options.q.match(/^\s*([A-Za-z0-9_.-]+)\s+eq\s+"((?:\\.|[^"])*)"\s*$/);
|
|
292
|
+
if (!match) throw new Error(`Unsupported snapshot SCIM query: ${options.q}`);
|
|
293
|
+
const [, field, raw] = match;
|
|
294
|
+
const expected = raw.replace(/\\"/g, '"').replace(/\\\\/g, "\\");
|
|
295
|
+
rows = rows.filter((row) => String(row[field]) === expected);
|
|
296
|
+
}
|
|
297
|
+
const offset = options.offset ?? 0;
|
|
298
|
+
rows = rows.slice(offset, offset + (options.limit ?? 100));
|
|
299
|
+
if ((_a = options.select) == null ? void 0 : _a.length) {
|
|
300
|
+
return rows.map((row) => Object.fromEntries(
|
|
301
|
+
options.select.filter((key) => key in row).map((key) => [key, row[key]])
|
|
302
|
+
));
|
|
303
|
+
}
|
|
304
|
+
return rows;
|
|
305
|
+
}
|
|
236
306
|
export {
|
|
237
307
|
BLOX_COLLECTIONS_WINDOW_KEY,
|
|
238
308
|
BLOX_DATA_WINDOW_KEY,
|
|
@@ -241,32 +311,37 @@ export {
|
|
|
241
311
|
BLOX_WEBSITE_ID_WINDOW_KEY,
|
|
242
312
|
BloxBuildResponseError,
|
|
243
313
|
bloxBuildJson,
|
|
244
|
-
|
|
314
|
+
i as bloxBuildRequest,
|
|
245
315
|
buildJsonLd,
|
|
246
316
|
buildPageHead,
|
|
247
|
-
|
|
317
|
+
j as buildSiteHead,
|
|
248
318
|
createBloxSSREntry,
|
|
249
319
|
extractPageText,
|
|
250
|
-
|
|
320
|
+
k as fetchCmsPrerenderPaths,
|
|
251
321
|
f as fetchCmsSiteData,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
g as
|
|
258
|
-
|
|
322
|
+
fetchDatastoreSnapshot,
|
|
323
|
+
l as generateLlmsFullTxt,
|
|
324
|
+
m as generateLlmsTxt,
|
|
325
|
+
n as generateNetlifyRedirects,
|
|
326
|
+
o as generateRobotsTxt,
|
|
327
|
+
g as generateSitemapArtifacts,
|
|
328
|
+
q as generateSitemapIndexXml,
|
|
329
|
+
r as generateSitemapXml,
|
|
330
|
+
s as getBloxBuildRequestOptions,
|
|
259
331
|
getCollectionCache,
|
|
260
332
|
getEmbeddedWebsiteId,
|
|
261
|
-
|
|
333
|
+
t as getSiteIconFlags,
|
|
262
334
|
installBloxStateCache,
|
|
263
335
|
installCollectionCache,
|
|
264
|
-
|
|
265
|
-
|
|
336
|
+
w as localeSitemapPath,
|
|
337
|
+
x as mergeLlmParts,
|
|
266
338
|
p as polyfillBloxSsgGlobals,
|
|
267
339
|
a as prerender,
|
|
340
|
+
querySnapshotRows,
|
|
268
341
|
renderBloxSsgPage,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
342
|
+
y as resolveManifestProvenance,
|
|
343
|
+
snapshotRows,
|
|
344
|
+
z as splitSitemapPathsByLocale,
|
|
345
|
+
u as uploadBloxManifest,
|
|
346
|
+
v as validateSsgOutput
|
|
272
347
|
};
|
|
@@ -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;
|
|
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;AAgBvE,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,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E,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;IAC7D,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,SAAS,CAAC,EAC/B,IAAoB,EACpB,YAA4B,EAC5B,WAA0C,EAC1C,KAAU,EACV,KAAY,EACZ,YAAiB,EACjB,QAAgB,EAChB,QAAe,EACf,WAAe,EACf,iBAAwB;AACxB;;;;;;;;;GASG;AACH,0BAA8B,EAC9B,QAAa,EACb,WAAkB,EAClB,cAAc,EACd,IAAY,EACZ,OAAc,EACd,SAAc,EACd,SAAc,EACd,WAAgB,EAChB,GAAQ,GACR,GAAE,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CAmTlD;AA4FD,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,SAAS,SAAK,GACZ,MAAM,CA8CR"}
|
package/dist/ssg/seo.d.ts
CHANGED
|
@@ -77,6 +77,23 @@ export declare function splitSitemapPathsByLocale(options: {
|
|
|
77
77
|
supportedLocales: string[];
|
|
78
78
|
}): Map<string, string[]>;
|
|
79
79
|
export declare function localeSitemapPath(locale: string): string;
|
|
80
|
+
export interface SitemapRoute {
|
|
81
|
+
path: string;
|
|
82
|
+
noindex?: boolean;
|
|
83
|
+
lastmod?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface SitemapArtifact {
|
|
86
|
+
path: string;
|
|
87
|
+
content: string;
|
|
88
|
+
}
|
|
89
|
+
export declare function generateSitemapArtifacts(options: {
|
|
90
|
+
routes: SitemapRoute[];
|
|
91
|
+
canonicalBase: string;
|
|
92
|
+
defaultLocale: string;
|
|
93
|
+
supportedLocales: string[];
|
|
94
|
+
splitByLocale?: boolean;
|
|
95
|
+
additionalSitemapPaths?: string[];
|
|
96
|
+
}): SitemapArtifact[];
|
|
80
97
|
export declare function generateRobotsTxt(options: {
|
|
81
98
|
robotsTxt?: string | null;
|
|
82
99
|
canonicalBase?: string;
|
package/dist/ssg/seo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seo.d.ts","sourceRoot":"","sources":["../../src/ssg/seo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAOzE,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;CACzD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAWlG;AAED,MAAM,WAAW,aAAa;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACnB;AAMD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE;IACtC,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,WAAW,GAAG,IAAI,CAAA;IAChC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE;QACV,KAAK,CAAC,EAAE,MAAM,CAAA;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AE,OAAO,CAAC,CAAA;CAAE,GAAG,IAAI,CAEtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shard-runner.d.ts","sourceRoot":"","sources":["../../src/ssg/shard-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAWH,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,iFAAiF;IACjF,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,8FAA8F;IAC9F,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AA4ED;;GAEG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"shard-runner.d.ts","sourceRoot":"","sources":["../../src/ssg/shard-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAWH,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,iFAAiF;IACjF,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,8FAA8F;IAC9F,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AA4ED;;GAEG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgI1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-output.d.ts","sourceRoot":"","sources":["../../src/ssg/validate-output.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,wBAAwB;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiDxF"}
|
|
@@ -500,6 +500,45 @@ function localeSitemapPath(locale) {
|
|
|
500
500
|
}
|
|
501
501
|
return `/sitemap-${locale}.xml`;
|
|
502
502
|
}
|
|
503
|
+
function generateSitemapArtifacts(options) {
|
|
504
|
+
const indexableRoutes = options.routes.filter((route) => !route.noindex);
|
|
505
|
+
const renderedPaths = indexableRoutes.map((route) => route.path);
|
|
506
|
+
const lastmod = Object.fromEntries(
|
|
507
|
+
indexableRoutes.flatMap((route) => route.lastmod ? [[route.path, route.lastmod]] : [])
|
|
508
|
+
);
|
|
509
|
+
if (options.splitByLocale === false) {
|
|
510
|
+
return [{
|
|
511
|
+
path: "/sitemap.xml",
|
|
512
|
+
content: generateSitemapXml({ renderedPaths, canonicalBase: options.canonicalBase, lastmod })
|
|
513
|
+
}];
|
|
514
|
+
}
|
|
515
|
+
const pathsByLocale = splitSitemapPathsByLocale({
|
|
516
|
+
renderedPaths,
|
|
517
|
+
defaultLocale: options.defaultLocale,
|
|
518
|
+
supportedLocales: options.supportedLocales
|
|
519
|
+
});
|
|
520
|
+
const localeArtifacts = [...pathsByLocale].map(([locale, paths]) => ({
|
|
521
|
+
path: localeSitemapPath(locale),
|
|
522
|
+
content: generateSitemapXml({
|
|
523
|
+
renderedPaths: paths,
|
|
524
|
+
canonicalBase: options.canonicalBase,
|
|
525
|
+
lastmod
|
|
526
|
+
})
|
|
527
|
+
}));
|
|
528
|
+
return [
|
|
529
|
+
{
|
|
530
|
+
path: "/sitemap.xml",
|
|
531
|
+
content: generateSitemapIndexXml({
|
|
532
|
+
canonicalBase: options.canonicalBase,
|
|
533
|
+
sitemapPaths: [
|
|
534
|
+
...localeArtifacts.map((artifact) => artifact.path),
|
|
535
|
+
...options.additionalSitemapPaths ?? []
|
|
536
|
+
]
|
|
537
|
+
})
|
|
538
|
+
},
|
|
539
|
+
...localeArtifacts
|
|
540
|
+
];
|
|
541
|
+
}
|
|
503
542
|
function generateRobotsTxt(options) {
|
|
504
543
|
const { robotsTxt, canonicalBase, noindex } = options;
|
|
505
544
|
if (noindex) {
|
|
@@ -978,38 +1017,25 @@ async function prerender({
|
|
|
978
1017
|
if (writeSharedAssets) {
|
|
979
1018
|
const sitemapPaths = rendered.filter((p) => !noindexPaths.has(p));
|
|
980
1019
|
if (canonicalBase && sitemapPaths.length > 0) {
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
generateSitemapXml({ renderedPaths: localePaths, canonicalBase, lastmod }),
|
|
993
|
-
"utf8"
|
|
994
|
-
);
|
|
995
|
-
sitemapFiles.push(sitemapPath);
|
|
996
|
-
}
|
|
1020
|
+
const artifacts = generateSitemapArtifacts({
|
|
1021
|
+
routes: sitemapPaths.map((routePath) => ({
|
|
1022
|
+
path: routePath,
|
|
1023
|
+
lastmod: lastmod[routePath]
|
|
1024
|
+
})),
|
|
1025
|
+
canonicalBase,
|
|
1026
|
+
defaultLocale: (website == null ? void 0 : website.default_locale) ?? "en",
|
|
1027
|
+
supportedLocales: (website == null ? void 0 : website.supported_locales) ?? [(website == null ? void 0 : website.default_locale) ?? "en"],
|
|
1028
|
+
splitByLocale: (_b = website == null ? void 0 : website.seo) == null ? void 0 : _b.sitemap_split_by_locale
|
|
1029
|
+
});
|
|
1030
|
+
for (const artifact of artifacts) {
|
|
997
1031
|
await fs.writeFile(
|
|
998
|
-
path.join(absClient,
|
|
999
|
-
|
|
1032
|
+
path.join(absClient, artifact.path.slice(1)),
|
|
1033
|
+
artifact.content,
|
|
1000
1034
|
"utf8"
|
|
1001
1035
|
);
|
|
1002
|
-
console.log(` Generated sitemap.xml (${sitemapFiles.length} locales, ${sitemapPaths.length} URLs)`);
|
|
1003
|
-
} else {
|
|
1004
|
-
await fs.writeFile(
|
|
1005
|
-
path.join(absClient, "sitemap.xml"),
|
|
1006
|
-
generateSitemapXml({ renderedPaths: sitemapPaths, canonicalBase, lastmod }),
|
|
1007
|
-
"utf8"
|
|
1008
|
-
);
|
|
1009
|
-
console.log(` Generated sitemap.xml (${sitemapPaths.length} URLs)`);
|
|
1010
1036
|
}
|
|
1011
1037
|
const skipped = noindexPaths.size > 0 ? ` (${noindexPaths.size} noindex excluded)` : "";
|
|
1012
|
-
|
|
1038
|
+
console.log(` Generated sitemap.xml (${artifacts.length} files, ${sitemapPaths.length} URLs)${skipped}`);
|
|
1013
1039
|
}
|
|
1014
1040
|
const robotsTxt = generateRobotsTxt({
|
|
1015
1041
|
robotsTxt: website == null ? void 0 : website.robots_txt,
|
|
@@ -1194,6 +1220,95 @@ function discoverInternalLinks(html) {
|
|
|
1194
1220
|
}
|
|
1195
1221
|
return [...out];
|
|
1196
1222
|
}
|
|
1223
|
+
const sitemapUrl = /<url>\s*<loc>[^<]+<\/loc>/m;
|
|
1224
|
+
const sitemapIndexEntry = /<sitemap>\s*<loc>[^<]+<\/loc>/gm;
|
|
1225
|
+
const sitemapLoc = /<loc>([^<]+)<\/loc>/;
|
|
1226
|
+
const loadingShell = /class=["'][^"']*\bblox-initial-loading\b/;
|
|
1227
|
+
const embeddedCmsState = /\b__BLOX_(?:STATE|DATA)__\b/;
|
|
1228
|
+
async function validateSsgOutput(options) {
|
|
1229
|
+
const outDir = path.resolve(options.outDir);
|
|
1230
|
+
const failures = [];
|
|
1231
|
+
const requiredFiles = options.requireFiles ?? [
|
|
1232
|
+
"robots.txt",
|
|
1233
|
+
"_redirects",
|
|
1234
|
+
"sitemap.xml",
|
|
1235
|
+
"llms.txt",
|
|
1236
|
+
"llms-full.txt"
|
|
1237
|
+
];
|
|
1238
|
+
const htmlFiles = await collectHtmlFiles(outDir);
|
|
1239
|
+
let hydratedFiles = 0;
|
|
1240
|
+
for (const file of htmlFiles) {
|
|
1241
|
+
const name = path.relative(outDir, file);
|
|
1242
|
+
const html = await fs.readFile(file, "utf8");
|
|
1243
|
+
if (embeddedCmsState.test(html)) hydratedFiles += 1;
|
|
1244
|
+
if (!/<title>[^<]+<\/title>/i.test(html)) failures.push(`${name}: missing page title`);
|
|
1245
|
+
if (!/<link\s[^>]*rel=["']canonical["'][^>]*>/i.test(html)) {
|
|
1246
|
+
failures.push(`${name}: missing canonical URL`);
|
|
1247
|
+
}
|
|
1248
|
+
if (!/<html[^>]*\slang=["'][^"']+["']/i.test(html)) failures.push(`${name}: missing html lang`);
|
|
1249
|
+
if (loadingShell.test(html) && !embeddedCmsState.test(html)) {
|
|
1250
|
+
failures.push(`${name}: contains only the Blox loading shell`);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
if (!htmlFiles.length) failures.push("output contains no HTML files");
|
|
1254
|
+
if (!hydratedFiles) failures.push("output contains no prerendered Blox hydration state");
|
|
1255
|
+
for (const required of requiredFiles) {
|
|
1256
|
+
try {
|
|
1257
|
+
const content = await fs.readFile(path.join(outDir, required), "utf8");
|
|
1258
|
+
if (required === "robots.txt" && /^Disallow:\s*\/\s*$/im.test(content)) {
|
|
1259
|
+
failures.push("robots.txt blocks the entire site");
|
|
1260
|
+
}
|
|
1261
|
+
if (required === "llms.txt" && !/^- \[[^\]]+\]\([^)]+\)/m.test(content)) {
|
|
1262
|
+
failures.push("llms.txt contains no page links");
|
|
1263
|
+
}
|
|
1264
|
+
if (required === "sitemap.xml") {
|
|
1265
|
+
failures.push(...await validateSitemap(outDir, content));
|
|
1266
|
+
}
|
|
1267
|
+
} catch {
|
|
1268
|
+
failures.push(`missing ${required}`);
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
if (failures.length) {
|
|
1272
|
+
throw new Error(`Invalid Blox SSG output:
|
|
1273
|
+
${failures.map((item) => ` - ${item}`).join("\n")}`);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
async function collectHtmlFiles(directory) {
|
|
1277
|
+
const entries = await fs.readdir(directory, { withFileTypes: true });
|
|
1278
|
+
const files = await Promise.all(entries.map(async (entry) => {
|
|
1279
|
+
const child = path.join(directory, entry.name);
|
|
1280
|
+
if (entry.isDirectory() && entry.name !== "server") return collectHtmlFiles(child);
|
|
1281
|
+
return entry.isFile() && entry.name.endsWith(".html") ? [child] : [];
|
|
1282
|
+
}));
|
|
1283
|
+
return files.flat();
|
|
1284
|
+
}
|
|
1285
|
+
async function validateSitemap(outDir, content) {
|
|
1286
|
+
var _a;
|
|
1287
|
+
if (sitemapUrl.test(content)) return [];
|
|
1288
|
+
const failures = [];
|
|
1289
|
+
const entries = content.match(sitemapIndexEntry) ?? [];
|
|
1290
|
+
if (!entries.length) return ["sitemap.xml contains neither page URLs nor child sitemaps"];
|
|
1291
|
+
let childUrlCount = 0;
|
|
1292
|
+
for (const entry of entries) {
|
|
1293
|
+
const loc = (_a = entry.match(sitemapLoc)) == null ? void 0 : _a[1];
|
|
1294
|
+
if (!loc) continue;
|
|
1295
|
+
const pathname = new URL(loc).pathname.replace(/^\/+/, "");
|
|
1296
|
+
const childPath = path.resolve(outDir, pathname);
|
|
1297
|
+
if (!childPath.startsWith(`${outDir}${path.sep}`)) {
|
|
1298
|
+
failures.push(`child sitemap escapes output directory: ${pathname}`);
|
|
1299
|
+
continue;
|
|
1300
|
+
}
|
|
1301
|
+
try {
|
|
1302
|
+
const child = await fs.readFile(childPath, "utf8");
|
|
1303
|
+
if (!sitemapUrl.test(child)) failures.push(`${pathname} contains no page URLs`);
|
|
1304
|
+
else childUrlCount += (child.match(/<url>/g) ?? []).length;
|
|
1305
|
+
} catch {
|
|
1306
|
+
failures.push(`missing child sitemap ${pathname}`);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
if (!childUrlCount) failures.push("sitemap index child files contain no page URLs");
|
|
1310
|
+
return failures;
|
|
1311
|
+
}
|
|
1197
1312
|
exports.BloxBuildResponseError = BloxBuildResponseError;
|
|
1198
1313
|
exports.bloxBuildJson = bloxBuildJson;
|
|
1199
1314
|
exports.bloxBuildRequest = bloxBuildRequest;
|
|
@@ -1207,6 +1322,7 @@ exports.generateLlmsFullTxt = generateLlmsFullTxt;
|
|
|
1207
1322
|
exports.generateLlmsTxt = generateLlmsTxt;
|
|
1208
1323
|
exports.generateNetlifyRedirects = generateNetlifyRedirects;
|
|
1209
1324
|
exports.generateRobotsTxt = generateRobotsTxt;
|
|
1325
|
+
exports.generateSitemapArtifacts = generateSitemapArtifacts;
|
|
1210
1326
|
exports.generateSitemapIndexXml = generateSitemapIndexXml;
|
|
1211
1327
|
exports.generateSitemapXml = generateSitemapXml;
|
|
1212
1328
|
exports.getBloxBuildRequestOptions = getBloxBuildRequestOptions;
|
|
@@ -1220,3 +1336,4 @@ exports.primaryContextEntry = primaryContextEntry;
|
|
|
1220
1336
|
exports.resolveManifestProvenance = resolveManifestProvenance;
|
|
1221
1337
|
exports.splitSitemapPathsByLocale = splitSitemapPathsByLocale;
|
|
1222
1338
|
exports.uploadBloxManifest = uploadBloxManifest;
|
|
1339
|
+
exports.validateSsgOutput = validateSsgOutput;
|
|
@@ -477,6 +477,45 @@ function localeSitemapPath(locale) {
|
|
|
477
477
|
}
|
|
478
478
|
return `/sitemap-${locale}.xml`;
|
|
479
479
|
}
|
|
480
|
+
function generateSitemapArtifacts(options) {
|
|
481
|
+
const indexableRoutes = options.routes.filter((route) => !route.noindex);
|
|
482
|
+
const renderedPaths = indexableRoutes.map((route) => route.path);
|
|
483
|
+
const lastmod = Object.fromEntries(
|
|
484
|
+
indexableRoutes.flatMap((route) => route.lastmod ? [[route.path, route.lastmod]] : [])
|
|
485
|
+
);
|
|
486
|
+
if (options.splitByLocale === false) {
|
|
487
|
+
return [{
|
|
488
|
+
path: "/sitemap.xml",
|
|
489
|
+
content: generateSitemapXml({ renderedPaths, canonicalBase: options.canonicalBase, lastmod })
|
|
490
|
+
}];
|
|
491
|
+
}
|
|
492
|
+
const pathsByLocale = splitSitemapPathsByLocale({
|
|
493
|
+
renderedPaths,
|
|
494
|
+
defaultLocale: options.defaultLocale,
|
|
495
|
+
supportedLocales: options.supportedLocales
|
|
496
|
+
});
|
|
497
|
+
const localeArtifacts = [...pathsByLocale].map(([locale, paths]) => ({
|
|
498
|
+
path: localeSitemapPath(locale),
|
|
499
|
+
content: generateSitemapXml({
|
|
500
|
+
renderedPaths: paths,
|
|
501
|
+
canonicalBase: options.canonicalBase,
|
|
502
|
+
lastmod
|
|
503
|
+
})
|
|
504
|
+
}));
|
|
505
|
+
return [
|
|
506
|
+
{
|
|
507
|
+
path: "/sitemap.xml",
|
|
508
|
+
content: generateSitemapIndexXml({
|
|
509
|
+
canonicalBase: options.canonicalBase,
|
|
510
|
+
sitemapPaths: [
|
|
511
|
+
...localeArtifacts.map((artifact) => artifact.path),
|
|
512
|
+
...options.additionalSitemapPaths ?? []
|
|
513
|
+
]
|
|
514
|
+
})
|
|
515
|
+
},
|
|
516
|
+
...localeArtifacts
|
|
517
|
+
];
|
|
518
|
+
}
|
|
480
519
|
function generateRobotsTxt(options) {
|
|
481
520
|
const { robotsTxt, canonicalBase, noindex } = options;
|
|
482
521
|
if (noindex) {
|
|
@@ -955,38 +994,25 @@ async function prerender({
|
|
|
955
994
|
if (writeSharedAssets) {
|
|
956
995
|
const sitemapPaths = rendered.filter((p) => !noindexPaths.has(p));
|
|
957
996
|
if (canonicalBase && sitemapPaths.length > 0) {
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
generateSitemapXml({ renderedPaths: localePaths, canonicalBase, lastmod }),
|
|
970
|
-
"utf8"
|
|
971
|
-
);
|
|
972
|
-
sitemapFiles.push(sitemapPath);
|
|
973
|
-
}
|
|
997
|
+
const artifacts = generateSitemapArtifacts({
|
|
998
|
+
routes: sitemapPaths.map((routePath) => ({
|
|
999
|
+
path: routePath,
|
|
1000
|
+
lastmod: lastmod[routePath]
|
|
1001
|
+
})),
|
|
1002
|
+
canonicalBase,
|
|
1003
|
+
defaultLocale: (website == null ? void 0 : website.default_locale) ?? "en",
|
|
1004
|
+
supportedLocales: (website == null ? void 0 : website.supported_locales) ?? [(website == null ? void 0 : website.default_locale) ?? "en"],
|
|
1005
|
+
splitByLocale: (_b = website == null ? void 0 : website.seo) == null ? void 0 : _b.sitemap_split_by_locale
|
|
1006
|
+
});
|
|
1007
|
+
for (const artifact of artifacts) {
|
|
974
1008
|
await fs.writeFile(
|
|
975
|
-
path.join(absClient,
|
|
976
|
-
|
|
1009
|
+
path.join(absClient, artifact.path.slice(1)),
|
|
1010
|
+
artifact.content,
|
|
977
1011
|
"utf8"
|
|
978
1012
|
);
|
|
979
|
-
console.log(` Generated sitemap.xml (${sitemapFiles.length} locales, ${sitemapPaths.length} URLs)`);
|
|
980
|
-
} else {
|
|
981
|
-
await fs.writeFile(
|
|
982
|
-
path.join(absClient, "sitemap.xml"),
|
|
983
|
-
generateSitemapXml({ renderedPaths: sitemapPaths, canonicalBase, lastmod }),
|
|
984
|
-
"utf8"
|
|
985
|
-
);
|
|
986
|
-
console.log(` Generated sitemap.xml (${sitemapPaths.length} URLs)`);
|
|
987
1013
|
}
|
|
988
1014
|
const skipped = noindexPaths.size > 0 ? ` (${noindexPaths.size} noindex excluded)` : "";
|
|
989
|
-
|
|
1015
|
+
console.log(` Generated sitemap.xml (${artifacts.length} files, ${sitemapPaths.length} URLs)${skipped}`);
|
|
990
1016
|
}
|
|
991
1017
|
const robotsTxt = generateRobotsTxt({
|
|
992
1018
|
robotsTxt: website == null ? void 0 : website.robots_txt,
|
|
@@ -1171,31 +1197,122 @@ function discoverInternalLinks(html) {
|
|
|
1171
1197
|
}
|
|
1172
1198
|
return [...out];
|
|
1173
1199
|
}
|
|
1200
|
+
const sitemapUrl = /<url>\s*<loc>[^<]+<\/loc>/m;
|
|
1201
|
+
const sitemapIndexEntry = /<sitemap>\s*<loc>[^<]+<\/loc>/gm;
|
|
1202
|
+
const sitemapLoc = /<loc>([^<]+)<\/loc>/;
|
|
1203
|
+
const loadingShell = /class=["'][^"']*\bblox-initial-loading\b/;
|
|
1204
|
+
const embeddedCmsState = /\b__BLOX_(?:STATE|DATA)__\b/;
|
|
1205
|
+
async function validateSsgOutput(options) {
|
|
1206
|
+
const outDir = path.resolve(options.outDir);
|
|
1207
|
+
const failures = [];
|
|
1208
|
+
const requiredFiles = options.requireFiles ?? [
|
|
1209
|
+
"robots.txt",
|
|
1210
|
+
"_redirects",
|
|
1211
|
+
"sitemap.xml",
|
|
1212
|
+
"llms.txt",
|
|
1213
|
+
"llms-full.txt"
|
|
1214
|
+
];
|
|
1215
|
+
const htmlFiles = await collectHtmlFiles(outDir);
|
|
1216
|
+
let hydratedFiles = 0;
|
|
1217
|
+
for (const file of htmlFiles) {
|
|
1218
|
+
const name = path.relative(outDir, file);
|
|
1219
|
+
const html = await fs.readFile(file, "utf8");
|
|
1220
|
+
if (embeddedCmsState.test(html)) hydratedFiles += 1;
|
|
1221
|
+
if (!/<title>[^<]+<\/title>/i.test(html)) failures.push(`${name}: missing page title`);
|
|
1222
|
+
if (!/<link\s[^>]*rel=["']canonical["'][^>]*>/i.test(html)) {
|
|
1223
|
+
failures.push(`${name}: missing canonical URL`);
|
|
1224
|
+
}
|
|
1225
|
+
if (!/<html[^>]*\slang=["'][^"']+["']/i.test(html)) failures.push(`${name}: missing html lang`);
|
|
1226
|
+
if (loadingShell.test(html) && !embeddedCmsState.test(html)) {
|
|
1227
|
+
failures.push(`${name}: contains only the Blox loading shell`);
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
if (!htmlFiles.length) failures.push("output contains no HTML files");
|
|
1231
|
+
if (!hydratedFiles) failures.push("output contains no prerendered Blox hydration state");
|
|
1232
|
+
for (const required of requiredFiles) {
|
|
1233
|
+
try {
|
|
1234
|
+
const content = await fs.readFile(path.join(outDir, required), "utf8");
|
|
1235
|
+
if (required === "robots.txt" && /^Disallow:\s*\/\s*$/im.test(content)) {
|
|
1236
|
+
failures.push("robots.txt blocks the entire site");
|
|
1237
|
+
}
|
|
1238
|
+
if (required === "llms.txt" && !/^- \[[^\]]+\]\([^)]+\)/m.test(content)) {
|
|
1239
|
+
failures.push("llms.txt contains no page links");
|
|
1240
|
+
}
|
|
1241
|
+
if (required === "sitemap.xml") {
|
|
1242
|
+
failures.push(...await validateSitemap(outDir, content));
|
|
1243
|
+
}
|
|
1244
|
+
} catch {
|
|
1245
|
+
failures.push(`missing ${required}`);
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
if (failures.length) {
|
|
1249
|
+
throw new Error(`Invalid Blox SSG output:
|
|
1250
|
+
${failures.map((item) => ` - ${item}`).join("\n")}`);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
async function collectHtmlFiles(directory) {
|
|
1254
|
+
const entries = await fs.readdir(directory, { withFileTypes: true });
|
|
1255
|
+
const files = await Promise.all(entries.map(async (entry) => {
|
|
1256
|
+
const child = path.join(directory, entry.name);
|
|
1257
|
+
if (entry.isDirectory() && entry.name !== "server") return collectHtmlFiles(child);
|
|
1258
|
+
return entry.isFile() && entry.name.endsWith(".html") ? [child] : [];
|
|
1259
|
+
}));
|
|
1260
|
+
return files.flat();
|
|
1261
|
+
}
|
|
1262
|
+
async function validateSitemap(outDir, content) {
|
|
1263
|
+
var _a;
|
|
1264
|
+
if (sitemapUrl.test(content)) return [];
|
|
1265
|
+
const failures = [];
|
|
1266
|
+
const entries = content.match(sitemapIndexEntry) ?? [];
|
|
1267
|
+
if (!entries.length) return ["sitemap.xml contains neither page URLs nor child sitemaps"];
|
|
1268
|
+
let childUrlCount = 0;
|
|
1269
|
+
for (const entry of entries) {
|
|
1270
|
+
const loc = (_a = entry.match(sitemapLoc)) == null ? void 0 : _a[1];
|
|
1271
|
+
if (!loc) continue;
|
|
1272
|
+
const pathname = new URL(loc).pathname.replace(/^\/+/, "");
|
|
1273
|
+
const childPath = path.resolve(outDir, pathname);
|
|
1274
|
+
if (!childPath.startsWith(`${outDir}${path.sep}`)) {
|
|
1275
|
+
failures.push(`child sitemap escapes output directory: ${pathname}`);
|
|
1276
|
+
continue;
|
|
1277
|
+
}
|
|
1278
|
+
try {
|
|
1279
|
+
const child = await fs.readFile(childPath, "utf8");
|
|
1280
|
+
if (!sitemapUrl.test(child)) failures.push(`${pathname} contains no page URLs`);
|
|
1281
|
+
else childUrlCount += (child.match(/<url>/g) ?? []).length;
|
|
1282
|
+
} catch {
|
|
1283
|
+
failures.push(`missing child sitemap ${pathname}`);
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
if (!childUrlCount) failures.push("sitemap index child files contain no page URLs");
|
|
1287
|
+
return failures;
|
|
1288
|
+
}
|
|
1174
1289
|
export {
|
|
1290
|
+
llmArtifacts as A,
|
|
1175
1291
|
BloxBuildResponseError as B,
|
|
1176
1292
|
prerender as a,
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1293
|
+
buildPageHead as b,
|
|
1294
|
+
primaryContextEntry as c,
|
|
1295
|
+
buildJsonLd as d,
|
|
1296
|
+
extractPageText as e,
|
|
1181
1297
|
fetchCmsSiteData as f,
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1298
|
+
generateSitemapArtifacts as g,
|
|
1299
|
+
bloxBuildJson as h,
|
|
1300
|
+
bloxBuildRequest as i,
|
|
1301
|
+
buildSiteHead as j,
|
|
1302
|
+
fetchCmsPrerenderPaths as k,
|
|
1303
|
+
generateLlmsFullTxt as l,
|
|
1304
|
+
generateLlmsTxt as m,
|
|
1305
|
+
generateNetlifyRedirects as n,
|
|
1306
|
+
generateRobotsTxt as o,
|
|
1191
1307
|
polyfillBloxSsgGlobals as p,
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1308
|
+
generateSitemapIndexXml as q,
|
|
1309
|
+
generateSitemapXml as r,
|
|
1310
|
+
getBloxBuildRequestOptions as s,
|
|
1311
|
+
getSiteIconFlags as t,
|
|
1196
1312
|
uploadBloxManifest as u,
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1313
|
+
validateSsgOutput as v,
|
|
1314
|
+
localeSitemapPath as w,
|
|
1315
|
+
mergeLlmParts as x,
|
|
1316
|
+
resolveManifestProvenance as y,
|
|
1317
|
+
splitSitemapPathsByLocale as z
|
|
1201
1318
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bagelink/blox",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.15.
|
|
4
|
+
"version": "1.15.535",
|
|
5
5
|
"description": "Blox page builder library for drag-and-drop page building and static data management",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Bagel Studio",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"static-pages"
|
|
29
29
|
],
|
|
30
30
|
"bin": {
|
|
31
|
-
"blox-ssg": "
|
|
31
|
+
"blox-ssg": "dist/ssg/cli.mjs"
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": [
|
|
34
34
|
"**/*.css",
|