feat(main): add silent mode to suppress output messages

* implement --silent flag to control output verbosity
* update error handling to restore stderr after silent mode
* enhance progress reporting in PostgreSQL reader
This commit is contained in:
2026-09-09 21:30:15 +02:00
parent 9e9a17d578
commit ee5c009234
8 changed files with 120 additions and 16 deletions
+2
View File
@@ -14,6 +14,7 @@ var (
buildDate = "unknown"
prisma7 bool
noVersion bool
silent bool
strictDirectives bool
)
@@ -73,6 +74,7 @@ func init() {
rootCmd.AddCommand(reportCmd)
rootCmd.PersistentFlags().BoolVar(&prisma7, "prisma7", false, "Use Prisma 7 generator conventions when reading/writing Prisma schemas")
rootCmd.PersistentFlags().BoolVar(&noVersion, "no-version", false, "Suppress the RelSpec version header")
rootCmd.PersistentFlags().BoolVar(&silent, "silent", false, "Suppress progress and status messages (errors are still shown)")
rootCmd.PersistentFlags().BoolVar(&strictDirectives, "strict-directives", false, "Fail on unknown or untranslatable DBML dialect directives (@postgres:, @sqlite:, …)")
}