From 3bc77296461ad977976076d0c26c279a8ac692d3 Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Thu, 15 Oct 2026 18:31:13 +0200 Subject: [PATCH] feat(19.3-04): shared site cache purge route POST /api/__site__/cache/purge - server/lib/siteCachePurge.ts and the route, byte for byte from vue-faq-layer (sha256 pinned in tests/sitePurge.test.ts) - runtimeConfig.siteCache.purgeToken (NUXT_SITE_CACHE_PURGE_TOKEN) and the '/api/__site__/**': { cache: false } route rule - version 0.2.0 --- README.md | 23 +++++- nuxt.config.ts | 15 ++++ package.json | 2 +- server/api/__site__/cache/purge.post.ts | 39 ++++++++++ server/lib/siteCachePurge.ts | 91 +++++++++++++++++++++++ tests/sitePurge.test.ts | 97 +++++++++++++++++++++++++ 6 files changed, 264 insertions(+), 3 deletions(-) create mode 100644 server/api/__site__/cache/purge.post.ts create mode 100644 server/lib/siteCachePurge.ts create mode 100644 tests/sitePurge.test.ts diff --git a/README.md b/README.md index e58c06b..ce4ecb2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A Nuxt 4 layer that renders a menu of the SummerCMS menu plugin as an accessible site navigation. ```bash -pnpm add git+https://git.golem15.com/golem15/vue-menu-layer.git#v0.1.0 +pnpm add git+https://git.golem15.com/golem15/vue-menu-layer.git#v0.2.0 ``` ## Overview @@ -20,6 +20,7 @@ The layer is neutral: it ships no site colours, no site copy and no Nuxt modules - **Active state**: the entry whose URL path equals the current route path (decoded, query, hash and trailing slash ignored; an absolute URL only on the request host) gets `aria-current="page"` and `menu-nav__link--active`; its ancestors get `menu-nav__item--trail`. - **Dividers**: `aria-hidden` list items, a horizontal line in panels and a short vertical line at the top level on the desktop. - **Empty states**: a missing menu (404), a failed request or a menu without entries renders nothing, or the `#fallback` slot. There is never an empty `