Deprecate existing options of thelounge start
in favor or -c, --config
This commit is contained in:
parent
df2787d3e9
commit
07a01b0547
@ -10,11 +10,11 @@ const Utils = require("./utils");
|
|||||||
|
|
||||||
program
|
program
|
||||||
.command("start")
|
.command("start")
|
||||||
.option("-H, --host <ip>", "set the IP address or hostname for the web server to listen on")
|
.option("-H, --host <ip>", `${colors.bold.red("[DEPRECATED]")} to set the IP address or hostname for the web server to listen on, use ${colors.bold("-c host=<ip>")} instead`)
|
||||||
.option("-P, --port <port>", "set the port to listen on")
|
.option("-P, --port <port>", `${colors.bold.red("[DEPRECATED]")} to set the port to listen on, use ${colors.bold("-c port=<port>")} instead`)
|
||||||
.option("-B, --bind <ip>", "set the local IP to bind to for outgoing connections")
|
.option("-B, --bind <ip>", `${colors.bold.red("[DEPRECATED]")} to set the local IP to bind to for outgoing connections, use ${colors.bold("-c bind=<ip>")} instead`)
|
||||||
.option(" --public", "start in public mode")
|
.option(" --public", `${colors.bold.red("[DEPRECATED]")} to start in public mode, use ${colors.bold("-c public=true")} instead`)
|
||||||
.option(" --private", "start in private mode")
|
.option(" --private", `${colors.bold.red("[DEPRECATED]")} to start in private mode, use ${colors.bold("-c public=false")} instead`)
|
||||||
.description("Start the server")
|
.description("Start the server")
|
||||||
.on("--help", Utils.extraHelp)
|
.on("--help", Utils.extraHelp)
|
||||||
.action(function(options) {
|
.action(function(options) {
|
||||||
@ -22,6 +22,22 @@ program
|
|||||||
|
|
||||||
const server = require("../server");
|
const server = require("../server");
|
||||||
|
|
||||||
|
if (options.host) {
|
||||||
|
log.warn(`${colors.bold("-H, --host <ip>")} is ${colors.bold.red("deprecated")} and will be removed in The Lounge v3. Use ${colors.bold("-c host=<ip>")} instead.`);
|
||||||
|
}
|
||||||
|
if (options.port) {
|
||||||
|
log.warn(`${colors.bold("-P, --port <port>")} is ${colors.bold.red("deprecated")} and will be removed in The Lounge v3. Use ${colors.bold("-c port=<port>")} instead.`);
|
||||||
|
}
|
||||||
|
if (options.bind) {
|
||||||
|
log.warn(`${colors.bold("-B, --bind <ip>")} is ${colors.bold.red("deprecated")} and will be removed in The Lounge v3. Use ${colors.bold("-c bind=<ip>")} instead.`);
|
||||||
|
}
|
||||||
|
if (options.public) {
|
||||||
|
log.warn(`${colors.bold("--public")} is ${colors.bold.red("deprecated")} and will be removed in The Lounge v3. Use ${colors.bold("-c public=true")} instead.`);
|
||||||
|
}
|
||||||
|
if (options.private) {
|
||||||
|
log.warn(`${colors.bold("--private")} is ${colors.bold.red("deprecated")} and will be removed in The Lounge v3. Use ${colors.bold("-c public=false")} instead.`);
|
||||||
|
}
|
||||||
|
|
||||||
var mode = Helper.config.public;
|
var mode = Helper.config.public;
|
||||||
if (options.public) {
|
if (options.public) {
|
||||||
mode = true;
|
mode = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user