- Update CLAUDE.md with full project structure and conventions - Add report viewer page: score ring, WCAG compliance cards, issue list with severity filter, next steps, export + auto-fix buttons, real-time polling - Add Alembic script.py.mako template (required for alembic revision --autogenerate) - Add frontend/tsconfig.json + postcss.config.js (Next.js build requirements) - Fix TypeScript error in supabase/server.ts (explicit CookieOptions type) - Upgrade Next.js 15.3.2 → 15.5.18 (cache poisoning CVE fix) - Update .gitignore: frontend build artifacts, backend venv, tsbuildinfo TypeScript: 0 errors (npx tsc --noEmit passes) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
636 B
TypeScript
20 lines
636 B
TypeScript
import { createServerClient, type CookieOptions } from "@supabase/ssr";
|
|
import { cookies } from "next/headers";
|
|
|
|
export async function createClient() {
|
|
const cookieStore = await cookies();
|
|
return createServerClient(
|
|
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
|
{
|
|
cookies: {
|
|
getAll: () => cookieStore.getAll(),
|
|
setAll: (cookiesToSet: Array<{ name: string; value: string; options?: CookieOptions }>) => {
|
|
cookiesToSet.forEach(({ name, value, options }) =>
|
|
cookieStore.set(name, value, options)
|
|
);
|
|
},
|
|
},
|
|
}
|
|
);
|
|
}
|