Making the core a module proved to bring more problems than it solved. For
the sake of simplicity in installation and code coverage reporting, the
core is now completely contained in the `lib/` directory.
Also added preliminary coverage reporting with nyc.
Minor refactoring to the core library to allow multiple calls from within
the same program.
Added --quiet option to silence output so that tests aren't so
verbose. Currently this only works on UNIX based systems.
The request-promise-native package adds support for request with native
promises. This is a convenient way to synchronize multiple HTTP requests.
The functions are changed to use promises to make testing easier. With
promises, the testing code can use the chai-as-promised library.
There are a few cases where doRequest is called with a callback that again
calls doAsyncRequest. With multiple hosts, this causes each command to be
propagated to all servers. This is a design flaw of the current multi-host
mode and needs to be changed.
Changed maxctrl.js to wait on the promises to silence some warnings if the
promise rejections are ignored.
All invocations into the common helper functions are now done through the
`maxctrl` function. This allows the program arguments to be passed to the
core as a parameter instead of reading them from global variables.
This helps with the implicit initialization that was done when the yargs
library was required which caused duplicated output.
Refactored the core functions so that they only process the argument
vector. The parsing of the argument vector is done in maxctrl.js where it
is more appropriate.