Commit 15899fe
committed
fix(json): flatten view command JSON output for --fields filtering
issue view, event view, and trace view commands yielded wrapper objects
(e.g., { issue, event, trace }) as their CommandOutput data. When --fields
was used, filterFields looked for field names at the top level of this
wrapper, so --fields shortId,title returned {} because those fields
lived inside the nested 'issue' object.
Add jsonTransform to all three view commands that spreads the primary
entity as the top-level object:
- issue view: { ...issue, event, trace }
- event view: { ...event, trace }
- trace view: { ...summary, spans }
This makes --fields shortId,title work directly on issue properties,
while enrichment data remains accessible via --fields event.id or
--fields trace.traceId.
The jsonTransform also handles spanTreeLines exclusion (previously done
via jsonExclude) since the transform controls the full JSON shape.1 parent be6735f commit 15899fe
File tree
5 files changed
+115
-46
lines changed- src/commands
- event
- issue
- trace
- test/commands/trace
5 files changed
+115
-46
lines changed
0 commit comments