diff --git a/AGENTS.md b/AGENTS.md index 27391f9..b3aa6c2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ See also: [ARCHITECTURE.md](./ARCHITECTURE.md) for project structure and data fl ## Project Overview -Netlify Cache Inspector is a Nuxt 4 web app for inspecting and comparing HTTP cache headers on Netlify sites. Users submit a URL, the server fetches it with Netlify debug headers (`x-nf-debug-logging: 1`), and the frontend displays structured cache analysis. Multiple runs can be compared side-by-side with hover-based diffing. +Netlify Cache Inspector is a Nuxt 5 web app for inspecting and comparing HTTP cache headers on Netlify sites. Users submit a URL, the server fetches it with Netlify debug headers (`x-nf-debug-logging: 1`), and the frontend displays structured cache analysis. Multiple runs can be compared side-by-side with hover-based diffing. ## Commands @@ -31,7 +31,7 @@ Package manager is **pnpm** (pinned in `packageManager` field). Enable via `core ## Architecture -**Nuxt 4** with `future: { compatibilityVersion: 4 }` — frontend code lives under `app/` (not project root). +**Nuxt 5** with `future: { compatibilityVersion: 5 }` — frontend code lives under `app/` (not project root). ### Data Flow diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index a71d5a0..1d6a46a 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -2,7 +2,7 @@ ## Project structure -Nuxt 4, with the new `app/` directory structure. +Nuxt 5, with the `app/` directory structure. ``` app/ diff --git a/README.md b/README.md index 2710299..ded047f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ This site deploys automatically to Netlify. ## Tech stack -- [Nuxt 4](https://nuxt.com) (Vue 3, file-based routing, server API routes) +- [Nuxt 5](https://nuxt.com) (Vue 3, file-based routing, server API routes) - [UnoCSS](https://unocss.dev) (utility CSS, dark mode, custom theme) - [Netlify Blobs](https://docs.netlify.com/blobs/overview/) (run persistence) - [Vitest](https://vitest.dev) + [Vue Test Utils](https://test-utils.vuejs.org) (testing) diff --git a/knip.config.ts b/knip.config.ts index f54e1f7..6181075 100644 --- a/knip.config.ts +++ b/knip.config.ts @@ -1,8 +1,7 @@ import type { KnipConfig } from 'knip' export default { - entry: ['oxlint.config.ts'], - // knip's Nuxt plugin doesn't support the Nuxt 4 app/ directory convention yet. + // knip's Nuxt plugin doesn't support the Nuxt 5 app/ directory convention yet. // Note: custom entry replaces (not merges with) the plugin defaults. nuxt: { entry: [ diff --git a/nuxt.config.ts b/nuxt.config.ts index ea913df..2e83c31 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -57,6 +57,6 @@ export default defineNuxtConfig({ }, }, }, - future: { compatibilityVersion: 4 }, - compatibilityDate: '2024-09-13', + future: { compatibilityVersion: 5 }, + compatibilityDate: '2026-03-24', }) diff --git a/package.json b/package.json index 78337e0..b540e51 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "@netlify/blobs": "^10.7.0", "@netlify/nuxt": "0.2.36", "date-fns": "^4.1.0", + "h3": "^1.15.0", "highlight.js": "^11.11.1", "nuxt": "^4.4.2", "vue": "^3.5.29", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c65502e..23e7340 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: date-fns: specifier: ^4.1.0 version: 4.1.0 + h3: + specifier: ^1.15.0 + version: 1.15.6 highlight.js: specifier: ^11.11.1 version: 11.11.1 diff --git a/server/api/inspect-url.post.ts b/server/api/inspect-url.post.ts index 998e95c..a53aecf 100644 --- a/server/api/inspect-url.post.ts +++ b/server/api/inspect-url.post.ts @@ -1,4 +1,5 @@ import { createHash } from 'crypto' +import { createError, defineEventHandler, readBody } from 'h3' import { saveRun } from '~server/db' const generateRunId = (url: string, timestamp: number): string => diff --git a/server/api/runs/[runId].ts b/server/api/runs/[runId].ts index 00d62c3..910ef25 100644 --- a/server/api/runs/[runId].ts +++ b/server/api/runs/[runId].ts @@ -1,3 +1,4 @@ +import { createError, defineEventHandler, getRouterParam } from 'h3' import { getRun } from '~server/db' export default defineEventHandler(async (event) => {