Closed mrmattrc closed 2 years ago
@soedirgo, thanks for the quick fix! Just out of curiosity, how does supabase/postgres-meta
affect supabase/cli
? In other words, is there a rough ETA for when I can update the CLI to include this fix?
We use postgres-meta to do the actual typegen - it's running in Docker through the CLI.
is there a rough ETA
I'd say a few days - there are some changes I'd like to do at the same time. If it's urgent for you we can just do it now though, it's a pretty quick task.
Thanks for the explanation. It's not an urgent issue. Thanks for being willing to prioritize it though! I look forward to getting the new update soon.
@soedirgo, I updated the CLI to v1.3.0 and reran the typegen command, but I am experiencing the same behavior as before.
Was this run with --local
? You might need to supabase stop && supabase start
for the change to take effect
@soedirgo, that worked! I was running locally, so I stopped and restarted supabase, reran the command, and it output it correctly. Thank you for the help!
Bug report
Describe the bug
When running
supabase gen types typescript
, enum array type definitions are incorrect. Rather than wrapping the possible values in an array and declaring that it is an array of those types, it puts the array on the last item in the type.To Reproduce
supabase gen types typescript
.Expected behavior
Enum arrays are correctly typed when running
supabase gen types typescript
.Screenshots
Supabase enum array definition
Generated types (code removed for example)
Expected type output (code removed for example)
System information