Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --silent flag to piped npx commands #335

Open
chriscarrollsmith opened this issue Apr 30, 2024 · 0 comments
Open

Add --silent flag to piped npx commands #335

chriscarrollsmith opened this issue Apr 30, 2024 · 0 comments

Comments

@chriscarrollsmith
Copy link
Contributor

I noticed some npm console output getting erroneously piped into the migration and types files. For instance, this script:

"supabase:generate-types": "npx supabase gen types typescript --local --schema public > types_db.ts"

was producing a types file that looked like this:


> [email protected] npx
> supabase gen types typescript --local --schema public

export type Json =
  | string
  | number
  ...

To resolve this, I added the -silent flag to this command:

"supabase:generate-types": "npx --silent supabase gen types typescript --local --schema public > types_db.ts"

And instead of piping a db diff into the migration, I just used push and pull:

    "supabase:push-local": "npx supabase db push --local",
    "supabase:pull-local": "npx supabase db pull --local",
    "supabase:push-remote": "npx supabase db push --remote",
    "supabase:pull-remote": "npx supabase db pull --remote"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant