mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
## Context Adds a pnpm command `api:codegen:prod` to generate API types off prod to work with the `verify-production-types` GHA. Just uses the existing logic in `verify-production-types.mjs` to fetch the OpenAPI specs, and writes it into the local API types files <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * API types can now be generated from the production API specifications when a local API environment is unavailable. * **Bug Fixes** * Resending invitations and updating project-scoped roles now handle roles without a base role ID more reliably. * **Documentation** * Updated guidance clarifies that API or schema changes must be deployed before relying on updated types. * Production is the source of truth for merge checks. Type verification should pass after deployment, and production-generated types are expected to pass verification. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
24 lines
803 B
JSON
24 lines
803 B
JSON
{
|
|
"name": "api-types",
|
|
"version": "0.0.0",
|
|
"description": "Types shared between Supabase apps and packages",
|
|
"main": "./index.ts",
|
|
"types": "./index.ts",
|
|
"scripts": {
|
|
"preinstall": "npx only-allow pnpm",
|
|
"clean": "rimraf .turbo tsconfig.tsbuildinfo",
|
|
"codegen": "openapi-typescript --redocly ./redocly.yaml --alphabetize --default-non-nullable=false && prettier --cache --write types/*.d.ts",
|
|
"codegen:prod": "node ./scripts/generate-production-types.mjs",
|
|
"verify-production-types": "node ./scripts/verify-production-types.mjs",
|
|
"test": "node --test ./scripts/*.test.mjs"
|
|
},
|
|
"author": "",
|
|
"license": "MIT",
|
|
"devDependencies": {
|
|
"openapi-typescript": "^7.4.3",
|
|
"prettier": "*",
|
|
"@typescript/native": "catalog:",
|
|
"typescript": "catalog:"
|
|
}
|
|
}
|