@justanarthur/payload-www 1.4.2 → 2.0.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/README.md +81 -33
- package/dist/access.d.ts +1 -1
- package/dist/access.js +3 -5
- package/dist/blocks.d.ts +1 -1
- package/dist/blocks.js +2 -4
- package/dist/cli.js +0 -2
- package/dist/collections.d.ts +19 -19
- package/dist/collections.js +91 -125
- package/dist/config.d.ts +2 -1
- package/dist/config.js +17 -47
- package/dist/fields.d.ts +4 -5
- package/dist/fields.js +14 -48
- package/dist/imagehash.d.ts +1 -1
- package/dist/imagehash.js +2 -4
- package/dist/import-map-provider.d.ts +1 -1
- package/dist/import-map-provider.js +2 -4
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +2 -4
- package/dist/metadata.d.ts +35 -10
- package/dist/metadata.js +99 -122
- package/dist/pages.d.ts +12 -4
- package/dist/pages.js +109 -136
- package/dist/render-pages.d.ts +15 -7
- package/dist/render-pages.js +125 -147
- package/dist/sitemap.d.ts +15 -2
- package/dist/sitemap.js +108 -132
- package/dist/translator.d.ts +1 -1
- package/dist/translator.js +2 -4
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +2 -4
- package/package.json +16 -14
package/dist/render-pages.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
1
|
// src/render/pages/FooterPage.tsx
|
|
4
|
-
import"server-only";
|
|
5
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
3
|
function FooterPage({ data }) {
|
|
7
4
|
const nav = data.nav ?? [];
|
|
@@ -59,7 +56,6 @@ function FooterPage({ data }) {
|
|
|
59
56
|
}
|
|
60
57
|
|
|
61
58
|
// src/render/pages/HeaderPage.tsx
|
|
62
|
-
import"server-only";
|
|
63
59
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
64
60
|
function HeaderPage({ data }) {
|
|
65
61
|
const nav = data.nav ?? [];
|
|
@@ -207,9 +203,6 @@ async function PostsPage({ doc, locale, ...props }) {
|
|
|
207
203
|
});
|
|
208
204
|
}
|
|
209
205
|
|
|
210
|
-
// src/render/pages/createCollectionPageExports.tsx
|
|
211
|
-
import"server-only";
|
|
212
|
-
|
|
213
206
|
// src/render/metadata/slug.ts
|
|
214
207
|
var SLUG_NESTED_DIVIDER = "_";
|
|
215
208
|
function paramsSlugToSlug(slug, _shape) {
|
|
@@ -229,135 +222,112 @@ function slugToPath(slug) {
|
|
|
229
222
|
}
|
|
230
223
|
|
|
231
224
|
// src/render/metadata/query.ts
|
|
225
|
+
import { createCacheHelpers } from "@pro-laico/payload-revalidate/cache";
|
|
226
|
+
import { tagsFor } from "@pro-laico/payload-revalidate";
|
|
227
|
+
import { cacheLife } from "next/cache";
|
|
232
228
|
import { getPayload } from "payload";
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
} catch (error) {
|
|
243
|
-
const msg = error instanceof Error ? error.message : String(error);
|
|
244
|
-
if (msg.includes("static generation store missing"))
|
|
245
|
-
return;
|
|
246
|
-
console.error(error);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
if ("collection" in args) {
|
|
250
|
-
[
|
|
251
|
-
doc && doc._status !== "draft" && doc.slug,
|
|
252
|
-
previousDoc && previousDoc._status === "published" && previousDoc.slug
|
|
253
|
-
].filter((slug) => slug !== undefined && slug !== false).map((slug) => revalidate({ collectionSlug: args.collection.slug, slug }));
|
|
254
|
-
} else {
|
|
255
|
-
revalidate({ globalSlug: args.global.slug });
|
|
256
|
-
}
|
|
257
|
-
return doc;
|
|
258
|
-
};
|
|
259
|
-
return { afterChange: afterChangeDeleteHook, afterDelete: afterChangeDeleteHook };
|
|
260
|
-
}
|
|
261
|
-
function createCollectionCacheKey(args) {
|
|
262
|
-
return `${"globalSlug" in args ? args.globalSlug : args.collectionSlug + args.slug}_${args.locale}`;
|
|
229
|
+
var _helpers = null;
|
|
230
|
+
var _seedPromise = null;
|
|
231
|
+
function seedPayloadCache({ config }) {
|
|
232
|
+
if (_helpers || _seedPromise)
|
|
233
|
+
return;
|
|
234
|
+
_seedPromise = (async () => {
|
|
235
|
+
const payload = await getPayload({ config: await config });
|
|
236
|
+
_helpers = createCacheHelpers(payload);
|
|
237
|
+
})();
|
|
263
238
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
239
|
+
async function requireCacheHelpers() {
|
|
240
|
+
if (_helpers)
|
|
241
|
+
return _helpers;
|
|
242
|
+
if (_seedPromise) {
|
|
243
|
+
await _seedPromise;
|
|
244
|
+
if (_helpers)
|
|
245
|
+
return _helpers;
|
|
246
|
+
}
|
|
247
|
+
throw new Error("[payload-www] seedPayloadCache({ config }) must be called before any query getter. " + "Call it from createCollectionPageExports / createRootLayoutExports factory, or in your root layout.");
|
|
269
248
|
}
|
|
270
|
-
async function
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
249
|
+
async function queryDocBySlug(args) {
|
|
250
|
+
"use cache";
|
|
251
|
+
cacheLife("weeks");
|
|
252
|
+
const { findDoc } = await requireCacheHelpers();
|
|
253
|
+
const slugField = args.slugField ?? "slug";
|
|
254
|
+
const result = await findDoc(args.collectionSlug, {
|
|
255
|
+
where: { [slugField]: { equals: args.slug } },
|
|
256
|
+
locale: args.locale,
|
|
257
|
+
draft: args.draft ?? false,
|
|
258
|
+
depth: args.depth
|
|
276
259
|
});
|
|
260
|
+
return result ?? null;
|
|
277
261
|
}
|
|
278
|
-
async function
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
const payload = await getPayload({ config });
|
|
288
|
-
const result = await payload.find({
|
|
289
|
-
collection: collectionSlug,
|
|
290
|
-
draft,
|
|
291
|
-
limit: 1,
|
|
292
|
-
pagination: false,
|
|
293
|
-
overrideAccess: draft,
|
|
294
|
-
where: { [slugField]: { equals: slug } },
|
|
295
|
-
locale
|
|
262
|
+
async function queryGlobal(args) {
|
|
263
|
+
"use cache";
|
|
264
|
+
cacheLife("weeks");
|
|
265
|
+
const { findGlobal } = await requireCacheHelpers();
|
|
266
|
+
try {
|
|
267
|
+
const result = await findGlobal(args.globalSlug, {
|
|
268
|
+
locale: args.locale,
|
|
269
|
+
draft: args.draft ?? false,
|
|
270
|
+
depth: args.depth
|
|
296
271
|
});
|
|
297
|
-
return result
|
|
298
|
-
})
|
|
272
|
+
return result ?? null;
|
|
273
|
+
} catch (error) {
|
|
274
|
+
console.warn("[WWW] queryGlobal failed", { globalSlug: args.globalSlug, locale: args.locale, error: String(error) });
|
|
275
|
+
return null;
|
|
276
|
+
}
|
|
299
277
|
}
|
|
300
|
-
async function
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
} catch (error) {
|
|
311
|
-
console.warn("[WWW] queryGlobal failed", { globalSlug, locale, error: String(error) });
|
|
312
|
-
return null;
|
|
313
|
-
}
|
|
314
|
-
});
|
|
278
|
+
async function queryAllDocs(args) {
|
|
279
|
+
"use cache";
|
|
280
|
+
cacheLife("weeks");
|
|
281
|
+
const { findIds, findDocByID } = await requireCacheHelpers();
|
|
282
|
+
const collection = args.collectionSlug;
|
|
283
|
+
const { ids } = await findIds(collection, { locale: args.locale });
|
|
284
|
+
if (ids.length === 0)
|
|
285
|
+
return [];
|
|
286
|
+
const docs = await Promise.all(ids.map((id) => findDocByID(collection, id, { locale: args.locale })));
|
|
287
|
+
return docs.filter((d) => d !== null);
|
|
315
288
|
}
|
|
316
|
-
async function
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
config
|
|
321
|
-
}) {
|
|
322
|
-
return withUnstableCache([collectionSlug, slugField, locale], [createCollectionCacheKey({ collectionSlug, slug: "__all__", locale })], async () => {
|
|
323
|
-
const payload = await getPayload({ config });
|
|
324
|
-
const result = await payload.find({
|
|
325
|
-
collection: collectionSlug,
|
|
326
|
-
draft: false,
|
|
327
|
-
limit: 1000,
|
|
328
|
-
pagination: false,
|
|
329
|
-
overrideAccess: false,
|
|
330
|
-
select: { [slugField]: true },
|
|
331
|
-
locale
|
|
332
|
-
});
|
|
333
|
-
return result.docs ?? [];
|
|
334
|
-
});
|
|
289
|
+
async function queryDoc(args) {
|
|
290
|
+
if ("globalSlug" in args)
|
|
291
|
+
return queryGlobal(args);
|
|
292
|
+
return queryDocBySlug(args);
|
|
335
293
|
}
|
|
336
|
-
async function queryAllLocaleSlugs({
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
})
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
294
|
+
async function queryAllLocaleSlugs(args) {
|
|
295
|
+
"use cache";
|
|
296
|
+
cacheLife("weeks");
|
|
297
|
+
const { findDocByID } = await requireCacheHelpers();
|
|
298
|
+
const slugField = args.slugField ?? "slug";
|
|
299
|
+
const doc = await findDocByID(args.collectionSlug, args.id, { locale: "all", select: { [slugField]: true } });
|
|
300
|
+
const localeMap = doc?.[slugField];
|
|
301
|
+
if (localeMap && typeof localeMap === "object")
|
|
302
|
+
return localeMap;
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
305
|
+
async function queryDocByID(args) {
|
|
306
|
+
"use cache";
|
|
307
|
+
cacheLife("weeks");
|
|
308
|
+
const { findDocByID } = await requireCacheHelpers();
|
|
309
|
+
return await findDocByID(args.collectionSlug, args.id, {
|
|
310
|
+
locale: args.locale,
|
|
311
|
+
draft: args.draft ?? false,
|
|
312
|
+
depth: args.depth
|
|
348
313
|
});
|
|
349
|
-
return doc?.[slugField];
|
|
350
314
|
}
|
|
351
315
|
|
|
352
316
|
// src/render/pages/createCollectionPageExports.tsx
|
|
353
317
|
import { setRequestLocale } from "next-intl/server";
|
|
354
318
|
|
|
355
319
|
// src/render/pages/utils/buildLocalizedPath.ts
|
|
320
|
+
function resolvePagePathPrefix(prefix, locale, routing) {
|
|
321
|
+
if (typeof prefix !== "object")
|
|
322
|
+
return prefix;
|
|
323
|
+
return prefix[locale] ?? prefix[routing.defaultLocale];
|
|
324
|
+
}
|
|
356
325
|
function buildLocalizedPath(locale, prefix, slug, { routing }) {
|
|
357
326
|
const path = slugToPath(slug);
|
|
327
|
+
const localePrefix = resolvePagePathPrefix(prefix, locale, routing);
|
|
358
328
|
return `${routing.localePrefix === "never" ? "" : routing.localePrefix === "always" ? locale : routing.localePrefix === "as-needed" ? locale === routing.defaultLocale ? "" : "/" + locale : (() => {
|
|
359
329
|
throw new Error("Unsupported locale prefix");
|
|
360
|
-
})()}${
|
|
330
|
+
})()}${localePrefix ? "/" + localePrefix : ""}${path ? "/" + path : ""}`;
|
|
361
331
|
}
|
|
362
332
|
function buildLocalizedPaths(localesSlug, pagePathPrefix, { routing }) {
|
|
363
333
|
const blankIsHome = !localesSlug[routing.defaultLocale];
|
|
@@ -412,7 +382,7 @@ async function renderWWWDataModule(data, {
|
|
|
412
382
|
import { jsx as jsx7, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
413
383
|
function createCollectionPageExports({
|
|
414
384
|
slug: collectionSlug = "pages",
|
|
415
|
-
|
|
385
|
+
_payloadConfig,
|
|
416
386
|
importMap,
|
|
417
387
|
routing,
|
|
418
388
|
slugShape = "single"
|
|
@@ -420,14 +390,13 @@ function createCollectionPageExports({
|
|
|
420
390
|
getServerSideURL,
|
|
421
391
|
pagePathPrefix
|
|
422
392
|
}) {
|
|
393
|
+
seedPayloadCache({ config: _payloadConfig });
|
|
423
394
|
const siteUrl = getServerSideURL();
|
|
424
395
|
async function fetchDoc(locale, slug) {
|
|
425
396
|
return queryDoc({
|
|
426
397
|
slug,
|
|
427
398
|
locale,
|
|
428
399
|
collectionSlug
|
|
429
|
-
}, {
|
|
430
|
-
config: configPromise
|
|
431
400
|
});
|
|
432
401
|
}
|
|
433
402
|
const default_ = async (props) => {
|
|
@@ -444,22 +413,25 @@ function createCollectionPageExports({
|
|
|
444
413
|
const { notFound } = await import("next/navigation");
|
|
445
414
|
notFound();
|
|
446
415
|
}
|
|
447
|
-
const rendered = renderWWWDataModule(doc, { collectionSlug, config:
|
|
416
|
+
const rendered = renderWWWDataModule(doc, { collectionSlug, config: _payloadConfig, importMap }, { ...props, locale });
|
|
448
417
|
return /* @__PURE__ */ jsx7(Fragment2, {
|
|
449
418
|
children: rendered
|
|
450
419
|
});
|
|
451
420
|
};
|
|
452
421
|
async function generateMetadata(props) {
|
|
453
422
|
const params = await props.params;
|
|
454
|
-
const locale = params.locale
|
|
423
|
+
const locale = params.locale;
|
|
424
|
+
if (!routing.locales.includes(locale)) {
|
|
425
|
+
return {};
|
|
426
|
+
}
|
|
427
|
+
const slug = paramsSlugToSlug(params.slug, slugShape);
|
|
455
428
|
const doc = await fetchDoc(locale, slug);
|
|
456
429
|
const [localesSlug, siteDefaults] = await Promise.all([
|
|
457
430
|
doc ? queryAllLocaleSlugs({
|
|
458
431
|
id: doc.id,
|
|
459
|
-
collectionSlug
|
|
460
|
-
config: configPromise
|
|
432
|
+
collectionSlug
|
|
461
433
|
}) : Promise.resolve({}),
|
|
462
|
-
createSiteDefaults({ config:
|
|
434
|
+
createSiteDefaults({ config: _payloadConfig, locale })
|
|
463
435
|
]);
|
|
464
436
|
if (!doc)
|
|
465
437
|
return {};
|
|
@@ -476,22 +448,23 @@ function createCollectionPageExports({
|
|
|
476
448
|
return { ...meta, alternates };
|
|
477
449
|
}
|
|
478
450
|
async function generateStaticParams(props) {
|
|
479
|
-
|
|
480
|
-
const
|
|
481
|
-
|
|
451
|
+
await props.params;
|
|
452
|
+
const perLocaleEntries = await Promise.all(routing.locales.map(async (locale) => {
|
|
453
|
+
const docs = await queryAllDocs({ locale, collectionSlug });
|
|
454
|
+
return docs.filter((doc) => typeof doc.slug === "string" && doc.slug.length > 0).map((doc) => ({ locale, slug: slugToParamsSlug(doc.slug, slugShape) }));
|
|
455
|
+
}));
|
|
456
|
+
return perLocaleEntries.flat();
|
|
482
457
|
}
|
|
483
458
|
async function generateSitemap() {
|
|
484
459
|
const locale = routing.defaultLocale;
|
|
485
460
|
const docs = await queryAllDocs({
|
|
486
461
|
collectionSlug,
|
|
487
|
-
locale
|
|
488
|
-
config: configPromise
|
|
462
|
+
locale: routing.defaultLocale
|
|
489
463
|
});
|
|
490
464
|
return await Promise.all(docs.map(async (doc) => {
|
|
491
465
|
const localesSlug = await queryAllLocaleSlugs({
|
|
492
466
|
id: doc.id,
|
|
493
|
-
collectionSlug
|
|
494
|
-
config: configPromise
|
|
467
|
+
collectionSlug
|
|
495
468
|
}) ?? {};
|
|
496
469
|
const alternates = buildAlternates(locale, localesSlug, pagePathPrefix, { routing, siteUrl });
|
|
497
470
|
return {
|
|
@@ -502,7 +475,7 @@ function createCollectionPageExports({
|
|
|
502
475
|
}));
|
|
503
476
|
}
|
|
504
477
|
generateSitemap.getServerSideURL = getServerSideURL;
|
|
505
|
-
generateSitemap.pagePathPrefix = pagePathPrefix;
|
|
478
|
+
generateSitemap.pagePathPrefix = resolvePagePathPrefix(pagePathPrefix, routing.defaultLocale, routing);
|
|
506
479
|
return {
|
|
507
480
|
default: default_,
|
|
508
481
|
generateMetadata,
|
|
@@ -526,13 +499,13 @@ ${sitemaps.map((url) => ` <sitemap><loc>${url}</loc></sitemap>`).join(`
|
|
|
526
499
|
}
|
|
527
500
|
|
|
528
501
|
// src/render/pages/createRootLayoutExports.tsx
|
|
529
|
-
import"
|
|
502
|
+
import { Activity } from "react";
|
|
530
503
|
import { setRequestLocale as setRequestLocale2 } from "next-intl/server";
|
|
531
504
|
import { NextIntlClientProvider } from "next-intl";
|
|
532
505
|
import { RootJsonLd } from "@justanarthur/payload-plugin-seo/root-jsonld";
|
|
533
506
|
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
534
507
|
function createRootLayoutExports({
|
|
535
|
-
|
|
508
|
+
_payloadConfig,
|
|
536
509
|
importMap,
|
|
537
510
|
routing
|
|
538
511
|
}, {
|
|
@@ -540,6 +513,7 @@ function createRootLayoutExports({
|
|
|
540
513
|
htmlAttrs,
|
|
541
514
|
getServerSideURL
|
|
542
515
|
} = {}) {
|
|
516
|
+
seedPayloadCache({ config: _payloadConfig });
|
|
543
517
|
async function RootLayout(props) {
|
|
544
518
|
const params = await props.params;
|
|
545
519
|
const locale = params.locale;
|
|
@@ -552,17 +526,17 @@ function createRootLayoutExports({
|
|
|
552
526
|
header,
|
|
553
527
|
footer
|
|
554
528
|
] = await Promise.all([
|
|
555
|
-
queryDoc({ globalSlug: "header", locale }
|
|
556
|
-
queryDoc({ globalSlug: "footer", locale }
|
|
529
|
+
queryDoc({ globalSlug: "header", locale }),
|
|
530
|
+
queryDoc({ globalSlug: "footer", locale })
|
|
557
531
|
]);
|
|
558
|
-
const renderedHeader = renderWWWDataModule(header, { collectionSlug: "header", configPath: "globals", config:
|
|
532
|
+
const renderedHeader = renderWWWDataModule(header, { collectionSlug: "header", configPath: "globals", config: _payloadConfig, importMap }, { ...props, locale }), renderedFooter = renderWWWDataModule(footer, { collectionSlug: "footer", configPath: "globals", config: _payloadConfig, importMap }, { ...props, locale });
|
|
559
533
|
const mergedHtmlAttrs = {
|
|
560
534
|
lang: locale,
|
|
561
535
|
suppressHydrationWarning: true,
|
|
562
536
|
...htmlAttrs?.(locale) ?? {}
|
|
563
537
|
};
|
|
564
538
|
const rootJsonLd = getServerSideURL ? /* @__PURE__ */ jsx8(RootJsonLd, {
|
|
565
|
-
config:
|
|
539
|
+
config: _payloadConfig,
|
|
566
540
|
locale,
|
|
567
541
|
getServerSideURL,
|
|
568
542
|
locales: routing.locales
|
|
@@ -573,9 +547,13 @@ function createRootLayoutExports({
|
|
|
573
547
|
children: /* @__PURE__ */ jsxs4(NextIntlClientProvider, {
|
|
574
548
|
children: [
|
|
575
549
|
rootJsonLd,
|
|
576
|
-
|
|
550
|
+
/* @__PURE__ */ jsx8(Activity, {
|
|
551
|
+
children: renderedHeader
|
|
552
|
+
}),
|
|
577
553
|
providers ? providers({ children: props.children, locale }) : props.children,
|
|
578
|
-
|
|
554
|
+
/* @__PURE__ */ jsx8(Activity, {
|
|
555
|
+
children: renderedFooter
|
|
556
|
+
})
|
|
579
557
|
]
|
|
580
558
|
})
|
|
581
559
|
})
|
|
@@ -592,12 +570,12 @@ import { RootJsonLd as RootJsonLd2 } from "@justanarthur/payload-plugin-seo/root
|
|
|
592
570
|
var renderPages = { createCollectionPageExports, createRootLayoutExports, PagesPage, PostsPage, HeaderPage, FooterPage, RootJsonLd: RootJsonLd2 };
|
|
593
571
|
var render_pages_default = renderPages;
|
|
594
572
|
export {
|
|
595
|
-
|
|
596
|
-
createRootLayoutExports,
|
|
597
|
-
createCollectionPageExports,
|
|
598
|
-
RootJsonLd2 as RootJsonLd,
|
|
599
|
-
PostsPage,
|
|
600
|
-
PagesPage,
|
|
573
|
+
FooterPage,
|
|
601
574
|
HeaderPage,
|
|
602
|
-
|
|
575
|
+
PagesPage,
|
|
576
|
+
PostsPage,
|
|
577
|
+
RootJsonLd2 as RootJsonLd,
|
|
578
|
+
createCollectionPageExports,
|
|
579
|
+
createRootLayoutExports,
|
|
580
|
+
render_pages_default as default
|
|
603
581
|
};
|
package/dist/sitemap.d.ts
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* URL segment a collection is mounted under. A string is used for every locale; a record
|
|
3
|
+
* localizes it (`{ en: 'posts', sk: 'prispevky' }`), so a host serving localized routes
|
|
4
|
+
* gets canonical/hreflang URLs that match the URLs it actually serves. Locales missing
|
|
5
|
+
* from the record fall back to the default locale.
|
|
6
|
+
*/
|
|
7
|
+
type PagePathPrefix = string | Record<string, string>;
|
|
1
8
|
type CreateCollectionPageExportsDeps<S extends string> = {
|
|
2
9
|
getServerSideURL: () => string;
|
|
3
|
-
pagePathPrefix?:
|
|
10
|
+
pagePathPrefix?: PagePathPrefix;
|
|
4
11
|
};
|
|
5
12
|
type GenerateSitemapPageExportsArgs = CreateCollectionPageExportsDeps<any>;
|
|
6
13
|
declare function createSitemapFromCollections(...args: GenerateSitemapPageExportsArgs[]): () => Response;
|
|
14
|
+
import { SanitizedConfig as SanitizedConfig2 } from "payload";
|
|
15
|
+
type SeedPayloadCacheArgs = {
|
|
16
|
+
config: SanitizedConfig2 | Promise<SanitizedConfig2>;
|
|
17
|
+
};
|
|
18
|
+
declare function seedPayloadCache({ config }: SeedPayloadCacheArgs): void;
|
|
7
19
|
declare const _default: {
|
|
8
20
|
createSitemapFromCollections: typeof createSitemapFromCollections;
|
|
21
|
+
seedPayloadCache: typeof seedPayloadCache;
|
|
9
22
|
};
|
|
10
|
-
export { _default as default,
|
|
23
|
+
export { createSitemapFromCollections, _default as default, seedPayloadCache };
|