⬆️ Bump vitest from 2.1.1 to 2.1.9 (#1548)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Luke Vella <me@lukevella.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2025-02-08 14:43:15 +07:00 committed by GitHub
parent 480f1a03d1
commit ffafcbdb43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 729 additions and 738 deletions

View file

@ -1,4 +1,5 @@
import { waitUntil } from "@vercel/functions";
import type { NextRequest } from "next/server";
import { PostHog } from "posthog-node";
function PostHogClient() {
@ -21,3 +22,10 @@ export function posthogApiHandler() {
console.error("Failed to flush PostHog events:", error);
}
}
export function withPosthog(handler: (req: NextRequest) => Promise<Response>) {
return async (req: NextRequest) => {
const res = await handler(req);
posthogApiHandler();
return res;
};
}