You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: return-based output with OutputConfig on buildCommand
Commands with output config return bare data or [data, {hint}] tuples.
The buildCommand wrapper intercepts returns and renders automatically
using the config's human formatter.
Two forms of output config:
- "json" (string) — flag injection only (--json, --fields)
- { json: true, human: fn } — flag injection + auto-render
Migrated 4 Category A commands to return-based pattern:
- auth/whoami: returns user
- auth/refresh: returns payload, formatRefreshResult in config
- issue/explain: returns causes with [data, {hint}] for footer
- org/view: returns org with optional [data, {hint}] for detection source
Eliminated jsonData — one canonical data object for JSON and human output.
Normalized JSON shapes for consistent jq ergonomics:
- issue/view: always includes event (null when absent)
- log/view: always emits array
- project/view: always emits array
Renames detectedFrom → hint (callers compose full message).
Removes OutputResult/output()/isOutputResult()/renderOutputResult()
and WriteOutputDivergentOptions/jsonData from all output APIs.
0 commit comments