mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 14:19:11 +03:00
* Add realtime chat to the landing page. * Fix the realtime cursor demo on the landing page. * Fix a bad spelling of shadcn. * Fix the wrong link in RR auth. * Change the demo for reatlime cursor to use predefined names. * Fix the React Router auth block docs. * Regenerate the realtime chat code. * Add a docs field to the clients blocks. Add a missing package to the nextjs client block. * Add links to additional docs on the auth blocks pages. * Add additional links to the current user avatar docs. * Add additional links to the client docs. * Add additional links to the dropzone docs. * Add additional links to the avatar stack. * Add additional links to the realtime cursor. * Add additional links to the realtime chat. * Fix the dropzone links.
25 lines
1.7 KiB
JSON
25 lines
1.7 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "supabase-client-tanstack",
|
|
"type": "registry:lib",
|
|
"title": "Supabase Client for TanStack Start",
|
|
"description": "",
|
|
"dependencies": [
|
|
"@supabase/ssr@latest",
|
|
"@supabase/supabase-js@latest"
|
|
],
|
|
"registryDependencies": [],
|
|
"files": [
|
|
{
|
|
"path": "registry/default/clients/tanstack/lib/supabase/client.ts",
|
|
"content": "/// <reference types=\"vite/types/importMeta.d.ts\" />\nimport { createBrowserClient } from '@supabase/ssr'\n\nexport function createClient() {\n return createBrowserClient(\n import.meta.env.VITE_SUPABASE_URL!,\n import.meta.env.VITE_SUPABASE_ANON_KEY!\n )\n}\n",
|
|
"type": "registry:lib"
|
|
},
|
|
{
|
|
"path": "registry/default/clients/tanstack/lib/supabase/server.ts",
|
|
"content": "import { createServerClient } from '@supabase/ssr'\nimport { parseCookies, setCookie } from '@tanstack/react-start/server'\n\nexport function createClient() {\n return createServerClient(process.env.VITE_SUPABASE_URL!, process.env.VITE_SUPABASE_ANON_KEY!, {\n cookies: {\n getAll() {\n return Object.entries(parseCookies()).map(\n ([name, value]) =>\n ({\n name,\n value,\n }) as { name: string; value: string }\n )\n },\n setAll(cookies) {\n cookies.forEach((cookie) => {\n setCookie(cookie.name, cookie.value)\n })\n },\n },\n })\n}\n",
|
|
"type": "registry:lib"
|
|
}
|
|
],
|
|
"docs": "You'll need to add a `.env` file with the following environment variables to your project: `VITE_SUPABASE_URL` and `VITE_SUPABASE_ANON_KEY`."
|
|
} |