feat: Preliminary work for shadcn add @supabase/...block... (#39322)

* Build the current registry.

* Export the blocks as JSON and import them into registry.json.

* Move the registry.json into public/r.

* Fix a prettier error.

* Clean up extra files in vue blocks.

* Bump shadcn.

* Readd shadcn to vue blocks.

* Fix the shadcn types.

* Remove extra package exclusions.
This commit is contained in:
Ivan Vasilov authored and GitHub committed 2025-10-07 20:32:24 +02:00
1 parent 4870327a42
commit 191a291c2d
21 files changed
+1037 -679

No files matched your search

+1
View File
@@ -8,6 +8,7 @@ apps/**/out
**/supabase/migrations/*.sql
apps/www/schema.sql
apps/www/public/images/*
apps/www/.generated/*
apps/docs/**/generated/*
apps/docs/examples/*
examples/slack-clone/nextjs-slack-clone/full-schema.sql
+2 -2
View File
@@ -7,7 +7,7 @@
"preinstall": "npx only-allow pnpm",
"dev": "next dev --port 3004",
"build": "pnpm run content:build && pnpm run build:registry && pnpm run build:llms && next build --turbopack",
"build:registry": "tsx --tsconfig ./tsconfig.scripts.json ./scripts/build-registry.mts && prettier --cache --write registry.json && rimraf -G public/r && shadcn build && cp node_modules/@supabase/vue-blocks/public/r/* public/r && tsx scripts/clean-registry.ts",
"build:registry": "rimraf -G public/r/* && tsx --tsconfig ./tsconfig.scripts.json ./scripts/build-registry.mts && shadcn build public/r/registry.json && tsx scripts/clean-registry.ts",
"build:llms": "tsx --tsconfig ./tsconfig.scripts.json ./scripts/build-llms-txt.ts",
"start": "next start",
"lint": "next lint",
@@ -105,7 +105,7 @@
"react-dropzone": "^14.3.8",
"react-router": "^7.5.2",
"rimraf": "^4.1.3",
"shadcn": "^2.10.0",
"shadcn": "^3.0.0",
"shiki": "^1.1.7",
"tailwindcss": "catalog:",
"tsconfig": "workspace:*",
@@ -91,7 +91,7 @@
},
{
"path": "registry/default/platform/platform-kit-nextjs/components/supabase-manager/logs.tsx",
"content": "'use client'\n\nimport { Alert, AlertDescription, AlertTitle } from '@/registry/default/components/ui/alert'\nimport { Button } from '@/registry/default/components/ui/button'\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/registry/default/components/ui/command'\nimport {\n HoverCard,\n HoverCardContent,\n HoverCardTrigger,\n} from '@/registry/default/components/ui/hover-card'\nimport { Popover, PopoverContent, PopoverTrigger } from '@/registry/default/components/ui/popover'\nimport { Skeleton } from '@/registry/default/components/ui/skeleton'\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/registry/default/components/ui/table'\nimport { useGetLogs } from '@/registry/default/platform/platform-kit-nextjs/hooks/use-logs'\nimport { LogsTableName, genDefaultQuery } from '../../lib/logs'\nimport { cn } from '@/lib/utils'\nimport { Check, ChevronsUpDown, Logs, Terminal } from 'lucide-react'\nimport { useMemo, useState } from 'react'\n\n// Define log types with names and descriptions\nconst logTypes = [\n {\n value: LogsTableName.FN_EDGE,\n label: 'Function Edge Logs',\n description: 'Edge function execution logs with request/response data',\n },\n {\n value: LogsTableName.AUTH,\n label: 'Authentication Logs',\n description: 'User authentication events and security logs',\n },\n {\n value: LogsTableName.POSTGRES,\n label: 'PostgreSQL Logs',\n description: 'Database queries, errors, and performance metrics',\n },\n {\n value: LogsTableName.REALTIME,\n label: 'Realtime Logs',\n description: 'WebSocket connections and realtime subscriptions',\n },\n {\n value: LogsTableName.STORAGE,\n label: 'Storage Logs',\n description: 'File uploads, downloads, and storage operations',\n },\n {\n value: LogsTableName.PG_CRON,\n label: 'Cron Job Logs',\n description: 'Scheduled job executions and cron task logs',\n },\n {\n value: LogsTableName.EDGE,\n label: 'Edge Logs',\n description: 'HTTP requests and responses from Edge Functions',\n },\n\n {\n value: LogsTableName.FUNCTIONS,\n label: 'Function Logs',\n description: 'Serverless function execution logs and events',\n },\n {\n value: LogsTableName.POSTGREST,\n label: 'PostgREST Logs',\n description: 'API requests to your database through PostgREST',\n },\n {\n value: LogsTableName.SUPAVISOR,\n label: 'Supavisor Logs',\n description: 'Connection pooling and database proxy logs',\n },\n {\n value: LogsTableName.PGBOUNCER,\n label: 'PgBouncer Logs',\n description: 'Legacy connection pooling logs',\n },\n {\n value: LogsTableName.WAREHOUSE,\n label: 'Warehouse Logs',\n description: 'Data warehouse operations and analytics',\n },\n {\n value: LogsTableName.PG_UPGRADE,\n label: 'PostgreSQL Upgrade Logs',\n description: 'Database upgrade processes and migration logs',\n },\n]\n\nexport function LogsManager({ projectRef }: { projectRef: string }) {\n const [activeTab, setActiveTab] = useState<LogsTableName>(LogsTableName.FN_EDGE)\n const [open, setOpen] = useState(false)\n\n const sql = useMemo(() => genDefaultQuery(activeTab), [activeTab])\n\n const { data: logs, isLoading, error } = useGetLogs(projectRef, { sql })\n\n const selectedLogType = logTypes.find((type) => type.value === activeTab)\n\n return (\n <>\n <div className=\"p-6 pt-4 lg:p-8 lg:pt-8 border-b bg-background z-10 sticky top-0 flex items-center justify-between mb-6\">\n <div className=\"flex-1\">\n <h1 className=\"text-base lg:text-xl font-semibold\">Logs</h1>\n <p className=\"hidden lg:block text-sm lg:text-base text-muted-foreground mt-1\">\n Debug errors and track activity in your app\n </p>\n </div>\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n className=\"w-64 justify-between\"\n >\n {selectedLogType ? selectedLogType.label : 'Select log type...'}\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-80 p-0\" align=\"end\">\n <Command>\n <CommandInput placeholder=\"Search log types...\" className=\"h-9\" />\n <CommandList\n className=\"max-h-60 overflow-y-auto\"\n onWheel={(e) => {\n e.stopPropagation()\n }}\n style={{ overscrollBehavior: 'contain' }}\n >\n <CommandEmpty>No log type found.</CommandEmpty>\n <CommandGroup>\n {logTypes.map((logType) => (\n <CommLine truncated
"content": "'use client'\n\nimport { Alert, AlertDescription, AlertTitle } from '@/registry/default/components/ui/alert'\nimport { Button } from '@/registry/default/components/ui/button'\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/registry/default/components/ui/command'\nimport {\n HoverCard,\n HoverCardContent,\n HoverCardTrigger,\n} from '@/registry/default/components/ui/hover-card'\nimport { Popover, PopoverContent, PopoverTrigger } from '@/registry/default/components/ui/popover'\nimport { Skeleton } from '@/registry/default/components/ui/skeleton'\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/registry/default/components/ui/table'\nimport { useGetLogs } from '@/registry/default/platform/platform-kit-nextjs/hooks/use-logs'\nimport { LogsTableName, genDefaultQuery } from '../../lib/logs'\nimport { cn } from '@/lib/utils'\nimport { Check, ChevronsUpDown, Logs, Terminal } from 'lucide-react'\nimport { useMemo, useState } from 'react'\n\n// Define log types with names and descriptions\nconst logTypes = [\n {\n value: LogsTableName.FN_EDGE,\n label: 'Function Edge Logs',\n description: 'Edge function execution logs with request and response metadata',\n },\n {\n value: LogsTableName.AUTH,\n label: 'Authentication Logs',\n description: 'User authentication events and security logs',\n },\n {\n value: LogsTableName.POSTGRES,\n label: 'PostgreSQL Logs',\n description: 'Database queries, errors, and performance metrics',\n },\n {\n value: LogsTableName.REALTIME,\n label: 'Realtime Logs',\n description: 'WebSocket connections and realtime subscriptions',\n },\n {\n value: LogsTableName.STORAGE,\n label: 'Storage Logs',\n description: 'File uploads, downloads, and storage operations',\n },\n {\n value: LogsTableName.PG_CRON,\n label: 'Cron Job Logs',\n description: 'Scheduled job executions and cron task logs',\n },\n {\n value: LogsTableName.EDGE,\n label: 'Edge Logs',\n description: 'HTTP requests and responses from the data API',\n },\n\n {\n value: LogsTableName.FUNCTIONS,\n label: 'Function Logs',\n description: 'Serverless function execution logs and events',\n },\n {\n value: LogsTableName.POSTGREST,\n label: 'PostgREST Logs',\n description: 'API requests to your database through PostgREST',\n },\n {\n value: LogsTableName.SUPAVISOR,\n label: 'Supavisor Logs',\n description: 'Connection pooling and database proxy logs',\n },\n {\n value: LogsTableName.PGBOUNCER,\n label: 'PgBouncer Logs',\n description: 'Legacy connection pooling logs',\n },\n {\n value: LogsTableName.PG_UPGRADE,\n label: 'PostgreSQL Upgrade Logs',\n description: 'Database upgrade processes and migration logs',\n },\n]\n\nexport function LogsManager({ projectRef }: { projectRef: string }) {\n const [activeTab, setActiveTab] = useState<LogsTableName>(LogsTableName.FN_EDGE)\n const [open, setOpen] = useState(false)\n\n const sql = useMemo(() => genDefaultQuery(activeTab), [activeTab])\n\n const { data: logs, isLoading, error } = useGetLogs(projectRef, { sql })\n\n const selectedLogType = logTypes.find((type) => type.value === activeTab)\n\n return (\n <>\n <div className=\"p-6 pt-4 lg:p-8 lg:pt-8 border-b bg-background z-10 sticky top-0 flex items-center justify-between mb-6\">\n <div className=\"flex-1\">\n <h1 className=\"text-base lg:text-xl font-semibold\">Logs</h1>\n <p className=\"hidden lg:block text-sm lg:text-base text-muted-foreground mt-1\">\n Debug errors and track activity in your app\n </p>\n </div>\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n className=\"w-64 justify-between\"\n >\n {selectedLogType ? selectedLogType.label : 'Select log type...'}\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-80 p-0\" align=\"end\">\n <Command>\n <CommandInput placeholder=\"Search log types...\" className=\"h-9\" />\n <CommandList\n className=\"max-h-60 overflow-y-auto\"\n onWheel={(e) => {\n e.stopPropagation()\n }}\n style={{ overscrollBehavior: 'contain' }}\n >\n <CommandEmpty>No log type found.</CommandEmpty>\n <CommandGroup>\n {logTypes.map((logType) => (\n <CommandItem\n key={logType.value}\n value={logType.value}\n onSelect={(curLine truncated
"type": "registry:component"
},
{
@@ -161,12 +161,12 @@
},
{
"path": "registry/default/platform/platform-kit-nextjs/lib/logs.ts",
"content": "export enum LogsTableName {\n FN_EDGE = 'function_edge_logs',\n AUTH = 'auth_logs',\n POSTGRES = 'postgres_logs',\n REALTIME = 'realtime_logs',\n STORAGE = 'storage_logs',\n PG_CRON = 'pg_cron_logs',\n EDGE = 'edge_logs',\n FUNCTIONS = 'function_logs',\n POSTGREST = 'postgrest_logs',\n SUPAVISOR = 'supavisor_logs',\n PGBOUNCER = 'pgbouncer_logs',\n WAREHOUSE = 'warehouse_logs',\n PG_UPGRADE = 'pg_upgrade_logs',\n}\n\nconst genCrossJoinUnnests = (table: LogsTableName) => {\n switch (table) {\n case LogsTableName.EDGE:\n return `cross join unnest(metadata) as m\n cross join unnest(m.request) as request\n cross join unnest(m.response) as response`\n case LogsTableName.POSTGRES:\n return `cross join unnest(metadata) as m\n cross join unnest(m.parsed) as parsed`\n case LogsTableName.FUNCTIONS:\n return `cross join unnest(metadata) as metadata`\n case LogsTableName.AUTH:\n return `cross join unnest(metadata) as metadata`\n case LogsTableName.FN_EDGE:\n return `cross join unnest(metadata) as m\n cross join unnest(m.response) as response\n cross join unnest(m.request) as request`\n case LogsTableName.SUPAVISOR:\n return `cross join unnest(metadata) as m`\n default:\n return ''\n }\n}\n\nexport const genDefaultQuery = (table: LogsTableName, limit: number = 100) => {\n const joins = genCrossJoinUnnests(table)\n const orderBy = 'order by timestamp desc'\n\n switch (table) {\n case LogsTableName.EDGE:\n return `select id, ${table}.timestamp, event_message, request.method, request.path, request.search, response.status_code\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.POSTGRES:\n return `select ${table}.timestamp, id, event_message, parsed.error_severity, parsed.detail, parsed.hint\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.FUNCTIONS:\n return `select id, ${table}.timestamp, event_message, metadata.event_type, metadata.function_id, metadata.level\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.AUTH:\n return `select id, ${table}.timestamp, event_message, metadata.level, metadata.status, metadata.path, metadata.msg as msg, metadata.error\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.FN_EDGE:\n return `select id, ${table}.timestamp, event_message, response.status_code, request.method, m.function_id, m.execution_time_ms, m.deployment_id, m.version\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.SUPAVISOR:\n return `select id, ${table}.timestamp, event_message\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.PG_UPGRADE:\n return `select id, ${table}.timestamp, event_message\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.PG_CRON:\n return `select postgres_logs.timestamp, id, event_message, parsed.error_severity, parsed.query\nfrom postgres_logs\ncross join unnest(metadata) as m\ncross join unnest(m.parsed) as parsed\nwhere (parsed.application_name = 'pg_cron' OR event_message LIKE '%cron job%')\n${orderBy}\nlimit ${limit}`\n\n default:\n return `select id, ${table}.timestamp, event_message\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n }\n}\n",
"content": "export enum LogsTableName {\n FN_EDGE = 'function_edge_logs',\n AUTH = 'auth_logs',\n POSTGRES = 'postgres_logs',\n REALTIME = 'realtime_logs',\n STORAGE = 'storage_logs',\n PG_CRON = 'pg_cron_logs',\n EDGE = 'edge_logs',\n FUNCTIONS = 'function_logs',\n POSTGREST = 'postgrest_logs',\n SUPAVISOR = 'supavisor_logs',\n PGBOUNCER = 'pgbouncer_logs',\n PG_UPGRADE = 'pg_upgrade_logs',\n}\n\nconst genCrossJoinUnnests = (table: LogsTableName) => {\n switch (table) {\n case LogsTableName.EDGE:\n return `cross join unnest(metadata) as m\n cross join unnest(m.request) as request\n cross join unnest(m.response) as response`\n case LogsTableName.POSTGRES:\n return `cross join unnest(metadata) as m\n cross join unnest(m.parsed) as parsed`\n case LogsTableName.FUNCTIONS:\n return `cross join unnest(metadata) as metadata`\n case LogsTableName.AUTH:\n return `cross join unnest(metadata) as metadata`\n case LogsTableName.FN_EDGE:\n return `cross join unnest(metadata) as m\n cross join unnest(m.response) as response\n cross join unnest(m.request) as request`\n case LogsTableName.SUPAVISOR:\n return `cross join unnest(metadata) as m`\n default:\n return ''\n }\n}\n\nexport const genDefaultQuery = (table: LogsTableName, limit: number = 100) => {\n const joins = genCrossJoinUnnests(table)\n const orderBy = 'order by timestamp desc'\n\n switch (table) {\n case LogsTableName.EDGE:\n return `select id, ${table}.timestamp, event_message, request.method, request.path, request.search, response.status_code\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.POSTGRES:\n return `select ${table}.timestamp, id, event_message, parsed.error_severity, parsed.detail, parsed.hint\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.FUNCTIONS:\n return `select id, ${table}.timestamp, event_message, metadata.event_type, metadata.function_id, metadata.level\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.AUTH:\n return `select id, ${table}.timestamp, event_message, metadata.level, metadata.status, metadata.path, metadata.msg as msg, metadata.error\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.FN_EDGE:\n return `select id, ${table}.timestamp, event_message, response.status_code, request.method, m.function_id, m.execution_time_ms, m.deployment_id, m.version\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.SUPAVISOR:\n return `select id, ${table}.timestamp, event_message\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.PG_UPGRADE:\n return `select id, ${table}.timestamp, event_message\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n\n case LogsTableName.PG_CRON:\n return `select postgres_logs.timestamp, id, event_message, parsed.error_severity, parsed.query\nfrom postgres_logs\ncross join unnest(metadata) as m\ncross join unnest(m.parsed) as parsed\nwhere (parsed.application_name = 'pg_cron' OR event_message LIKE '%cron job%')\n${orderBy}\nlimit ${limit}`\n\n default:\n return `select id, ${table}.timestamp, event_message\nfrom ${table}\n${joins}\n${orderBy}\nlimit ${limit}`\n }\n}\n",
"type": "registry:lib"
},
{
"path": "registry/default/platform/platform-kit-nextjs/lib/management-api-schema.d.ts",
"content": "/**\n * This file was auto-generated by openapi-typescript.\n * Do not make direct changes to the file.\n */\n\nexport interface paths {\n '/v1/branches/{branch_id}': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n /**\n * Get database branch config\n * @description Fetches configurations of the specified database branch\n */\n get: operations['v1-get-a-branch-config']\n put?: never\n post?: never\n /**\n * Delete a database branch\n * @description Deletes the specified database branch\n */\n delete: operations['v1-delete-a-branch']\n options?: never\n head?: never\n /**\n * Update database branch config\n * @description Updates the configuration of the specified database branch\n */\n patch: operations['v1-update-a-branch-config']\n trace?: never\n }\n '/v1/branches/{branch_id}/push': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n get?: never\n put?: never\n /**\n * Pushes a database branch\n * @description Pushes the specified database branch\n */\n post: operations['v1-push-a-branch']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/branches/{branch_id}/merge': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n get?: never\n put?: never\n /**\n * Merges a database branch\n * @description Merges the specified database branch\n */\n post: operations['v1-merge-a-branch']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/branches/{branch_id}/reset': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n get?: never\n put?: never\n /**\n * Resets a database branch\n * @description Resets the specified database branch\n */\n post: operations['v1-reset-a-branch']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/branches/{branch_id}/diff': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n /**\n * [Beta] Diffs a database branch\n * @description Diffs the specified database branch\n */\n get: operations['v1-diff-a-branch']\n put?: never\n post?: never\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/projects': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n /**\n * List all projects\n * @description Returns a list of all projects you've previously created.\n */\n get: operations['v1-list-all-projects']\n put?: never\n /** Create a project */\n post: operations['v1-create-a-project']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/organizations': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n /**\n * List all organizations\n * @description Returns a list of organizations that you currently belong to.\n */\n get: operations['v1-list-all-organizations']\n put?: never\n /** Create an organization */\n post: operations['v1-create-an-organization']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/oauth/authorize': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n /** [Beta] Authorize user through oauth */\n get: operations['v1-authorize-user']\n put?: never\n post?: never\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/oauth/token': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n get?: never\n put?: never\n /** [Beta] Exchange auth code for user's access and refresh token */\n post: operations['v1-exchange-oauth-token']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/oauth/revoke': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n get?: never\n put?: never\n /** [Beta] Revoke oauth app authorization and it's corresponding tokens */\n post: operations['v1-revoke-token']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/oauth/authorize/project-claim': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n Line truncated
"content": "/**\n * This file was auto-generated by openapi-typescript.\n * Do not make direct changes to the file.\n */\n\nexport interface paths {\n '/v1/branches/{branch_id_or_ref}': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n /**\n * Get database branch config\n * @description Fetches configurations of the specified database branch\n */\n get: operations['v1-get-a-branch-config']\n put?: never\n post?: never\n /**\n * Delete a database branch\n * @description Deletes the specified database branch\n */\n delete: operations['v1-delete-a-branch']\n options?: never\n head?: never\n /**\n * Update database branch config\n * @description Updates the configuration of the specified database branch\n */\n patch: operations['v1-update-a-branch-config']\n trace?: never\n }\n '/v1/branches/{branch_id_or_ref}/push': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n get?: never\n put?: never\n /**\n * Pushes a database branch\n * @description Pushes the specified database branch\n */\n post: operations['v1-push-a-branch']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/branches/{branch_id_or_ref}/merge': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n get?: never\n put?: never\n /**\n * Merges a database branch\n * @description Merges the specified database branch\n */\n post: operations['v1-merge-a-branch']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/branches/{branch_id_or_ref}/reset': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n get?: never\n put?: never\n /**\n * Resets a database branch\n * @description Resets the specified database branch\n */\n post: operations['v1-reset-a-branch']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/branches/{branch_id_or_ref}/diff': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n /**\n * [Beta] Diffs a database branch\n * @description Diffs the specified database branch\n */\n get: operations['v1-diff-a-branch']\n put?: never\n post?: never\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/projects': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n /**\n * List all projects\n * @description Returns a list of all projects you've previously created.\n */\n get: operations['v1-list-all-projects']\n put?: never\n /** Create a project */\n post: operations['v1-create-a-project']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/organizations': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n /**\n * List all organizations\n * @description Returns a list of organizations that you currently belong to.\n */\n get: operations['v1-list-all-organizations']\n put?: never\n /** Create an organization */\n post: operations['v1-create-an-organization']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/oauth/authorize': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n /** [Beta] Authorize user through oauth */\n get: operations['v1-authorize-user']\n put?: never\n post?: never\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/oauth/token': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n get?: never\n put?: never\n /** [Beta] Exchange auth code for user's access and refresh token */\n post: operations['v1-exchange-oauth-token']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/oauth/revoke': {\n parameters: {\n query?: never\n header?: never\n path?: never\n cookie?: never\n }\n get?: never\n put?: never\n /** [Beta] Revoke oauth app authorization and it's corresponding tokens */\n post: operations['v1-revoke-token']\n delete?: never\n options?: never\n head?: never\n patch?: never\n trace?: never\n }\n '/v1/oauth/authorize/project-claim': {\n parameters: {\n query?: never\n header?: never\n path?: neverLine truncated
"type": "registry:lib"
},
{
@@ -8,8 +8,16 @@
"type": "registry:block",
"title": "Password Based Auth flow for Nextjs and Supabase",
"description": "Password Based Auth flow for Nextjs and Supabase",
"registryDependencies": ["button", "card", "input", "label"],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"button",
"card",
"input",
"label"
],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/password-based-auth-nextjs/app/auth/login/page.tsx",
@@ -100,7 +108,12 @@
"type": "registry:block",
"title": "Password Based Auth flow for React and Supabase",
"description": "Password Based Auth flow for React and Supabase",
"registryDependencies": ["button", "card", "input", "label"],
"registryDependencies": [
"button",
"card",
"input",
"label"
],
"files": [
{
"path": "registry/default/blocks/password-based-auth-react/components/login-form.tsx",
@@ -123,7 +136,9 @@
"type": "registry:lib"
}
],
"dependencies": ["@supabase/supabase-js@latest"],
"dependencies": [
"@supabase/supabase-js@latest"
],
"docs": "You'll need to set the following environment variables in your project: `VITE_SUPABASE_URL` and `VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY`.",
"envVars": {
"VITE_SUPABASE_URL": "",
@@ -135,7 +150,12 @@
"type": "registry:block",
"title": "Password Based Auth flow for React Router and Supabase",
"description": "Password Based Auth flow for React Router and Supabase",
"registryDependencies": ["button", "card", "input", "label"],
"registryDependencies": [
"button",
"card",
"input",
"label"
],
"dependencies": [
"@supabase/ssr@latest",
"@react-router/dev@latest",
@@ -208,8 +228,16 @@
"type": "registry:block",
"title": "Password Based Auth flow for tanstack and Supabase",
"description": "Password Based Auth flow for tanstack and Supabase",
"registryDependencies": ["button", "card", "input", "label"],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"button",
"card",
"input",
"label"
],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/password-based-auth-tanstack/routes/login.tsx",
@@ -296,8 +324,14 @@
"type": "registry:block",
"title": "Social Auth flow for Nextjs and Supabase",
"description": "Social Auth flow for Nextjs and Supabase",
"registryDependencies": ["button", "card"],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"button",
"card"
],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/social-auth-nextjs/app/auth/login/page.tsx",
@@ -356,7 +390,10 @@
"type": "registry:block",
"title": "Social Auth flow for React and Supabase",
"description": "Social Auth flow for React and Supabase",
"registryDependencies": ["button", "card"],
"registryDependencies": [
"button",
"card"
],
"files": [
{
"path": "registry/default/blocks/social-auth-react/components/login-form.tsx",
@@ -367,7 +404,9 @@
"type": "registry:lib"
}
],
"dependencies": ["@supabase/supabase-js@latest"],
"dependencies": [
"@supabase/supabase-js@latest"
],
"docs": "You'll need to set the following environment variables in your project: `VITE_SUPABASE_URL` and `VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY`.",
"envVars": {
"VITE_SUPABASE_URL": "",
@@ -379,7 +418,10 @@
"type": "registry:block",
"title": "Social Auth flow for React Router and Supabase",
"description": "Social Auth flow for React Router and Supabase",
"registryDependencies": ["button", "card"],
"registryDependencies": [
"button",
"card"
],
"dependencies": [
"@supabase/ssr@latest",
"@react-router/dev@latest",
@@ -437,8 +479,14 @@
"type": "registry:block",
"title": "Social Auth flow for TanStack and Supabase",
"description": "Social Auth flow for TanStack and Supabase",
"registryDependencies": ["button", "card"],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"button",
"card"
],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/social-auth-tanstack/components/login-form.tsx",
@@ -494,7 +542,9 @@
"type": "registry:component",
"title": "Dropzone (File Upload)",
"description": "Displays a control for easier uploading of files directly to Supabase Storage.",
"registryDependencies": ["button"],
"registryDependencies": [
"button"
],
"dependencies": [
"react-dropzone",
"lucide-react",
@@ -535,8 +585,14 @@
"type": "registry:component",
"title": "Dropzone (File Upload)",
"description": "Displays a control for easier uploading of files directly to Supabase Storage.",
"registryDependencies": ["button"],
"dependencies": ["react-dropzone", "lucide-react", "@supabase/supabase-js@latest"],
"registryDependencies": [
"button"
],
"dependencies": [
"react-dropzone",
"lucide-react",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/dropzone/components/dropzone.tsx",
@@ -563,7 +619,9 @@
"type": "registry:component",
"title": "Dropzone (File Upload)",
"description": "Displays a control for easier uploading of files directly to Supabase Storage.",
"registryDependencies": ["button"],
"registryDependencies": [
"button"
],
"dependencies": [
"react-dropzone",
"lucide-react",
@@ -600,7 +658,9 @@
"type": "registry:component",
"title": "Dropzone (File Upload)",
"description": "Displays a control for easier uploading of files directly to Supabase Storage.",
"registryDependencies": ["button"],
"registryDependencies": [
"button"
],
"dependencies": [
"react-dropzone",
"lucide-react",
@@ -638,7 +698,11 @@
"title": "Realtime Cursor",
"description": "Component which renders realtime cursors from other users in a room.",
"registryDependencies": [],
"dependencies": ["lucide-react", "@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"dependencies": [
"lucide-react",
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-cursor/components/cursor.tsx",
@@ -678,7 +742,10 @@
"title": "Realtime Cursor",
"description": "Component which renders realtime cursors from other users in a room.",
"registryDependencies": [],
"dependencies": ["lucide-react", "@supabase/supabase-js@latest"],
"dependencies": [
"lucide-react",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-cursor/components/cursor.tsx",
@@ -710,7 +777,11 @@
"title": "Realtime Cursor",
"description": "Component which renders realtime cursors from other users in a room.",
"registryDependencies": [],
"dependencies": ["lucide-react", "@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"dependencies": [
"lucide-react",
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-cursor/components/cursor.tsx",
@@ -746,7 +817,11 @@
"title": "Realtime Cursor",
"description": "Component which renders realtime cursors from other users in a room.",
"registryDependencies": [],
"dependencies": ["lucide-react", "@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"dependencies": [
"lucide-react",
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-cursor/components/cursor.tsx",
@@ -781,8 +856,13 @@
"type": "registry:component",
"title": "Current User Avatar",
"description": "Component which renders the current user's avatar.",
"registryDependencies": ["avatar"],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"avatar"
],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/current-user-avatar/components/current-user-avatar.tsx",
@@ -821,8 +901,12 @@
"type": "registry:component",
"title": "Current User Avatar",
"description": "Component which renders the current user's avatar.",
"registryDependencies": ["avatar"],
"dependencies": ["@supabase/supabase-js@latest"],
"registryDependencies": [
"avatar"
],
"dependencies": [
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/current-user-avatar/components/current-user-avatar.tsx",
@@ -853,8 +937,13 @@
"type": "registry:component",
"title": "Current User Avatar",
"description": "Component which renders the current user's avatar.",
"registryDependencies": ["avatar"],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"avatar"
],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/current-user-avatar/components/current-user-avatar.tsx",
@@ -889,8 +978,13 @@
"type": "registry:component",
"title": "Current User Avatar",
"description": "Component which renders the current user's avatar.",
"registryDependencies": ["avatar"],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"avatar"
],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/current-user-avatar/components/current-user-avatar.tsx",
@@ -925,8 +1019,14 @@
"type": "registry:component",
"title": "Avatar Stack with Realtime Presence",
"description": "Component which stack of avatars, tracked by realtime presence.",
"registryDependencies": ["avatar", "tooltip"],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"avatar",
"tooltip"
],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-avatar-stack/components/avatar-stack.tsx",
@@ -973,8 +1073,13 @@
"type": "registry:component",
"title": "Avatar Stack with Realtime Presence",
"description": "Component which stack of avatars, tracked by realtime presence.",
"registryDependencies": ["avatar", "tooltip"],
"dependencies": ["@supabase/supabase-js@latest"],
"registryDependencies": [
"avatar",
"tooltip"
],
"dependencies": [
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-avatar-stack/components/avatar-stack.tsx",
@@ -1013,8 +1118,14 @@
"type": "registry:component",
"title": "Avatar Stack with Realtime Presence",
"description": "Component which stack of avatars, tracked by realtime presence.",
"registryDependencies": ["avatar", "tooltip"],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"avatar",
"tooltip"
],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-avatar-stack/components/avatar-stack.tsx",
@@ -1057,8 +1168,14 @@
"type": "registry:component",
"title": "Avatar Stack with Realtime Presence",
"description": "Component which stack of avatars, tracked by realtime presence.",
"registryDependencies": ["avatar", "tooltip"],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"avatar",
"tooltip"
],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-avatar-stack/components/avatar-stack.tsx",
@@ -1101,8 +1218,15 @@
"type": "registry:component",
"title": "Realtime Chat",
"description": "Component which renders realtime chat messages from other users in a room.",
"registryDependencies": ["input", "button"],
"dependencies": ["lucide-react", "@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"input",
"button"
],
"dependencies": [
"lucide-react",
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-chat/components/chat-message.tsx",
@@ -1145,8 +1269,14 @@
"type": "registry:component",
"title": "Realtime Chat",
"description": "Component which renders realtime chat messages from other users in a room.",
"registryDependencies": ["input", "button"],
"dependencies": ["lucide-react", "@supabase/supabase-js@latest"],
"registryDependencies": [
"input",
"button"
],
"dependencies": [
"lucide-react",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-chat/components/chat-message.tsx",
@@ -1181,8 +1311,15 @@
"type": "registry:component",
"title": "Realtime Chat",
"description": "Component which renders realtime chat messages from other users in a room.",
"registryDependencies": ["input", "button"],
"dependencies": ["lucide-react", "@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"input",
"button"
],
"dependencies": [
"lucide-react",
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-chat/components/chat-message.tsx",
@@ -1221,8 +1358,15 @@
"type": "registry:component",
"title": "Realtime Chat",
"description": "Component which renders realtime chat messages from other users in a room.",
"registryDependencies": ["input", "button"],
"dependencies": ["lucide-react", "@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"registryDependencies": [
"input",
"button"
],
"dependencies": [
"lucide-react",
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"files": [
{
"path": "registry/default/blocks/realtime-chat/components/chat-message.tsx",
@@ -1261,7 +1405,10 @@
"type": "registry:block",
"title": "Infinite Query Hook",
"description": "React hook for infinite lists, fetching data from Supabase.",
"dependencies": ["@supabase/supabase-js", "@supabase/postgrest-js@*"],
"dependencies": [
"@supabase/supabase-js",
"@supabase/postgrest-js@*"
],
"registryDependencies": [],
"files": [
{
@@ -1277,7 +1424,10 @@
"title": "Supabase Client for Next.js",
"description": "",
"registryDependencies": [],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"docs": "You'll need to set the following environment variables in your project: `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY`.",
"envVars": {
"NEXT_PUBLIC_SUPABASE_URL": "",
@@ -1305,7 +1455,9 @@
"title": "Supabase Client for React",
"description": "",
"registryDependencies": [],
"dependencies": ["@supabase/supabase-js@latest"],
"dependencies": [
"@supabase/supabase-js@latest"
],
"docs": "You'll need to set the following environment variables in your project: `VITE_SUPABASE_URL` and `VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY`.",
"envVars": {
"VITE_SUPABASE_URL": "",
@@ -1325,7 +1477,10 @@
"title": "Supabase Client for React Router",
"description": "",
"registryDependencies": [],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"docs": "You'll need to set the following environment variables in your project: `VITE_SUPABASE_URL` and `VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY`.",
"envVars": {
"VITE_SUPABASE_URL": "",
@@ -1349,7 +1504,10 @@
"title": "Supabase Client for TanStack Start",
"description": "",
"registryDependencies": [],
"dependencies": ["@supabase/ssr@latest", "@supabase/supabase-js@latest"],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"docs": "You'll need to set the following environment variables in your project: `VITE_SUPABASE_URL` and `VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY`.",
"envVars": {
"VITE_SUPABASE_URL": "",
@@ -1543,6 +1701,66 @@
}
]
},
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "supabase-client-nuxtjs",
"type": "registry:lib",
"title": "Supabase Client for Nuxt.js",
"description": "",
"registryDependencies": [],
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"docs": "You'll need to set the following environment variables in your project: `NUXT_PUBLIC_SUPABASE_URL` and `NUXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY`.",
"envVars": {
"NUXT_PUBLIC_SUPABASE_URL": "",
"NUXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY": ""
},
"files": [
{
"path": "registry/default/clients/nuxtjs/lib/supabase/client.ts",
"type": "registry:lib"
},
{
"path": "registry/default/clients/nuxtjs/server/middleware/is-authenticated.ts",
"type": "registry:file",
"target": "server/middleware/is-authenticated.ts"
},
{
"path": "registry/default/clients/nuxtjs/server/api/profile.get.ts",
"type": "registry:file",
"target": "server/api/profile.get.ts"
},
{
"path": "registry/default/clients/nuxtjs/server/supabase/client.ts",
"type": "registry:file",
"target": "server/supabase/client.ts"
}
]
},
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "supabase-client-vue",
"type": "registry:lib",
"title": "Supabase Client for Vue",
"description": "",
"registryDependencies": [],
"dependencies": [
"@supabase/supabase-js@latest"
],
"docs": "You'll need to set the following environment variables in your project: `VITE_SUPABASE_URL` and `VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY`.",
"envVars": {
"VITE_SUPABASE_URL": "",
"VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY": ""
},
"files": [
{
"path": "registry/default/clients/vue/lib/supabase/client.ts",
"type": "registry:lib"
}
]
},
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "ai-editor-rules",
@@ -1585,4 +1803,4 @@
]
}
]
}
}
+3 -3
View File
@@ -1,4 +1,4 @@
import { type Registry, type RegistryItem } from 'shadcn/registry'
import { type RegistryItem } from 'shadcn/schema'
import { clients } from './clients'
import { registryItemAppend } from './utils'
@@ -19,7 +19,7 @@ import socialAuthReactRouter from './default/blocks/social-auth-react-router/reg
import socialAuthReact from './default/blocks/social-auth-react/registry-item.json' with { type: 'json' }
import socialAuthTanstack from './default/blocks/social-auth-tanstack/registry-item.json' with { type: 'json' }
const combine = (component: Registry['items'][number]) => {
const combine = (component: RegistryItem) => {
return clients.flatMap((client) => {
return registryItemAppend(
{
@@ -54,4 +54,4 @@ export const blocks = [
...combine(realtimeChat as RegistryItem),
// infinite query hook is intentionally not combined with the clients since it depends on clients having database types.
infiniteQueryHook as RegistryItem,
] as Registry['items']
] as RegistryItem[]
+2 -2
View File
@@ -1,7 +1,7 @@
import { type Registry } from 'shadcn/registry'
import type { RegistryItem } from 'shadcn/schema'
import nextjs from './default/clients/nextjs/registry-item.json' with { type: 'json' }
import reactRouter from './default/clients/react-router/registry-item.json' with { type: 'json' }
import react from './default/clients/react/registry-item.json' with { type: 'json' }
import tanstack from './default/clients/tanstack/registry-item.json' with { type: 'json' }
export const clients = [nextjs, react, reactRouter, tanstack] as Registry['items']
export const clients = [nextjs, react, reactRouter, tanstack] as RegistryItem[]
+2 -2
View File
@@ -1,6 +1,6 @@
import { type Registry } from 'shadcn/registry'
import type { RegistryItem } from 'shadcn/schema'
export const examples: Registry['items'] = [
export const examples: RegistryItem[] = [
{
name: 'dropzone-demo',
type: 'registry:example',
+3 -2
View File
@@ -1,7 +1,7 @@
import { type Registry } from 'shadcn/registry'
import { type Registry, type RegistryItem } from 'shadcn/schema'
import { examples } from '@/registry/examples'
import type { RegistryItem } from 'shadcn/registry'
import { blocks as vueBlocks } from '@supabase/vue-blocks'
import { blocks } from './blocks'
import { clients } from './clients'
import aiEditorRules from './default/ai-editor-rules/registry-item.json' with { type: 'json' }
@@ -14,6 +14,7 @@ export const registry = {
...blocks,
...clients,
...platform,
...vueBlocks,
aiEditorRules as RegistryItem,
// Internal use only.
+2 -2
View File
@@ -1,5 +1,5 @@
import { type Registry, type RegistryItem } from 'shadcn/registry'
import { type RegistryItem } from 'shadcn/schema'
import embeddedDashboardNextjs from './default/platform/platform-kit-nextjs/registry-item.json' with { type: 'json' }
export const platform = [embeddedDashboardNextjs as RegistryItem] as Registry['items']
export const platform = [embeddedDashboardNextjs] as RegistryItem[]
+2 -2
View File
@@ -1,8 +1,8 @@
import lodash from 'lodash'
import { Registry } from 'shadcn/registry'
import type { RegistryItem } from 'shadcn/schema'
const { uniq, uniqBy } = lodash
const registryItemAppend = (item: Registry['items'][number], items: Registry['items']) => {
const registryItemAppend = (item: RegistryItem, items: RegistryItem[]) => {
const neededRegDependencies = [
...(item.registryDependencies || []),
...items.flatMap((i) => i.registryDependencies),
+1 -1
View File
@@ -6,7 +6,7 @@ import { fileURLToPath } from 'url'
import { registry } from '../registry/index'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const registryPath = path.join(__dirname, '..', 'registry.json')
const registryPath = path.join(__dirname, '..', 'public', 'r', 'registry.json')
const cleanedRegistry = {
$schema: 'https://ui.shadcn.com/schema/registry.json',
@@ -18,6 +18,8 @@ function processJsonFile(filePath: string) {
"import { Link } from '@/registry/default/components/ui/link'",
"import Link from 'next/link'"
)
// Replace the file origin path to exclude the monorepo structure
.replaceAll('node_modules/@supabase/vue-blocks/', '')
// Write back to file
fs.writeFileSync(filePath, stringified)
+14
View File
@@ -0,0 +1,14 @@
import { blocks as originBlocks } from './registry/index'
const blocks = originBlocks.map((item) => {
const newItem = { ...item }
newItem.files = newItem.files?.map((file) => {
if (file.path.startsWith('registry/')) {
return { ...file, path: `node_modules/@supabase/vue-blocks/${file.path}` }
}
return file
})
return newItem
})
export { blocks }
+2 -2
View File
@@ -3,9 +3,9 @@
"version": "0.1.0",
"private": true,
"type": "module",
"exports": "./index.ts",
"scripts": {
"preinstall": "npx only-allow pnpm",
"build": "prettier --cache --write registry.json && rimraf -G public/r && shadcn build && tsx scripts/clean-registry.ts",
"clean": "rimraf node_modules .next .turbo",
"typecheck": "tsc --noEmit -p tsconfig.json"
},
@@ -16,7 +16,7 @@
"@supabase/supabase-js": "^2.49.1"
},
"devDependencies": {
"shadcn": "^2.10.0",
"shadcn": "^3.0.0",
"tsconfig": "workspace:*",
"vite": "catalog:"
}
@@ -1,42 +0,0 @@
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "supabase-client-nuxtjs",
"type": "registry:lib",
"title": "Supabase Client for Nuxt.js",
"description": "",
"dependencies": [
"@supabase/ssr@latest",
"@supabase/supabase-js@latest"
],
"registryDependencies": [],
"files": [
{
"path": "registry/default/clients/nuxtjs/lib/supabase/client.ts",
"content": "import { createBrowserClient } from '@supabase/ssr'\n\nexport function createClient() {\n return createBrowserClient(\n process.env.NUXT_PUBLIC_SUPABASE_URL!,\n process.env.NUXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY!\n )\n}\n",
"type": "registry:lib"
},
{
"path": "registry/default/clients/nuxtjs/server/middleware/is-authenticated.ts",
"content": "import { defineNuxtRouteMiddleware, navigateTo, useRequestEvent } from 'nuxt/app'\nimport { createSupabaseServerClient } from '../supabase/client'\n\nexport default defineNuxtRouteMiddleware(async (to) => {\n const event = useRequestEvent()\n\n // create Supabase SSR client directly here\n const supabase = createSupabaseServerClient(event);\n\n // check current user\n const { data: { user } } = await supabase.auth.getUser()\n\n if (!user && to.path !== '/login') {\n return navigateTo('/login')\n }\n})\n",
"type": "registry:file",
"target": "server/middleware/is-authenticated.ts"
},
{
"path": "registry/default/clients/nuxtjs/server/api/profile.get.ts",
"content": "import { createError, defineEventHandler } from 'h3';\nimport { createSupabaseServerClient } from '../supabase/client';\n\nexport default defineEventHandler(async (event) => {\n // Create Supabase SSR client\n const supabase = createSupabaseServerClient(event)\n\n // Example: get user session\n const {\n data: { user },\n } = await supabase.auth.getUser();\n\n if (!user) {\n return { error: 'Not authenticated' };\n }\n\n // Fetch profile row\n const { data, error } = await supabase\n .from('profiles')\n .select('*')\n .eq('id', user.id)\n .single();\n\n if (error) {\n throw createError({ statusCode: 500, statusMessage: error.message });\n }\n\n return { profile: data };\n});\n",
"type": "registry:file",
"target": "server/api/profile.get.ts"
},
{
"path": "registry/default/clients/nuxtjs/server/supabase/client.ts",
"content": "import { createServerClient } from '@supabase/ssr'\nimport { getCookie, setCookie, deleteCookie, H3Event, EventHandlerRequest } from 'h3'\n\nexport const createSupabaseServerClient = (event: H3Event<EventHandlerRequest> | undefined) => {\n return createServerClient(\n process.env.NUXT_PUBLIC_SUPABASE_URL!,\n process.env.NUXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY!,\n {\n cookies: {\n get: (key) => getCookie(event!, key),\n set: (key, value, options) => setCookie(event!, key, value, options),\n remove: (key, options) => deleteCookie(event!, key, options),\n },\n }\n )\n}",
"type": "registry:file",
"target": "server/supabase/client.ts"
}
],
"envVars": {
"NUXT_PUBLIC_SUPABASE_URL": "",
"NUXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY": ""
},
"docs": "You'll need to set the following environment variables in your project: `NUXT_PUBLIC_SUPABASE_URL` and `NUXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY`."
}
@@ -1,23 +0,0 @@
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "supabase-client-vue",
"type": "registry:lib",
"title": "Supabase Client for Vue",
"description": "",
"dependencies": [
"@supabase/supabase-js@latest"
],
"registryDependencies": [],
"files": [
{
"path": "registry/default/clients/vue/lib/supabase/client.ts",
"content": "/// <reference types=\"vite/types/importMeta.d.ts\" />\nimport { createClient as createSupabaseClient } from '@supabase/supabase-js'\n\nexport function createClient() {\n return createSupabaseClient(\n import.meta.env.VITE_SUPABASE_URL!,\n import.meta.env.VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY!\n )\n}\n",
"type": "registry:lib"
}
],
"envVars": {
"VITE_SUPABASE_URL": "",
"VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY": ""
},
"docs": "You'll need to set the following environment variables in your project: `VITE_SUPABASE_URL` and `VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY`."
}
+3 -2
View File
@@ -1,5 +1,6 @@
import { type Registry } from 'shadcn/registry'
import { type RegistryItem } from 'shadcn/schema'
import nuxtjs from './default/clients/nuxtjs/registry-item.json' with { type: 'json' }
import vue from './default/clients/vue/registry-item.json' with { type: 'json' }
export const clients = [nuxtjs, vue] as Registry['items']
export const clients = [nuxtjs, vue] as RegistryItem[]
+3 -7
View File
@@ -1,9 +1,5 @@
import { type Registry } from 'shadcn/registry'
import { clients } from './clients'
export const registry = {
name: 'Supabase UI Library',
homepage: 'https://supabase.com/ui',
items: [...clients],
} satisfies Registry
const blocks = [...clients]
export { blocks }
-55
View File
@@ -1,55 +0,0 @@
import * as fs from 'fs'
import * as path from 'path'
function processJsonFile(filePath: string) {
try {
// Read the file
const content = fs.readFileSync(filePath, 'utf8')
const json = JSON.parse(content)
// Convert to string to do replacement
let stringified = JSON.stringify(json, null, 2)
// Perform the replacement
stringified = stringified
.replace(/\/ui\/example\/password-based-auth/g, '')
.replace(/\/example\/password-based-auth/g, '')
.replaceAll(
"import { Link } from '@/registry/default/components/ui/link'",
"import Link from 'next/link'"
)
// Write back to file
fs.writeFileSync(filePath, stringified)
console.log(`✓ Updated ${filePath}`)
} catch (error) {
console.error(`Error processing ${filePath}:`, error)
}
}
function processDirectory(directoryPath: string) {
const files = fs.readdirSync(directoryPath)
files.forEach((file) => {
const fullPath = path.join(directoryPath, file)
const stat = fs.statSync(fullPath)
if (stat.isDirectory()) {
processDirectory(fullPath)
} else if (path.extname(file) === '.json') {
processJsonFile(fullPath)
}
})
}
// Start processing from the specified directory
const targetDir = path.join(process.cwd(), 'public/r')
if (!fs.existsSync(targetDir)) {
console.error('Target directory does not exist:', targetDir)
process.exit(1)
}
console.log('Starting JSON file processing...')
processDirectory(targetDir)
console.log('Processing complete!')
+721 -474
View File
File diff suppressed because it is too large. Load diff
-2
View File
@@ -38,8 +38,6 @@ minimumReleaseAge: 10080
minimumReleaseAgeExclude:
- ai
- '@ai-sdk/*'
- '@supabase/mcp-server-supabase'
- '@supabase/mcp-utils'
- '@supabase/*'
onlyBuiltDependencies: