@onruntime/next-sitemap 0.5.0 → 0.5.1
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/app/index.cjs +8 -8
- package/dist/app/index.js +8 -8
- package/package.json +1 -1
package/dist/app/index.cjs
CHANGED
|
@@ -201,16 +201,16 @@ function createSitemapIndexHandler(options) {
|
|
|
201
201
|
const { urlsPerSitemap = 5e3, locales = [], defaultLocale, additionalSitemaps, exclude, debug = false } = options;
|
|
202
202
|
const localeSegment = options.localeSegment ?? (locales.length > 0 || defaultLocale ? "[locale]" : "");
|
|
203
203
|
const routes = extractRoutes(options.pagesContext, localeSegment);
|
|
204
|
-
if (debug) {
|
|
205
|
-
console.log(`[next-sitemap] Found ${routes.length} routes:`);
|
|
206
|
-
routes.forEach((r) => {
|
|
207
|
-
const hasParams = r.getParams ? "\u2713 generateStaticParams" : "\u2717 no generateStaticParams";
|
|
208
|
-
const segments = r.dynamicSegments.length > 0 ? ` [${r.dynamicSegments.join(", ")}]` : "";
|
|
209
|
-
console.log(` ${r.pathname}${segments} - ${hasParams}`);
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
204
|
return {
|
|
213
205
|
GET: async () => {
|
|
206
|
+
if (debug) {
|
|
207
|
+
console.log(`[next-sitemap] Found ${routes.length} routes:`);
|
|
208
|
+
routes.forEach((r) => {
|
|
209
|
+
const hasParams = r.getParams ? "\u2713 generateStaticParams" : "\u2717 no generateStaticParams";
|
|
210
|
+
const segments = r.dynamicSegments.length > 0 ? ` [${r.dynamicSegments.join(", ")}]` : "";
|
|
211
|
+
console.log(` ${r.pathname}${segments} - ${hasParams}`);
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
214
|
const allPaths = await getAllPaths(routes, debug);
|
|
215
215
|
const filteredPaths = allPaths.filter((pathname) => !shouldExclude(pathname, exclude));
|
|
216
216
|
const sitemapCount = Math.max(1, Math.ceil(filteredPaths.length / urlsPerSitemap));
|
package/dist/app/index.js
CHANGED
|
@@ -199,16 +199,16 @@ function createSitemapIndexHandler(options) {
|
|
|
199
199
|
const { urlsPerSitemap = 5e3, locales = [], defaultLocale, additionalSitemaps, exclude, debug = false } = options;
|
|
200
200
|
const localeSegment = options.localeSegment ?? (locales.length > 0 || defaultLocale ? "[locale]" : "");
|
|
201
201
|
const routes = extractRoutes(options.pagesContext, localeSegment);
|
|
202
|
-
if (debug) {
|
|
203
|
-
console.log(`[next-sitemap] Found ${routes.length} routes:`);
|
|
204
|
-
routes.forEach((r) => {
|
|
205
|
-
const hasParams = r.getParams ? "\u2713 generateStaticParams" : "\u2717 no generateStaticParams";
|
|
206
|
-
const segments = r.dynamicSegments.length > 0 ? ` [${r.dynamicSegments.join(", ")}]` : "";
|
|
207
|
-
console.log(` ${r.pathname}${segments} - ${hasParams}`);
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
202
|
return {
|
|
211
203
|
GET: async () => {
|
|
204
|
+
if (debug) {
|
|
205
|
+
console.log(`[next-sitemap] Found ${routes.length} routes:`);
|
|
206
|
+
routes.forEach((r) => {
|
|
207
|
+
const hasParams = r.getParams ? "\u2713 generateStaticParams" : "\u2717 no generateStaticParams";
|
|
208
|
+
const segments = r.dynamicSegments.length > 0 ? ` [${r.dynamicSegments.join(", ")}]` : "";
|
|
209
|
+
console.log(` ${r.pathname}${segments} - ${hasParams}`);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
212
|
const allPaths = await getAllPaths(routes, debug);
|
|
213
213
|
const filteredPaths = allPaths.filter((pathname) => !shouldExclude(pathname, exclude));
|
|
214
214
|
const sitemapCount = Math.max(1, Math.ceil(filteredPaths.length / urlsPerSitemap));
|
package/package.json
CHANGED