bun-plugin-stx 0.2.861 → 0.2.862
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 +3 -4
- package/package.json +3 -3
package/dist/serve.js
CHANGED
|
@@ -8755,7 +8755,7 @@ var defaultConfigDir4 = /* @__PURE__ */ resolve12(process19.cwd(), "config");
|
|
|
8755
8755
|
var defaultGeneratedDir4 = /* @__PURE__ */ resolve12(process19.cwd(), "src/generated");
|
|
8756
8756
|
|
|
8757
8757
|
// src/serve.ts
|
|
8758
|
-
import { BUILD_ID_HEADER, decodeTitleEntities, externalScriptsOutsideContainer, extractPageResponseStatus, findContainerRegion, FRAGMENT_CACHE_CONTROL, getBuildId, mergeCssConfig, pageCssFragment, pageHeadFragment, readResponseHeaders, readResponseStatus, renderFontCSS, SPA_NAV_HEADER, spaNavVaryHeaders, stateDir, stateDirName } from "@stacksjs/stx";
|
|
8758
|
+
import { bodyCloseIndex, BUILD_ID_HEADER, decodeTitleEntities, externalScriptsOutsideContainer, extractPageResponseStatus, findContainerRegion, FRAGMENT_CACHE_CONTROL, getBuildId, insertBeforeHeadClose, mergeCssConfig, pageCssFragment, pageHeadFragment, readResponseHeaders, readResponseStatus, renderFontCSS, SPA_NAV_HEADER, spaNavVaryHeaders, stateDir, stateDirName } from "@stacksjs/stx";
|
|
8759
8759
|
import { buildCodeFrame, locateFailureLine } from "@stacksjs/stx/build-message";
|
|
8760
8760
|
import { clearBundleFailures, getBundleFailures } from "@stacksjs/stx/client-script-bundler";
|
|
8761
8761
|
import { insertBeforeBodyClose, actionRedirectResponse, compressResponse, runPageAction as sharedRunPageAction } from "@stacksjs/stx";
|
|
@@ -10004,7 +10004,7 @@ function __stxOverlay(errs){
|
|
|
10004
10004
|
return html;
|
|
10005
10005
|
refreshBuildErrors();
|
|
10006
10006
|
const client = HMR_CLIENT_SCRIPT.replace("__STX_HMR_VERSION__", String(hmrVersion));
|
|
10007
|
-
const closeBody = html
|
|
10007
|
+
const closeBody = bodyCloseIndex(html);
|
|
10008
10008
|
if (closeBody === -1) {
|
|
10009
10009
|
return html + client;
|
|
10010
10010
|
}
|
|
@@ -11002,8 +11002,7 @@ function __stxOverlay(errs){
|
|
|
11002
11002
|
const serializedParams = cacheShell ? ROUTE_PARAMS_PLACEHOLDER : serializeRouteParams(paramsObj);
|
|
11003
11003
|
const paramsScript = `<script data-stx-route-params>(function(){var p=${serializedParams};window.__stx_rp=p;if(window.stx){window.stx._rp=p;if(window.stx.setRouteParams)window.stx.setRouteParams(p)}})()</script>`;
|
|
11004
11004
|
if (output.includes("</head>")) {
|
|
11005
|
-
output = output
|
|
11006
|
-
</head>`);
|
|
11005
|
+
output = insertBeforeHeadClose(output, paramsScript);
|
|
11007
11006
|
} else {
|
|
11008
11007
|
output = `${paramsScript}
|
|
11009
11008
|
${output}`;
|
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.862",
|
|
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.862",
|
|
78
|
+
"stx-router": "0.2.862"
|
|
79
79
|
}
|
|
80
80
|
}
|