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
@@ -1574,7 +1574,7 @@ async function startServer() {
type: "string",
})
.command("plugin", "Manage available plugins", libSharedCommands.pluginCommand)
.command("config", "Manage Master config", libConfig.configCommand)
.command("config", "Manage Master config", libSharedCommands.configCommand)
.command("bootstrap", "Bootstrap access to cluster", yargs => {
yargs
.command("create-admin <name>", "Create a cluster admin")
@@ -1641,7 +1641,7 @@ async function startServer() {
}
if (command === "config") {
await libConfig.handleConfigCommand(args, masterConfig, masterConfigPath);
await libSharedCommands.handleConfigCommand(args, masterConfig, masterConfigPath);
return;
} else if (command === "bootstrap") {