@bagelink/blox 1.15.228 → 1.15.230
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-FPRGhRSk.js → prerender-uiciCJgS.js} +9 -6
- package/dist/{prerender-CD3vMqn6.cjs → prerender-yrgljW5F.cjs} +9 -6
- package/dist/ssg/cli.cjs +5 -1
- package/dist/ssg/cli.mjs +5 -1
- package/dist/ssg/index.cjs +1 -1
- package/dist/ssg/index.mjs +2 -2
- package/dist/ssg/prerender.d.ts +6 -2
- package/dist/ssg/prerender.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -364,10 +364,14 @@ async function prerender({
|
|
|
364
364
|
/**
|
|
365
365
|
* How many `/resolve-path` prefetches to run in parallel, ahead of the render
|
|
366
366
|
* pool. Decouples the (I/O-bound) resolve latency from the (CPU-bound) render
|
|
367
|
-
* so pages render from an in-memory cache with no per-page round-trip.
|
|
368
|
-
*
|
|
367
|
+
* so pages render from an in-memory cache with no per-page round-trip.
|
|
368
|
+
*
|
|
369
|
+
* NOTE: this is PER PROCESS. When running N shards, the *total* load on the
|
|
370
|
+
* API is `N × this`, so keep it modest (a small API saturates ~5-wide). The
|
|
371
|
+
* sharded runner divides a global budget by the shard count. 0 disables
|
|
372
|
+
* prefetch (render resolves inline). Default 8.
|
|
369
373
|
*/
|
|
370
|
-
resolvePrefetchConcurrency =
|
|
374
|
+
resolvePrefetchConcurrency = 8,
|
|
371
375
|
mode = "dir",
|
|
372
376
|
website = null,
|
|
373
377
|
websiteId = "",
|
|
@@ -478,7 +482,8 @@ async function prerender({
|
|
|
478
482
|
}
|
|
479
483
|
}
|
|
480
484
|
}
|
|
481
|
-
|
|
485
|
+
await runResolvePrefetch().catch(() => {
|
|
486
|
+
});
|
|
482
487
|
while (queue.length && !stopped && rendered.length < maxPages) {
|
|
483
488
|
const workers = Array.from(
|
|
484
489
|
{ length: Math.min(concurrency, queue.length) },
|
|
@@ -486,8 +491,6 @@ async function prerender({
|
|
|
486
491
|
);
|
|
487
492
|
await Promise.all(workers);
|
|
488
493
|
}
|
|
489
|
-
await prefetchDone.catch(() => {
|
|
490
|
-
});
|
|
491
494
|
const canonicalBase = (((_a = website == null ? void 0 : website.seo) == null ? void 0 : _a.canonical_base_url) || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
492
495
|
if (writeSharedAssets) {
|
|
493
496
|
const sitemapPaths = rendered.filter((p) => !noindexPaths.has(p));
|
|
@@ -387,10 +387,14 @@ async function prerender({
|
|
|
387
387
|
/**
|
|
388
388
|
* How many `/resolve-path` prefetches to run in parallel, ahead of the render
|
|
389
389
|
* pool. Decouples the (I/O-bound) resolve latency from the (CPU-bound) render
|
|
390
|
-
* so pages render from an in-memory cache with no per-page round-trip.
|
|
391
|
-
*
|
|
390
|
+
* so pages render from an in-memory cache with no per-page round-trip.
|
|
391
|
+
*
|
|
392
|
+
* NOTE: this is PER PROCESS. When running N shards, the *total* load on the
|
|
393
|
+
* API is `N × this`, so keep it modest (a small API saturates ~5-wide). The
|
|
394
|
+
* sharded runner divides a global budget by the shard count. 0 disables
|
|
395
|
+
* prefetch (render resolves inline). Default 8.
|
|
392
396
|
*/
|
|
393
|
-
resolvePrefetchConcurrency =
|
|
397
|
+
resolvePrefetchConcurrency = 8,
|
|
394
398
|
mode = "dir",
|
|
395
399
|
website = null,
|
|
396
400
|
websiteId = "",
|
|
@@ -501,7 +505,8 @@ async function prerender({
|
|
|
501
505
|
}
|
|
502
506
|
}
|
|
503
507
|
}
|
|
504
|
-
|
|
508
|
+
await runResolvePrefetch().catch(() => {
|
|
509
|
+
});
|
|
505
510
|
while (queue.length && !stopped && rendered.length < maxPages) {
|
|
506
511
|
const workers = Array.from(
|
|
507
512
|
{ length: Math.min(concurrency, queue.length) },
|
|
@@ -509,8 +514,6 @@ async function prerender({
|
|
|
509
514
|
);
|
|
510
515
|
await Promise.all(workers);
|
|
511
516
|
}
|
|
512
|
-
await prefetchDone.catch(() => {
|
|
513
|
-
});
|
|
514
517
|
const canonicalBase = (((_a = website == null ? void 0 : website.seo) == null ? void 0 : _a.canonical_base_url) || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
515
518
|
if (writeSharedAssets) {
|
|
516
519
|
const sitemapPaths = rendered.filter((p) => !noindexPaths.has(p));
|
package/dist/ssg/cli.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
"use strict";
|
|
3
3
|
const process = require("node:process");
|
|
4
|
-
const prerender = require("../prerender-
|
|
4
|
+
const prerender = require("../prerender-yrgljW5F.cjs");
|
|
5
5
|
function installFetchTimeout() {
|
|
6
6
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
7
7
|
const original = globalThis.fetch;
|
|
@@ -156,6 +156,10 @@ Environment:
|
|
|
156
156
|
// Bounded concurrency — configurable so we don't overwhelm a small
|
|
157
157
|
// staging box. Defaults conservative; bump for beefy prod builds.
|
|
158
158
|
concurrency: Number(process.env.BLOX_SSG_CONCURRENCY) || 4,
|
|
159
|
+
// Per-process resolve-prefetch parallelism. The sharded runner sets
|
|
160
|
+
// this to (global budget / shard count) so N shards don't collectively
|
|
161
|
+
// hammer a small API. 0 disables prefetch (inline resolve).
|
|
162
|
+
resolvePrefetchConcurrency: process.env.BLOX_SSG_PREFETCH !== void 0 ? Number(process.env.BLOX_SSG_PREFETCH) : 8,
|
|
159
163
|
mode: "file",
|
|
160
164
|
// Only shard 0 writes shared, whole-site assets (sitemap/robots/_redirects)
|
|
161
165
|
// so parallel shards don't race/clobber them.
|
package/dist/ssg/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import process from "node:process";
|
|
3
|
-
import { p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, a as prerender } from "../prerender-
|
|
3
|
+
import { p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, a as prerender } from "../prerender-uiciCJgS.js";
|
|
4
4
|
function installFetchTimeout() {
|
|
5
5
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
6
6
|
const original = globalThis.fetch;
|
|
@@ -155,6 +155,10 @@ Environment:
|
|
|
155
155
|
// Bounded concurrency — configurable so we don't overwhelm a small
|
|
156
156
|
// staging box. Defaults conservative; bump for beefy prod builds.
|
|
157
157
|
concurrency: Number(process.env.BLOX_SSG_CONCURRENCY) || 4,
|
|
158
|
+
// Per-process resolve-prefetch parallelism. The sharded runner sets
|
|
159
|
+
// this to (global budget / shard count) so N shards don't collectively
|
|
160
|
+
// hammer a small API. 0 disables prefetch (inline resolve).
|
|
161
|
+
resolvePrefetchConcurrency: process.env.BLOX_SSG_PREFETCH !== void 0 ? Number(process.env.BLOX_SSG_PREFETCH) : 8,
|
|
158
162
|
mode: "file",
|
|
159
163
|
// Only shard 0 writes shared, whole-site assets (sitemap/robots/_redirects)
|
|
160
164
|
// so parallel shards don't race/clobber them.
|
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 prerender = require("../prerender-
|
|
25
|
+
const prerender = require("../prerender-yrgljW5F.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 } from "../prerender-
|
|
2
|
-
import { c, d, f, g, e, h, i, p, a } from "../prerender-
|
|
1
|
+
import { b as buildPageHead } from "../prerender-uiciCJgS.js";
|
|
2
|
+
import { c, d, f, g, e, h, i, p, a } from "../prerender-uiciCJgS.js";
|
|
3
3
|
import { BLOX_STATE_WINDOW_KEY, BLOX_COLLECTIONS_WINDOW_KEY, BLOX_WEBSITE_ID_WINDOW_KEY } from "./client.mjs";
|
|
4
4
|
import { BLOX_DATA_WINDOW_KEY, BLOX_PAGE_SEO_WINDOW_KEY, getCollectionCache, getEmbeddedWebsiteId, installBloxStateCache, installCollectionCache } from "./client.mjs";
|
|
5
5
|
import { createPinia } from "pinia";
|
package/dist/ssg/prerender.d.ts
CHANGED
|
@@ -80,8 +80,12 @@ export declare function prerender({ root, clientOutDir, serverEntry, paths, craw
|
|
|
80
80
|
/**
|
|
81
81
|
* How many `/resolve-path` prefetches to run in parallel, ahead of the render
|
|
82
82
|
* pool. Decouples the (I/O-bound) resolve latency from the (CPU-bound) render
|
|
83
|
-
* so pages render from an in-memory cache with no per-page round-trip.
|
|
84
|
-
*
|
|
83
|
+
* so pages render from an in-memory cache with no per-page round-trip.
|
|
84
|
+
*
|
|
85
|
+
* NOTE: this is PER PROCESS. When running N shards, the *total* load on the
|
|
86
|
+
* API is `N × this`, so keep it modest (a small API saturates ~5-wide). The
|
|
87
|
+
* sharded runner divides a global budget by the shard count. 0 disables
|
|
88
|
+
* prefetch (render resolves inline). Default 8.
|
|
85
89
|
*/
|
|
86
90
|
resolvePrefetchConcurrency, mode, website, websiteId, redirects, collections, }?: PrerenderOptions): Promise<PrerenderResult>;
|
|
87
91
|
export {};
|
|
@@ -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;AAe1C,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,YA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