bun-plugin-stx 0.2.70 → 0.2.73
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/chunk-bpa1j7nx.js +9523 -0
- package/dist/serve.d.ts +4 -4
- package/dist/serve.js +10 -1
- package/package.json +3 -3
- package/dist/chunk-v61e2x3s.js +0 -6206
package/dist/serve.d.ts
CHANGED
|
@@ -32,10 +32,10 @@ export declare interface ServeOptions {
|
|
|
32
32
|
site?: import('@stacksjs/stx').SiteConfig
|
|
33
33
|
routes?: Record<string, (req: Request) => Response | Promise<Response>>
|
|
34
34
|
onRequest?: (req: Request) =>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
| Response
|
|
36
|
+
| null
|
|
37
|
+
| undefined
|
|
38
|
+
| Promise<Response | null | undefined>
|
|
39
39
|
middleware?: Record<string, MiddlewareHandler>
|
|
40
40
|
globalMiddleware?: string[]
|
|
41
41
|
middlewareGroups?: Record<string, string[]>
|
package/dist/serve.js
CHANGED
|
@@ -8810,6 +8810,8 @@ async function serve(options) {
|
|
|
8810
8810
|
stxConfig._pluginComponentDirs = pluginLoaded._pluginComponentDirs;
|
|
8811
8811
|
if (pluginLoaded?._pluginPageDirs)
|
|
8812
8812
|
stxConfig._pluginPageDirs = pluginLoaded._pluginPageDirs;
|
|
8813
|
+
if (pluginLoaded?.analytics)
|
|
8814
|
+
stxConfig.analytics = pluginLoaded.analytics;
|
|
8813
8815
|
}
|
|
8814
8816
|
if (stxMod && typeof stxMod.preloadIconCollection === "function")
|
|
8815
8817
|
await stxMod.preloadIconCollection("lucide");
|
|
@@ -8819,6 +8821,10 @@ async function serve(options) {
|
|
|
8819
8821
|
const partialsDir = options.partialsDir ?? stxConfig.partialsDir ?? defaultStxConfig.partialsDir;
|
|
8820
8822
|
const publicDir = options.publicDir ?? stxConfig.publicDir ?? "public";
|
|
8821
8823
|
const stxModule = options.stxModule ? Promise.resolve(options.stxModule) : defaultStxModule;
|
|
8824
|
+
let resolvedStxModule = null;
|
|
8825
|
+
Promise.resolve(stxModule).then((m) => {
|
|
8826
|
+
resolvedStxModule = m;
|
|
8827
|
+
}).catch(() => {});
|
|
8822
8828
|
const { patterns, port = 3456 } = options;
|
|
8823
8829
|
if (patterns.length === 0) {
|
|
8824
8830
|
console.error("Usage: serve <files...> [--port 3000]");
|
|
@@ -8883,6 +8889,7 @@ After installing: bun add bun-plugin-stx`);
|
|
|
8883
8889
|
routes.clear();
|
|
8884
8890
|
htmlCache.clear();
|
|
8885
8891
|
crosswindCssCache.clear();
|
|
8892
|
+
resolvedStxModule?.clearDevCaches?.();
|
|
8886
8893
|
}
|
|
8887
8894
|
broadcastHmr(isCss && !isStxLike ? { type: "css", file: f } : { type: "reload", file: f });
|
|
8888
8895
|
});
|
|
@@ -9190,7 +9197,7 @@ After installing: bun add bun-plugin-stx`);
|
|
|
9190
9197
|
return crosswindModule;
|
|
9191
9198
|
crosswindLoadAttempted = true;
|
|
9192
9199
|
try {
|
|
9193
|
-
const mod = await import("./chunk-
|
|
9200
|
+
const mod = await import("./chunk-bpa1j7nx.js");
|
|
9194
9201
|
crosswindModule = { CSSGenerator: mod.CSSGenerator, config: mod.config };
|
|
9195
9202
|
return crosswindModule;
|
|
9196
9203
|
} catch {
|
|
@@ -9352,6 +9359,7 @@ After installing: bun add bun-plugin-stx`);
|
|
|
9352
9359
|
..."defaultDescription" in stxConfig && { defaultDescription: stxConfig.defaultDescription },
|
|
9353
9360
|
..."defaultImage" in stxConfig && { defaultImage: stxConfig.defaultImage },
|
|
9354
9361
|
..."seo" in stxConfig && { seo: stxConfig.seo },
|
|
9362
|
+
..."analytics" in stxConfig && { analytics: stxConfig.analytics },
|
|
9355
9363
|
..."_pluginComponentDirs" in stxConfig && { _pluginComponentDirs: stxConfig._pluginComponentDirs },
|
|
9356
9364
|
..."_pluginPageDirs" in stxConfig && { _pluginPageDirs: stxConfig._pluginPageDirs }
|
|
9357
9365
|
};
|
|
@@ -9518,6 +9526,7 @@ After installing: bun add bun-plugin-stx`);
|
|
|
9518
9526
|
..."defaultDescription" in stxConfig && { defaultDescription: stxConfig.defaultDescription },
|
|
9519
9527
|
..."defaultImage" in stxConfig && { defaultImage: stxConfig.defaultImage },
|
|
9520
9528
|
..."seo" in stxConfig && { seo: stxConfig.seo },
|
|
9529
|
+
..."analytics" in stxConfig && { analytics: stxConfig.analytics },
|
|
9521
9530
|
..."_pluginComponentDirs" in stxConfig && { _pluginComponentDirs: stxConfig._pluginComponentDirs },
|
|
9522
9531
|
..."_pluginPageDirs" in stxConfig && { _pluginPageDirs: stxConfig._pluginPageDirs }
|
|
9523
9532
|
};
|
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.73",
|
|
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",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"typecheck": "bun tsc --noEmit"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@stacksjs/stx": "0.2.
|
|
77
|
-
"stx-router": "0.2.
|
|
76
|
+
"@stacksjs/stx": "^0.2.72",
|
|
77
|
+
"stx-router": "^0.2.72"
|
|
78
78
|
}
|
|
79
79
|
}
|