Merge remote-tracking branch 'origin/master' into proto-discord

# Conflicts:
#	README.md
#	bin/gamedig.js
This commit is contained in:
Michael Morrison 2021-05-18 22:08:37 -05:00
commit 576062e88b
28 changed files with 1014 additions and 808 deletions

View file

@ -4,14 +4,15 @@ const Minimist = require('minimist'),
Gamedig = require('..');
const argv = Minimist(process.argv.slice(2), {
boolean: ['pretty','debug'],
string: ['_']
boolean: ['pretty','debug','givenPortOnly']
});
const debug = argv.debug;
delete argv.debug;
const pretty = !!argv.pretty || debug;
delete argv.pretty;
const givenPortOnly = argv.givenPortOnly;
delete argv.givenPortOnly;
const options = {};
for(const key of Object.keys(argv)) {
@ -35,6 +36,9 @@ if (argv._.length >= 1) {
if (debug) {
options.debug = true;
}
if (givenPortOnly) {
options.givenPortOnly = true;
}
Gamedig.query(options)
.then((state) => {