bun-plugin-stx 0.2.311 → 0.2.313
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 +0 -5
- package/package.json +1 -1
package/dist/serve.js
CHANGED
|
@@ -9266,7 +9266,6 @@ Examples:`);
|
|
|
9266
9266
|
After installing: bun add bun-plugin-stx`);
|
|
9267
9267
|
throw new Error("No file patterns provided");
|
|
9268
9268
|
}
|
|
9269
|
-
const routes = new Map;
|
|
9270
9269
|
let sourceFiles = null;
|
|
9271
9270
|
let discoveredPagePaths = null;
|
|
9272
9271
|
let assetsInitialized = false;
|
|
@@ -9387,7 +9386,6 @@ function __stxOverlay(errs){
|
|
|
9387
9386
|
if (isStxLike || isCode || isData) {
|
|
9388
9387
|
if (isStxLike)
|
|
9389
9388
|
sourceFiles = null;
|
|
9390
|
-
routes.clear();
|
|
9391
9389
|
htmlCache.clear();
|
|
9392
9390
|
cssCssCache.clear();
|
|
9393
9391
|
resolvedStxModule?.clearDevCaches?.();
|
|
@@ -10076,14 +10074,12 @@ function __stxOverlay(errs){
|
|
|
10076
10074
|
const isRootRequest = requestPath === "/" || normalizedPath === "";
|
|
10077
10075
|
if (`/${fileRoute}` === requestPath || fileRoute === normalizedPath || `/${fileRoute}.stx` === requestPath || `/${fileRoute}.md` === requestPath || `/${fileRoute}.html` === requestPath || isIndexFile && isRootRequest) {
|
|
10078
10076
|
const output = await processTemplate(filePath, reqCtx);
|
|
10079
|
-
routes.set(requestPath, output);
|
|
10080
10077
|
return output;
|
|
10081
10078
|
}
|
|
10082
10079
|
if (fileRoute.startsWith("pages/")) {
|
|
10083
10080
|
const prettyRoute = fileRoute.slice(6);
|
|
10084
10081
|
if (`/${prettyRoute}` === requestPath || prettyRoute === normalizedPath) {
|
|
10085
10082
|
const output = await processTemplate(filePath, reqCtx);
|
|
10086
|
-
routes.set(requestPath, output);
|
|
10087
10083
|
return output;
|
|
10088
10084
|
}
|
|
10089
10085
|
}
|
|
@@ -10115,7 +10111,6 @@ function __stxOverlay(errs){
|
|
|
10115
10111
|
const paramNames = [...fileRouteBase.matchAll(/\[([^\]]+)\]/g)].map((m) => m[1].replace(/^\.\.\./, ""));
|
|
10116
10112
|
const paramValues = match.slice(1);
|
|
10117
10113
|
const output = await processTemplateDynamic(filePath, paramNames, paramValues, normalizedPath, reqCtx);
|
|
10118
|
-
routes.set(requestPath, output);
|
|
10119
10114
|
return output;
|
|
10120
10115
|
}
|
|
10121
10116
|
}
|
package/package.json
CHANGED