@bagelink/blox 1.18.9 → 1.18.11
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/LICENSE +21 -0
- package/dist/{PreviewApp-DJ-zFK64.cjs → PreviewApp-B9zGzNoj.cjs} +1 -1
- package/dist/{PreviewApp-Eu1N9XYe.js → PreviewApp-DNvYww-1.js} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-BF52PPjt.cjs → PreviewApp.vue_vue_type_style_index_0_lang-BY4OFOi6.cjs} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-zkP_L9cF.js → PreviewApp.vue_vue_type_style_index_0_lang-B_1HZLks.js} +1 -1
- package/dist/api/index.d.ts +1 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/{appRuntime-DQRKuyja.cjs → appRuntime-7hLqxk2p.cjs} +2 -2
- package/dist/{appRuntime-Cmns1A7C.js → appRuntime-DbIMo4Ow.js} +2 -2
- package/dist/{index-I81QTzv-.js → index-9Rzzo_yF.js} +4 -3
- package/dist/{index-DUjEj7ts.cjs → index-De9SLPcI.cjs} +4 -3
- package/dist/index.cjs +5 -3
- package/dist/index.mjs +7 -5
- package/dist/manifest.d.ts +3 -0
- package/dist/manifest.d.ts.map +1 -1
- package/dist/{shard-runner-D1dDFt2v.js → shard-runner-DPI12yYi.js} +2 -2
- package/dist/{shard-runner-BJ9PEpxo.cjs → shard-runner-nITsCO5r.cjs} +2 -2
- package/dist/ssg/cli.cjs +15 -6
- package/dist/ssg/cli.mjs +15 -6
- package/dist/ssg/cms-routes.d.ts +4 -4
- package/dist/ssg/cms-routes.d.ts.map +1 -1
- package/dist/ssg/createSSREntry.d.ts +5 -1
- package/dist/ssg/createSSREntry.d.ts.map +1 -1
- package/dist/ssg/index.cjs +10 -6
- package/dist/ssg/index.mjs +11 -7
- package/dist/ssg/prerender.d.ts +4 -1
- package/dist/ssg/prerender.d.ts.map +1 -1
- package/dist/{validate-output-C48vY_9-.cjs → validate-output-K-8pYmLz.cjs} +48 -7
- package/dist/{validate-output-B0ZK_S-l.js → validate-output-UVCDNeUA.js} +48 -7
- package/package.json +124 -125
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Bagel Studio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
3
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-BY4OFOi6.cjs");
|
|
4
4
|
exports.default = PreviewApp_vue_vue_type_style_index_0_lang._sfc_main;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, h, provide, onMounted, onUnmounted, openBlock, createElementBlock, createVNode, unref, nextTick } from "vue";
|
|
2
|
-
import { e as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, f as BLOX_RUNTIME_KEY } from "./appRuntime-
|
|
2
|
+
import { e as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, f as BLOX_RUNTIME_KEY } from "./appRuntime-DbIMo4Ow.js";
|
|
3
3
|
function sendToEditor(msg) {
|
|
4
4
|
window.parent.postMessage(cloneForPostMessage(msg), "*");
|
|
5
5
|
}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CollectionItemsPage, PageResolveRead } from './types';
|
|
2
2
|
import { App, InjectionKey } from 'vue';
|
|
3
|
-
type CollectionResolver = (collection: string, options: ListItemsOptions) => Promise<Array<Record<string, unknown>> | null>;
|
|
3
|
+
export type CollectionResolver = (collection: string, options: ListItemsOptions) => Promise<Array<Record<string, unknown>> | null>;
|
|
4
4
|
export interface BloxApiOptions {
|
|
5
5
|
websiteName: string;
|
|
6
6
|
store: string;
|
|
@@ -64,5 +64,4 @@ export declare function getItemById<T = Record<string, unknown>>(collection: str
|
|
|
64
64
|
export declare function listItemsFromActiveApi<T = Record<string, unknown>>(collection: string, options?: ListItemsOptions): Promise<CollectionItemsPage & {
|
|
65
65
|
items: T[];
|
|
66
66
|
}>;
|
|
67
|
-
export {};
|
|
68
67
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB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AAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED,wBAAsB,SAAS,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,UAAU,EAAE,MAAM,EAClB,EAAE,MAAM,EAAE,CAAC,EAAE,MAAU,EAAE,KAAW,EAAE,GAAE,gBAAqB,GAC3D,OAAO,CAAC,mBAAmB,GAAG;IAAE,KAAK,EAAE,CAAC,EAAE,CAAA;CAAE,CAAC,CAS/C;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9D,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAMnB;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5D,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAOnB;AAED,wBAAgB,sBAAsB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjE,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,gBAAqB,GAC5B,OAAO,CAAC,mBAAmB,GAAG;IAAE,KAAK,EAAE,CAAC,EAAE,CAAA;CAAE,CAAC,CAE/C"}
|
|
@@ -4,7 +4,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
const pinia = require("pinia");
|
|
6
6
|
const vue = require("vue");
|
|
7
|
-
const index = require("./index-
|
|
7
|
+
const index = require("./index-De9SLPcI.cjs");
|
|
8
8
|
const vueRouter = require("vue-router");
|
|
9
9
|
const vue$1 = require("@bagelink/vue");
|
|
10
10
|
const localeStrategy = require("./localeStrategy-OwRIn35C.cjs");
|
|
@@ -810,7 +810,7 @@ class BloxInstance {
|
|
|
810
810
|
router.addRoute({
|
|
811
811
|
path: "/_blox_preview",
|
|
812
812
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
813
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
813
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-B9zGzNoj.cjs")),
|
|
814
814
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
815
815
|
});
|
|
816
816
|
}
|
|
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { createPinia } from "pinia";
|
|
5
5
|
import { inject, computed, ref, defineComponent, onMounted, unref, openBlock, createElementBlock, createElementVNode, createCommentVNode, getCurrentInstance, h, provide, watch, resolveComponent, toDisplayString, createVNode, withCtx, createTextVNode, Fragment, createBlock, shallowRef, onServerPrefetch, toValue, markRaw, resolveDynamicComponent } from "vue";
|
|
6
|
-
import { useBloxApi, getWebsiteIdSync, getWebsiteId, resolvePath, configureApi, listItemsFromActiveApi, getItemBySlug, getItemById } from "./index-
|
|
6
|
+
import { useBloxApi, getWebsiteIdSync, getWebsiteId, resolvePath, configureApi, listItemsFromActiveApi, getItemBySlug, getItemById } from "./index-9Rzzo_yF.js";
|
|
7
7
|
import { useRoute, useRouter } from "vue-router";
|
|
8
8
|
import { getI18n } from "@bagelink/vue";
|
|
9
9
|
import { r as resolvePageTitle, b as siteNameFromContexts, d as preserveCurrentSiteSuffix, e as createLocaleStrategy } from "./localeStrategy-hXlNof1E.js";
|
|
@@ -809,7 +809,7 @@ class BloxInstance {
|
|
|
809
809
|
router.addRoute({
|
|
810
810
|
path: "/_blox_preview",
|
|
811
811
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
812
|
-
component: () => import("./PreviewApp-
|
|
812
|
+
component: () => import("./PreviewApp-DNvYww-1.js"),
|
|
813
813
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
814
814
|
});
|
|
815
815
|
}
|
|
@@ -76,7 +76,7 @@ function createBloxApi(options) {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
async function listItems2(collection, { locale, q, offset = 0, limit = 100 } = {}) {
|
|
79
|
-
const resolver = options.collectionResolver ??
|
|
79
|
+
const resolver = options.collectionResolver ?? getCollectionResolver();
|
|
80
80
|
if (resolver) {
|
|
81
81
|
const resolved = await resolver(collection, {
|
|
82
82
|
locale,
|
|
@@ -175,8 +175,9 @@ async function resolvePath(path, locale) {
|
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
async function listItems(collection, { locale, q, offset = 0, limit = 100 } = {}) {
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
const resolver = getCollectionResolver();
|
|
179
|
+
if (resolver) {
|
|
180
|
+
return await resolver(collection, { locale, q, offset, limit });
|
|
180
181
|
}
|
|
181
182
|
return request(`/datastore/${_store}/collections/${collection}`, {
|
|
182
183
|
locale,
|
|
@@ -78,7 +78,7 @@ function createBloxApi(options) {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
async function listItems2(collection, { locale, q, offset = 0, limit = 100 } = {}) {
|
|
81
|
-
const resolver = options.collectionResolver ??
|
|
81
|
+
const resolver = options.collectionResolver ?? getCollectionResolver();
|
|
82
82
|
if (resolver) {
|
|
83
83
|
const resolved = await resolver(collection, {
|
|
84
84
|
locale,
|
|
@@ -177,8 +177,9 @@ async function resolvePath(path, locale) {
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
async function listItems(collection, { locale, q, offset = 0, limit = 100 } = {}) {
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
const resolver = getCollectionResolver();
|
|
181
|
+
if (resolver) {
|
|
182
|
+
return await resolver(collection, { locale, q, offset, limit });
|
|
182
183
|
}
|
|
183
184
|
return request(`/datastore/${_store}/collections/${collection}`, {
|
|
184
185
|
locale,
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
4
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
5
|
-
const appRuntime = require("./appRuntime-
|
|
3
|
+
const index = require("./index-De9SLPcI.cjs");
|
|
4
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-BY4OFOi6.cjs");
|
|
5
|
+
const appRuntime = require("./appRuntime-7hLqxk2p.cjs");
|
|
6
6
|
const vue = require("vue");
|
|
7
7
|
const ssg_client = require("./client-AoDTJJXJ.cjs");
|
|
8
8
|
const vueRouter = require("vue-router");
|
|
@@ -465,6 +465,7 @@ function withLocaleRoutes(path, component, supportedLocales, defaultLocale = "en
|
|
|
465
465
|
const MANIFEST_VERSION = 1;
|
|
466
466
|
function definitionToEntry(type, def) {
|
|
467
467
|
const { schema } = def;
|
|
468
|
+
const dataSources = schema.dataSource === true || schema.dataSource === false || !schema.dataSource ? void 0 : Array.isArray(schema.dataSource) ? schema.dataSource : [schema.dataSource];
|
|
468
469
|
let propsSchema = null;
|
|
469
470
|
const fields = schema.fields;
|
|
470
471
|
if (fields && typeof fields.toJSONSchema === "function") {
|
|
@@ -483,6 +484,7 @@ function definitionToEntry(type, def) {
|
|
|
483
484
|
icon: schema.icon,
|
|
484
485
|
description: schema.description,
|
|
485
486
|
dataSource: !!schema.dataSource,
|
|
487
|
+
dataSources,
|
|
486
488
|
category: schema.category,
|
|
487
489
|
order: schema.order,
|
|
488
490
|
global: schema.global,
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useBloxApi, getItemBySlug, getItemById, provideBloxApi } from "./index-
|
|
2
|
-
import { configureApi, createBloxApi, getCollectionResolver, getWebsiteId, getWebsiteIdSync, listItems, resolvePath, setApiOrigin, setCollectionResolver } from "./index-
|
|
3
|
-
import { _, P, s, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
4
|
-
import { g as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, f as BLOX_RUNTIME_KEY, h as useSeo, j as getRegistryData, k as getContentRoute, p as provideBloxData, b as provideBloxLocale, i as installBloxRuntime, d as setActiveLocale, l as isMissingPageDocument, m as installSmartLinks, o as BLOX_CMS_ROUTE_NAME, q as BLOX_PREVIEW_ROUTE_NAME } from "./appRuntime-
|
|
5
|
-
import { _ as _2, t, v, w, x, y, z, A, C, P as P2, D, E, c, a as a2, F, G, H, I, J, K, L, M, N, O, Q, R, r, s as s2, S, T, U, V } from "./appRuntime-
|
|
1
|
+
import { useBloxApi, getItemBySlug, getItemById, provideBloxApi } from "./index-9Rzzo_yF.js";
|
|
2
|
+
import { configureApi, createBloxApi, getCollectionResolver, getWebsiteId, getWebsiteIdSync, listItems, resolvePath, setApiOrigin, setCollectionResolver } from "./index-9Rzzo_yF.js";
|
|
3
|
+
import { _, P, s, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-B_1HZLks.js";
|
|
4
|
+
import { g as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, f as BLOX_RUNTIME_KEY, h as useSeo, j as getRegistryData, k as getContentRoute, p as provideBloxData, b as provideBloxLocale, i as installBloxRuntime, d as setActiveLocale, l as isMissingPageDocument, m as installSmartLinks, o as BLOX_CMS_ROUTE_NAME, q as BLOX_PREVIEW_ROUTE_NAME } from "./appRuntime-DbIMo4Ow.js";
|
|
5
|
+
import { _ as _2, t, v, w, x, y, z, A, C, P as P2, D, E, c, a as a2, F, G, H, I, J, K, L, M, N, O, Q, R, r, s as s2, S, T, U, V } from "./appRuntime-DbIMo4Ow.js";
|
|
6
6
|
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, Transition, resolveDynamicComponent, inject, ref, watch, onMounted, onUnmounted, computed, onServerPrefetch, toValue, h, Suspense, createSSRApp, createApp } from "vue";
|
|
7
7
|
import { r as readBloxHydration } from "./client-Ce9fRCGH.js";
|
|
8
8
|
import { useRouter, useRoute } from "vue-router";
|
|
@@ -466,6 +466,7 @@ function withLocaleRoutes(path, component, supportedLocales, defaultLocale = "en
|
|
|
466
466
|
const MANIFEST_VERSION = 1;
|
|
467
467
|
function definitionToEntry(type, def) {
|
|
468
468
|
const { schema } = def;
|
|
469
|
+
const dataSources = schema.dataSource === true || schema.dataSource === false || !schema.dataSource ? void 0 : Array.isArray(schema.dataSource) ? schema.dataSource : [schema.dataSource];
|
|
469
470
|
let propsSchema = null;
|
|
470
471
|
const fields = schema.fields;
|
|
471
472
|
if (fields && typeof fields.toJSONSchema === "function") {
|
|
@@ -484,6 +485,7 @@ function definitionToEntry(type, def) {
|
|
|
484
485
|
icon: schema.icon,
|
|
485
486
|
description: schema.description,
|
|
486
487
|
dataSource: !!schema.dataSource,
|
|
488
|
+
dataSources,
|
|
487
489
|
category: schema.category,
|
|
488
490
|
order: schema.order,
|
|
489
491
|
global: schema.global,
|
package/dist/manifest.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BloxInstance } from './core';
|
|
2
2
|
import { BlockDefinition } from './schema';
|
|
3
|
+
import { BlockDataSource } from './defineBlock';
|
|
3
4
|
/**
|
|
4
5
|
* Backend-friendly description of a single registered block.
|
|
5
6
|
*
|
|
@@ -19,6 +20,8 @@ export interface BlockManifestEntry {
|
|
|
19
20
|
description?: string;
|
|
20
21
|
/** True when the block fetches its own data from a datastore collection. */
|
|
21
22
|
dataSource?: boolean;
|
|
23
|
+
/** Declared datastore dependencies (used by build-time collection discovery). */
|
|
24
|
+
dataSources?: BlockDataSource[];
|
|
22
25
|
/** Group key for the editor block picker. */
|
|
23
26
|
category?: string;
|
|
24
27
|
/** Sort order in the editor block picker (lower first). */
|
package/dist/manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IAClC,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAA;IACZ,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAA;IACb,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,iFAAiF;IACjF,WAAW,CAAC,EAAE,eAAe,EAAE,CAAA;IAC/B,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IAC3C,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,MAAM,WAAW,YAAY;IAC5B,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAA;IACf,6DAA6D;IAC7D,MAAM,EAAE,kBAAkB,EAAE,CAAA;CAC5B;AAwCD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACvC,YAAY,CAKd;AAED,kEAAkE;AAClE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,CAElE"}
|
|
@@ -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, d as validateNoRedirectingLinks, i as isErrorPagePath } from "./validate-output-
|
|
5
|
+
import { f as fetchCmsSiteData, g as generateSitemapArtifacts, d as validateNoRedirectingLinks, i as isErrorPagePath } from "./validate-output-UVCDNeUA.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";
|
|
@@ -145,7 +145,7 @@ async function runSharded(opts) {
|
|
|
145
145
|
}
|
|
146
146
|
if (process.env.BLOX_SSG_LLM !== "0" && !((_a = website == null ? void 0 : website.seo) == null ? void 0 : _a.noindex)) {
|
|
147
147
|
try {
|
|
148
|
-
const { mergeLlmParts } = await import("./validate-output-
|
|
148
|
+
const { mergeLlmParts } = await import("./validate-output-UVCDNeUA.js").then((n) => n.E);
|
|
149
149
|
const mergeWebsite = website;
|
|
150
150
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
151
151
|
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-K-8pYmLz.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";
|
|
@@ -169,7 +169,7 @@ async function runSharded(opts) {
|
|
|
169
169
|
}
|
|
170
170
|
if (process.env.BLOX_SSG_LLM !== "0" && !((_a = website == null ? void 0 : website.seo) == null ? void 0 : _a.noindex)) {
|
|
171
171
|
try {
|
|
172
|
-
const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-
|
|
172
|
+
const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-K-8pYmLz.cjs")).then((n) => n.llmArtifacts);
|
|
173
173
|
const mergeWebsite = website;
|
|
174
174
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
175
175
|
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-K-8pYmLz.cjs");
|
|
7
7
|
const localeStrategy = require("../localeStrategy-OwRIn35C.cjs");
|
|
8
8
|
function installFetchTimeout() {
|
|
9
9
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
@@ -145,10 +145,19 @@ Environment:
|
|
|
145
145
|
process.env.BLOX_BUILD_TOKEN = buildGrant.grant;
|
|
146
146
|
}
|
|
147
147
|
const buildRequest = buildGrant ? { websiteId: buildGrant.websiteId, token: buildGrant.grant } : {};
|
|
148
|
+
if (buildGrant) {
|
|
149
|
+
const { apiBase: apiBase2 } = await resolveApiBase(mode);
|
|
150
|
+
const manifestPath = "dist/.blox-manifest.json";
|
|
151
|
+
const manifestExists = await fs.stat(manifestPath).then(() => true, () => false);
|
|
152
|
+
if (manifestExists) {
|
|
153
|
+
await llmArtifacts.uploadBloxManifest(apiBase2, buildGrant.websiteId, buildRequest);
|
|
154
|
+
console.log("Uploaded .blox-manifest.json before route discovery");
|
|
155
|
+
}
|
|
156
|
+
}
|
|
148
157
|
if (shardsOpt !== null || routesCmd) {
|
|
149
158
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
150
159
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
151
|
-
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-
|
|
160
|
+
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-nITsCO5r.cjs"));
|
|
152
161
|
const code = await runSharded({
|
|
153
162
|
shards: shardsOpt ?? "auto",
|
|
154
163
|
mode,
|
|
@@ -174,7 +183,7 @@ Environment:
|
|
|
174
183
|
}
|
|
175
184
|
const { apiBase, websiteName: configWebsiteName } = await resolveApiBase(mode);
|
|
176
185
|
await llmArtifacts.polyfillBloxSsgGlobals({ pageUrl: apiBase });
|
|
177
|
-
const { setCollectionResolver } = await Promise.resolve().then(() => require("../index-
|
|
186
|
+
const { setCollectionResolver } = await Promise.resolve().then(() => require("../index-De9SLPcI.cjs"));
|
|
178
187
|
const websiteName = process.env.WEBSITE_NAME ?? configWebsiteName ?? "default";
|
|
179
188
|
console.log(siteDataFile ? `Loading cached site routes (mode: ${mode}, site: ${websiteName})…` : `Fetching routes from ${apiBase} (mode: ${mode}, site: ${websiteName})…`);
|
|
180
189
|
let paths = [];
|
|
@@ -206,9 +215,8 @@ Environment:
|
|
|
206
215
|
if (productionBuild) throw err;
|
|
207
216
|
paths = ["/"];
|
|
208
217
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
218
|
+
const collectionResolver = collectionItems && Object.keys(collectionItems).length > 0 ? llmArtifacts.buildCollectionResolver(collectionItems) : null;
|
|
219
|
+
setCollectionResolver(collectionResolver);
|
|
212
220
|
for (const p of extraPaths) {
|
|
213
221
|
if (!paths.includes(p)) paths.push(p);
|
|
214
222
|
}
|
|
@@ -251,6 +259,7 @@ Environment:
|
|
|
251
259
|
website,
|
|
252
260
|
websiteId,
|
|
253
261
|
redirects,
|
|
262
|
+
collectionResolver,
|
|
254
263
|
// Canonical localized page paths, injected into each document's
|
|
255
264
|
// hydration payload so client-side links resolve without a redirect.
|
|
256
265
|
pageSlugMap,
|
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, c as validateInternalLinks, d as validateNoRedirectingLinks } from "../validate-output-
|
|
5
|
+
import { v as validateSsgOutput, u as uploadBloxManifest, p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, b as buildCollectionResolver, a as prerender, c as validateInternalLinks, d as validateNoRedirectingLinks } from "../validate-output-UVCDNeUA.js";
|
|
6
6
|
import { s as setPageSlugMap } from "../localeStrategy-hXlNof1E.js";
|
|
7
7
|
function installFetchTimeout() {
|
|
8
8
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
@@ -144,10 +144,19 @@ Environment:
|
|
|
144
144
|
process.env.BLOX_BUILD_TOKEN = buildGrant.grant;
|
|
145
145
|
}
|
|
146
146
|
const buildRequest = buildGrant ? { websiteId: buildGrant.websiteId, token: buildGrant.grant } : {};
|
|
147
|
+
if (buildGrant) {
|
|
148
|
+
const { apiBase: apiBase2 } = await resolveApiBase(mode);
|
|
149
|
+
const manifestPath = "dist/.blox-manifest.json";
|
|
150
|
+
const manifestExists = await fs.stat(manifestPath).then(() => true, () => false);
|
|
151
|
+
if (manifestExists) {
|
|
152
|
+
await uploadBloxManifest(apiBase2, buildGrant.websiteId, buildRequest);
|
|
153
|
+
console.log("Uploaded .blox-manifest.json before route discovery");
|
|
154
|
+
}
|
|
155
|
+
}
|
|
147
156
|
if (shardsOpt !== null || routesCmd) {
|
|
148
157
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
149
158
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
150
|
-
const { runSharded } = await import("../shard-runner-
|
|
159
|
+
const { runSharded } = await import("../shard-runner-DPI12yYi.js");
|
|
151
160
|
const code = await runSharded({
|
|
152
161
|
shards: shardsOpt ?? "auto",
|
|
153
162
|
mode,
|
|
@@ -173,7 +182,7 @@ Environment:
|
|
|
173
182
|
}
|
|
174
183
|
const { apiBase, websiteName: configWebsiteName } = await resolveApiBase(mode);
|
|
175
184
|
await polyfillBloxSsgGlobals({ pageUrl: apiBase });
|
|
176
|
-
const { setCollectionResolver } = await import("../index-
|
|
185
|
+
const { setCollectionResolver } = await import("../index-9Rzzo_yF.js");
|
|
177
186
|
const websiteName = process.env.WEBSITE_NAME ?? configWebsiteName ?? "default";
|
|
178
187
|
console.log(siteDataFile ? `Loading cached site routes (mode: ${mode}, site: ${websiteName})…` : `Fetching routes from ${apiBase} (mode: ${mode}, site: ${websiteName})…`);
|
|
179
188
|
let paths = [];
|
|
@@ -205,9 +214,8 @@ Environment:
|
|
|
205
214
|
if (productionBuild) throw err;
|
|
206
215
|
paths = ["/"];
|
|
207
216
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
217
|
+
const collectionResolver = collectionItems && Object.keys(collectionItems).length > 0 ? buildCollectionResolver(collectionItems) : null;
|
|
218
|
+
setCollectionResolver(collectionResolver);
|
|
211
219
|
for (const p of extraPaths) {
|
|
212
220
|
if (!paths.includes(p)) paths.push(p);
|
|
213
221
|
}
|
|
@@ -250,6 +258,7 @@ Environment:
|
|
|
250
258
|
website,
|
|
251
259
|
websiteId,
|
|
252
260
|
redirects,
|
|
261
|
+
collectionResolver,
|
|
253
262
|
// Canonical localized page paths, injected into each document's
|
|
254
263
|
// hydration payload so client-side links resolve without a redirect.
|
|
255
264
|
pageSlugMap,
|
package/dist/ssg/cms-routes.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface CmsSiteData {
|
|
|
20
20
|
*/
|
|
21
21
|
pageSlugMap: Record<string, Record<string, string>>;
|
|
22
22
|
redirects: RedirectEntry[];
|
|
23
|
-
/** Datastore collections referenced by
|
|
23
|
+
/** Datastore collections referenced by page bindings or used block manifests. */
|
|
24
24
|
collections: CollectionRef[];
|
|
25
25
|
/**
|
|
26
26
|
* Full datastore items per collection, bulk-loaded during route expansion.
|
|
@@ -51,9 +51,9 @@ export type CollectionResolver = (collection: string, options: {
|
|
|
51
51
|
* detail pages resolve from memory during SSR instead of one network round-trip
|
|
52
52
|
* per page. Supports the SCIM `q` subset the renderer emits: `field eq "value"`.
|
|
53
53
|
*
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
* Returns `null` for collections that were NOT bulk-loaded from page bindings
|
|
55
|
+
* or block manifest dependencies, so the caller can fall back to a live HTTP
|
|
56
|
+
* fetch instead of silently returning an empty list.
|
|
57
57
|
*/
|
|
58
58
|
export declare function buildCollectionResolver(collectionItems: Record<string, Record<string, unknown>[]>): CollectionResolver;
|
|
59
59
|
//# sourceMappingURL=cms-routes.d.ts.map
|
|
@@ -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;
|
|
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;AAqB9D,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;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACnD,SAAS,EAAE,aAAa,EAAE,CAAA;IAC1B,iFAAiF;IACjF,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;AAwCD;;;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,CAmMtB;AAuKD,MAAM,MAAM,kBAAkB,GAAG,CAChC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,KACrE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,CAAA;AAE9C;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACtC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,GACxD,kBAAkB,CAapB"}
|
|
@@ -3,7 +3,7 @@ import { Router } from 'vue-router';
|
|
|
3
3
|
import { BlockModule } from '../defineBlock';
|
|
4
4
|
import { RenderContext, RenderResult } from './prerender';
|
|
5
5
|
import { BloxBuildRequestOptions } from './build-request';
|
|
6
|
-
import { ListItemsOptions } from '../api';
|
|
6
|
+
import { CollectionResolver, ListItemsOptions } from '../api';
|
|
7
7
|
export interface CreateBloxSSREntryOptions {
|
|
8
8
|
/** Root Vue component (App.vue). */
|
|
9
9
|
rootComponent: Component;
|
|
@@ -54,6 +54,10 @@ export interface BloxSSREntry {
|
|
|
54
54
|
render: (url: string, ctx: RenderContext) => Promise<RenderResult>;
|
|
55
55
|
/** Resolve a URL's page data without rendering (for batched prefetch). */
|
|
56
56
|
prefetchResolve?: (url: string) => Promise<unknown>;
|
|
57
|
+
/** Install immutable collection data explicitly for this build process. */
|
|
58
|
+
configureBuildData?: (data: {
|
|
59
|
+
collectionResolver?: CollectionResolver | null;
|
|
60
|
+
}) => void;
|
|
57
61
|
}
|
|
58
62
|
interface PublishedPage {
|
|
59
63
|
slug?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSSREntry.d.ts","sourceRoot":"","sources":["../../src/ssg/createSSREntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"createSSREntry.d.ts","sourceRoot":"","sources":["../../src/ssg/createSSREntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAMhD,OAAO,EAAyC,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAMrF,MAAM,WAAW,yBAAyB;IACzC,oCAAoC;IACpC,aAAa,EAAE,SAAS,CAAA;IACxB;;;;OAIG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IAC9D;;;OAGG;IACH,OAAO,EAA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ACZ,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,GACxD,OAAO,CAAC;IACV,IAAI,EAAE,aAAa,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACnC,GAAG,IAAI,CAAC,CAoFR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,YAAY,CA2NnF"}
|
package/dist/ssg/index.cjs
CHANGED
|
@@ -22,13 +22,13 @@ 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-K-8pYmLz.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");
|
|
29
|
-
const appRuntime = require("../appRuntime-
|
|
29
|
+
const appRuntime = require("../appRuntime-7hLqxk2p.cjs");
|
|
30
30
|
const localeStrategy = require("../localeStrategy-OwRIn35C.cjs");
|
|
31
|
-
const index = require("../index-
|
|
31
|
+
const index = require("../index-De9SLPcI.cjs");
|
|
32
32
|
async function renderBloxSsgPage(options) {
|
|
33
33
|
var _a, _b, _c, _d, _e;
|
|
34
34
|
const {
|
|
@@ -229,7 +229,11 @@ function createBloxSSREntry(options) {
|
|
|
229
229
|
} = options;
|
|
230
230
|
const apiBase = options.apiBase ?? (typeof process !== "undefined" ? (_a = process.env) == null ? void 0 : _a.BAGELINK_API_URL : void 0) ?? "https://api.bagel.to";
|
|
231
231
|
let websiteIdCache = null;
|
|
232
|
+
let buildCollectionResolver = options.collectionResolver ?? null;
|
|
232
233
|
const publishedBundleCache = /* @__PURE__ */ new Map();
|
|
234
|
+
function configureBuildData(data) {
|
|
235
|
+
buildCollectionResolver = data.collectionResolver ?? null;
|
|
236
|
+
}
|
|
233
237
|
async function getWebsiteId() {
|
|
234
238
|
var _a2, _b, _c;
|
|
235
239
|
if (websiteIdCache) return websiteIdCache;
|
|
@@ -272,7 +276,7 @@ function createBloxSSREntry(options) {
|
|
|
272
276
|
publishedBundleCache.set(cacheKey, pending);
|
|
273
277
|
}
|
|
274
278
|
const bundle = await pending;
|
|
275
|
-
const activeResolver =
|
|
279
|
+
const activeResolver = buildCollectionResolver ?? index.getCollectionResolver() ?? void 0;
|
|
276
280
|
const resolved = await resolvePublishedPage(
|
|
277
281
|
bundle.pages,
|
|
278
282
|
slug,
|
|
@@ -313,7 +317,7 @@ function createBloxSSREntry(options) {
|
|
|
313
317
|
websiteName,
|
|
314
318
|
store,
|
|
315
319
|
origin: apiBase,
|
|
316
|
-
collectionResolver:
|
|
320
|
+
collectionResolver: buildCollectionResolver ?? index.getCollectionResolver()
|
|
317
321
|
});
|
|
318
322
|
const localeState = appRuntime.provideBloxLocale(app, pageLocale);
|
|
319
323
|
app.provide(appRuntime.BLOX_SSR_ROUTE_STATE_KEY, {
|
|
@@ -369,7 +373,7 @@ function createBloxSSREntry(options) {
|
|
|
369
373
|
const { locale: pageLocale, slug } = detectLocale(url);
|
|
370
374
|
return resolveForBuild(slug, pageLocale);
|
|
371
375
|
}
|
|
372
|
-
return { render, prefetchResolve };
|
|
376
|
+
return { render, prefetchResolve, configureBuildData };
|
|
373
377
|
}
|
|
374
378
|
async function fetchDatastoreSnapshot(options) {
|
|
375
379
|
var _a;
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { e as buildPageHead, h as primaryContextEntry, j as buildJsonLd, k as extractPageText, B as BloxBuildResponseError, l as bloxBuildJson } from "../validate-output-
|
|
2
|
-
import { m, n, f, o, q, r, s, g, t, w, x, y, z, A, p, a, C, D, u, c, v } from "../validate-output-
|
|
1
|
+
import { e as buildPageHead, h as primaryContextEntry, j as buildJsonLd, k as extractPageText, B as BloxBuildResponseError, l as bloxBuildJson } from "../validate-output-UVCDNeUA.js";
|
|
2
|
+
import { m, n, f, o, q, r, s, g, t, w, x, y, z, A, p, a, C, D, u, c, v } from "../validate-output-UVCDNeUA.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";
|
|
6
|
-
import { c as collectBloxData, a as collectBloxSeo, s as setSsrPageLocale, p as provideBloxData, b as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, d as setActiveLocale } from "../appRuntime-
|
|
6
|
+
import { c as collectBloxData, a as collectBloxSeo, s as setSsrPageLocale, p as provideBloxData, b as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, d as setActiveLocale } from "../appRuntime-DbIMo4Ow.js";
|
|
7
7
|
import { s as setPageSlugMap } from "../localeStrategy-hXlNof1E.js";
|
|
8
|
-
import { provideBloxApi, getCollectionResolver } from "../index-
|
|
8
|
+
import { provideBloxApi, getCollectionResolver } from "../index-9Rzzo_yF.js";
|
|
9
9
|
async function renderBloxSsgPage(options) {
|
|
10
10
|
var _a, _b, _c, _d, _e;
|
|
11
11
|
const {
|
|
@@ -206,7 +206,11 @@ function createBloxSSREntry(options) {
|
|
|
206
206
|
} = options;
|
|
207
207
|
const apiBase = options.apiBase ?? (typeof process !== "undefined" ? (_a = process.env) == null ? void 0 : _a.BAGELINK_API_URL : void 0) ?? "https://api.bagel.to";
|
|
208
208
|
let websiteIdCache = null;
|
|
209
|
+
let buildCollectionResolver = options.collectionResolver ?? null;
|
|
209
210
|
const publishedBundleCache = /* @__PURE__ */ new Map();
|
|
211
|
+
function configureBuildData(data) {
|
|
212
|
+
buildCollectionResolver = data.collectionResolver ?? null;
|
|
213
|
+
}
|
|
210
214
|
async function getWebsiteId() {
|
|
211
215
|
var _a2, _b, _c;
|
|
212
216
|
if (websiteIdCache) return websiteIdCache;
|
|
@@ -249,7 +253,7 @@ function createBloxSSREntry(options) {
|
|
|
249
253
|
publishedBundleCache.set(cacheKey, pending);
|
|
250
254
|
}
|
|
251
255
|
const bundle = await pending;
|
|
252
|
-
const activeResolver =
|
|
256
|
+
const activeResolver = buildCollectionResolver ?? getCollectionResolver() ?? void 0;
|
|
253
257
|
const resolved = await resolvePublishedPage(
|
|
254
258
|
bundle.pages,
|
|
255
259
|
slug,
|
|
@@ -290,7 +294,7 @@ function createBloxSSREntry(options) {
|
|
|
290
294
|
websiteName,
|
|
291
295
|
store,
|
|
292
296
|
origin: apiBase,
|
|
293
|
-
collectionResolver:
|
|
297
|
+
collectionResolver: buildCollectionResolver ?? getCollectionResolver()
|
|
294
298
|
});
|
|
295
299
|
const localeState = provideBloxLocale(app, pageLocale);
|
|
296
300
|
app.provide(BLOX_SSR_ROUTE_STATE_KEY, {
|
|
@@ -346,7 +350,7 @@ function createBloxSSREntry(options) {
|
|
|
346
350
|
const { locale: pageLocale, slug } = detectLocale(url);
|
|
347
351
|
return resolveForBuild(slug, pageLocale);
|
|
348
352
|
}
|
|
349
|
-
return { render, prefetchResolve };
|
|
353
|
+
return { render, prefetchResolve, configureBuildData };
|
|
350
354
|
}
|
|
351
355
|
async function fetchDatastoreSnapshot(options) {
|
|
352
356
|
var _a;
|
package/dist/ssg/prerender.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WebsiteRead } from '../api/types';
|
|
2
2
|
import { RedirectEntry } from './seo';
|
|
3
3
|
import { LlmArtifactsConfig, LlmPageEntry } from './llm-artifacts';
|
|
4
|
+
import { CollectionResolver } from '../api';
|
|
4
5
|
type ExcludeRule = string | RegExp | ((path: string) => boolean);
|
|
5
6
|
export interface PrerenderOptions {
|
|
6
7
|
root?: string;
|
|
@@ -36,6 +37,8 @@ export interface PrerenderOptions {
|
|
|
36
37
|
redirects?: RedirectEntry[];
|
|
37
38
|
/** Canonical localized page paths, embedded in each document's hydration payload. */
|
|
38
39
|
pageSlugMap?: Record<string, Record<string, string>>;
|
|
40
|
+
/** Immutable build collection source installed into the imported SSR entry. */
|
|
41
|
+
collectionResolver?: CollectionResolver | null;
|
|
39
42
|
/** LLM artifacts config (llms.txt, llms-full.txt, per-page JSON-LD). */
|
|
40
43
|
llm?: LlmArtifactsConfig;
|
|
41
44
|
}
|
|
@@ -104,7 +107,7 @@ export declare function prerender({ root, clientOutDir, serverEntry, paths, craw
|
|
|
104
107
|
* sharded runner divides a global budget by the shard count. 0 disables
|
|
105
108
|
* prefetch (render resolves inline). Default 8.
|
|
106
109
|
*/
|
|
107
|
-
resolvePrefetchConcurrency, appPaths, includeRoot, routePartsFile, mode, website, websiteId, redirects, pageSlugMap, llm, }?: PrerenderOptions): Promise<PrerenderResult>;
|
|
110
|
+
resolvePrefetchConcurrency, appPaths, includeRoot, routePartsFile, mode, website, websiteId, redirects, pageSlugMap, collectionResolver, llm, }?: PrerenderOptions): Promise<PrerenderResult>;
|
|
108
111
|
/**
|
|
109
112
|
* Collect `<link rel="preload">` tags for the web fonts a page is likely to use.
|
|
110
113
|
*
|
|
@@ -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;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"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AAQ,EAAE,MAAM,EAAE,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;IAC7D,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,SAAS,CAAC,EAC/B,IAAoB,EACpB,YAA4B,EAC5B,WAA0C,EAC1C,KAAU,EACV,KAAY,EACZ,YAAiB,EACjB,QAAgB,EAChB,QAAe,EACf,WAAe,EACf,iBAAwB;AACxB;;;;;;;;;GASG;AACH,0BAA8B,EAC9B,QAAa,EACb,WAAkB,EAClB,cAAc,EACd,IAAY,EACZ,OAAc,EACd,SAAc,EACd,SAAc,EACd,WAAgB,EAChB,kBAAyB,EACzB,GAAQ,GACR,GAAE,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CAsVlD;AA6ID;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAyDhF;AAED,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,SAAS,SAAK,EACd,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACpC,MAAM,CA8DR;AAED,wBAAgB,eAAe,CAC9B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,MAAM,CA2BR;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAGxD"}
|
|
@@ -144,6 +144,15 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
144
144
|
paths: localePaths.map((path2) => localizePath(path2, locale, defaultLocale2))
|
|
145
145
|
};
|
|
146
146
|
}));
|
|
147
|
+
const manifestCollections = baseBundle.collections ?? [];
|
|
148
|
+
await preloadCollections(
|
|
149
|
+
apiBase,
|
|
150
|
+
websiteId,
|
|
151
|
+
manifestCollections,
|
|
152
|
+
defaultLocale2,
|
|
153
|
+
requestOptions,
|
|
154
|
+
collectionItems
|
|
155
|
+
);
|
|
147
156
|
const paths2 = [...new Set(localizedBundles.flatMap((result) => result.paths))];
|
|
148
157
|
const pathSet2 = new Set(paths2);
|
|
149
158
|
const defaultPages2 = ((_c = localizedBundles.find((result) => result.locale === defaultLocale2)) == null ? void 0 : _c.bundle.pages) ?? [];
|
|
@@ -175,7 +184,10 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
175
184
|
pageSlugs: [...new Set(localizedBundles.flatMap((result) => result.bundle.pages.flatMap((page) => page.slug ? [localizePath(page.slug, result.locale, defaultLocale2)] : [])))],
|
|
176
185
|
pageSlugMap: buildPageSlugMap(localizedBundles, defaultLocale2),
|
|
177
186
|
redirects: redirects2,
|
|
178
|
-
collections:
|
|
187
|
+
collections: mergeCollectionRefs(
|
|
188
|
+
extractCollectionRefs(localizedBundles.flatMap((result) => result.bundle.pages)),
|
|
189
|
+
manifestCollections
|
|
190
|
+
),
|
|
179
191
|
collectionItems
|
|
180
192
|
};
|
|
181
193
|
}
|
|
@@ -299,6 +311,33 @@ async function expandRoutes(apiBase, pages, requestOptions, locale, collectItems
|
|
|
299
311
|
}
|
|
300
312
|
return [...new Set(routes)];
|
|
301
313
|
}
|
|
314
|
+
function mergeCollectionRefs(...groups) {
|
|
315
|
+
const refs = /* @__PURE__ */ new Map();
|
|
316
|
+
for (const group of groups) {
|
|
317
|
+
for (const ref of group) refs.set(`${ref.store}/${ref.collection}`, ref);
|
|
318
|
+
}
|
|
319
|
+
return [...refs.values()];
|
|
320
|
+
}
|
|
321
|
+
async function preloadCollections(apiBase, websiteId, refs, locale, requestOptions, collectItems) {
|
|
322
|
+
const pageSize = 1e3;
|
|
323
|
+
await Promise.all(refs.map(async (ref) => {
|
|
324
|
+
if (ref.collection in collectItems) return;
|
|
325
|
+
const items = [];
|
|
326
|
+
for (let offset = 0; ; offset += pageSize) {
|
|
327
|
+
const response = await bloxBuildJson(
|
|
328
|
+
`${apiBase}/blox-build/websites/${websiteId}/collections/${ref.store}/${ref.collection}?offset=${offset}&limit=${pageSize}&locale=${encodeURIComponent(locale)}`,
|
|
329
|
+
{},
|
|
330
|
+
requestOptions
|
|
331
|
+
);
|
|
332
|
+
if (!Array.isArray(response.items)) {
|
|
333
|
+
throw new TypeError(`Blox collection response is invalid: ${ref.store}/${ref.collection}`);
|
|
334
|
+
}
|
|
335
|
+
items.push(...response.items);
|
|
336
|
+
if (response.items.length < pageSize) break;
|
|
337
|
+
}
|
|
338
|
+
collectItems[ref.collection] = items;
|
|
339
|
+
}));
|
|
340
|
+
}
|
|
302
341
|
function extractCollectionRefs(pages) {
|
|
303
342
|
const seen = /* @__PURE__ */ new Set();
|
|
304
343
|
const refs = [];
|
|
@@ -1046,9 +1085,10 @@ async function prerender({
|
|
|
1046
1085
|
websiteId = "",
|
|
1047
1086
|
redirects = [],
|
|
1048
1087
|
pageSlugMap = {},
|
|
1088
|
+
collectionResolver = null,
|
|
1049
1089
|
llm = {}
|
|
1050
1090
|
} = {}) {
|
|
1051
|
-
var _a, _b, _c, _d, _e;
|
|
1091
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1052
1092
|
const absRoot = path.resolve(root);
|
|
1053
1093
|
const absClient = path.resolve(absRoot, clientOutDir);
|
|
1054
1094
|
const absServerEntry = path.resolve(absRoot, serverEntry);
|
|
@@ -1066,6 +1106,7 @@ async function prerender({
|
|
|
1066
1106
|
`SSR entry must export async function render(url, ctx). Missing "render" in: ${absServerEntry}`
|
|
1067
1107
|
);
|
|
1068
1108
|
}
|
|
1109
|
+
(_a = serverMod.configureBuildData) == null ? void 0 : _a.call(serverMod, { collectionResolver });
|
|
1069
1110
|
let manifest = null;
|
|
1070
1111
|
try {
|
|
1071
1112
|
const manifestPath = path.join(absClient, "ssr-manifest.json");
|
|
@@ -1202,7 +1243,7 @@ async function prerender({
|
|
|
1202
1243
|
);
|
|
1203
1244
|
await Promise.all(workers);
|
|
1204
1245
|
}
|
|
1205
|
-
const canonicalBase = (((
|
|
1246
|
+
const canonicalBase = (((_b = website == null ? void 0 : website.seo) == null ? void 0 : _b.canonical_base_url) || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
1206
1247
|
if (writeSharedAssets) {
|
|
1207
1248
|
const sitemapPaths = rendered.filter((p) => !noindexPaths.has(p) && !isErrorPagePath(p));
|
|
1208
1249
|
if (canonicalBase && sitemapPaths.length > 0) {
|
|
@@ -1214,7 +1255,7 @@ async function prerender({
|
|
|
1214
1255
|
canonicalBase,
|
|
1215
1256
|
defaultLocale: (website == null ? void 0 : website.default_locale) ?? "en",
|
|
1216
1257
|
supportedLocales: (website == null ? void 0 : website.supported_locales) ?? [(website == null ? void 0 : website.default_locale) ?? "en"],
|
|
1217
|
-
splitByLocale: (
|
|
1258
|
+
splitByLocale: (_c = website == null ? void 0 : website.seo) == null ? void 0 : _c.sitemap_split_by_locale
|
|
1218
1259
|
});
|
|
1219
1260
|
for (const artifact of artifacts) {
|
|
1220
1261
|
await fs.writeFile(
|
|
@@ -1229,11 +1270,11 @@ async function prerender({
|
|
|
1229
1270
|
const robotsTxt = generateRobotsTxt({
|
|
1230
1271
|
robotsTxt: website == null ? void 0 : website.robots_txt,
|
|
1231
1272
|
canonicalBase,
|
|
1232
|
-
noindex: (
|
|
1273
|
+
noindex: (_d = website == null ? void 0 : website.seo) == null ? void 0 : _d.noindex
|
|
1233
1274
|
});
|
|
1234
1275
|
await fs.writeFile(path.join(absClient, "robots.txt"), robotsTxt, "utf8");
|
|
1235
1276
|
console.log(" Generated robots.txt");
|
|
1236
|
-
if ((
|
|
1277
|
+
if ((_e = website == null ? void 0 : website.seo) == null ? void 0 : _e.noindex) {
|
|
1237
1278
|
const headersPath = path.join(absClient, "_headers");
|
|
1238
1279
|
let existing = "";
|
|
1239
1280
|
try {
|
|
@@ -1262,7 +1303,7 @@ ${existing}`,
|
|
|
1262
1303
|
await fs.writeFile(redirectsPath, redirectsContent + existing, "utf8");
|
|
1263
1304
|
console.log(` Generated _redirects (${redirects.length} rules)`);
|
|
1264
1305
|
}
|
|
1265
|
-
if (!((
|
|
1306
|
+
if (!((_f = website == null ? void 0 : website.seo) == null ? void 0 : _f.noindex) && llmEnabled && llm.writeIndex !== false && llmPages.length > 0) {
|
|
1266
1307
|
const indexable = llmPages.filter((p) => !noindexPaths.has(p.url));
|
|
1267
1308
|
const llmsTxt = generateLlmsTxt({ website, pages: indexable, config: llm });
|
|
1268
1309
|
await fs.writeFile(path.join(absClient, "llms.txt"), llmsTxt, "utf8");
|
|
@@ -121,6 +121,15 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
121
121
|
paths: localePaths.map((path2) => localizePath(path2, locale, defaultLocale2))
|
|
122
122
|
};
|
|
123
123
|
}));
|
|
124
|
+
const manifestCollections = baseBundle.collections ?? [];
|
|
125
|
+
await preloadCollections(
|
|
126
|
+
apiBase,
|
|
127
|
+
websiteId,
|
|
128
|
+
manifestCollections,
|
|
129
|
+
defaultLocale2,
|
|
130
|
+
requestOptions,
|
|
131
|
+
collectionItems
|
|
132
|
+
);
|
|
124
133
|
const paths2 = [...new Set(localizedBundles.flatMap((result) => result.paths))];
|
|
125
134
|
const pathSet2 = new Set(paths2);
|
|
126
135
|
const defaultPages2 = ((_c = localizedBundles.find((result) => result.locale === defaultLocale2)) == null ? void 0 : _c.bundle.pages) ?? [];
|
|
@@ -152,7 +161,10 @@ async function fetchCmsSiteData(apiBase, websiteName, requestOptions = {}) {
|
|
|
152
161
|
pageSlugs: [...new Set(localizedBundles.flatMap((result) => result.bundle.pages.flatMap((page) => page.slug ? [localizePath(page.slug, result.locale, defaultLocale2)] : [])))],
|
|
153
162
|
pageSlugMap: buildPageSlugMap(localizedBundles, defaultLocale2),
|
|
154
163
|
redirects: redirects2,
|
|
155
|
-
collections:
|
|
164
|
+
collections: mergeCollectionRefs(
|
|
165
|
+
extractCollectionRefs(localizedBundles.flatMap((result) => result.bundle.pages)),
|
|
166
|
+
manifestCollections
|
|
167
|
+
),
|
|
156
168
|
collectionItems
|
|
157
169
|
};
|
|
158
170
|
}
|
|
@@ -276,6 +288,33 @@ async function expandRoutes(apiBase, pages, requestOptions, locale, collectItems
|
|
|
276
288
|
}
|
|
277
289
|
return [...new Set(routes)];
|
|
278
290
|
}
|
|
291
|
+
function mergeCollectionRefs(...groups) {
|
|
292
|
+
const refs = /* @__PURE__ */ new Map();
|
|
293
|
+
for (const group of groups) {
|
|
294
|
+
for (const ref of group) refs.set(`${ref.store}/${ref.collection}`, ref);
|
|
295
|
+
}
|
|
296
|
+
return [...refs.values()];
|
|
297
|
+
}
|
|
298
|
+
async function preloadCollections(apiBase, websiteId, refs, locale, requestOptions, collectItems) {
|
|
299
|
+
const pageSize = 1e3;
|
|
300
|
+
await Promise.all(refs.map(async (ref) => {
|
|
301
|
+
if (ref.collection in collectItems) return;
|
|
302
|
+
const items = [];
|
|
303
|
+
for (let offset = 0; ; offset += pageSize) {
|
|
304
|
+
const response = await bloxBuildJson(
|
|
305
|
+
`${apiBase}/blox-build/websites/${websiteId}/collections/${ref.store}/${ref.collection}?offset=${offset}&limit=${pageSize}&locale=${encodeURIComponent(locale)}`,
|
|
306
|
+
{},
|
|
307
|
+
requestOptions
|
|
308
|
+
);
|
|
309
|
+
if (!Array.isArray(response.items)) {
|
|
310
|
+
throw new TypeError(`Blox collection response is invalid: ${ref.store}/${ref.collection}`);
|
|
311
|
+
}
|
|
312
|
+
items.push(...response.items);
|
|
313
|
+
if (response.items.length < pageSize) break;
|
|
314
|
+
}
|
|
315
|
+
collectItems[ref.collection] = items;
|
|
316
|
+
}));
|
|
317
|
+
}
|
|
279
318
|
function extractCollectionRefs(pages) {
|
|
280
319
|
const seen = /* @__PURE__ */ new Set();
|
|
281
320
|
const refs = [];
|
|
@@ -1023,9 +1062,10 @@ async function prerender({
|
|
|
1023
1062
|
websiteId = "",
|
|
1024
1063
|
redirects = [],
|
|
1025
1064
|
pageSlugMap = {},
|
|
1065
|
+
collectionResolver = null,
|
|
1026
1066
|
llm = {}
|
|
1027
1067
|
} = {}) {
|
|
1028
|
-
var _a, _b, _c, _d, _e;
|
|
1068
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1029
1069
|
const absRoot = path.resolve(root);
|
|
1030
1070
|
const absClient = path.resolve(absRoot, clientOutDir);
|
|
1031
1071
|
const absServerEntry = path.resolve(absRoot, serverEntry);
|
|
@@ -1043,6 +1083,7 @@ async function prerender({
|
|
|
1043
1083
|
`SSR entry must export async function render(url, ctx). Missing "render" in: ${absServerEntry}`
|
|
1044
1084
|
);
|
|
1045
1085
|
}
|
|
1086
|
+
(_a = serverMod.configureBuildData) == null ? void 0 : _a.call(serverMod, { collectionResolver });
|
|
1046
1087
|
let manifest = null;
|
|
1047
1088
|
try {
|
|
1048
1089
|
const manifestPath = path.join(absClient, "ssr-manifest.json");
|
|
@@ -1179,7 +1220,7 @@ async function prerender({
|
|
|
1179
1220
|
);
|
|
1180
1221
|
await Promise.all(workers);
|
|
1181
1222
|
}
|
|
1182
|
-
const canonicalBase = (((
|
|
1223
|
+
const canonicalBase = (((_b = website == null ? void 0 : website.seo) == null ? void 0 : _b.canonical_base_url) || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
1183
1224
|
if (writeSharedAssets) {
|
|
1184
1225
|
const sitemapPaths = rendered.filter((p) => !noindexPaths.has(p) && !isErrorPagePath(p));
|
|
1185
1226
|
if (canonicalBase && sitemapPaths.length > 0) {
|
|
@@ -1191,7 +1232,7 @@ async function prerender({
|
|
|
1191
1232
|
canonicalBase,
|
|
1192
1233
|
defaultLocale: (website == null ? void 0 : website.default_locale) ?? "en",
|
|
1193
1234
|
supportedLocales: (website == null ? void 0 : website.supported_locales) ?? [(website == null ? void 0 : website.default_locale) ?? "en"],
|
|
1194
|
-
splitByLocale: (
|
|
1235
|
+
splitByLocale: (_c = website == null ? void 0 : website.seo) == null ? void 0 : _c.sitemap_split_by_locale
|
|
1195
1236
|
});
|
|
1196
1237
|
for (const artifact of artifacts) {
|
|
1197
1238
|
await fs.writeFile(
|
|
@@ -1206,11 +1247,11 @@ async function prerender({
|
|
|
1206
1247
|
const robotsTxt = generateRobotsTxt({
|
|
1207
1248
|
robotsTxt: website == null ? void 0 : website.robots_txt,
|
|
1208
1249
|
canonicalBase,
|
|
1209
|
-
noindex: (
|
|
1250
|
+
noindex: (_d = website == null ? void 0 : website.seo) == null ? void 0 : _d.noindex
|
|
1210
1251
|
});
|
|
1211
1252
|
await fs.writeFile(path.join(absClient, "robots.txt"), robotsTxt, "utf8");
|
|
1212
1253
|
console.log(" Generated robots.txt");
|
|
1213
|
-
if ((
|
|
1254
|
+
if ((_e = website == null ? void 0 : website.seo) == null ? void 0 : _e.noindex) {
|
|
1214
1255
|
const headersPath = path.join(absClient, "_headers");
|
|
1215
1256
|
let existing = "";
|
|
1216
1257
|
try {
|
|
@@ -1239,7 +1280,7 @@ ${existing}`,
|
|
|
1239
1280
|
await fs.writeFile(redirectsPath, redirectsContent + existing, "utf8");
|
|
1240
1281
|
console.log(` Generated _redirects (${redirects.length} rules)`);
|
|
1241
1282
|
}
|
|
1242
|
-
if (!((
|
|
1283
|
+
if (!((_f = website == null ? void 0 : website.seo) == null ? void 0 : _f.noindex) && llmEnabled && llm.writeIndex !== false && llmPages.length > 0) {
|
|
1243
1284
|
const indexable = llmPages.filter((p) => !noindexPaths.has(p.url));
|
|
1244
1285
|
const llmsTxt = generateLlmsTxt({ website, pages: indexable, config: llm });
|
|
1245
1286
|
await fs.writeFile(path.join(absClient, "llms.txt"), llmsTxt, "utf8");
|
package/package.json
CHANGED
|
@@ -1,126 +1,125 @@
|
|
|
1
1
|
{
|
|
2
|
-
|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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
2
|
+
"name": "@bagelink/blox",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.18.11",
|
|
5
|
+
"description": "Blox page builder library for drag-and-drop page building and static data management",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Bagel Studio",
|
|
8
|
+
"email": "info@bagelstudio.co.il",
|
|
9
|
+
"url": "https://bagelstudio.co.il"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"homepage": "https://github.com/bageldb/bagelink/tree/master/packages/blox#readme",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/bageldb/bagelink.git",
|
|
16
|
+
"directory": "packages/blox"
|
|
17
|
+
},
|
|
18
|
+
"bugs": "https://github.com/bageldb/bagelink/issues",
|
|
19
|
+
"keywords": [
|
|
20
|
+
"blox",
|
|
21
|
+
"page-builder",
|
|
22
|
+
"preview",
|
|
23
|
+
"external-preview",
|
|
24
|
+
"cms",
|
|
25
|
+
"vue",
|
|
26
|
+
"component-library",
|
|
27
|
+
"drag-and-drop",
|
|
28
|
+
"static-pages"
|
|
29
|
+
],
|
|
30
|
+
"bin": {
|
|
31
|
+
"blox-ssg": "dist/ssg/cli.mjs"
|
|
32
|
+
},
|
|
33
|
+
"sideEffects": [
|
|
34
|
+
"**/*.css",
|
|
35
|
+
"**/*.vue"
|
|
36
|
+
],
|
|
37
|
+
"exports": {
|
|
38
|
+
"./package.json": "./package.json",
|
|
39
|
+
"./vite": {
|
|
40
|
+
"types": "./dist/vite-plugin.d.ts",
|
|
41
|
+
"import": "./dist/vite-plugin.mjs"
|
|
42
|
+
},
|
|
43
|
+
".": {
|
|
44
|
+
"types": "./dist/index.d.ts",
|
|
45
|
+
"require": "./dist/index.cjs",
|
|
46
|
+
"import": "./dist/index.mjs"
|
|
47
|
+
},
|
|
48
|
+
"./ssg": {
|
|
49
|
+
"types": "./dist/ssg/index.d.ts",
|
|
50
|
+
"import": "./dist/ssg/index.mjs"
|
|
51
|
+
},
|
|
52
|
+
"./ssg/client": {
|
|
53
|
+
"types": "./dist/ssg/client.d.ts",
|
|
54
|
+
"import": "./dist/ssg/client.mjs"
|
|
55
|
+
},
|
|
56
|
+
"./ssg/build-grant": {
|
|
57
|
+
"types": "./dist/ssg/build-grant.d.ts",
|
|
58
|
+
"import": "./dist/ssg/build-grant.mjs"
|
|
59
|
+
},
|
|
60
|
+
"./style.css": "./dist/style.css",
|
|
61
|
+
"./dist/style.css": "./dist/style.css"
|
|
62
|
+
},
|
|
63
|
+
"main": "./dist/index.cjs",
|
|
64
|
+
"module": "./dist/index.mjs",
|
|
65
|
+
"types": "./dist/index.d.ts",
|
|
66
|
+
"typesVersions": {
|
|
67
|
+
"*": {
|
|
68
|
+
"*": [
|
|
69
|
+
"./dist/*",
|
|
70
|
+
"./dist/index.d.ts"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"files": [
|
|
75
|
+
"dist",
|
|
76
|
+
"core",
|
|
77
|
+
"components",
|
|
78
|
+
"config",
|
|
79
|
+
"ssg",
|
|
80
|
+
"utils",
|
|
81
|
+
"views",
|
|
82
|
+
"setup.ts",
|
|
83
|
+
"index.ts",
|
|
84
|
+
"README.md"
|
|
85
|
+
],
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"access": "public"
|
|
88
|
+
},
|
|
89
|
+
"peerDependencies": {
|
|
90
|
+
"@bagelink/vue": "*",
|
|
91
|
+
"happy-dom": ">=14.0.0",
|
|
92
|
+
"vite": ">=5.0.0",
|
|
93
|
+
"vue": "^3.3.0",
|
|
94
|
+
"vue-router": "^4.0.0"
|
|
95
|
+
},
|
|
96
|
+
"peerDependenciesMeta": {
|
|
97
|
+
"happy-dom": {
|
|
98
|
+
"optional": true
|
|
99
|
+
},
|
|
100
|
+
"vite": {
|
|
101
|
+
"optional": true
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"devDependencies": {
|
|
105
|
+
"@vitejs/plugin-vue": "^5.2.4",
|
|
106
|
+
"@vue/tsconfig": "^0.7.0",
|
|
107
|
+
"typescript": "^5.9.3",
|
|
108
|
+
"vite": "^5.4.21",
|
|
109
|
+
"vite-plugin-dts": "^4.5.4",
|
|
110
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
111
|
+
"vitest": "^3.2.7",
|
|
112
|
+
"vue": "^3.5.43",
|
|
113
|
+
"vue-router": "^4.6.4",
|
|
114
|
+
"vue-tsc": "^2.2.12"
|
|
115
|
+
},
|
|
116
|
+
"dependencies": {
|
|
117
|
+
"magic-string": "^0.30.21",
|
|
118
|
+
"pinia": "^3.0.4"
|
|
119
|
+
},
|
|
120
|
+
"scripts": {
|
|
121
|
+
"dev": "vite build --watch",
|
|
122
|
+
"build": "vite build",
|
|
123
|
+
"typecheck": "vue-tsc --noEmit"
|
|
124
|
+
}
|
|
125
|
+
}
|