Rename clusterctl to clusterioctl

Rename the clusterctl command line utility to clusterioctl in order to
be consistent with the naming of the commands for master and slave.
This commit is contained in:
Hornwitser committed 2020-09-21 18:00:07 +02:00
1 parent bf5a4a8a9c
commit 3485c9ac68
15 files changed
+46 -46

No files matched your search

@@ -522,7 +522,7 @@ class ControlConnector extends link.WebSocketClientConnector {
console.log("SOCKET | registering control");
this.sendHandshake("register_control", {
token: this._token,
agent: "clusterctl",
agent: "clusterioctl",
version: version,
});
}
@@ -577,7 +577,7 @@ class Control extends link.Link {
async function startControl() {
yargs
.scriptName("clusterctl")
.scriptName("clusterioctl")
.usage("$0 <command> [options]")
.option("config", {
nargs: 1,
@@ -591,7 +591,7 @@ async function startControl() {
.strict()
;
const rootCommands = new command.CommandTree({ name: "clusterctl", description: "Manage cluster" });
const rootCommands = new command.CommandTree({ name: "clusterioctl", description: "Manage cluster" });
rootCommands.add(slaveCommands);
rootCommands.add(instanceCommands);
rootCommands.add(permissionCommands);
@@ -741,9 +741,9 @@ I version of clusterio. Expect things to break. I
);
} else {
console.error(`
+-------------------------------+
| Unable to to start clusterctl |
+-------------------------------+`
+---------------------------------+
| Unable to to start clusterioctl |
+---------------------------------+`
);
}
+2 -2
View File
@@ -4,12 +4,12 @@
"author": "Hornwitser",
"license": "MIT",
"version": "2.0.0-alpha0",
"main": "clusterctl.js",
"main": "ctl.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"bin": {
"clusterctl": "./clusterctl.js"
"clusterioctl": "./ctl.js"
},
"keywords": [
"factorio"
+3 -3
View File
@@ -1,7 +1,7 @@
/**
* Command library
*
* Data types and utilites for commands to clusterctl's CLI.
* Data types and utilites for commands to clusterioctl's CLI.
*
* @author Hornwitser
* @module
@@ -11,7 +11,7 @@ const link = require("@clusterio/lib/link");
const errors = require("@clusterio/lib/errors");
/**
* Represents a command that can be runned by clusterctl
* Represents a command that can be runned by clusterioctl
* @static
*/
class Command {
@@ -52,7 +52,7 @@ class Command {
* A node in the command tree that can hold commands and sub trees
*
* Container which can contain {@link module:lib/command.Command}s and other
* CommandTrees. This is used by clusterctl to hold the full tree of
* CommandTrees. This is used by clusterioctl to hold the full tree of
* available commands, you may extend this tree by using a control plugin,
* see {@link module:lib/plugin.BaseControlPlugin#addCommands}
*
+3 -3
View File
@@ -339,10 +339,10 @@ class BaseMasterPlugin {
}
/**
* Base class for clusterctl plugins
* Base class for clusterioctl plugins
*
* Control plugins are subclasses of this class which get instantiated by
* clusterctl in order to extend its functionallity. To be discovered the
* clusterioctl in order to extend its functionallity. To be discovered the
* class must be exported under the name `ControlPlugin` in the module
* specified by the `controlEntrypoint` in the plugin's info.js file.
*
@@ -364,7 +364,7 @@ class BaseControlPlugin {
/**
* Called to add commands to the command line interface.
*
* Invoked by clusterctl to let plugins add commands. `rootCommand` is
* Invoked by clusterioctl to let plugins add commands. `rootCommand` is
* the top level command node which the plugin should add its own {@link
* module:lib/command.CommandTree} to.
*
+2 -2
View File
@@ -6,7 +6,7 @@
* Facilitates communication between slaves and control of the cluster
* through WebSocet connections, and hosts a webserver for browser
* interfaces and Prometheus statistics export. It is remotely controlled
* by {@link module:clusterctl}.
* by {@link module:@clusterio/ctl/ctl}.
*
* @module
* @author Danielv123, Hornwitser
@@ -1582,7 +1582,7 @@ async function startServer() {
.command("bootstrap", "Bootstrap access to cluster", yargs => {
yargs
.command("create-admin <name>", "Create a cluster admin")
.command("create-ctl-config <name>", "Create clusterctl config for the given user", yargs => {
.command("create-ctl-config <name>", "Create clusterioctl config for the given user", yargs => {
yargs.option("output", {
describe: "Path to output config (- for stdout)", type: "string",
nargs: 1, default: "config-control.json",
+1 -1
View File
@@ -1429,7 +1429,7 @@ async function startSlave() {
"Master server requires an access token for socket operations. As clusterio\n"+
"slaves depends upon this, please set your token using the command npx\n"+
"clusterioslave config set slave.master_token <token>. You can generate an\n"+
"auth token using npx clusterctl generate-slave-token."
"auth token using npx clusterioctl generate-slave-token."
);
process.exitCode = 1;
return;