@weaverse/hydrogen 6.1.2 → 6.2.0
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/index.js +5 -6
- package/dist/index.mjs +1 -2
- package/dist/internal.js +18 -29
- package/dist/internal.mjs +3 -14
- package/dist/next-client-boundary.js +1088 -0
- package/dist/next-client-boundary.js.map +1 -0
- package/dist/next-client-boundary.mjs +1038 -0
- package/dist/next-client-boundary.mjs.map +1 -0
- package/dist/next-server.js +669 -13
- package/dist/next-server.js.map +1 -0
- package/dist/next-server.mjs +666 -2
- package/dist/next-server.mjs.map +1 -0
- package/dist/next.js +33 -41
- package/dist/next.mjs +5 -3
- package/dist/react-router.js +6 -7
- package/dist/react-router.mjs +2 -3
- package/dist/seo-B8u2r3rX.mjs +205 -0
- package/dist/seo-B8u2r3rX.mjs.map +1 -0
- package/dist/seo-D9A9uRQ4.js +264 -0
- package/dist/seo-D9A9uRQ4.js.map +1 -0
- package/dist/translate-Celryv8j.mjs +26 -0
- package/dist/translate-Celryv8j.mjs.map +1 -0
- package/dist/translate-Kt1BYL1n.js +37 -0
- package/dist/translate-Kt1BYL1n.js.map +1 -0
- package/dist/{nested-key-CR3-YMFi.js → translation-store-BmGxBALf.js} +46 -137
- package/dist/translation-store-BmGxBALf.js.map +1 -0
- package/dist/{nested-key-_k9aW_Wd.mjs → translation-store-JFs-4lvf.mjs} +35 -138
- package/dist/translation-store-JFs-4lvf.mjs.map +1 -0
- package/dist/types/hooks/translation-context.d.ts +2 -36
- package/dist/types/hooks/translation-context.d.ts.map +1 -1
- package/dist/types/next/client-boundary.d.ts +25 -0
- package/dist/types/next/client-boundary.d.ts.map +1 -0
- package/dist/types/next/client.d.ts +16 -0
- package/dist/types/next/client.d.ts.map +1 -0
- package/dist/types/next/hooks.d.ts +20 -0
- package/dist/types/next/hooks.d.ts.map +1 -0
- package/dist/types/next/index.d.ts +34 -0
- package/dist/types/next/index.d.ts.map +1 -0
- package/dist/types/next/item.d.ts +60 -0
- package/dist/types/next/item.d.ts.map +1 -0
- package/dist/types/next/loader.d.ts +25 -0
- package/dist/types/next/loader.d.ts.map +1 -0
- package/dist/types/next/main.d.ts +11 -0
- package/dist/types/next/main.d.ts.map +1 -0
- package/dist/types/next/provider.d.ts +85 -0
- package/dist/types/next/provider.d.ts.map +1 -0
- package/dist/types/next/registry.d.ts +15 -0
- package/dist/types/next/registry.d.ts.map +1 -0
- package/dist/types/next/renderer.d.ts +21 -0
- package/dist/types/next/renderer.d.ts.map +1 -0
- package/dist/types/next/request-info.d.ts +19 -0
- package/dist/types/next/request-info.d.ts.map +1 -0
- package/dist/types/next/revalidate-item.d.ts +82 -0
- package/dist/types/next/revalidate-item.d.ts.map +1 -0
- package/dist/types/next/root-provider.d.ts +65 -0
- package/dist/types/next/root-provider.d.ts.map +1 -0
- package/dist/types/next/runtime.d.ts +113 -0
- package/dist/types/next/runtime.d.ts.map +1 -0
- package/dist/types/next/seo.d.ts +55 -0
- package/dist/types/next/seo.d.ts.map +1 -0
- package/dist/types/next/server/configs.d.ts +27 -0
- package/dist/types/next/server/configs.d.ts.map +1 -0
- package/dist/types/next/server/normalize-page-url.d.ts +19 -0
- package/dist/types/next/server/normalize-page-url.d.ts.map +1 -0
- package/dist/types/next/server/revalidate-handler.d.ts +55 -0
- package/dist/types/next/server/revalidate-handler.d.ts.map +1 -0
- package/dist/types/next/server/server-client.d.ts +21 -0
- package/dist/types/next/server/server-client.d.ts.map +1 -0
- package/dist/types/next/server.d.ts +19 -0
- package/dist/types/next/server.d.ts.map +1 -0
- package/dist/types/next/studio-bridge.d.ts +16 -0
- package/dist/types/next/studio-bridge.d.ts.map +1 -0
- package/dist/types/next/studio-connect.d.ts +27 -0
- package/dist/types/next/studio-connect.d.ts.map +1 -0
- package/dist/types/next/studio-router.d.ts +50 -0
- package/dist/types/next/studio-router.d.ts.map +1 -0
- package/dist/types/next/studio-script-src.d.ts +12 -0
- package/dist/types/next/studio-script-src.d.ts.map +1 -0
- package/dist/types/next/theme-settings-store.d.ts +18 -0
- package/dist/types/next/theme-settings-store.d.ts.map +1 -0
- package/dist/types/next/translation-context.d.ts +109 -0
- package/dist/types/next/translation-context.d.ts.map +1 -0
- package/dist/types/next/types.d.ts +674 -0
- package/dist/types/next/types.d.ts.map +1 -0
- package/dist/types/next/use-weaverse-next-studio.d.ts +34 -0
- package/dist/types/next/use-weaverse-next-studio.d.ts.map +1 -0
- package/dist/types/next/utils.d.ts +21 -0
- package/dist/types/next/utils.d.ts.map +1 -0
- package/dist/types/next-server.d.ts +3 -1
- package/dist/types/next-server.d.ts.map +1 -1
- package/dist/types/next.d.ts +4 -3
- package/dist/types/next.d.ts.map +1 -1
- package/dist/types/utils/translate.d.ts +51 -0
- package/dist/types/utils/translate.d.ts.map +1 -0
- package/dist/{weaverse-client-C9IgIH7O.js → weaverse-client-BmceZc5q.js} +49 -771
- package/dist/weaverse-client-BmceZc5q.js.map +1 -0
- package/dist/{weaverse-client-D59mBW0j.mjs → weaverse-client-CXnM9ayH.mjs} +4 -720
- package/dist/weaverse-client-CXnM9ayH.mjs.map +1 -0
- package/package.json +13 -7
- package/src/hooks/translation-context.tsx +7 -84
- package/src/next/client-boundary.ts +51 -0
- package/src/next/client.ts +102 -0
- package/src/next/hooks.ts +52 -0
- package/src/next/index.ts +145 -0
- package/src/next/item.ts +167 -0
- package/src/next/loader.ts +135 -0
- package/src/next/main.tsx +45 -0
- package/src/next/provider.tsx +241 -0
- package/src/next/registry.ts +63 -0
- package/src/next/renderer.tsx +102 -0
- package/src/next/request-info.ts +124 -0
- package/src/next/revalidate-item.ts +211 -0
- package/src/next/root-provider.tsx +201 -0
- package/src/next/runtime.ts +559 -0
- package/src/next/seo.ts +157 -0
- package/src/next/server/configs.ts +178 -0
- package/src/next/server/normalize-page-url.ts +73 -0
- package/src/next/server/revalidate-handler.ts +357 -0
- package/src/next/server/server-client.ts +728 -0
- package/src/next/server.ts +67 -0
- package/src/next/studio-bridge.tsx +82 -0
- package/src/next/studio-connect.tsx +88 -0
- package/src/next/studio-router.ts +85 -0
- package/src/next/studio-script-src.ts +128 -0
- package/src/next/theme-settings-store.ts +47 -0
- package/src/next/translation-context.tsx +182 -0
- package/src/next/types.ts +764 -0
- package/src/next/use-weaverse-next-studio.tsx +106 -0
- package/src/next/utils.ts +48 -0
- package/src/next-server.ts +41 -1
- package/src/next.ts +51 -15
- package/src/utils/translate.ts +101 -0
- package/dist/internal.js.map +0 -1
- package/dist/internal.mjs.map +0 -1
- package/dist/nested-key-CR3-YMFi.js.map +0 -1
- package/dist/nested-key-_k9aW_Wd.mjs.map +0 -1
- package/dist/translation-store-4fAV771j.js +0 -69
- package/dist/translation-store-4fAV771j.js.map +0 -1
- package/dist/translation-store-BBrw0FOk.mjs +0 -58
- package/dist/translation-store-BBrw0FOk.mjs.map +0 -1
- package/dist/weaverse-client-C9IgIH7O.js.map +0 -1
- package/dist/weaverse-client-D59mBW0j.mjs.map +0 -1
package/dist/next-server.js
CHANGED
|
@@ -1,14 +1,670 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
2
|
+
const require_seo = require("./seo-D9A9uRQ4.js");
|
|
3
|
+
let _weaverse_schema = require("@weaverse/schema");
|
|
4
|
+
//#region src/next/server/configs.ts
|
|
5
|
+
const DEFAULT_WEAVERSE_HOST = "https://studio.weaverse.io";
|
|
6
|
+
const DEFAULT_WEAVERSE_API_BASE = "https://api.weaverse.io";
|
|
7
|
+
const TRUSTED_STUDIO_DOMAINS = ["weaverse.io", "weaverse.dev"];
|
|
8
|
+
function isTrustedStudioHost(host) {
|
|
9
|
+
let parsed;
|
|
10
|
+
try {
|
|
11
|
+
parsed = new URL(host);
|
|
12
|
+
} catch {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
if (parsed.protocol !== "https:") return false;
|
|
16
|
+
let { hostname } = parsed;
|
|
17
|
+
return TRUSTED_STUDIO_DOMAINS.some((domain) => hostname === domain || hostname.endsWith(`.${domain}`));
|
|
18
|
+
}
|
|
19
|
+
function toUrl(value) {
|
|
20
|
+
try {
|
|
21
|
+
return typeof value === "string" ? new URL(value, "http://localhost") : value;
|
|
22
|
+
} catch {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function getContextSearchParams(context) {
|
|
27
|
+
if (context?.searchParams) return new URLSearchParams(context.searchParams);
|
|
28
|
+
if (context?.url) {
|
|
29
|
+
let url = toUrl(context.url);
|
|
30
|
+
if (url) return new URLSearchParams(url.searchParams);
|
|
31
|
+
}
|
|
32
|
+
return new URLSearchParams();
|
|
33
|
+
}
|
|
34
|
+
function lastParam(searchParams, key) {
|
|
35
|
+
let values = searchParams.getAll(key);
|
|
36
|
+
return values.length ? values.at(-1) : void 0;
|
|
37
|
+
}
|
|
38
|
+
function coerceBool(value) {
|
|
39
|
+
return value === "true";
|
|
40
|
+
}
|
|
41
|
+
function readEnv(env, key) {
|
|
42
|
+
let fromConfig = env?.[key];
|
|
43
|
+
if (fromConfig !== void 0) return fromConfig;
|
|
44
|
+
if (typeof process !== "undefined" && process.env) return process.env[key];
|
|
45
|
+
}
|
|
46
|
+
function getWeaverseNextConfigs(context, options = {}) {
|
|
47
|
+
let searchParams = getContextSearchParams(context);
|
|
48
|
+
let { env } = options;
|
|
49
|
+
let queryHost = lastParam(searchParams, "weaverseHost");
|
|
50
|
+
let trustedUrlHost = queryHost && isTrustedStudioHost(queryHost) ? new URL(queryHost).origin : "";
|
|
51
|
+
let configuredHost = options.weaverseHost || readEnv(env, "WEAVERSE_HOST") || "";
|
|
52
|
+
let weaverseHost = trustedUrlHost || configuredHost || DEFAULT_WEAVERSE_HOST;
|
|
53
|
+
let weaverseApiBase = trustedUrlHost || options.weaverseApiBase || readEnv(env, "WEAVERSE_PUBLIC_API_BASE") || (configuredHost && configuredHost !== DEFAULT_WEAVERSE_HOST ? configuredHost : DEFAULT_WEAVERSE_API_BASE);
|
|
54
|
+
let isRevisionPreview = context?.isRevisionPreview ?? searchParams.has("__revisionId");
|
|
55
|
+
let isDesignMode = context?.isDesignMode ?? coerceBool(lastParam(searchParams, "isDesignMode"));
|
|
56
|
+
let isPreviewMode = context?.isPreviewMode ?? coerceBool(lastParam(searchParams, "isPreviewMode"));
|
|
57
|
+
return {
|
|
58
|
+
queryProjectId: lastParam(searchParams, "weaverseProjectId") || "",
|
|
59
|
+
envProjectId: readEnv(env, "WEAVERSE_PROJECT_ID") || "",
|
|
60
|
+
weaverseHost,
|
|
61
|
+
weaverseApiBase,
|
|
62
|
+
weaverseVersion: lastParam(searchParams, "weaverseVersion") || options.weaverseVersion || "",
|
|
63
|
+
isDesignMode,
|
|
64
|
+
isPreviewMode,
|
|
65
|
+
isRevisionPreview,
|
|
66
|
+
sectionType: context?.sectionType || lastParam(searchParams, "sectionType") || "",
|
|
67
|
+
publicEnv: {
|
|
68
|
+
PUBLIC_STORE_DOMAIN: readEnv(env, "PUBLIC_STORE_DOMAIN") || "",
|
|
69
|
+
PUBLIC_STOREFRONT_API_TOKEN: readEnv(env, "PUBLIC_STOREFRONT_API_TOKEN") || ""
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/next/server/normalize-page-url.ts
|
|
75
|
+
const KEPT_PARAM_RE = /^(?:__revisionId|__weaverseDraftItem|isDesignMode|weaverse)/;
|
|
76
|
+
const DATA_SUFFIX = ".data";
|
|
77
|
+
function normalizeNextPageUrl(url) {
|
|
78
|
+
let parsed;
|
|
79
|
+
try {
|
|
80
|
+
parsed = new URL(url);
|
|
81
|
+
} catch {
|
|
82
|
+
try {
|
|
83
|
+
parsed = new URL(url, "http://localhost");
|
|
84
|
+
} catch {
|
|
85
|
+
return url;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
let kept = [...parsed.searchParams].filter(([key]) => KEPT_PARAM_RE.test(key));
|
|
89
|
+
kept.sort(([a], [b]) => a.localeCompare(b));
|
|
90
|
+
let search = new URLSearchParams(kept).toString();
|
|
91
|
+
let { pathname } = parsed;
|
|
92
|
+
if (pathname.endsWith(DATA_SUFFIX)) pathname = pathname.slice(0, -5);
|
|
93
|
+
return `${parsed.origin}${pathname}${search ? `?${search}` : ""}`;
|
|
94
|
+
}
|
|
95
|
+
function resolveRequestUrl(context) {
|
|
96
|
+
if (context?.url) {
|
|
97
|
+
let raw = String(context.url);
|
|
98
|
+
let url = new URL(raw, "http://localhost");
|
|
99
|
+
let pathname = require_seo.withPathPrefix(url.pathname, context.i18n);
|
|
100
|
+
if (pathname === url.pathname) return raw;
|
|
101
|
+
url.pathname = pathname;
|
|
102
|
+
return url.toString();
|
|
103
|
+
}
|
|
104
|
+
let pathname = require_seo.withPathPrefix(context?.pathname || "/", context?.i18n);
|
|
105
|
+
let search = context?.searchParams ? new URLSearchParams(context.searchParams).toString() : "";
|
|
106
|
+
return `http://localhost${pathname}${search ? `?${search}` : ""}`;
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/next/server/revalidate-handler.ts
|
|
110
|
+
const NO_STORE_HEADERS = {
|
|
111
|
+
"Content-Type": "application/json",
|
|
112
|
+
"Cache-Control": "no-store"
|
|
113
|
+
};
|
|
114
|
+
const STATUS_OK = 200;
|
|
115
|
+
const STATUS_BAD_REQUEST = 400;
|
|
116
|
+
const STATUS_NOT_FOUND = 404;
|
|
117
|
+
const STATUS_UNPROCESSABLE = 422;
|
|
118
|
+
const STATUS_SERVER_ERROR = 500;
|
|
119
|
+
const MAX_PATHNAME_LENGTH = 2048;
|
|
120
|
+
const MAX_SEARCH_LENGTH = 8192;
|
|
121
|
+
const MAX_HANDLE_LENGTH = 512;
|
|
122
|
+
const MAX_I18N_FIELD_LENGTH = 256;
|
|
123
|
+
const CONTROL_CHAR_PATTERN = /[\u0000-\u001F\u007F]/;
|
|
124
|
+
function isValidPathname(pathname) {
|
|
125
|
+
if (!pathname || pathname.length > MAX_PATHNAME_LENGTH) return false;
|
|
126
|
+
if (pathname[0] !== "/" || pathname.startsWith("//")) return false;
|
|
127
|
+
if (pathname.includes("\\") || pathname.includes("?")) return false;
|
|
128
|
+
if (pathname.includes("#") || CONTROL_CHAR_PATTERN.test(pathname)) return false;
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
function isPlainObject(value) {
|
|
132
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
|
|
133
|
+
let proto = Object.getPrototypeOf(value);
|
|
134
|
+
return proto === Object.prototype || proto === null;
|
|
135
|
+
}
|
|
136
|
+
function sanitizeRouteContextI18n(input) {
|
|
137
|
+
if (input === void 0) return;
|
|
138
|
+
if (!isPlainObject(input)) return null;
|
|
139
|
+
let source = input;
|
|
140
|
+
let allowed = new Set(require_seo.ROUTE_CONTEXT_I18N_KEYS);
|
|
141
|
+
for (let key of Object.keys(source)) if (!allowed.has(key)) return null;
|
|
142
|
+
let result = {};
|
|
143
|
+
for (let key of require_seo.ROUTE_CONTEXT_I18N_KEYS) {
|
|
144
|
+
let value = source[key];
|
|
145
|
+
if (value === void 0) continue;
|
|
146
|
+
if (typeof value !== "string" || value.length > MAX_I18N_FIELD_LENGTH) return null;
|
|
147
|
+
result[key] = value;
|
|
148
|
+
}
|
|
149
|
+
return Object.keys(result).length ? result : void 0;
|
|
150
|
+
}
|
|
151
|
+
function reconstructRouteContext(request, routeContext) {
|
|
152
|
+
if (typeof routeContext !== "object" || routeContext === null || Array.isArray(routeContext)) return null;
|
|
153
|
+
let { pathname, search, handle, pageType, i18n } = routeContext;
|
|
154
|
+
if (typeof pathname !== "string" || !isValidPathname(pathname)) return null;
|
|
155
|
+
if (typeof search !== "string" || search.length > MAX_SEARCH_LENGTH) return null;
|
|
156
|
+
let rawSearch = search;
|
|
157
|
+
if (rawSearch.length && !rawSearch.startsWith("?")) return null;
|
|
158
|
+
let sanitizedI18n = sanitizeRouteContextI18n(i18n);
|
|
159
|
+
if (sanitizedI18n === null) return null;
|
|
160
|
+
let resolvedPageType;
|
|
161
|
+
if (pageType !== void 0) {
|
|
162
|
+
let parsed = _weaverse_schema.PageTypeSchema.safeParse(pageType);
|
|
163
|
+
if (!parsed.success) return null;
|
|
164
|
+
resolvedPageType = parsed.data;
|
|
165
|
+
}
|
|
166
|
+
let resolvedHandle;
|
|
167
|
+
if (handle !== void 0) {
|
|
168
|
+
if (typeof handle !== "string" || !handle || handle.length > MAX_HANDLE_LENGTH) return null;
|
|
169
|
+
resolvedHandle = handle;
|
|
170
|
+
}
|
|
171
|
+
let endpointUrl = new URL(request.url);
|
|
172
|
+
let routeUrl = new URL(endpointUrl.origin);
|
|
173
|
+
routeUrl.pathname = pathname;
|
|
174
|
+
routeUrl.search = require_seo.sanitizeRouteContextSearch(rawSearch);
|
|
175
|
+
let canonicalPathname = routeUrl.pathname;
|
|
176
|
+
let searchParams = routeUrl.searchParams;
|
|
177
|
+
let lastParam = (key) => {
|
|
178
|
+
let values = searchParams.getAll(key);
|
|
179
|
+
return values.length ? values.at(-1) : void 0;
|
|
180
|
+
};
|
|
181
|
+
return {
|
|
182
|
+
pathname: canonicalPathname,
|
|
183
|
+
searchParams,
|
|
184
|
+
url: routeUrl,
|
|
185
|
+
headers: new Headers(request.headers),
|
|
186
|
+
...sanitizedI18n ? { i18n: sanitizedI18n } : {},
|
|
187
|
+
...resolvedPageType ? { pageType: resolvedPageType } : {},
|
|
188
|
+
...resolvedHandle ? { handle: resolvedHandle } : {},
|
|
189
|
+
isDesignMode: lastParam("isDesignMode") === "true",
|
|
190
|
+
isPreviewMode: lastParam("isPreviewMode") === "true",
|
|
191
|
+
isRevisionPreview: searchParams.has("__revisionId"),
|
|
192
|
+
sectionType: lastParam("sectionType") || void 0
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function json(body, status) {
|
|
196
|
+
return new Response(JSON.stringify(body), {
|
|
197
|
+
status,
|
|
198
|
+
headers: NO_STORE_HEADERS
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
function parseDraftItem(payload) {
|
|
202
|
+
if (typeof payload !== "object" || payload === null) return null;
|
|
203
|
+
let draftItem = payload.draftItem;
|
|
204
|
+
if (typeof draftItem !== "object" || draftItem === null) return null;
|
|
205
|
+
let { id, type } = draftItem;
|
|
206
|
+
if (typeof id !== "string" || !id || typeof type !== "string" || !type) return null;
|
|
207
|
+
return draftItem;
|
|
208
|
+
}
|
|
209
|
+
function createWeaverseNextRevalidateHandler(config) {
|
|
210
|
+
return { POST: async (request) => {
|
|
211
|
+
let payload;
|
|
212
|
+
try {
|
|
213
|
+
payload = await request.json();
|
|
214
|
+
} catch {
|
|
215
|
+
return json({ error: "invalid-payload" }, STATUS_BAD_REQUEST);
|
|
216
|
+
}
|
|
217
|
+
let draftItem = parseDraftItem(payload);
|
|
218
|
+
if (!draftItem) return json({ error: "invalid-payload" }, STATUS_BAD_REQUEST);
|
|
219
|
+
let requestContext;
|
|
220
|
+
let body = payload;
|
|
221
|
+
if (Object.hasOwn(body, "routeContext")) {
|
|
222
|
+
let reconstructed = reconstructRouteContext(request, body.routeContext);
|
|
223
|
+
if (!reconstructed) return json({ error: "invalid-route-context" }, STATUS_BAD_REQUEST);
|
|
224
|
+
requestContext = reconstructed;
|
|
225
|
+
}
|
|
226
|
+
let client;
|
|
227
|
+
try {
|
|
228
|
+
client = await config.getClient(request, requestContext);
|
|
229
|
+
} catch (error) {
|
|
230
|
+
console.error("❌ Revalidate handler getClient failed.", error);
|
|
231
|
+
return json({ error: "client-init-failed" }, STATUS_SERVER_ERROR);
|
|
232
|
+
}
|
|
233
|
+
let component = client.components.find((candidate) => candidate?.schema?.type === draftItem.type);
|
|
234
|
+
if (!component) return json({ error: "unknown-component-type" }, STATUS_NOT_FOUND);
|
|
235
|
+
if (typeof component.loader !== "function") return json({ error: "missing-loader" }, STATUS_UNPROCESSABLE);
|
|
236
|
+
try {
|
|
237
|
+
return json({ loaderData: await component.loader({
|
|
238
|
+
data: {
|
|
239
|
+
...require_seo.generateDataFromSchema(component.schema),
|
|
240
|
+
...draftItem.data
|
|
241
|
+
},
|
|
242
|
+
weaverse: client,
|
|
243
|
+
context: client.requestContext,
|
|
244
|
+
commerce: client.commerce
|
|
245
|
+
}) ?? null }, STATUS_OK);
|
|
246
|
+
} catch (error) {
|
|
247
|
+
console.error("❌ Item loader revalidation failed.", draftItem.type, draftItem.id, error);
|
|
248
|
+
return json({ error: "loader-failed" }, STATUS_SERVER_ERROR);
|
|
249
|
+
}
|
|
250
|
+
} };
|
|
251
|
+
}
|
|
252
|
+
//#endregion
|
|
253
|
+
//#region src/next/server/server-client.ts
|
|
254
|
+
const DEFAULT_FETCH_TIMEOUT_MS = 1e4;
|
|
255
|
+
const RANDOM_ID_RADIX = 36;
|
|
256
|
+
const RANDOM_ID_SLICE_START = 2;
|
|
257
|
+
const MAX_CUSTOM_PAGE_PAGES = 100;
|
|
258
|
+
const JSON_HEADERS = {
|
|
259
|
+
"Content-Type": "application/json",
|
|
260
|
+
Accept: "application/json",
|
|
261
|
+
"Accept-Encoding": "gzip, deflate, br"
|
|
262
|
+
};
|
|
263
|
+
function asThemeSchema(schema) {
|
|
264
|
+
return schema && typeof schema === "object" ? schema : void 0;
|
|
265
|
+
}
|
|
266
|
+
function generateUuid() {
|
|
267
|
+
if (typeof crypto !== "undefined" && "randomUUID" in crypto) return crypto.randomUUID();
|
|
268
|
+
return `id-${Math.random().toString(RANDOM_ID_RADIX).slice(RANDOM_ID_SLICE_START)}`;
|
|
269
|
+
}
|
|
270
|
+
function normalizeWeaverseNextPageAssignment(input) {
|
|
271
|
+
if (!input || typeof input !== "object") return;
|
|
272
|
+
let { projectId, type, handle, locale, meta } = input;
|
|
273
|
+
if (typeof projectId !== "string" || typeof type !== "string" || typeof handle !== "string") return;
|
|
274
|
+
let normalized = {
|
|
275
|
+
projectId,
|
|
276
|
+
type,
|
|
277
|
+
handle,
|
|
278
|
+
locale: typeof locale === "string" ? locale : ""
|
|
279
|
+
};
|
|
280
|
+
if (meta && typeof meta === "object") normalized.meta = meta;
|
|
281
|
+
return normalized;
|
|
282
|
+
}
|
|
283
|
+
var NextServerClient = class {
|
|
284
|
+
components;
|
|
285
|
+
commerce;
|
|
286
|
+
requestContext;
|
|
287
|
+
themeSchema;
|
|
288
|
+
themeSettings;
|
|
289
|
+
data = null;
|
|
290
|
+
dataContext = {};
|
|
291
|
+
configs;
|
|
292
|
+
_projectIdInput;
|
|
293
|
+
_baseConfigs;
|
|
294
|
+
_fetch;
|
|
295
|
+
_cache;
|
|
296
|
+
_fetchTimeoutMs;
|
|
297
|
+
_resolvedProjectId;
|
|
298
|
+
constructor(config) {
|
|
299
|
+
this.components = config.components;
|
|
300
|
+
this.commerce = config.commerce;
|
|
301
|
+
this.requestContext = config.requestContext;
|
|
302
|
+
this.themeSchema = config.themeSchema;
|
|
303
|
+
this.themeSettings = {
|
|
304
|
+
...require_seo.generateDataFromSchema(config.themeSchema),
|
|
305
|
+
...config.themeSettings
|
|
306
|
+
};
|
|
307
|
+
this._projectIdInput = config.projectId;
|
|
308
|
+
this._fetch = config.fetch ?? globalThis.fetch;
|
|
309
|
+
this._cache = config.cache;
|
|
310
|
+
this._fetchTimeoutMs = config.fetchTimeoutMs ?? DEFAULT_FETCH_TIMEOUT_MS;
|
|
311
|
+
this._baseConfigs = getWeaverseNextConfigs(config.requestContext, {
|
|
312
|
+
env: config.env,
|
|
313
|
+
weaverseHost: config.weaverseHost,
|
|
314
|
+
weaverseApiBase: config.weaverseApiBase,
|
|
315
|
+
weaverseVersion: config.weaverseVersion
|
|
316
|
+
});
|
|
317
|
+
this.configs = this._buildPublicConfigs(this._baseConfigs.queryProjectId || (typeof this._projectIdInput === "string" ? this._projectIdInput.trim() : "") || this._baseConfigs.envProjectId);
|
|
318
|
+
}
|
|
319
|
+
get projectId() {
|
|
320
|
+
return this.configs.projectId;
|
|
321
|
+
}
|
|
322
|
+
get storefront() {
|
|
323
|
+
return this.commerce?.storefront;
|
|
324
|
+
}
|
|
325
|
+
_buildPublicConfigs(projectId) {
|
|
326
|
+
let base = this._baseConfigs;
|
|
327
|
+
return {
|
|
328
|
+
projectId,
|
|
329
|
+
weaverseHost: base.weaverseHost,
|
|
330
|
+
weaverseApiBase: base.weaverseApiBase,
|
|
331
|
+
weaversePublicApiBase: base.weaverseApiBase,
|
|
332
|
+
weaverseVersion: base.weaverseVersion,
|
|
333
|
+
isDesignMode: base.isDesignMode,
|
|
334
|
+
isPreviewMode: base.isPreviewMode,
|
|
335
|
+
isRevisionPreview: base.isRevisionPreview,
|
|
336
|
+
sectionType: base.sectionType,
|
|
337
|
+
publicEnv: base.publicEnv
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
resolveProjectId = async () => {
|
|
341
|
+
if (this._resolvedProjectId !== void 0) return this._resolvedProjectId;
|
|
342
|
+
let resolved = this._baseConfigs.queryProjectId;
|
|
343
|
+
if (!resolved && typeof this._projectIdInput === "function") try {
|
|
344
|
+
let value = await this._projectIdInput(this.requestContext);
|
|
345
|
+
if (typeof value === "string" && value.trim()) resolved = value.trim();
|
|
346
|
+
} catch (error) {
|
|
347
|
+
console.warn("[WeaverseNextServerClient] projectId resolver threw, falling back.", error);
|
|
348
|
+
}
|
|
349
|
+
if (!resolved && typeof this._projectIdInput === "string") resolved = this._projectIdInput.trim();
|
|
350
|
+
if (!resolved) resolved = this._baseConfigs.envProjectId;
|
|
351
|
+
this._resolvedProjectId = resolved;
|
|
352
|
+
this.configs = this._buildPublicConfigs(resolved);
|
|
353
|
+
return resolved;
|
|
354
|
+
};
|
|
355
|
+
fetchWithCache = async (url, options = {}) => {
|
|
356
|
+
let { revalidate, tags, ...init } = options;
|
|
357
|
+
let requestInit = { ...init };
|
|
358
|
+
let { isDesignMode, isRevisionPreview } = this._baseConfigs;
|
|
359
|
+
if (isDesignMode || isRevisionPreview) requestInit.cache = "no-store";
|
|
360
|
+
else if (requestInit.cache === void 0) {
|
|
361
|
+
let effectiveRevalidate = revalidate ?? this._cache?.revalidate;
|
|
362
|
+
let effectiveTags = tags ?? this._cache?.tags;
|
|
363
|
+
if (effectiveRevalidate !== void 0 || effectiveTags?.length) requestInit.next = {
|
|
364
|
+
...effectiveRevalidate === void 0 ? {} : { revalidate: effectiveRevalidate },
|
|
365
|
+
...effectiveTags?.length ? { tags: effectiveTags } : {}
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
let controller = new AbortController();
|
|
369
|
+
let timeoutId = setTimeout(() => controller.abort(), this._fetchTimeoutMs);
|
|
370
|
+
try {
|
|
371
|
+
let response = await this._fetch(url, {
|
|
372
|
+
...requestInit,
|
|
373
|
+
signal: requestInit.signal ?? controller.signal
|
|
374
|
+
});
|
|
375
|
+
if (!response.ok) throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
376
|
+
return await response.json();
|
|
377
|
+
} finally {
|
|
378
|
+
clearTimeout(timeoutId);
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
_buildCustomPagesUrl(projectId, options, cursor) {
|
|
382
|
+
let params = new URLSearchParams();
|
|
383
|
+
if (options.locale) params.set("locale", options.locale);
|
|
384
|
+
if (options.limit) params.set("limit", String(options.limit));
|
|
385
|
+
if (cursor) params.set("cursor", cursor);
|
|
386
|
+
let qs = params.toString();
|
|
387
|
+
return `${this._baseConfigs.weaverseApiBase}/api/public/v1/projects/${projectId}/custom-pages${qs ? `?${qs}` : ""}`;
|
|
388
|
+
}
|
|
389
|
+
fetchCustomPages = async (options = {}) => {
|
|
390
|
+
let projectId = await this.resolveProjectId();
|
|
391
|
+
let entries = [];
|
|
392
|
+
if (!projectId) {
|
|
393
|
+
console.warn("[WeaverseNext] Failed to fetch custom pages: missing projectId");
|
|
394
|
+
return entries;
|
|
395
|
+
}
|
|
396
|
+
let cursor = null;
|
|
397
|
+
for (let page = 0; page < MAX_CUSTOM_PAGE_PAGES; page += 1) {
|
|
398
|
+
let url = this._buildCustomPagesUrl(projectId, options, cursor);
|
|
399
|
+
try {
|
|
400
|
+
let result = await this.fetchWithCache(url, {
|
|
401
|
+
revalidate: options.revalidate,
|
|
402
|
+
tags: options.tags
|
|
403
|
+
});
|
|
404
|
+
entries.push(...result.data ?? []);
|
|
405
|
+
if (!result.nextCursor) return entries;
|
|
406
|
+
cursor = result.nextCursor;
|
|
407
|
+
} catch (error) {
|
|
408
|
+
let message = error instanceof Error ? error.message : String(error);
|
|
409
|
+
console.warn(entries.length === 0 ? `[WeaverseNext] Failed to fetch custom pages: ${message}` : `[WeaverseNext] Custom pages pagination interrupted: ${message}`);
|
|
410
|
+
return entries;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
console.warn("[WeaverseNext] Custom pages pagination cap reached");
|
|
414
|
+
return entries;
|
|
415
|
+
};
|
|
416
|
+
_generateFallbackPage(message) {
|
|
417
|
+
let rootId = generateUuid();
|
|
418
|
+
return {
|
|
419
|
+
id: `fallback_page_${rootId}`,
|
|
420
|
+
rootId,
|
|
421
|
+
name: "Default Page",
|
|
422
|
+
items: [{
|
|
423
|
+
type: "main",
|
|
424
|
+
id: rootId,
|
|
425
|
+
data: { dangerouslySetInnerHTML: { __html: message } }
|
|
426
|
+
}]
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
_buildPreviewItems(type, items, initData = {}) {
|
|
430
|
+
let component = this.components.find((c) => c.schema?.type === type);
|
|
431
|
+
if (!component) return;
|
|
432
|
+
let { children, ...data } = component.schema?.presets ?? {};
|
|
433
|
+
let childIds = [];
|
|
434
|
+
if (children) for (let child of children) {
|
|
435
|
+
let { type: childType, children: _children, ...childData } = child;
|
|
436
|
+
let childId = this._buildPreviewItems(childType, items, childData);
|
|
437
|
+
if (childId) childIds.push({ id: childId });
|
|
438
|
+
}
|
|
439
|
+
let id = generateUuid();
|
|
440
|
+
items.push({
|
|
441
|
+
id,
|
|
442
|
+
type,
|
|
443
|
+
data: {
|
|
444
|
+
...data,
|
|
445
|
+
...initData
|
|
446
|
+
},
|
|
447
|
+
children: childIds
|
|
448
|
+
});
|
|
449
|
+
return id;
|
|
450
|
+
}
|
|
451
|
+
_generatePreviewData(projectId) {
|
|
452
|
+
let { sectionType, weaverseHost } = this._baseConfigs;
|
|
453
|
+
let items = [];
|
|
454
|
+
let sectionId = sectionType ? this._buildPreviewItems(sectionType, items) : void 0;
|
|
455
|
+
let configs = {
|
|
456
|
+
...this._buildPublicConfigs(projectId),
|
|
457
|
+
isPreviewMode: true,
|
|
458
|
+
weaverseHost,
|
|
459
|
+
requestInfo: require_seo.buildWeaverseNextRequestInfo(this.requestContext)
|
|
460
|
+
};
|
|
461
|
+
return {
|
|
462
|
+
project: {
|
|
463
|
+
id: projectId,
|
|
464
|
+
weaverseShopId: "shop-id",
|
|
465
|
+
name: "Section Preview"
|
|
466
|
+
},
|
|
467
|
+
configs,
|
|
468
|
+
page: {
|
|
469
|
+
id: "weaverse-preview-page",
|
|
470
|
+
name: "Preview section",
|
|
471
|
+
rootId: "1",
|
|
472
|
+
items: [{
|
|
473
|
+
id: "1",
|
|
474
|
+
type: "main",
|
|
475
|
+
data: {},
|
|
476
|
+
children: sectionId ? [{ id: sectionId }] : []
|
|
477
|
+
}, ...items]
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
_getLoadPageInput(input) {
|
|
482
|
+
let { cache, projectId: routeProjectId, ...rest } = input;
|
|
483
|
+
let params = {};
|
|
484
|
+
for (let [key, value] of Object.entries(rest)) if (value !== void 0) params[key] = value;
|
|
485
|
+
return {
|
|
486
|
+
cache,
|
|
487
|
+
params,
|
|
488
|
+
routeProjectId
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
async _resolveLoadPageProjectId(routeProjectId) {
|
|
492
|
+
let effectiveProjectId = typeof routeProjectId === "string" && routeProjectId.trim() || await this.resolveProjectId();
|
|
493
|
+
if (effectiveProjectId) this.configs = this._buildPublicConfigs(effectiveProjectId);
|
|
494
|
+
return effectiveProjectId;
|
|
495
|
+
}
|
|
496
|
+
_fetchPagePayload(projectId, params, cache) {
|
|
497
|
+
let i18n = this.requestContext?.i18n ?? this.commerce?.storefront?.i18n;
|
|
498
|
+
let url = normalizeNextPageUrl(resolveRequestUrl(this.requestContext));
|
|
499
|
+
let apiUrl = `${this._baseConfigs.weaverseApiBase}/api/public/project`;
|
|
500
|
+
let userAgent = this.requestContext?.headers?.get("user-agent") ?? "";
|
|
501
|
+
return this.fetchWithCache(apiUrl, {
|
|
502
|
+
method: "POST",
|
|
503
|
+
body: JSON.stringify({
|
|
504
|
+
projectId,
|
|
505
|
+
url,
|
|
506
|
+
i18n,
|
|
507
|
+
params,
|
|
508
|
+
isDesignMode: this._baseConfigs.isDesignMode
|
|
509
|
+
}),
|
|
510
|
+
headers: {
|
|
511
|
+
...JSON_HEADERS,
|
|
512
|
+
"X-Visitor-UA": userAgent
|
|
513
|
+
},
|
|
514
|
+
...cache ?? {}
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
_assertNoPageError(payload) {
|
|
518
|
+
if ("error" in payload && typeof payload.error === "string") throw new Error(payload.error);
|
|
519
|
+
}
|
|
520
|
+
_createLoaderData(payload, projectId) {
|
|
521
|
+
this._assertNoPageError(payload);
|
|
522
|
+
let page = payload.page;
|
|
523
|
+
let project = payload.project;
|
|
524
|
+
let pageAssignment = normalizeWeaverseNextPageAssignment(payload.pageAssignment);
|
|
525
|
+
page ??= this._generateFallbackPage("<div style=\"text-align: center;\">Please add new section to start.</div>");
|
|
526
|
+
project ??= {
|
|
527
|
+
id: projectId,
|
|
528
|
+
name: "Weaverse project not found.",
|
|
529
|
+
weaverseShopId: ""
|
|
530
|
+
};
|
|
531
|
+
if (Array.isArray(page.items) && page.items.length === 0) page.items.push({
|
|
532
|
+
type: "main",
|
|
533
|
+
id: page.rootId || generateUuid(),
|
|
534
|
+
data: {}
|
|
535
|
+
});
|
|
536
|
+
return {
|
|
537
|
+
page,
|
|
538
|
+
project,
|
|
539
|
+
pageAssignment,
|
|
540
|
+
configs: {
|
|
541
|
+
...this._buildPublicConfigs(projectId),
|
|
542
|
+
requestInfo: require_seo.buildWeaverseNextRequestInfo(this.requestContext)
|
|
543
|
+
}
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
async _runLoaders(data) {
|
|
547
|
+
this.data = data;
|
|
548
|
+
let withLoaders = await require_seo.runWeaverseComponentLoaders({
|
|
549
|
+
client: this,
|
|
550
|
+
data
|
|
551
|
+
});
|
|
552
|
+
this.data = withLoaders ?? data;
|
|
553
|
+
return this.data;
|
|
554
|
+
}
|
|
555
|
+
loadPage = async (input = {}) => {
|
|
556
|
+
try {
|
|
557
|
+
let { cache, params, routeProjectId } = this._getLoadPageInput(input);
|
|
558
|
+
let projectId = await this._resolveLoadPageProjectId(routeProjectId);
|
|
559
|
+
if (this._baseConfigs.isPreviewMode) {
|
|
560
|
+
let previewData = this._generatePreviewData(projectId || "x");
|
|
561
|
+
this.data = previewData;
|
|
562
|
+
return previewData;
|
|
563
|
+
}
|
|
564
|
+
if (!projectId) throw new Error("Missing Weaverse projectId!");
|
|
565
|
+
let payload = await this._fetchPagePayload(projectId, params, cache);
|
|
566
|
+
let data = this._createLoaderData(payload, projectId);
|
|
567
|
+
return await this._runLoaders(data);
|
|
568
|
+
} catch (error) {
|
|
569
|
+
console.error("❌ Page load failed", {
|
|
570
|
+
url: this.requestContext?.url,
|
|
571
|
+
projectId: input.projectId || this.configs.projectId,
|
|
572
|
+
message: error instanceof Error ? error.message : String(error)
|
|
573
|
+
});
|
|
574
|
+
return null;
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
_resolveOverridesLocale() {
|
|
578
|
+
let i18n = this.requestContext?.i18n;
|
|
579
|
+
let language = typeof i18n?.language === "string" ? i18n.language.trim() : "";
|
|
580
|
+
let country = typeof i18n?.country === "string" ? i18n.country.trim() : "";
|
|
581
|
+
if (!(language && country)) return;
|
|
582
|
+
return `${language.toLowerCase()}-${country.toLowerCase()}`;
|
|
583
|
+
}
|
|
584
|
+
async _fetchMerchantOverrides(projectId, options) {
|
|
585
|
+
let { weaverseHost } = this._baseConfigs;
|
|
586
|
+
if (!(asThemeSchema(this.themeSchema)?.i18n && projectId && weaverseHost)) return;
|
|
587
|
+
let locale = this._resolveOverridesLocale();
|
|
588
|
+
if (!locale) return;
|
|
589
|
+
let url = `${weaverseHost}/api/translation/static?projectId=${projectId}&locale=${locale}`;
|
|
590
|
+
try {
|
|
591
|
+
let overrides = await this.fetchWithCache(url, {
|
|
592
|
+
method: "GET",
|
|
593
|
+
headers: { Accept: "application/json" },
|
|
594
|
+
revalidate: options.revalidate,
|
|
595
|
+
tags: options.tags
|
|
596
|
+
});
|
|
597
|
+
return typeof overrides === "object" && overrides !== null ? overrides : void 0;
|
|
598
|
+
} catch (error) {
|
|
599
|
+
console.warn("[WeaverseNext] Unable to load merchant overrides, using theme defaults:", error instanceof Error ? error.message : String(error));
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
loadThemeSettings = async (optionsInput = {}) => {
|
|
604
|
+
let options = optionsInput;
|
|
605
|
+
let themeSchema = asThemeSchema(this.themeSchema);
|
|
606
|
+
let defaultThemeSettings = require_seo.generateDataFromSchema(this.themeSchema);
|
|
607
|
+
let staticContent = themeSchema?.i18n?.staticContent;
|
|
608
|
+
try {
|
|
609
|
+
let projectId = await this.resolveProjectId();
|
|
610
|
+
if (!projectId) throw new Error("Missing Weaverse projectId!");
|
|
611
|
+
let { isDesignMode } = this._baseConfigs;
|
|
612
|
+
let url = `${this._baseConfigs.weaverseApiBase}/api/public/project_configs`;
|
|
613
|
+
let [result, merchantOverrides] = await Promise.all([this.fetchWithCache(url, {
|
|
614
|
+
method: "POST",
|
|
615
|
+
body: JSON.stringify({
|
|
616
|
+
projectId,
|
|
617
|
+
isDesignMode
|
|
618
|
+
}),
|
|
619
|
+
headers: JSON_HEADERS,
|
|
620
|
+
revalidate: options.revalidate,
|
|
621
|
+
tags: options.tags
|
|
622
|
+
}), this._fetchMerchantOverrides(projectId, options)]);
|
|
623
|
+
if (typeof result !== "object" || result === null) result = { theme: defaultThemeSettings };
|
|
624
|
+
if (themeSchema?.settings || themeSchema?.inspector) if (!result.theme || typeof result.theme !== "object") result.theme = defaultThemeSettings;
|
|
625
|
+
else result.theme = {
|
|
626
|
+
...defaultThemeSettings,
|
|
627
|
+
...result.theme
|
|
628
|
+
};
|
|
629
|
+
if (staticContent) result.staticContent = staticContent;
|
|
630
|
+
if (merchantOverrides) result.merchantOverrides = merchantOverrides;
|
|
631
|
+
if (isDesignMode) {
|
|
632
|
+
let serializableSchema = themeSchema ? {
|
|
633
|
+
...themeSchema,
|
|
634
|
+
settings: themeSchema.settings?.map((group) => ({
|
|
635
|
+
...group,
|
|
636
|
+
inputs: group?.inputs?.map((inputItem) => typeof inputItem?.condition === "function" ? {
|
|
637
|
+
...inputItem,
|
|
638
|
+
condition: inputItem.condition.toString()
|
|
639
|
+
} : inputItem)
|
|
640
|
+
}))
|
|
641
|
+
} : void 0;
|
|
642
|
+
result = {
|
|
643
|
+
...result,
|
|
644
|
+
schema: serializableSchema,
|
|
645
|
+
publicEnv: this._baseConfigs.publicEnv
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
return result;
|
|
649
|
+
} catch (error) {
|
|
650
|
+
let errorDetails = error instanceof Error ? error.message : String(error);
|
|
651
|
+
console.error("Unable to load theme settings", errorDetails);
|
|
652
|
+
return {
|
|
653
|
+
theme: defaultThemeSettings,
|
|
654
|
+
staticContent,
|
|
655
|
+
_error: errorDetails,
|
|
656
|
+
_loadFailed: true
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
function createWeaverseNextServerClient(config) {
|
|
662
|
+
return new NextServerClient(config);
|
|
663
|
+
}
|
|
664
|
+
//#endregion
|
|
665
|
+
exports.createWeaverseNextRevalidateHandler = createWeaverseNextRevalidateHandler;
|
|
666
|
+
exports.createWeaverseNextServerClient = createWeaverseNextServerClient;
|
|
667
|
+
exports.formatWeaverseNextSeoMetadata = require_seo.formatWeaverseNextSeoMetadata;
|
|
668
|
+
exports.getWeaverseNextSeoMetadata = require_seo.getWeaverseNextSeoMetadata;
|
|
669
|
+
|
|
670
|
+
//# sourceMappingURL=next-server.js.map
|