@bagelink/blox 1.15.609 → 1.15.611

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.
@@ -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-TaFA9DJo.js";
5
+ import { f as fetchCmsSiteData, g as generateSitemapArtifacts } from "./validate-output-CVjmUmiV.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-TaFA9DJo.js").then((n) => n.A);
145
+ const { mergeLlmParts } = await import("./validate-output-CVjmUmiV.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-KdMpE6Uz.cjs");
29
+ const llmArtifacts = require("./validate-output-BTTHpr9g.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-KdMpE6Uz.cjs")).then((n) => n.llmArtifacts);
169
+ const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-BTTHpr9g.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-KdMpE6Uz.cjs");
6
+ const llmArtifacts = require("../validate-output-BTTHpr9g.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-BXU2Ymbj.cjs"));
144
+ const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-BJ5GOYAH.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, a as prerender } from "../validate-output-TaFA9DJo.js";
5
+ import { v as validateSsgOutput, u as uploadBloxManifest, p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, a as prerender } from "../validate-output-CVjmUmiV.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-BpRDqCOl.js");
143
+ const { runSharded } = await import("../shard-runner-AhSQzGqP.js");
144
144
  const code = await runSharded({
145
145
  shards: shardsOpt ?? "auto",
146
146
  mode,
@@ -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-KdMpE6Uz.cjs");
25
+ const llmArtifacts = require("../validate-output-BTTHpr9g.cjs");
26
26
  const ssg_buildGrant = require("./build-grant.cjs");
27
27
  const ssg_client = require("./client.cjs");
28
28
  const vue = require("vue");
@@ -1,5 +1,5 @@
1
- import { b as buildPageHead, c as primaryContextEntry, d as buildJsonLd, e as extractPageText, B as BloxBuildResponseError, h as bloxBuildJson } from "../validate-output-TaFA9DJo.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-TaFA9DJo.js";
1
+ import { b as buildPageHead, c as primaryContextEntry, d as buildJsonLd, e as extractPageText, B as BloxBuildResponseError, h as bloxBuildJson } from "../validate-output-CVjmUmiV.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-CVjmUmiV.js";
3
3
  import { parseBloxBuildGrantBody, resolveBloxBuildGrant } from "./build-grant.mjs";
4
4
  import { BLOX_STATE_WINDOW_KEY, BLOX_WEBSITE_ID_WINDOW_KEY } from "./client.mjs";
5
5
  import { BLOX_DATA_WINDOW_KEY } from "./client.mjs";
@@ -207,12 +207,18 @@ async function expandRoutes(apiBase, pages, requestOptions, locale) {
207
207
  const q = b.filter ? `&q=${encodeURIComponent(b.filter)}` : "";
208
208
  const localeParam = locale ? `&locale=${encodeURIComponent(locale)}` : "";
209
209
  const collectionPath = grantedWebsiteId ? `/blox-build/websites/${grantedWebsiteId}/collections/${b.store}/${b.collection}` : `/datastore/${b.store}/collections/${b.collection}`;
210
- const itemsData = await bloxBuildJson(
211
- `${apiBase}${collectionPath}?limit=200${localeParam}${q}`,
212
- {},
213
- requestOptions
214
- );
215
- const items = Array.isArray(itemsData) ? itemsData : itemsData.items ?? itemsData.data ?? [];
210
+ const pageSize = 1e3;
211
+ const items = [];
212
+ for (let offset = 0; ; offset += pageSize) {
213
+ const itemsData = await bloxBuildJson(
214
+ `${apiBase}${collectionPath}?offset=${offset}&limit=${pageSize}${localeParam}${q}`,
215
+ {},
216
+ requestOptions
217
+ );
218
+ const pageItems = Array.isArray(itemsData) ? itemsData : itemsData.items ?? itemsData.data ?? [];
219
+ items.push(...pageItems);
220
+ if (pageItems.length < pageSize) break;
221
+ }
216
222
  for (const item of items) {
217
223
  const bindValue = item[b.bind_by];
218
224
  if (typeof bindValue !== "string" || bindValue === "") continue;
@@ -184,12 +184,18 @@ async function expandRoutes(apiBase, pages, requestOptions, locale) {
184
184
  const q = b.filter ? `&q=${encodeURIComponent(b.filter)}` : "";
185
185
  const localeParam = locale ? `&locale=${encodeURIComponent(locale)}` : "";
186
186
  const collectionPath = grantedWebsiteId ? `/blox-build/websites/${grantedWebsiteId}/collections/${b.store}/${b.collection}` : `/datastore/${b.store}/collections/${b.collection}`;
187
- const itemsData = await bloxBuildJson(
188
- `${apiBase}${collectionPath}?limit=200${localeParam}${q}`,
189
- {},
190
- requestOptions
191
- );
192
- const items = Array.isArray(itemsData) ? itemsData : itemsData.items ?? itemsData.data ?? [];
187
+ const pageSize = 1e3;
188
+ const items = [];
189
+ for (let offset = 0; ; offset += pageSize) {
190
+ const itemsData = await bloxBuildJson(
191
+ `${apiBase}${collectionPath}?offset=${offset}&limit=${pageSize}${localeParam}${q}`,
192
+ {},
193
+ requestOptions
194
+ );
195
+ const pageItems = Array.isArray(itemsData) ? itemsData : itemsData.items ?? itemsData.data ?? [];
196
+ items.push(...pageItems);
197
+ if (pageItems.length < pageSize) break;
198
+ }
193
199
  for (const item of items) {
194
200
  const bindValue = item[b.bind_by];
195
201
  if (typeof bindValue !== "string" || bindValue === "") continue;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/blox",
3
3
  "type": "module",
4
- "version": "1.15.609",
4
+ "version": "1.15.611",
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",