bun-plugin-stx 0.2.388 → 0.2.389
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 +12 -0
- package/package.json +3 -3
package/dist/serve.js
CHANGED
|
@@ -10060,6 +10060,7 @@ function __stxOverlay(errs){
|
|
|
10060
10060
|
..."defaultImage" in stxConfig && { defaultImage: stxConfig.defaultImage },
|
|
10061
10061
|
..."seo" in stxConfig && { seo: stxConfig.seo },
|
|
10062
10062
|
..."analytics" in stxConfig && { analytics: stxConfig.analytics },
|
|
10063
|
+
..."offline" in stxConfig && { offline: stxConfig.offline },
|
|
10063
10064
|
..."_pluginComponentDirs" in stxConfig && { _pluginComponentDirs: stxConfig._pluginComponentDirs },
|
|
10064
10065
|
..."_pluginPageDirs" in stxConfig && { _pluginPageDirs: stxConfig._pluginPageDirs }
|
|
10065
10066
|
};
|
|
@@ -10261,6 +10262,7 @@ function __stxOverlay(errs){
|
|
|
10261
10262
|
..."defaultImage" in stxConfig && { defaultImage: stxConfig.defaultImage },
|
|
10262
10263
|
..."seo" in stxConfig && { seo: stxConfig.seo },
|
|
10263
10264
|
..."analytics" in stxConfig && { analytics: stxConfig.analytics },
|
|
10265
|
+
..."offline" in stxConfig && { offline: stxConfig.offline },
|
|
10264
10266
|
..."_pluginComponentDirs" in stxConfig && { _pluginComponentDirs: stxConfig._pluginComponentDirs },
|
|
10265
10267
|
..."_pluginPageDirs" in stxConfig && { _pluginPageDirs: stxConfig._pluginPageDirs }
|
|
10266
10268
|
};
|
|
@@ -10642,6 +10644,16 @@ ${block}`;
|
|
|
10642
10644
|
} catch {}
|
|
10643
10645
|
return new Response("Image not found", { status: 404 });
|
|
10644
10646
|
}
|
|
10647
|
+
if (path === "/_stx/sw.js" && stxConfig.offline?.enabled) {
|
|
10648
|
+
const stx = await stxModule;
|
|
10649
|
+
return new Response(stx.generateOfflineWorker(stxConfig.offline, getBuildId()), {
|
|
10650
|
+
headers: {
|
|
10651
|
+
"Content-Type": "text/javascript; charset=utf-8",
|
|
10652
|
+
"Cache-Control": "no-cache",
|
|
10653
|
+
"Service-Worker-Allowed": "/"
|
|
10654
|
+
}
|
|
10655
|
+
});
|
|
10656
|
+
}
|
|
10645
10657
|
if (path === "/_stx/stores.js") {
|
|
10646
10658
|
const stx = await stxModule;
|
|
10647
10659
|
const code = typeof stx.getStoreScript === "function" ? await stx.getStoreScript() : null;
|
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.389",
|
|
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.389",
|
|
78
|
+
"stx-router": "0.2.389"
|
|
79
79
|
}
|
|
80
80
|
}
|