@nuxtjs/sitemap 7.4.8 → 7.4.10
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/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/{BD3NqoLn.js → CjT5ejtq.js} +1 -1
- package/dist/client/_nuxt/{CGPPaMu7.js → DBmpb9dG.js} +1 -1
- package/dist/client/_nuxt/{HdjdXzAy.js → FE81ed4p.js} +14 -16
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/698c1660-7b4c-4db3-a9a5-6c0e6240b3a7.json +1 -0
- package/dist/client/_nuxt/error-404.DC9fsYfS.css +1 -0
- package/dist/client/_nuxt/error-500.DPVweS-0.css +1 -0
- package/dist/client/index.html +1 -1
- package/dist/client/sitemap.xml +1 -1
- package/dist/content.d.mts +36 -37
- package/dist/content.d.ts +36 -37
- package/dist/content.mjs +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +38 -28
- package/dist/runtime/server/plugins/nuxt-content-v2.js +6 -7
- package/dist/runtime/server/routes/__sitemap__/debug.js +3 -2
- package/dist/runtime/server/routes/__sitemap__/nuxt-content-urls-v2.d.ts +1 -1
- package/dist/runtime/server/routes/__sitemap__/nuxt-content-urls-v3.d.ts +3 -1
- package/dist/runtime/server/routes/__sitemap__/nuxt-content-urls-v3.js +7 -6
- package/dist/runtime/server/routes/sitemap/[sitemap].xml.js +1 -1
- package/dist/runtime/server/sitemap/builder/sitemap.js +67 -74
- package/dist/runtime/server/sitemap/builder/xml.js +81 -169
- package/dist/runtime/server/sitemap/nitro.js +4 -3
- package/dist/runtime/server/sitemap/urlset/normalise.js +29 -26
- package/dist/runtime/types.d.ts +8 -2
- package/dist/runtime/utils-pure.js +1 -1
- package/dist/utils.mjs +1 -2
- package/package.json +21 -13
- package/dist/client/_nuxt/builds/meta/61bb4b51-7d01-424f-91fb-0e4ca01f7b22.json +0 -1
- package/dist/client/_nuxt/error-404.i2ufnNET.css +0 -1
- package/dist/client/_nuxt/error-500.CIrNTbBE.css +0 -1
|
@@ -11,36 +11,39 @@ import {
|
|
|
11
11
|
import { defu } from "defu";
|
|
12
12
|
import { mergeOnKey } from "../../../utils-pure.js";
|
|
13
13
|
function resolve(s, resolvers) {
|
|
14
|
-
if (typeof s === "undefined"
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
return
|
|
19
|
-
|
|
14
|
+
if (typeof s === "undefined")
|
|
15
|
+
return void 0;
|
|
16
|
+
const str = typeof s === "string" ? s : s.toString();
|
|
17
|
+
if (!resolvers)
|
|
18
|
+
return str;
|
|
19
|
+
if (hasProtocol(str, { acceptRelative: true, strict: false }))
|
|
20
|
+
return resolvers.fixSlashes(str);
|
|
21
|
+
return resolvers.canonicalUrlResolver(str);
|
|
20
22
|
}
|
|
21
23
|
function removeTrailingSlash(s) {
|
|
22
24
|
return s.replace(/\/(\?|#|$)/, "$1");
|
|
23
25
|
}
|
|
24
26
|
export function preNormalizeEntry(_e, resolvers) {
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
delete e.url;
|
|
27
|
+
const input = typeof _e === "string" ? { loc: _e } : { ..._e };
|
|
28
|
+
if (input.url && !input.loc) {
|
|
29
|
+
input.loc = input.url;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
delete input.url;
|
|
32
|
+
if (typeof input.loc !== "string") {
|
|
33
|
+
input.loc = "";
|
|
32
34
|
}
|
|
35
|
+
const e = input;
|
|
33
36
|
e.loc = removeTrailingSlash(e.loc);
|
|
34
37
|
e._abs = hasProtocol(e.loc, { acceptRelative: false, strict: false });
|
|
35
38
|
try {
|
|
36
39
|
e._path = e._abs ? parseURL(e.loc) : parsePath(e.loc);
|
|
37
|
-
} catch
|
|
38
|
-
|
|
40
|
+
} catch {
|
|
41
|
+
e._path = null;
|
|
39
42
|
}
|
|
40
43
|
if (e._path) {
|
|
41
|
-
const
|
|
42
|
-
const qs = stringifyQuery(
|
|
43
|
-
e._relativeLoc = `${encodePath(e._path
|
|
44
|
+
const search = e._path.search;
|
|
45
|
+
const qs = search && search.length > 1 ? stringifyQuery(parseQuery(search)) : "";
|
|
46
|
+
e._relativeLoc = `${encodePath(e._path.pathname)}${qs.length ? `?${qs}` : ""}`;
|
|
44
47
|
if (e._path.host) {
|
|
45
48
|
e.loc = stringifyParsedURL(e._path);
|
|
46
49
|
} else {
|
|
@@ -76,8 +79,7 @@ export function normaliseEntry(_e, defaults, resolvers) {
|
|
|
76
79
|
e.loc = resolve(e.loc, resolvers);
|
|
77
80
|
if (e.alternatives) {
|
|
78
81
|
const alternatives = e.alternatives.map((a) => ({ ...a }));
|
|
79
|
-
for (
|
|
80
|
-
const alt = alternatives[i];
|
|
82
|
+
for (const alt of alternatives) {
|
|
81
83
|
if (typeof alt.href === "string") {
|
|
82
84
|
alt.href = resolve(alt.href, resolvers);
|
|
83
85
|
} else if (typeof alt.href === "object" && alt.href) {
|
|
@@ -88,16 +90,16 @@ export function normaliseEntry(_e, defaults, resolvers) {
|
|
|
88
90
|
}
|
|
89
91
|
if (e.images) {
|
|
90
92
|
const images = e.images.map((i) => ({ ...i }));
|
|
91
|
-
for (
|
|
92
|
-
|
|
93
|
+
for (const img of images) {
|
|
94
|
+
img.loc = resolve(img.loc, resolvers);
|
|
93
95
|
}
|
|
94
96
|
e.images = mergeOnKey(images, "loc");
|
|
95
97
|
}
|
|
96
98
|
if (e.videos) {
|
|
97
99
|
const videos = e.videos.map((v) => ({ ...v }));
|
|
98
|
-
for (
|
|
99
|
-
if (
|
|
100
|
-
|
|
100
|
+
for (const video of videos) {
|
|
101
|
+
if (video.content_loc) {
|
|
102
|
+
video.content_loc = resolve(video.content_loc, resolvers);
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
e.videos = mergeOnKey(videos, "content_loc");
|
|
@@ -115,8 +117,9 @@ export function isValidW3CDate(d) {
|
|
|
115
117
|
}
|
|
116
118
|
export function normaliseDate(d) {
|
|
117
119
|
if (typeof d === "string") {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
const tIdx = d.indexOf("T");
|
|
121
|
+
if (tIdx !== -1) {
|
|
122
|
+
const t = d.slice(tIdx + 1);
|
|
120
123
|
if (!t.includes("+") && !t.includes("-") && !t.includes("Z")) {
|
|
121
124
|
d += "Z";
|
|
122
125
|
}
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -247,7 +247,7 @@ export type ResolvedSitemapUrl = Omit<SitemapUrl, 'url'> & Required<Pick<Sitemap
|
|
|
247
247
|
/**
|
|
248
248
|
* @internal
|
|
249
249
|
*/
|
|
250
|
-
_path: ParsedURL;
|
|
250
|
+
_path: ParsedURL | null;
|
|
251
251
|
/**
|
|
252
252
|
* @internal
|
|
253
253
|
*/
|
|
@@ -362,6 +362,10 @@ export interface SitemapSourcesHookCtx extends NitroBaseHook {
|
|
|
362
362
|
export type Changefreq = 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
|
|
363
363
|
export interface SitemapUrl {
|
|
364
364
|
loc: string;
|
|
365
|
+
/**
|
|
366
|
+
* Alias for `loc`. Will be normalized to `loc`.
|
|
367
|
+
*/
|
|
368
|
+
url?: string;
|
|
365
369
|
lastmod?: string | Date;
|
|
366
370
|
changefreq?: Changefreq;
|
|
367
371
|
priority?: 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
|
|
@@ -406,7 +410,7 @@ export interface GoogleNewsEntry {
|
|
|
406
410
|
export interface ImageEntry {
|
|
407
411
|
loc: string | URL;
|
|
408
412
|
caption?: string;
|
|
409
|
-
|
|
413
|
+
geo_location?: string;
|
|
410
414
|
title?: string;
|
|
411
415
|
license?: string | URL;
|
|
412
416
|
}
|
|
@@ -436,6 +440,8 @@ export interface VideoEntry {
|
|
|
436
440
|
};
|
|
437
441
|
live?: 'yes' | 'no' | boolean;
|
|
438
442
|
tag?: string | string[];
|
|
443
|
+
category?: string;
|
|
444
|
+
gallery_loc?: string | URL;
|
|
439
445
|
}
|
|
440
446
|
export interface Restriction {
|
|
441
447
|
relationship: 'allow' | 'deny';
|
|
@@ -30,7 +30,7 @@ export function mergeOnKey(arr, key) {
|
|
|
30
30
|
}
|
|
31
31
|
export function splitForLocales(path, locales) {
|
|
32
32
|
const prefix = withLeadingSlash(path).split("/")[1];
|
|
33
|
-
if (locales.includes(prefix))
|
|
33
|
+
if (prefix && locales.includes(prefix))
|
|
34
34
|
return [prefix, path.replace(`/${prefix}`, "")];
|
|
35
35
|
return [null, path];
|
|
36
36
|
}
|
package/dist/utils.mjs
CHANGED
|
@@ -319,12 +319,11 @@ function extractUrlFromParsedElement(urlElement, warnings) {
|
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
|
|
322
|
+
return Object.fromEntries(
|
|
323
323
|
Object.entries(urlObj).filter(
|
|
324
324
|
([_, value]) => value != null && (!Array.isArray(value) || value.length > 0)
|
|
325
325
|
)
|
|
326
326
|
);
|
|
327
|
-
return filteredUrlObj;
|
|
328
327
|
}
|
|
329
328
|
async function parseSitemapXml(xml) {
|
|
330
329
|
const warnings = [];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxtjs/sitemap",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.4.
|
|
4
|
+
"version": "7.4.10",
|
|
5
5
|
"description": "Powerfully flexible XML Sitemaps that integrate seamlessly, for Nuxt.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@nuxt/devtools-kit": "^3.1.1",
|
|
52
|
-
"@nuxt/kit": "^4.2.
|
|
52
|
+
"@nuxt/kit": "^4.2.2",
|
|
53
53
|
"chalk": "^5.6.2",
|
|
54
54
|
"defu": "^6.1.4",
|
|
55
|
-
"fast-xml-parser": "^5.3.
|
|
55
|
+
"fast-xml-parser": "^5.3.3",
|
|
56
56
|
"h3-compression": "^0.3.2",
|
|
57
|
-
"nuxt-site-config": "^3.2.
|
|
57
|
+
"nuxt-site-config": "^3.2.14",
|
|
58
58
|
"ofetch": "^1.5.1",
|
|
59
59
|
"pathe": "^2.0.3",
|
|
60
60
|
"pkg-types": "^2.3.0",
|
|
@@ -65,27 +65,35 @@
|
|
|
65
65
|
"ufo": "^1.6.1",
|
|
66
66
|
"ultrahtml": "^1.6.0"
|
|
67
67
|
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"zod": ">=3"
|
|
70
|
+
},
|
|
71
|
+
"peerDependenciesMeta": {
|
|
72
|
+
"zod": {
|
|
73
|
+
"optional": true
|
|
74
|
+
}
|
|
75
|
+
},
|
|
68
76
|
"devDependencies": {
|
|
69
77
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
70
78
|
"@nuxt/content": "^3.9.0",
|
|
71
|
-
"@nuxt/eslint-config": "^1.
|
|
79
|
+
"@nuxt/eslint-config": "^1.12.1",
|
|
72
80
|
"@nuxt/module-builder": "^1.0.2",
|
|
73
81
|
"@nuxt/test-utils": "^3.21.0",
|
|
74
82
|
"@nuxt/ui": "^4.2.1",
|
|
75
83
|
"@nuxtjs/i18n": "^10.2.1",
|
|
76
|
-
"@nuxtjs/robots": "^5.6.
|
|
84
|
+
"@nuxtjs/robots": "^5.6.7",
|
|
77
85
|
"better-sqlite3": "^12.5.0",
|
|
78
86
|
"bumpp": "^10.3.2",
|
|
79
|
-
"eslint": "^9.39.
|
|
87
|
+
"eslint": "^9.39.2",
|
|
80
88
|
"eslint-plugin-n": "^17.23.1",
|
|
81
89
|
"execa": "^9.6.1",
|
|
82
90
|
"happy-dom": "^20.0.11",
|
|
83
|
-
"nuxt": "^4.2.
|
|
84
|
-
"nuxt-i18n-micro": "^2.
|
|
91
|
+
"nuxt": "^4.2.2",
|
|
92
|
+
"nuxt-i18n-micro": "^2.15.2",
|
|
85
93
|
"typescript": "^5.9.3",
|
|
86
|
-
"vitest": "
|
|
87
|
-
"vue-tsc": "^3.1.
|
|
88
|
-
"@nuxtjs/sitemap": "7.4.
|
|
94
|
+
"vitest": "3.2.4",
|
|
95
|
+
"vue-tsc": "^3.1.8",
|
|
96
|
+
"@nuxtjs/sitemap": "7.4.10"
|
|
89
97
|
},
|
|
90
98
|
"scripts": {
|
|
91
99
|
"lint": "eslint .",
|
|
@@ -102,6 +110,6 @@
|
|
|
102
110
|
"test": "vitest run && pnpm run test:attw",
|
|
103
111
|
"test:unit": "vitest --project=unit",
|
|
104
112
|
"test:attw": "attw --pack",
|
|
105
|
-
"typecheck": "
|
|
113
|
+
"typecheck": "nuxt typecheck"
|
|
106
114
|
}
|
|
107
115
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"61bb4b51-7d01-424f-91fb-0e4ca01f7b22","timestamp":1764878513805,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.grid[data-v-7b03c9df]{display:grid}.mb-2[data-v-7b03c9df]{margin-bottom:.5rem}.mb-4[data-v-7b03c9df]{margin-bottom:1rem}.max-w-520px[data-v-7b03c9df]{max-width:520px}.min-h-screen[data-v-7b03c9df]{min-height:100vh}.w-full[data-v-7b03c9df]{width:100%}.flex[data-v-7b03c9df]{display:flex}.place-content-center[data-v-7b03c9df]{place-content:center}.items-center[data-v-7b03c9df]{align-items:center}.justify-center[data-v-7b03c9df]{justify-content:center}.overflow-hidden[data-v-7b03c9df]{overflow:hidden}.bg-white[data-v-7b03c9df]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-7b03c9df]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-7b03c9df]{text-align:center}.text-\[80px\][data-v-7b03c9df]{font-size:80px}.text-2xl[data-v-7b03c9df]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-7b03c9df]{font-size:.875rem;line-height:1.25rem}.text-\[\#020420\][data-v-7b03c9df]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-7b03c9df]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\:text-\[\#00DC82\][data-v-7b03c9df]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-7b03c9df]{font-weight:500}.font-semibold[data-v-7b03c9df]{font-weight:600}.leading-none[data-v-7b03c9df]{line-height:1}.tracking-wide[data-v-7b03c9df]{letter-spacing:.025em}.font-sans[data-v-7b03c9df]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-7b03c9df]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline[data-v-7b03c9df]{text-decoration-line:underline}.underline-offset-3[data-v-7b03c9df]{text-underline-offset:3px}.antialiased[data-v-7b03c9df]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-7b03c9df]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-7b03c9df]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-7b03c9df]{font-size:110px}.sm\:text-3xl[data-v-7b03c9df]{font-size:1.875rem;line-height:2.25rem}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.grid[data-v-b5d03260]{display:grid}.mb-2[data-v-b5d03260]{margin-bottom:.5rem}.mb-4[data-v-b5d03260]{margin-bottom:1rem}.max-w-520px[data-v-b5d03260]{max-width:520px}.min-h-screen[data-v-b5d03260]{min-height:100vh}.place-content-center[data-v-b5d03260]{place-content:center}.overflow-hidden[data-v-b5d03260]{overflow:hidden}.bg-white[data-v-b5d03260]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-b5d03260]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-b5d03260]{text-align:center}.text-\[80px\][data-v-b5d03260]{font-size:80px}.text-2xl[data-v-b5d03260]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-b5d03260]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-b5d03260]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-b5d03260]{font-weight:600}.leading-none[data-v-b5d03260]{line-height:1}.tracking-wide[data-v-b5d03260]{letter-spacing:.025em}.font-sans[data-v-b5d03260]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-b5d03260]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-b5d03260]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-b5d03260]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-b5d03260]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-b5d03260]{font-size:110px}.sm\:text-3xl[data-v-b5d03260]{font-size:1.875rem;line-height:2.25rem}}
|