-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Improve help to display properly
- Loading branch information
Showing
21 changed files
with
129 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/client/LibplanetConsole.Clients.Executable/EntryCommands/KeyCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
using System.ComponentModel; | ||
using LibplanetConsole.Common.Commands; | ||
|
||
namespace LibplanetConsole.Clients.Executable.EntryCommands; | ||
|
||
[Category("Tools")] | ||
internal sealed class KeyCommand : KeyCommandBase | ||
{ | ||
} |
25 changes: 6 additions & 19 deletions
25
src/client/LibplanetConsole.Clients.Executable/EntryCommands/SchemaCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,19 @@ | ||
using System.ComponentModel; | ||
using JSSoft.Commands; | ||
using LibplanetConsole.Common; | ||
using LibplanetConsole.Frameworks; | ||
|
||
namespace LibplanetConsole.Clients.Executable.EntryCommands; | ||
|
||
[CommandSummary("Creates a schema of the application settings.")] | ||
[Category("Tools")] | ||
internal sealed class SchemaCommand : CommandBase | ||
{ | ||
[CommandProperty("output")] | ||
public string OutputPath { get; set; } = string.Empty; | ||
|
||
protected override void OnExecute() | ||
{ | ||
var schemaBuilder = new ApplicationSettingsSchemaBuilder(); | ||
var json = schemaBuilder.Build(); | ||
var outputPath = OutputPath; | ||
if (outputPath == string.Empty) | ||
{ | ||
Out.WriteLine(json); | ||
} | ||
else | ||
{ | ||
var directory = Path.GetDirectoryName(outputPath) | ||
?? throw new InvalidOperationException("The directory is not found."); | ||
if (Directory.Exists(directory) is false) | ||
{ | ||
Directory.CreateDirectory(directory); | ||
} | ||
|
||
File.WriteAllText(outputPath, json); | ||
} | ||
var colorizedString = JsonUtility.ToColorizedString(json); | ||
Out.WriteLine(colorizedString); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/console/LibplanetConsole.Consoles.Executable/EntryCommands/GenesisCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
using System.ComponentModel; | ||
using LibplanetConsole.Common.Commands; | ||
|
||
namespace LibplanetConsole.Consoles.Executable.EntryCommands; | ||
|
||
[Category("Tools")] | ||
internal sealed class GenesisCommand : GenesisCommandBase | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/console/LibplanetConsole.Consoles.Executable/EntryCommands/KeyCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
using System.ComponentModel; | ||
using LibplanetConsole.Common.Commands; | ||
|
||
namespace LibplanetConsole.Consoles.Executable.EntryCommands; | ||
|
||
[Category("Tools")] | ||
internal sealed class KeyCommand : KeyCommandBase | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/console/LibplanetConsole.Consoles.Executable/EntryCommands/StartCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/node/LibplanetConsole.Nodes.Executable/EntryCommands/GenesisCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
using System.ComponentModel; | ||
using LibplanetConsole.Common.Commands; | ||
|
||
namespace LibplanetConsole.Nodes.Executable.EntryCommands; | ||
|
||
[Category("Tools")] | ||
internal sealed class GenesisCommand : GenesisCommandBase | ||
{ | ||
} |
Oops, something went wrong.