@bagelink/blox 1.15.375 → 1.15.377
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/{prerender-CaqnL5Fj.cjs → prerender-CI54eV74.cjs} +5 -3
- package/dist/{prerender-B-nE1VpK.js → prerender-DfIkpbr8.js} +5 -3
- package/dist/{shard-runner-CDu9ntxJ.js → shard-runner-D4TGQ2FM.js} +2 -2
- package/dist/{shard-runner-C4LI5gGz.cjs → shard-runner-DB37MOsu.cjs} +2 -2
- package/dist/ssg/cli.cjs +3 -3
- package/dist/ssg/cli.mjs +3 -3
- 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/package.json +1 -1
|
@@ -96,6 +96,7 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
96
96
|
return { locale, pages, paths: localePaths.map((path2) => localizePath(path2, locale, defaultLocale)) };
|
|
97
97
|
}));
|
|
98
98
|
const paths = [...new Set(localizedPages.flatMap((result) => result.paths))];
|
|
99
|
+
const pathSet = new Set(paths);
|
|
99
100
|
const defaultPages = ((_a = localizedPages.find((result) => result.locale === defaultLocale)) == null ? void 0 : _a.pages) ?? [];
|
|
100
101
|
const canonicalSlugById = new Map(
|
|
101
102
|
defaultPages.flatMap((page) => page.id && page.slug && !page.slug.includes(":") ? [[page.id, page.slug]] : [])
|
|
@@ -104,9 +105,10 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
104
105
|
if (locale === defaultLocale) return [];
|
|
105
106
|
return pages.flatMap((page) => {
|
|
106
107
|
const canonicalSlug = page.id ? canonicalSlugById.get(page.id) : void 0;
|
|
107
|
-
|
|
108
|
+
const fromPath = canonicalSlug ? localizePath(canonicalSlug, locale, defaultLocale) : "";
|
|
109
|
+
if (page.status && page.status !== "published" || !canonicalSlug || !page.slug || page.slug.includes(":") || page.slug === canonicalSlug || pathSet.has(fromPath)) return [];
|
|
108
110
|
return [{
|
|
109
|
-
from_path:
|
|
111
|
+
from_path: fromPath,
|
|
110
112
|
to_path: localizePath(page.slug, locale, defaultLocale),
|
|
111
113
|
status_code: 302
|
|
112
114
|
}];
|
|
@@ -119,7 +121,7 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
119
121
|
);
|
|
120
122
|
const redirectItems = Array.isArray(rData) ? rData : rData.data ?? [];
|
|
121
123
|
const redirects = redirectItems.filter((r) => r.from_path && r.to_path);
|
|
122
|
-
const explicitSources = new Set(redirects.map((redirect) => redirect.from_path));
|
|
124
|
+
const explicitSources = new Set(redirects.map((redirect) => redirect.from_path.trim()));
|
|
123
125
|
redirects.push(...localeAliases.filter((alias) => !explicitSources.has(alias.from_path)));
|
|
124
126
|
const collections = extractCollectionRefs(localizedPages.flatMap((result) => result.pages));
|
|
125
127
|
return { websiteId: site.id, website, paths, redirects, collections };
|
|
@@ -73,6 +73,7 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
73
73
|
return { locale, pages, paths: localePaths.map((path2) => localizePath(path2, locale, defaultLocale)) };
|
|
74
74
|
}));
|
|
75
75
|
const paths = [...new Set(localizedPages.flatMap((result) => result.paths))];
|
|
76
|
+
const pathSet = new Set(paths);
|
|
76
77
|
const defaultPages = ((_a = localizedPages.find((result) => result.locale === defaultLocale)) == null ? void 0 : _a.pages) ?? [];
|
|
77
78
|
const canonicalSlugById = new Map(
|
|
78
79
|
defaultPages.flatMap((page) => page.id && page.slug && !page.slug.includes(":") ? [[page.id, page.slug]] : [])
|
|
@@ -81,9 +82,10 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
81
82
|
if (locale === defaultLocale) return [];
|
|
82
83
|
return pages.flatMap((page) => {
|
|
83
84
|
const canonicalSlug = page.id ? canonicalSlugById.get(page.id) : void 0;
|
|
84
|
-
|
|
85
|
+
const fromPath = canonicalSlug ? localizePath(canonicalSlug, locale, defaultLocale) : "";
|
|
86
|
+
if (page.status && page.status !== "published" || !canonicalSlug || !page.slug || page.slug.includes(":") || page.slug === canonicalSlug || pathSet.has(fromPath)) return [];
|
|
85
87
|
return [{
|
|
86
|
-
from_path:
|
|
88
|
+
from_path: fromPath,
|
|
87
89
|
to_path: localizePath(page.slug, locale, defaultLocale),
|
|
88
90
|
status_code: 302
|
|
89
91
|
}];
|
|
@@ -96,7 +98,7 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
96
98
|
);
|
|
97
99
|
const redirectItems = Array.isArray(rData) ? rData : rData.data ?? [];
|
|
98
100
|
const redirects = redirectItems.filter((r) => r.from_path && r.to_path);
|
|
99
|
-
const explicitSources = new Set(redirects.map((redirect) => redirect.from_path));
|
|
101
|
+
const explicitSources = new Set(redirects.map((redirect) => redirect.from_path.trim()));
|
|
100
102
|
redirects.push(...localeAliases.filter((alias) => !explicitSources.has(alias.from_path)));
|
|
101
103
|
const collections = extractCollectionRefs(localizedPages.flatMap((result) => result.pages));
|
|
102
104
|
return { websiteId: site.id, website, paths, redirects, collections };
|
|
@@ -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 } from "./prerender-
|
|
5
|
+
import { f as fetchCmsSiteData } from "./prerender-DfIkpbr8.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) {
|
|
@@ -83,7 +83,7 @@ async function runSharded(opts) {
|
|
|
83
83
|
}
|
|
84
84
|
if (process.env.BLOX_SSG_LLM !== "0") {
|
|
85
85
|
try {
|
|
86
|
-
const { mergeLlmParts } = await import("./prerender-
|
|
86
|
+
const { mergeLlmParts } = await import("./prerender-DfIkpbr8.js").then((n) => n.t);
|
|
87
87
|
const website = siteData.website;
|
|
88
88
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
89
89
|
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("./prerender-
|
|
29
|
+
const llmArtifacts = require("./prerender-CI54eV74.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) {
|
|
@@ -107,7 +107,7 @@ async function runSharded(opts) {
|
|
|
107
107
|
}
|
|
108
108
|
if (process.env.BLOX_SSG_LLM !== "0") {
|
|
109
109
|
try {
|
|
110
|
-
const { mergeLlmParts } = await Promise.resolve().then(() => require("./prerender-
|
|
110
|
+
const { mergeLlmParts } = await Promise.resolve().then(() => require("./prerender-CI54eV74.cjs")).then((n) => n.llmArtifacts);
|
|
111
111
|
const website = siteData.website;
|
|
112
112
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
113
113
|
const { pages } = await mergeLlmParts({
|
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("../prerender-
|
|
5
|
+
const llmArtifacts = require("../prerender-CI54eV74.cjs");
|
|
6
6
|
function installFetchTimeout() {
|
|
7
7
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
8
8
|
const original = globalThis.fetch;
|
|
@@ -113,7 +113,7 @@ Environment:
|
|
|
113
113
|
if (shardsOpt !== null || routesCmd) {
|
|
114
114
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
115
115
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
116
|
-
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-
|
|
116
|
+
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-DB37MOsu.cjs"));
|
|
117
117
|
const code = await runSharded({
|
|
118
118
|
shards: shardsOpt ?? "auto",
|
|
119
119
|
mode,
|
|
@@ -129,7 +129,7 @@ Environment:
|
|
|
129
129
|
const { apiBase, websiteName: configWebsiteName } = await resolveApiBase(mode);
|
|
130
130
|
await llmArtifacts.polyfillBloxSsgGlobals({ pageUrl: apiBase });
|
|
131
131
|
const websiteName = process.env.WEBSITE_NAME ?? configWebsiteName ?? "default";
|
|
132
|
-
console.log(`Fetching routes from ${apiBase} (mode: ${mode}, site: ${websiteName})…`);
|
|
132
|
+
console.log(siteDataFile ? `Loading cached site routes (mode: ${mode}, site: ${websiteName})…` : `Fetching routes from ${apiBase} (mode: ${mode}, site: ${websiteName})…`);
|
|
133
133
|
let paths = [];
|
|
134
134
|
let website = null;
|
|
135
135
|
let websiteId = "";
|
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 { p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, a as prerender } from "../prerender-
|
|
4
|
+
import { p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, a as prerender } from "../prerender-DfIkpbr8.js";
|
|
5
5
|
function installFetchTimeout() {
|
|
6
6
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
7
7
|
const original = globalThis.fetch;
|
|
@@ -112,7 +112,7 @@ Environment:
|
|
|
112
112
|
if (shardsOpt !== null || routesCmd) {
|
|
113
113
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
114
114
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
115
|
-
const { runSharded } = await import("../shard-runner-
|
|
115
|
+
const { runSharded } = await import("../shard-runner-D4TGQ2FM.js");
|
|
116
116
|
const code = await runSharded({
|
|
117
117
|
shards: shardsOpt ?? "auto",
|
|
118
118
|
mode,
|
|
@@ -128,7 +128,7 @@ Environment:
|
|
|
128
128
|
const { apiBase, websiteName: configWebsiteName } = await resolveApiBase(mode);
|
|
129
129
|
await polyfillBloxSsgGlobals({ pageUrl: apiBase });
|
|
130
130
|
const websiteName = process.env.WEBSITE_NAME ?? configWebsiteName ?? "default";
|
|
131
|
-
console.log(`Fetching routes from ${apiBase} (mode: ${mode}, site: ${websiteName})…`);
|
|
131
|
+
console.log(siteDataFile ? `Loading cached site routes (mode: ${mode}, site: ${websiteName})…` : `Fetching routes from ${apiBase} (mode: ${mode}, site: ${websiteName})…`);
|
|
132
132
|
let paths = [];
|
|
133
133
|
let website = null;
|
|
134
134
|
let websiteId = "";
|
|
@@ -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;AAc9D,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,CAA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AE,MAAM,EACnB,cAAc,GAAE,uBAA4B,GAC1C,OAAO,CAAC,WAAW,CAAC,CAgFtB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC3C,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,cAAc,GAAE,uBAA4B,GAC1C,OAAO,CAAC,MAAM,EAAE,CAAC,CAGnB"}
|
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("../prerender-
|
|
25
|
+
const llmArtifacts = require("../prerender-CI54eV74.cjs");
|
|
26
26
|
const ssg_client = require("./client.cjs");
|
|
27
27
|
const pinia = require("pinia");
|
|
28
28
|
const vue = require("vue");
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as buildPageHead, c as primaryContextEntry, d as buildJsonLd, e as extractPageText, B as BloxBuildResponseError, g as bloxBuildJson } from "../prerender-
|
|
2
|
-
import { h, i, j, f, k, l, m, n, o, q, r, s, p, a } from "../prerender-
|
|
1
|
+
import { b as buildPageHead, c as primaryContextEntry, d as buildJsonLd, e as extractPageText, B as BloxBuildResponseError, g as bloxBuildJson } from "../prerender-DfIkpbr8.js";
|
|
2
|
+
import { h, i, j, f, k, l, m, n, o, q, r, s, p, a } from "../prerender-DfIkpbr8.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";
|
package/package.json
CHANGED