mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 11:55:05 +03:00
Every block and starter guide answers "what does this install?" with a file tree. That is the wrong unit: a reader wants to know which tables land in their database, which Edge Functions get deployed, and which URLs their app gains — none of which a path listing states. `common/project-resources` derives that inventory from source text alone. It reads supplied files and returns resources; it never touches a filesystem, fetches, executes SQL or project code, or depends on React, so it is reusable outside the library. Tables come from parsing migration and schema SQL with libpg-query's Postgres 17 grammar, tracking creates, drops, renames and schema moves in path order, rather than pattern-matching CREATE TABLE. Edge Functions read supabase/config.toml with a real TOML parser for custom entrypoints and `enabled = false`. Routes follow each framework's documented file convention — Next.js App and Pages routers, Nuxt, TanStack, React Router's fs-routes, and Flutter — and static route declarations, not guesses. Where the source cannot settle a question the analyzer emits a diagnostic instead of inventing a resource; project-resources/README.md states the scope and limits in full. The library's build runs the analysis once into __registry__/resources.json, which adds a "What's added" tab to every block guide's overview and the matching section to the Markdown export. Community starter templates live in other repositories, so update:starter-sources pins each one to a commit and vendors the SQL and config text it needs to analyze, keeping the build offline and the result reviewable in the diff. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
114 lines
4.1 KiB
JSON
114 lines
4.1 KiB
JSON
{
|
|
"name": "library",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"preinstall": "npx only-allow pnpm",
|
|
"dev:content": "velite dev",
|
|
"dev:next": "next dev --port 3004",
|
|
"dev": "pnpm build:registry && run-p build:content build:markdown build:markdown-index && run-p --race dev:*",
|
|
"build:content": "velite build --strict",
|
|
"build:registry": "rimraf -G public/r/* && tsx ./scripts/build-registry.mts && shadcn build public/r/registry.json && tsx scripts/clean-registry.ts && pnpm build:resources",
|
|
"build:markdown": "tsx ./scripts/build-markdown.ts",
|
|
"build:markdown-index": "tsx ./scripts/build-markdown-index.ts",
|
|
"build:next": "next build --turbopack",
|
|
"build": "pnpm build:registry && run-p build:content build:markdown build:markdown-index && pnpm build:next",
|
|
"test": "pnpm build:markdown && tsx --test ../../packages/common/project-resources/*.test.ts && vitest",
|
|
"test:architecture": "vitest run scripts/block-architecture.test.ts && tsx --test ../../packages/common/project-resources/*.test.ts",
|
|
"test:headless-tools": "tsx scripts/test-headless-tools.mts",
|
|
"start": "next start",
|
|
"lint": "eslint .",
|
|
"clean": "rimraf .next .turbo tsconfig.tsbuildinfo .contentlayer .velite",
|
|
"typecheck": "run-p build:content build:markdown && next typegen && tsc --noEmit -p tsconfig.json",
|
|
"build:resources": "tsx ./scripts/build-resources.ts",
|
|
"update:starter-sources": "tsx ./scripts/update-starter-sources.ts"
|
|
},
|
|
"dependencies": {
|
|
"@hookform/resolvers": "^3.1.1",
|
|
"@monaco-editor/react": "catalog:",
|
|
"@react-router/fs-routes": "^7.4.0",
|
|
"@supabase-labs/y-supabase": "0.1.0",
|
|
"@supabase/postgrest-js": "catalog:",
|
|
"@supabase/vue-blocks": "workspace:*",
|
|
"@tanstack/react-query": "~5.83.0",
|
|
"@xyflow/react": "^12.10.1",
|
|
"api-types": "workspace:*",
|
|
"axios": "^1.12.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"cmdk": "^1.1.1",
|
|
"common": "workspace:*",
|
|
"common-tags": "^1.8.2",
|
|
"eslint-config-supabase": "workspace:*",
|
|
"framer-motion": "^11.18.2",
|
|
"icons": "workspace:*",
|
|
"jotai": "^2.8.0",
|
|
"lucide-react": "*",
|
|
"monaco-editor": "catalog:",
|
|
"next": "catalog:",
|
|
"next-themes": "catalog:",
|
|
"openai": "^5.9.0",
|
|
"openapi-fetch": "0.12.4",
|
|
"radix-ui": "catalog:",
|
|
"react": "catalog:",
|
|
"react-dom": "catalog:",
|
|
"react-hook-form": "^7.71.2",
|
|
"react-markdown": "^10.1.0",
|
|
"react-wrap-balancer": "^1.1.0",
|
|
"recharts": "catalog:",
|
|
"rehype-autolink-headings": "^7.1.0",
|
|
"rehype-pretty-code": "^0.9.0",
|
|
"rehype-slug": "^6.0.0",
|
|
"remark-code-import": "^1.2.0",
|
|
"remark-gfm": "^4.0.0",
|
|
"sonner": "^1.5.0",
|
|
"ui": "workspace:*",
|
|
"ui-patterns": "workspace:*",
|
|
"unist-util-visit": "^5.0.0",
|
|
"vaul": "^1.1.2",
|
|
"velite": "catalog:",
|
|
"y-monaco": "^0.1.6",
|
|
"y-protocols": "^1.0.7",
|
|
"yjs": "^13.6.29",
|
|
"zod": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "*",
|
|
"@react-router/dev": "^7.9.0",
|
|
"@shikijs/compat": "^1.1.7",
|
|
"@supabase/ssr": "catalog:",
|
|
"@supabase/supabase-js": "catalog:",
|
|
"@tanstack/react-router": "catalog:",
|
|
"@tanstack/react-start": "catalog:",
|
|
"@types/common-tags": "^1.8.4",
|
|
"@types/lodash": "^4.17.16",
|
|
"@types/mdast": "^3.0.15",
|
|
"@types/react": "catalog:",
|
|
"@types/react-dom": "catalog:",
|
|
"@typescript/native": "catalog:",
|
|
"config": "workspace:^",
|
|
"gray-matter": "^4.0.3",
|
|
"lodash": "catalog:",
|
|
"mdast-util-from-markdown": "^1.3.1",
|
|
"mdast-util-gfm": "^2.0.2",
|
|
"mdast-util-mdx": "^2.0.1",
|
|
"mdast-util-mdx-jsx": "^2.1.4",
|
|
"mdast-util-to-markdown": "^1.5.0",
|
|
"micromark-extension-gfm": "^2.0.3",
|
|
"micromark-extension-mdxjs": "^1.0.1",
|
|
"npm-run-all": "^4.1.5",
|
|
"postcss": "catalog:",
|
|
"react-dropzone": "^14.3.8",
|
|
"react-router": "^7.13.2",
|
|
"rimraf": "^4.1.3",
|
|
"shadcn": "^4.0.0",
|
|
"shiki": "^1.1.7",
|
|
"tailwindcss": "catalog:",
|
|
"tsconfig": "workspace:*",
|
|
"tsx": "catalog:",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:",
|
|
"vitest": "catalog:"
|
|
}
|
|
}
|