Commit d057a94
committed
feat(cli): add --json option for machine-readable output
Add --json flag to prepare-db command for machine-readable output:
- Success output includes: mode, action, database, monitoringUser,
applied steps, skippedOptional, and warnings
- Error output includes: mode, error object with message, step,
code, detail, hint, and httpStatus (for Supabase)
- Verify output includes: verified status, missingRequired/Optional
- Works for both Supabase and direct PostgreSQL modes
Example success:
{
"success": true,
"mode": "supabase",
"action": "apply",
"database": "postgres",
"monitoringUser": "postgres_ai_mon",
"applied": ["01.role", "02.permissions", ...],
"skippedOptional": ["03.optional_rds"],
"warnings": []
}
Example error:
{
"success": false,
"mode": "supabase",
"error": {
"message": "Failed at step \"01.role\": permission denied",
"step": "01.role",
"code": "42501"
}
}1 parent fd00960 commit d057a94
1 file changed
+320
-142
lines changed
0 commit comments