Files
supabase/packages/api-types/package.json
T
Joshen Lim 54c2a2788f Joshenlim/fe 4474 add command to generate types off api production (#50960)
## 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 -->
2026-09-29 01:34:34 +08:00

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:"
}
}