Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dashmate): json output for status commands #31

Merged
merged 8 commits into from
Nov 11, 2021
Merged

Conversation

strophy
Copy link
Collaborator

@strophy strophy commented Nov 11, 2021

Issue being fixed or feature implemented

We plan to implement tests on dashmate, which requires machine-readable output. This PR enables the --format=json flag for all status commands.

What was done?

  • Implement json format flag
  • strip-ansi colors from chalked table output
  • Refactor status commands

How Has This Been Tested?

Locally against a testnet node

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

packages/dashmate/src/printers/printObject.js Outdated Show resolved Hide resolved
packages/dashmate/src/printers/printArrayOfObjects.js Outdated Show resolved Hide resolved
packages/dashmate/src/printers/printObject.js Outdated Show resolved Hide resolved
packages/dashmate/src/oclif/command/BaseCommand.js Outdated Show resolved Hide resolved
packages/dashmate/src/oclif/command/BaseCommand.js Outdated Show resolved Hide resolved
packages/dashmate/src/commands/status/index.js Outdated Show resolved Hide resolved
packages/dashmate/src/util/getFormat.js Outdated Show resolved Hide resolved
packages/dashmate/src/oclif/command/BaseCommand.js Outdated Show resolved Hide resolved
@strophy strophy requested a review from shumkov November 11, 2021 18:00
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@shumkov shumkov changed the title feat: json output for status commands feat(dashmate): json output for status commands Nov 11, 2021
@strophy strophy merged commit 25866ce into v0.22-dev Nov 11, 2021
@strophy strophy deleted the feat/format-json branch November 11, 2021 19:47
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.

2 participants