Skip to content

feat(mongodb-runner): add mongodb-runner ls --json#626

Draft
addaleax wants to merge 1 commit intomainfrom
mongodb-ls-json
Draft

feat(mongodb-runner): add mongodb-runner ls --json#626
addaleax wants to merge 1 commit intomainfrom
mongodb-ls-json

Conversation

@addaleax
Copy link
Collaborator

Provide JSON-formatted output that contains serialized cluster data.

Description

Open Questions

Checklist

Provide JSON-formatted output that contains serialized cluster data.
Copy link
Collaborator

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

tried it out locally, lgtm! just a thought:

})
.option('debug', { type: 'boolean', describe: 'Enable debug output' })
.option('verbose', { type: 'boolean', describe: 'Enable verbose output' })
.option('json', {
Copy link
Collaborator

Choose a reason for hiding this comment

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

    .option('verbose', { type: 'boolean', describe: 'Enable verbose output' })
    .command('start', 'Start a MongoDB instance')
    .command('stop', 'Stop a MongoDB instance')
    .command('prune', 'Clean up metadata for any dead MongoDB instances')
    .command('ls', 'List currently running MongoDB instances', (yargs) => {
      return yargs.option('json', {
        type: 'boolean',
        describe: 'Output machine-readable JSON',
      });
    })

just a suggestion, you could nest it under ls, it's still top-level on argv so no code change below needed.

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