mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 02:45:07 +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>
55 lines
1.5 KiB
JSON
55 lines
1.5 KiB
JSON
{
|
|
"name": "common",
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"main": "./index.tsx",
|
|
"types": "./index.tsx",
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"preinstall": "npx only-allow pnpm",
|
|
"clean": "rimraf .turbo tsconfig.tsbuildinfo",
|
|
"gen:types": "supabase gen types typescript --local >| ./database-types.ts",
|
|
"typecheck": "tsc --noEmit",
|
|
"test:project-resources": "node --import tsx --test project-resources/*.test.ts"
|
|
},
|
|
"dependencies": {
|
|
"@types/dat.gui": "^0.7.12",
|
|
"@usercentrics/cmp-browser-sdk": "^4.42.0",
|
|
"api-types": "workspace:*",
|
|
"config": "workspace:*",
|
|
"configcat-js": "^9.5.1",
|
|
"dat.gui": "^0.7.9",
|
|
"flags": "^4.0.0",
|
|
"libpg-query": "17.6.0",
|
|
"lodash": "catalog:",
|
|
"next-themes": "catalog:",
|
|
"posthog-js": "^1.416.1",
|
|
"react-use": "^17.4.0",
|
|
"smol-toml": "1.8.0",
|
|
"valtio": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@types/lodash": "4.17.5",
|
|
"@types/node": "catalog:",
|
|
"@types/react": "catalog:",
|
|
"@types/react-dom": "catalog:",
|
|
"@typescript/native": "catalog:",
|
|
"@vitest/coverage-v8": "catalog:",
|
|
"@vitest/ui": "catalog:",
|
|
"lucide-react": "*",
|
|
"tsconfig": "workspace:*",
|
|
"type-fest": "5.6.0",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:",
|
|
"vitest": "catalog:"
|
|
},
|
|
"peerDependencies": {
|
|
"@supabase/auth-js": "catalog:",
|
|
"@supabase/supabase-js": "catalog:",
|
|
"lucide-react": "*",
|
|
"next": "catalog:",
|
|
"react": "catalog:",
|
|
"react-dom": "catalog:"
|
|
}
|
|
}
|