Move config command to lib/shared_commands

Move the definition and implementation of the config command to
lib/shared_comhmands.js, this removes the need for lib config to depend
on the fs module, which is not accessible in web build.
This commit is contained in:
Hornwitser committed 2020-11-07 20:23:06 +01:00
1 parent bd1414dd1c
commit bcd1290301
5 files changed
+82 -81

No files matched your search

+2 -2
View File
@@ -595,7 +595,7 @@ async function startControl() {
type: "string",
})
.command("plugin", "Manage available plugins", libSharedCommands.pluginCommand)
.command("control-config", "Manage Control config", libConfig.configCommand)
.command("control-config", "Manage Control config", libSharedCommands.configCommand)
.wrap(yargs.terminalWidth())
.help(false) // Disable help to avoid triggering it on the first parse.
;
@@ -681,7 +681,7 @@ async function startControl() {
// Handle the control-config command before trying to connect.
if (args._[0] === "control-config") {
await libConfig.handleConfigCommand(args, controlConfig, args.config);
await libSharedCommands.handleConfigCommand(args, controlConfig, args.config);
return;
}