@bagelink/blox 1.15.215 → 1.15.218

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/ssg/cli.cjs CHANGED
@@ -2,6 +2,15 @@
2
2
  "use strict";
3
3
  const process = require("node:process");
4
4
  const prerender = require("../prerender-BkTA1QZ6.cjs");
5
+ function installFetchTimeout() {
6
+ const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
7
+ const original = globalThis.fetch;
8
+ const wrapped = async (input, init) => {
9
+ if (init == null ? void 0 : init.signal) return original(input, init);
10
+ return original(input, { ...init, signal: AbortSignal.timeout(ms) });
11
+ };
12
+ globalThis.fetch = Object.assign(wrapped, original);
13
+ }
5
14
  async function resolveApiBase(mode) {
6
15
  if (process.env.BAGELINK_API_URL != null && process.env.BAGELINK_API_URL !== "") {
7
16
  return { apiBase: process.env.BAGELINK_API_URL };
@@ -31,6 +40,7 @@ async function resolveApiBase(mode) {
31
40
  }
32
41
  async function main() {
33
42
  var _a;
43
+ installFetchTimeout();
34
44
  const argv = process.argv.slice(2);
35
45
  const extraPaths = [];
36
46
  let crawl = false;
@@ -129,6 +139,9 @@ Environment:
129
139
  crawl,
130
140
  excludePaths,
131
141
  maxPages: 5e3,
142
+ // Bounded concurrency — configurable so we don't overwhelm a small
143
+ // staging box. Defaults conservative; bump for beefy prod builds.
144
+ concurrency: Number(process.env.BLOX_SSG_CONCURRENCY) || 4,
132
145
  mode: "file",
133
146
  website,
134
147
  websiteId,
package/dist/ssg/cli.mjs CHANGED
@@ -1,6 +1,15 @@
1
1
  #!/usr/bin/env bun
2
2
  import process from "node:process";
3
3
  import { p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, a as prerender } from "../prerender-wIuYNW6N.js";
4
+ function installFetchTimeout() {
5
+ const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
6
+ const original = globalThis.fetch;
7
+ const wrapped = async (input, init) => {
8
+ if (init == null ? void 0 : init.signal) return original(input, init);
9
+ return original(input, { ...init, signal: AbortSignal.timeout(ms) });
10
+ };
11
+ globalThis.fetch = Object.assign(wrapped, original);
12
+ }
4
13
  async function resolveApiBase(mode) {
5
14
  if (process.env.BAGELINK_API_URL != null && process.env.BAGELINK_API_URL !== "") {
6
15
  return { apiBase: process.env.BAGELINK_API_URL };
@@ -30,6 +39,7 @@ async function resolveApiBase(mode) {
30
39
  }
31
40
  async function main() {
32
41
  var _a;
42
+ installFetchTimeout();
33
43
  const argv = process.argv.slice(2);
34
44
  const extraPaths = [];
35
45
  let crawl = false;
@@ -128,6 +138,9 @@ Environment:
128
138
  crawl,
129
139
  excludePaths,
130
140
  maxPages: 5e3,
141
+ // Bounded concurrency — configurable so we don't overwhelm a small
142
+ // staging box. Defaults conservative; bump for beefy prod builds.
143
+ concurrency: Number(process.env.BLOX_SSG_CONCURRENCY) || 4,
131
144
  mode: "file",
132
145
  website,
133
146
  websiteId,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/blox",
3
3
  "type": "module",
4
- "version": "1.15.215",
4
+ "version": "1.15.218",
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",