@checkstack/backend 0.6.2 → 0.6.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @checkstack/backend
2
2
 
3
+ ## 0.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 3da7582: Fix favicon not loading in production container and add NotFound page
8
+
9
+ - **Backend**: Fix static file serving so root-level files like `/favicon.svg` are served from the dist directory before the SPA fallback catches them
10
+ - **UI**: Add `NotFound` component with stacked-checkmark logo, physics-inspired falling "4" animation, and low-power device fallback
11
+ - **Frontend**: Add catch-all `*` route to display the NotFound page for unmatched routes, and add the Checkstack logo to the navbar
12
+ - **Favicon**: Redesign with stacked checkmarks in the brand purple/indigo palette
13
+
3
14
  ## 0.6.2
4
15
 
5
16
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/backend",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "checkstack": {
5
5
  "type": "backend"
6
6
  },
@@ -15,11 +15,11 @@
15
15
  "dependencies": {
16
16
  "@checkstack/api-docs-common": "0.1.9",
17
17
  "@checkstack/auth-common": "0.6.1",
18
- "@checkstack/backend-api": "0.11.1",
18
+ "@checkstack/backend-api": "0.12.0",
19
19
  "@checkstack/common": "0.6.5",
20
20
  "@checkstack/drizzle-helper": "0.0.4",
21
- "@checkstack/queue-api": "0.2.12",
22
- "@checkstack/signal-backend": "0.1.18",
21
+ "@checkstack/queue-api": "0.2.13",
22
+ "@checkstack/signal-backend": "0.1.19",
23
23
  "@checkstack/signal-common": "0.1.9",
24
24
  "@hono/zod-validator": "^0.7.6",
25
25
  "@orpc/client": "^1.13.14",
@@ -40,6 +40,6 @@
40
40
  "@types/bun": "latest",
41
41
  "@checkstack/tsconfig": "0.0.5",
42
42
  "@checkstack/scripts": "0.1.2",
43
- "@checkstack/test-utils-backend": "0.1.18"
43
+ "@checkstack/test-utils-backend": "0.1.19"
44
44
  }
45
45
  }
package/src/index.ts CHANGED
@@ -203,13 +203,29 @@ if (frontendDistPath && fs.existsSync(frontendDistPath)) {
203
203
  return c.notFound();
204
204
  });
205
205
 
206
- // Serve index.html for all non-API routes (SPA fallback)
206
+ // Serve root-level static files (e.g., /favicon.svg) from the dist directory
207
+ // before the SPA fallback, so they don't get caught by the index.html handler
207
208
  app.get("*", async (c, next) => {
208
209
  // Skip API and WebSocket routes - let them pass through to actual handlers
209
210
  if (c.req.path.startsWith("/api")) {
210
211
  return next();
211
212
  }
212
213
 
214
+ // Check if the request maps to an actual file in the dist root
215
+ // (e.g., /favicon.svg -> dist/favicon.svg)
216
+ const reqPath = c.req.path.slice(1); // Remove leading "/"
217
+ if (reqPath && reqPath !== "" && !reqPath.includes("..")) {
218
+ const staticFilePath = path.join(frontendDistPath, reqPath);
219
+ // Only serve if it's a file (not a directory) and exists
220
+ if (fs.existsSync(staticFilePath) && fs.statSync(staticFilePath).isFile()) {
221
+ const file = Bun.file(staticFilePath);
222
+ return new Response(file, {
223
+ headers: { "Content-Type": file.type },
224
+ });
225
+ }
226
+ }
227
+
228
+ // SPA fallback: serve index.html for all remaining non-API routes
213
229
  const indexPath = path.join(frontendDistPath, "index.html");
214
230
  if (fs.existsSync(indexPath)) {
215
231
  const file = Bun.file(indexPath);