Skip to content

fix: human-readable text output for simple commands#419

Merged
margaretjgu merged 4 commits into
mainfrom
fix/human-readable-output
Jul 22, 2026
Merged

fix: human-readable text output for simple commands#419
margaretjgu merged 4 commits into
mainfrom
fix/human-readable-output

Conversation

@margaretjgu

@margaretjgu margaretjgu commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

Closes #379

Config commands now print human-readable text instead of raw JSON: context list prints a bullet list marking the current context, context add/edit/remove and current-context set print confirmation sentences plus warnings, and current-context get prints just the name. renderText also renders single flat objects as key: value lines, which improves extension command output for free. --json output is unchanged throughout.

Note: the bare elastic version text output originally in this PR was dropped; main now handles version text output itself.

Test plan

  • npx tsc --noEmit passes
  • npx tsx --test test/output.test.ts test/factory.test.ts test/cli.test.ts (344 pass)
  • Manually verify elastic config context list/add, elastic config current-context get/set

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 0.74s
✅ REPOSITORY gitleaks yes no no 45.49s
✅ REPOSITORY git_diff yes no no 0.46s
✅ REPOSITORY secretlint yes no no 22.73s
✅ REPOSITORY trivy yes no no 16.35s
✅ TYPESCRIPT eslint 5 0 0 4.07s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@JoshMock JoshMock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@margaretjgu
margaretjgu force-pushed the fix/human-readable-output branch from 8e2e86a to e306bc2 Compare July 22, 2026 20:06
@margaretjgu
margaretjgu enabled auto-merge (squash) July 22, 2026 20:12
@margaretjgu
margaretjgu merged commit c35bce4 into main Jul 22, 2026
29 checks passed
@margaretjgu
margaretjgu deleted the fix/human-readable-output branch July 22, 2026 20:41
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

Successfully merging this pull request may close these issues.

Make return values more readable by default

2 participants