bun-plugin-stx 0.2.149 → 0.2.150
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.
|
@@ -119,6 +119,10 @@ function matchRoute(pathname, routes) {
|
|
|
119
119
|
}
|
|
120
120
|
return null;
|
|
121
121
|
}
|
|
122
|
+
function bracketPathToRegex(routePath) {
|
|
123
|
+
const pattern = routePath.replace(/\[\[([^\]]+)\]\]/g, ":$1?").replace(/\[([^\]]+)\]/g, ":$1").replace(/:\.\.\.([^/]+)/g, ":$1*");
|
|
124
|
+
return patternToRegex(pattern);
|
|
125
|
+
}
|
|
122
126
|
|
|
123
127
|
// ../router/src/nested-layouts.ts
|
|
124
128
|
import fs2 from "fs";
|
|
@@ -1719,6 +1723,7 @@ export {
|
|
|
1719
1723
|
createMiddlewareContext,
|
|
1720
1724
|
createClientCookieManager,
|
|
1721
1725
|
clearMiddleware,
|
|
1726
|
+
bracketPathToRegex,
|
|
1722
1727
|
abortNavigation,
|
|
1723
1728
|
Router
|
|
1724
1729
|
};
|
package/dist/serve.js
CHANGED
|
@@ -9361,7 +9361,7 @@ After installing: bun add bun-plugin-stx`);
|
|
|
9361
9361
|
pageMiddlewarePatterns.length = 0;
|
|
9362
9362
|
await Promise.all(files.map((f) => detectPageMiddleware(f)));
|
|
9363
9363
|
try {
|
|
9364
|
-
const { Router } = await import("./chunk-
|
|
9364
|
+
const { Router } = await import("./chunk-8nbccnre.js");
|
|
9365
9365
|
const pagesDirs = patterns.map((p) => p.replace(/\/$/, "")).filter(Boolean);
|
|
9366
9366
|
const router = new Router(process19.cwd(), { pagesDirs, stateDir: stateDirName() });
|
|
9367
9367
|
if (!options.quiet)
|
package/package.json
CHANGED