bun-plugin-stx 0.2.384 → 0.2.385
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.
|
@@ -1171,19 +1171,13 @@ function routerSource() {
|
|
|
1171
1171
|
* Column-anchored: a declaration nested inside a function is indented, and
|
|
1172
1172
|
* is not in scope at the end of the block anyway.
|
|
1173
1173
|
*/
|
|
1174
|
-
var
|
|
1174
|
+
var TLD=/^(?:export\\s+)?(?:async\\s+)?(?:function\\s*\\*?|class|const|let|var)\\s+([$\\w]+)/gm;
|
|
1175
1175
|
function republishTopLevel(src){
|
|
1176
|
-
var
|
|
1177
|
-
|
|
1178
|
-
while((m=
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
if(!names.length)return '';
|
|
1182
|
-
var out='\\n;';
|
|
1183
|
-
for(var i=0;i<names.length;i++){
|
|
1184
|
-
out+='try{if(typeof '+names[i]+'==="function")window.'+names[i]+'='+names[i]+'}catch(e){}';
|
|
1185
|
-
}
|
|
1186
|
-
return out;
|
|
1176
|
+
var n=[],m,o='',i;
|
|
1177
|
+
TLD.lastIndex=0;
|
|
1178
|
+
while((m=TLD.exec(src))!==null)if(n.indexOf(m[1])<0)n.push(m[1]);
|
|
1179
|
+
for(i=0;i<n.length;i++)o+='try{typeof '+n[i]+'=="function"&&(window.'+n[i]+'='+n[i]+')}catch(e){}';
|
|
1180
|
+
return o?'\\n;'+o:'';
|
|
1187
1181
|
}
|
|
1188
1182
|
function runsAlways(declared, code){
|
|
1189
1183
|
if(declared==='always')return true;
|
package/dist/serve.js
CHANGED
|
@@ -9800,7 +9800,7 @@ function __stxOverlay(errs){
|
|
|
9800
9800
|
rebuildDiscoveredPagePaths(kept);
|
|
9801
9801
|
await indexPageMiddleware(kept);
|
|
9802
9802
|
try {
|
|
9803
|
-
const { Router } = await import("./chunk-
|
|
9803
|
+
const { Router } = await import("./chunk-kpbk9rbk.js");
|
|
9804
9804
|
const pagesDirs = patterns.map((p) => p.replace(/\/$/, "")).filter(Boolean);
|
|
9805
9805
|
const router = new Router(process19.cwd(), { pagesDirs, stateDir: stateDirName(), exclude: options.exclude });
|
|
9806
9806
|
if (!options.quiet)
|
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.385",
|
|
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.385",
|
|
78
|
+
"stx-router": "0.2.385"
|
|
79
79
|
}
|
|
80
80
|
}
|