Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

feat: add verbose mode to every command #230

Merged
merged 1 commit into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/commands/platform/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class InitCommand extends BaseCommand {
{
'drive-image-build-path': driveImageBuildPath,
'dapi-image-build-path': dapiImageBuildPath,
verbose: isVerbose,
},
dockerCompose,
initTask,
Expand All @@ -35,6 +36,7 @@ class InitCommand extends BaseCommand {
},
],
{
renderer: isVerbose ? 'verbose' : 'default',
rendererOptions: {
clearOutput: false,
collapse: false,
Expand Down
3 changes: 0 additions & 3 deletions src/commands/register.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const { Listr } = require('listr2');

const { flags: flagTypes } = require('@oclif/command');

const { PrivateKey } = require('@dashevo/dashcore-lib');

const BaseCommand = require('../oclif/command/BaseCommand');
Expand Down Expand Up @@ -75,7 +73,6 @@ RegisterCommand.args = [{

RegisterCommand.flags = {
...BaseCommand.flags,
verbose: flagTypes.boolean({ char: 'v', description: 'use verbose mode for output', default: false }),
};

module.exports = RegisterCommand;
5 changes: 4 additions & 1 deletion src/commands/reset.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class ResetCommand extends BaseCommand {
*/
async runWithDependencies(
args,
flags,
{
verbose: isVerbose,
},
dockerCompose,
config,
) {
Expand All @@ -32,6 +34,7 @@ class ResetCommand extends BaseCommand {
},
],
{
renderer: isVerbose ? 'verbose' : 'default',
rendererOptions: {
clearOutput: false,
collapse: false,
Expand Down
2 changes: 2 additions & 0 deletions src/commands/restart.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class RestartCommand extends BaseCommand {
update: isUpdate,
'drive-image-build-path': driveImageBuildPath,
'dapi-image-build-path': dapiImageBuildPath,
verbose: isVerbose,
},
dockerCompose,
startNodeTask,
Expand All @@ -47,6 +48,7 @@ class RestartCommand extends BaseCommand {
},
],
{
renderer: isVerbose ? 'verbose' : 'default',
rendererOptions: {
clearOutput: false,
collapse: false,
Expand Down
1 change: 0 additions & 1 deletion src/commands/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ SetupCommand.flags = {
'drive-image-build-path': flagTypes.string({ description: 'drive\'s docker image build path', default: null }),
'dapi-image-build-path': flagTypes.string({ description: 'dapi\'s docker image build path', default: null }),
verbose: flagTypes.boolean({ char: 'v', description: 'use verbose mode for output', default: false }),

};

module.exports = SetupCommand;
2 changes: 2 additions & 0 deletions src/commands/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class StartCommand extends BaseCommand {
update: isUpdate,
'drive-image-build-path': driveImageBuildPath,
'dapi-image-build-path': dapiImageBuildPath,
verbose: isVerbose,
},
dockerCompose,
startNodeTask,
Expand All @@ -44,6 +45,7 @@ class StartCommand extends BaseCommand {
},
],
{
renderer: isVerbose ? 'verbose' : 'default',
rendererOptions: {
clearOutput: false,
collapse: false,
Expand Down
5 changes: 4 additions & 1 deletion src/commands/stop.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class StopCommand extends BaseCommand {
*/
async runWithDependencies(
args,
flags,
{
verbose: isVerbose,
},
dockerCompose,
config,
) {
Expand All @@ -25,6 +27,7 @@ class StopCommand extends BaseCommand {
},
],
{
renderer: isVerbose ? 'verbose' : 'default',
rendererOptions: {
clearOutput: false,
collapse: false,
Expand Down
2 changes: 2 additions & 0 deletions src/commands/wallet/mint.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class MintCommand extends BaseCommand {
},
{
address,
verbose: isVerbose,
},
generateToAddressTask,
config,
Expand All @@ -38,6 +39,7 @@ class MintCommand extends BaseCommand {
},
],
{
renderer: isVerbose ? 'verbose' : 'default',
rendererOptions: {
clearOutput: false,
collapse: false,
Expand Down
5 changes: 5 additions & 0 deletions src/oclif/command/BaseCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ BaseCommand.flags = {
description: 'configuration name to use',
default: null,
}),
verbose: flagTypes.boolean({
char: 'v',
description: 'use verbose mode for output',
default: false,
}),
};

module.exports = BaseCommand;