This PR adds the generate:types script, ideally we'll use this from CI before we run tsc but I'd prefer deferring this to a new PR as we'd need to add a DOPPLER_KEY to the github secrets so we can use it in CI to login to doppler and I'm not allowed to do so (CC @with-heart).
For now, every time we change something in the database schema, we'll have to run yarn generate:types which will rewrite types/supabase and these can then be used as a ts-generic as shown in /api/auth.ts
This PR adds the
generate:types
script, ideally we'll use this from CI before we runtsc
but I'd prefer deferring this to a new PR as we'd need to add aDOPPLER_KEY
to the github secrets so we can use it in CI to login to doppler and I'm not allowed to do so (CC @with-heart).For now, every time we change something in the database schema, we'll have to run
yarn generate:types
which will rewritetypes/supabase
and these can then be used as ats-generic
as shown in/api/auth.ts
resolves #75