@bagelink/blox 1.15.641 → 1.15.643
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-Dpy8KM8K.js → shard-runner-A_vfoOw0.js} +2 -2
- package/dist/{shard-runner-kul5GCkF.cjs → shard-runner-BoSrSIzQ.cjs} +2 -2
- package/dist/ssg/cli.cjs +2 -2
- package/dist/ssg/cli.mjs +2 -2
- package/dist/ssg/cms-routes.d.ts.map +1 -1
- package/dist/ssg/index.cjs +1 -1
- package/dist/ssg/index.mjs +2 -2
- package/dist/{validate-output-Bece4IcI.js → validate-output-CBUyK03E.js} +28 -4
- package/dist/{validate-output-uWZ9-FOM.cjs → validate-output-CGCpqI7T.cjs} +28 -4
- package/package.json +1 -1
|
@@ -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-CBUyK03E.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-CBUyK03E.js").then((n) => n.A);
|
|
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({
|
|
@@ -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-CGCpqI7T.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-CGCpqI7T.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({
|
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-CGCpqI7T.cjs");
|
|
7
7
|
function installFetchTimeout() {
|
|
8
8
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
9
9
|
const original = globalThis.fetch;
|
|
@@ -141,7 +141,7 @@ Environment:
|
|
|
141
141
|
if (shardsOpt !== null || routesCmd) {
|
|
142
142
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
143
143
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
144
|
-
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-
|
|
144
|
+
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-BoSrSIzQ.cjs"));
|
|
145
145
|
const code = await runSharded({
|
|
146
146
|
shards: shardsOpt ?? "auto",
|
|
147
147
|
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 } from "../validate-output-
|
|
5
|
+
import { v as validateSsgOutput, u as uploadBloxManifest, p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, b as buildCollectionResolver, a as prerender } from "../validate-output-CBUyK03E.js";
|
|
6
6
|
function installFetchTimeout() {
|
|
7
7
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
8
8
|
const original = globalThis.fetch;
|
|
@@ -140,7 +140,7 @@ Environment:
|
|
|
140
140
|
if (shardsOpt !== null || routesCmd) {
|
|
141
141
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
142
142
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
143
|
-
const { runSharded } = await import("../shard-runner-
|
|
143
|
+
const { runSharded } = await import("../shard-runner-A_vfoOw0.js");
|
|
144
144
|
const code = await runSharded({
|
|
145
145
|
shards: shardsOpt ?? "auto",
|
|
146
146
|
mode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cms-routes.d.ts","sourceRoot":"","sources":["../../src/ssg/cms-routes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAoB9D,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,WAAW;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,WAAW,CAAA;IACpB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,8EAA8E;IAC9E,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,SAAS,EAAE,aAAa,EAAE,CAAA;IAC1B,oEAAoE;IACpE,WAAW,EAAE,aAAa,EAAE,CAAA;IAC5B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;CAC3D;AAYD;;;GAGG;AACH,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,MAAM,EAAE,EACf,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,MAAM,EAAE,GACxB,MAAM,EAAE,CASV;AAMD;;;GAGG;AACH,wBAAsB,gBAAgB,CACrC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,cAAc,GAAE,uBAA4B,GAC1C,OAAO,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"cms-routes.d.ts","sourceRoot":"","sources":["../../src/ssg/cms-routes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AA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,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,GACxD,kBAAkB,CAapB"}
|
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-CGCpqI7T.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");
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as buildPageHead, d as primaryContextEntry, e as buildJsonLd, h as extractPageText, B as BloxBuildResponseError, i as bloxBuildJson } from "../validate-output-
|
|
2
|
-
import { j, k, f, l, m, n, o, g, q, r, s, t, w, x, p, a, y, z, u, v } from "../validate-output-
|
|
1
|
+
import { c as buildPageHead, d as primaryContextEntry, e as buildJsonLd, h as extractPageText, B as BloxBuildResponseError, i as bloxBuildJson } from "../validate-output-CBUyK03E.js";
|
|
2
|
+
import { j, k, f, l, m, n, o, g, q, r, s, t, w, x, p, a, y, z, u, v } from "../validate-output-CBUyK03E.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";
|
|
@@ -78,7 +78,7 @@ function localizePath(slug, locale, defaultLocale) {
|
|
|
78
78
|
return `/${locale}${s}`;
|
|
79
79
|
}
|
|
80
80
|
async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
81
|
-
var _a, _b, _c;
|
|
81
|
+
var _a, _b, _c, _d;
|
|
82
82
|
const websiteId = requestOptions.websiteId ?? (typeof process !== "undefined" ? (_b = (_a = process.env) == null ? void 0 : _a.BLOX_WEBSITE_ID) == null ? void 0 : _b.trim() : void 0);
|
|
83
83
|
if (websiteId) {
|
|
84
84
|
const baseBundle = await bloxBuildJson(
|
|
@@ -103,12 +103,36 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
103
103
|
paths: localePaths.map((path2) => localizePath(path2, locale, defaultLocale2))
|
|
104
104
|
};
|
|
105
105
|
}));
|
|
106
|
+
const paths2 = [...new Set(localizedBundles.flatMap((result) => result.paths))];
|
|
107
|
+
const pathSet2 = new Set(paths2);
|
|
108
|
+
const defaultPages2 = ((_c = localizedBundles.find((result) => result.locale === defaultLocale2)) == null ? void 0 : _c.bundle.pages) ?? [];
|
|
109
|
+
const canonicalSlugById2 = new Map(
|
|
110
|
+
defaultPages2.flatMap((page) => page.id && page.slug && !page.slug.includes(":") ? [[page.id, page.slug]] : [])
|
|
111
|
+
);
|
|
112
|
+
const localeAliases2 = localizedBundles.flatMap(({ locale, bundle }) => {
|
|
113
|
+
if (locale === defaultLocale2) return [];
|
|
114
|
+
return bundle.pages.flatMap((page) => {
|
|
115
|
+
const canonicalSlug = page.id ? canonicalSlugById2.get(page.id) : void 0;
|
|
116
|
+
const fromPath = canonicalSlug ? localizePath(canonicalSlug, locale, defaultLocale2) : "";
|
|
117
|
+
if (page.status && page.status !== "published" || !canonicalSlug || !page.slug || page.slug.includes(":") || page.slug === canonicalSlug || pathSet2.has(fromPath)) return [];
|
|
118
|
+
return [{
|
|
119
|
+
from_path: fromPath,
|
|
120
|
+
to_path: localizePath(page.slug, locale, defaultLocale2),
|
|
121
|
+
status_code: 302
|
|
122
|
+
}];
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
const explicitSources2 = new Set(
|
|
126
|
+
baseBundle.redirects.filter((r) => r.from_path).map((r) => r.from_path.trim())
|
|
127
|
+
);
|
|
128
|
+
const redirects2 = baseBundle.redirects.filter((redirect) => redirect.from_path && redirect.to_path);
|
|
129
|
+
redirects2.push(...localeAliases2.filter((alias) => !explicitSources2.has(alias.from_path)));
|
|
106
130
|
return {
|
|
107
131
|
websiteId,
|
|
108
132
|
website: website2,
|
|
109
|
-
paths:
|
|
133
|
+
paths: paths2,
|
|
110
134
|
pageSlugs: [...new Set(localizedBundles.flatMap((result) => result.bundle.pages.flatMap((page) => page.slug ? [localizePath(page.slug, result.locale, defaultLocale2)] : [])))],
|
|
111
|
-
redirects:
|
|
135
|
+
redirects: redirects2,
|
|
112
136
|
collections: extractCollectionRefs(localizedBundles.flatMap((result) => result.bundle.pages)),
|
|
113
137
|
collectionItems
|
|
114
138
|
};
|
|
@@ -138,7 +162,7 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
138
162
|
}));
|
|
139
163
|
const paths = [...new Set(localizedPages.flatMap((result) => result.paths))];
|
|
140
164
|
const pathSet = new Set(paths);
|
|
141
|
-
const defaultPages = ((
|
|
165
|
+
const defaultPages = ((_d = localizedPages.find((result) => result.locale === defaultLocale)) == null ? void 0 : _d.pages) ?? [];
|
|
142
166
|
const canonicalSlugById = new Map(
|
|
143
167
|
defaultPages.flatMap((page) => page.id && page.slug && !page.slug.includes(":") ? [[page.id, page.slug]] : [])
|
|
144
168
|
);
|
|
@@ -101,7 +101,7 @@ function localizePath(slug, locale, defaultLocale) {
|
|
|
101
101
|
return `/${locale}${s}`;
|
|
102
102
|
}
|
|
103
103
|
async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
104
|
-
var _a, _b, _c;
|
|
104
|
+
var _a, _b, _c, _d;
|
|
105
105
|
const websiteId = requestOptions.websiteId ?? (typeof process !== "undefined" ? (_b = (_a = process.env) == null ? void 0 : _a.BLOX_WEBSITE_ID) == null ? void 0 : _b.trim() : void 0);
|
|
106
106
|
if (websiteId) {
|
|
107
107
|
const baseBundle = await bloxBuildJson(
|
|
@@ -126,12 +126,36 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
126
126
|
paths: localePaths.map((path2) => localizePath(path2, locale, defaultLocale2))
|
|
127
127
|
};
|
|
128
128
|
}));
|
|
129
|
+
const paths2 = [...new Set(localizedBundles.flatMap((result) => result.paths))];
|
|
130
|
+
const pathSet2 = new Set(paths2);
|
|
131
|
+
const defaultPages2 = ((_c = localizedBundles.find((result) => result.locale === defaultLocale2)) == null ? void 0 : _c.bundle.pages) ?? [];
|
|
132
|
+
const canonicalSlugById2 = new Map(
|
|
133
|
+
defaultPages2.flatMap((page) => page.id && page.slug && !page.slug.includes(":") ? [[page.id, page.slug]] : [])
|
|
134
|
+
);
|
|
135
|
+
const localeAliases2 = localizedBundles.flatMap(({ locale, bundle }) => {
|
|
136
|
+
if (locale === defaultLocale2) return [];
|
|
137
|
+
return bundle.pages.flatMap((page) => {
|
|
138
|
+
const canonicalSlug = page.id ? canonicalSlugById2.get(page.id) : void 0;
|
|
139
|
+
const fromPath = canonicalSlug ? localizePath(canonicalSlug, locale, defaultLocale2) : "";
|
|
140
|
+
if (page.status && page.status !== "published" || !canonicalSlug || !page.slug || page.slug.includes(":") || page.slug === canonicalSlug || pathSet2.has(fromPath)) return [];
|
|
141
|
+
return [{
|
|
142
|
+
from_path: fromPath,
|
|
143
|
+
to_path: localizePath(page.slug, locale, defaultLocale2),
|
|
144
|
+
status_code: 302
|
|
145
|
+
}];
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
const explicitSources2 = new Set(
|
|
149
|
+
baseBundle.redirects.filter((r) => r.from_path).map((r) => r.from_path.trim())
|
|
150
|
+
);
|
|
151
|
+
const redirects2 = baseBundle.redirects.filter((redirect) => redirect.from_path && redirect.to_path);
|
|
152
|
+
redirects2.push(...localeAliases2.filter((alias) => !explicitSources2.has(alias.from_path)));
|
|
129
153
|
return {
|
|
130
154
|
websiteId,
|
|
131
155
|
website: website2,
|
|
132
|
-
paths:
|
|
156
|
+
paths: paths2,
|
|
133
157
|
pageSlugs: [...new Set(localizedBundles.flatMap((result) => result.bundle.pages.flatMap((page) => page.slug ? [localizePath(page.slug, result.locale, defaultLocale2)] : [])))],
|
|
134
|
-
redirects:
|
|
158
|
+
redirects: redirects2,
|
|
135
159
|
collections: extractCollectionRefs(localizedBundles.flatMap((result) => result.bundle.pages)),
|
|
136
160
|
collectionItems
|
|
137
161
|
};
|
|
@@ -161,7 +185,7 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
161
185
|
}));
|
|
162
186
|
const paths = [...new Set(localizedPages.flatMap((result) => result.paths))];
|
|
163
187
|
const pathSet = new Set(paths);
|
|
164
|
-
const defaultPages = ((
|
|
188
|
+
const defaultPages = ((_d = localizedPages.find((result) => result.locale === defaultLocale)) == null ? void 0 : _d.pages) ?? [];
|
|
165
189
|
const canonicalSlugById = new Map(
|
|
166
190
|
defaultPages.flatMap((page) => page.id && page.slug && !page.slug.includes(":") ? [[page.id, page.slug]] : [])
|
|
167
191
|
);
|
package/package.json
CHANGED