bun-plugin-stx 0.2.606 → 0.2.611

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.
Files changed (2) hide show
  1. package/dist/serve.js +10 -0
  2. package/package.json +3 -3
package/dist/serve.js CHANGED
@@ -10650,6 +10650,16 @@ ${block}`;
10650
10650
  port: actualPort,
10651
10651
  reusePort: options.reusePort ?? false,
10652
10652
  idleTimeout: production ? 120 : 0,
10653
+ error(error) {
10654
+ console.error("[stx] Request failed:", error);
10655
+ return new Response("<h1>Internal Server Error</h1><p>An error occurred while processing your request.</p>", {
10656
+ status: 500,
10657
+ headers: {
10658
+ "Content-Type": "text/html; charset=utf-8",
10659
+ "Cache-Control": "no-store"
10660
+ }
10661
+ });
10662
+ },
10653
10663
  async fetch(req, server) {
10654
10664
  const warmup = awaitImageWarmup();
10655
10665
  if (warmup)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bun-plugin-stx",
3
3
  "type": "module",
4
- "version": "0.2.606",
4
+ "version": "0.2.611",
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.606",
78
- "stx-router": "0.2.606"
77
+ "@stacksjs/stx": "0.2.611",
78
+ "stx-router": "0.2.611"
79
79
  }
80
80
  }