fimo-vite 2.8.0-staging.10 → 2.8.0-staging.12
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/plugins/sitemap.js +15 -1
- package/package.json +4 -4
package/dist/plugins/sitemap.js
CHANGED
|
@@ -49,7 +49,21 @@ export default function sitemapPlugin() {
|
|
|
49
49
|
next();
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
// The sitemap reads every entry from the content API. A failed read is
|
|
53
|
+
// this request's error, never the dev server's: thrown from an async
|
|
54
|
+
// middleware it would end the whole process (FIMO-2791).
|
|
55
|
+
let xml;
|
|
56
|
+
try {
|
|
57
|
+
xml = await generateSitemap();
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
61
|
+
server.config.logger.error(`[fimo] sitemap.xml could not be generated: ${message}`);
|
|
62
|
+
res.statusCode = 500;
|
|
63
|
+
res.setHeader('Content-Type', 'text/plain; charset=utf-8');
|
|
64
|
+
res.end(`sitemap.xml could not be generated: ${message}\n`);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
53
67
|
if (!xml) {
|
|
54
68
|
next();
|
|
55
69
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fimo-vite",
|
|
3
|
-
"version": "2.8.0-staging.
|
|
3
|
+
"version": "2.8.0-staging.12",
|
|
4
4
|
"description": "Framework-neutral Fimo Vite plugin. Pairs with the fimo package at the same version.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"oxc-parser": "^0.118.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@fimo/tsconfig": "2.8.0-staging.
|
|
34
|
+
"@fimo/tsconfig": "2.8.0-staging.12",
|
|
35
35
|
"@types/node": "22.18.6",
|
|
36
|
-
"fimo": "2.8.0-staging.
|
|
36
|
+
"fimo": "2.8.0-staging.12",
|
|
37
37
|
"typescript": "7.0.2",
|
|
38
38
|
"vite": "8.3.3",
|
|
39
39
|
"vitest": "5.0.3"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"fimo": "2.8.0-staging.
|
|
42
|
+
"fimo": "2.8.0-staging.12",
|
|
43
43
|
"vite": "^7.0.0 || ^8.0.0"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|