- Trying out supabase cli and attempting to create work flow to sync of local dev with hosted environment and having a pretty terrible time:
- how is branching supposed to work?
- my dev and remote dev migrations are out of sync, but i have no idea how to fix?
- do I dev on local and push to remote? or work on remote and sync with local?
supabase db remote changes
takes forever!?
- settling on a much simpler solution to generate type and finally have a chance to use zx to write bash with javascript. itโs so good!
settling on this
import "zx/globals";
require("dotenv").config({ path: ".env.local" });
const SB_PROJECT_URL = process.env.NEXT_PUBLIC_SUPABASE_URL;
const SB_ANON_KEY = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
await $`npx openapi-typescript ${SB_PROJECT_URL}/rest/v1/?apikey=${SB_ANON_KEY} --output types/supabase.ts`;
- hide stdout in bash shell with
&> /dev/null
- https://stackoverflow.com/a/18063720
When in TRPC land handle errors with trpc.TRPCError
and dont return an error object like in GQL