fimo-vite 2.8.0-staging.9 → 2.8.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/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;
|
|
@@ -571,18 +571,21 @@ async function readProjectSettings(rootDir) {
|
|
|
571
571
|
}
|
|
572
572
|
return {};
|
|
573
573
|
}
|
|
574
|
+
// Label and content events go to the Branch room, `<projectId>:<branchKey>`,
|
|
575
|
+
// and the tenant host carries that key as `<projectId>-<branchKey>`. The events
|
|
576
|
+
// worker rejects a bare `<projectId>` room, and one rejected socket would tear
|
|
577
|
+
// down the others on every reconnect.
|
|
574
578
|
function deriveEventsRooms(projectId, tenantApiUrl) {
|
|
575
|
-
const rooms = new Set([projectId]);
|
|
576
579
|
try {
|
|
577
580
|
const firstLabel = new URL(tenantApiUrl).hostname.split('.')[0];
|
|
578
581
|
if (firstLabel.startsWith(`${projectId}-`)) {
|
|
579
|
-
|
|
582
|
+
return [`${projectId}:${firstLabel.slice(projectId.length + 1)}`];
|
|
580
583
|
}
|
|
581
584
|
}
|
|
582
585
|
catch {
|
|
583
|
-
return [
|
|
586
|
+
return [];
|
|
584
587
|
}
|
|
585
|
-
return [
|
|
588
|
+
return [];
|
|
586
589
|
}
|
|
587
590
|
async function generateOneTimeToken(apiUrl) {
|
|
588
591
|
const bearer = process.env.FIMO_API_TOKEN?.trim() || (await readStoredToken(apiUrl));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fimo-vite",
|
|
3
|
-
"version": "2.8.0
|
|
3
|
+
"version": "2.8.0",
|
|
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
|
|
34
|
+
"@fimo/tsconfig": "2.8.0",
|
|
35
35
|
"@types/node": "22.18.6",
|
|
36
|
-
"fimo": "2.8.0
|
|
36
|
+
"fimo": "2.8.0",
|
|
37
37
|
"typescript": "7.0.2",
|
|
38
|
-
"vite": "8.3.
|
|
39
|
-
"vitest": "5.0.
|
|
38
|
+
"vite": "8.3.4",
|
|
39
|
+
"vitest": "5.0.4"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"fimo": "2.
|
|
42
|
+
"fimo": ">=2.0.1",
|
|
43
43
|
"vite": "^7.0.0 || ^8.0.0"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|