Add sharp image processing library and update dependencies in package.json and package-lock.json; enhance Navigation component with new 'Galerie' link for improved user navigation.

This commit is contained in:
Torsten Schulz (local)
2025-12-17 17:06:47 +01:00
parent b6f39f83a8
commit 220c337996
12 changed files with 1679 additions and 5 deletions

View File

@@ -20,11 +20,20 @@ const getCookieStore = (event: any): CookieStore => {
global.readBody = vi.fn(async (event: any) => event.__body ?? null)
global.getQuery = (event: any) => event.__query ?? {}
global.getRouterParam = (event: any, name: string) => {
return event.context?.params?.[name] ?? null
}
global.getHeader = (event: any, name: string) => {
const headers = event.node?.req?.headers || {}
const key = Object.keys(headers).find(h => h.toLowerCase() === name.toLowerCase())
return key ? headers[key] : undefined
}
global.setHeader = vi.fn((event: any, name: string, value: string) => {
if (event.node?.res) {
event.node.res.headers = event.node.res.headers || {}
event.node.res.headers[name] = value
}
})
global.setCookie = (event: any, name: string, value: string, options = {}) => {
const store = getCookieStore(event)