bun-plugin-stx 0.2.686 → 0.2.687
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/serve.js +6 -0
- package/package.json +3 -3
package/dist/serve.js
CHANGED
|
@@ -10774,6 +10774,12 @@ ${block}`;
|
|
|
10774
10774
|
html = stx.applyTranslations(html, i18nConfig, locale);
|
|
10775
10775
|
html = ensureRouterConfig(html);
|
|
10776
10776
|
const headers = new Headers(res.headers);
|
|
10777
|
+
const fragmentTitle = headers.get("X-STX-Title");
|
|
10778
|
+
if (res.headers.get("X-STX-Fragment") === "true" && fragmentTitle && i18nConfig && stx.applyTranslations) {
|
|
10779
|
+
const titleHtml = escapeHtml(decodeURIComponent(fragmentTitle));
|
|
10780
|
+
const translated = stx.applyTranslations(titleHtml, i18nConfig, locale);
|
|
10781
|
+
headers.set("X-STX-Title", encodeURIComponent(decodeTitleEntities(translated)));
|
|
10782
|
+
}
|
|
10777
10783
|
headers.delete("content-length");
|
|
10778
10784
|
return new Response(html, {
|
|
10779
10785
|
status: res.status,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bun-plugin-stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.687",
|
|
5
5
|
"description": "A Bun plugin that allows for using Laravel Blade-like syntax.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typecheck": "bun tsc --noEmit"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@stacksjs/stx": "0.2.
|
|
78
|
-
"stx-router": "0.2.
|
|
77
|
+
"@stacksjs/stx": "0.2.687",
|
|
78
|
+
"stx-router": "0.2.687"
|
|
79
79
|
}
|
|
80
80
|
}
|