Skip to content

Commit

Permalink
Merge pull request #3 from neocotic/develop
Browse files Browse the repository at this point in the history
Release 0.1.1
  • Loading branch information
neocotic committed Jul 24, 2017
2 parents a200215 + 99b6cb3 commit fead4b1
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 79 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Version 0.1.1, 2017.07.24

* Fix `--debug` option [#2](https://github.com/neocotic/throne/issues/2)

## Version 0.1.0, 2017.07.21

* Initial release
152 changes: 102 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "throne",
"version": "0.1.0",
"version": "0.1.1",
"description": "Name availability checker",
"homepage": "https://github.com/neocotic/throne",
"bugs": {
Expand All @@ -27,6 +27,7 @@
"chalk": "^2.0.1",
"commander": "^2.11.0",
"debug": "^2.6.8",
"debugged": "^0.1.0",
"glob": "^7.1.2",
"http-status-codes": "^1.1.6",
"lodash.defaultsdeep": "^4.6.0",
Expand All @@ -38,7 +39,7 @@
"right-pad": "^1.0.1"
},
"devDependencies": {
"eslint": "^4.2.0",
"eslint": "^4.3.0",
"eslint-config-notninja": "^0.2.3"
},
"bin": {
Expand Down
10 changes: 5 additions & 5 deletions src/CLI.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

const chalk = require('chalk');
const Command = require('commander').Command;
const debugModule = require('debug');
const debug = debugModule('throne:cli');
const Debugged = require('debugged');
const debug = Debugged.create('throne:cli');
const EOL = require('os').EOL;
const groupBy = require('lodash.groupby');
const rightPad = require('right-pad');
Expand Down Expand Up @@ -132,7 +132,7 @@ class CLI {
.option('-d, --debug', 'enable debug level logging')
.option('-s, --service <title>', 'filter service by title', (s, list) => list.concat(s), [])
.option('--stack', 'print stack traces for errors')
.on('option:debug', () => debugModule.enable('*'));
.on('option:debug', () => Debugged.enable('*'));

this[_command].command('check <name>')
.alias('chk')
Expand Down Expand Up @@ -197,7 +197,7 @@ class CLI {
args = [];
}

debug('Parsing arguments: %o', args);
debug.log('Parsing arguments: %o', args);

this[_command].parse(args);

Expand All @@ -217,7 +217,7 @@ class CLI {
return Math.max(acc, `${descriptor.category} > ${descriptor.title}`.length);
}, 0);

debug('Calculated maximum length for service descriptor: %d', maxLength);
debug.log('Calculated maximum length for service descriptor: %d', maxLength);
});

throne.addListener('checkservice', (event) => {
Expand Down
Loading

0 comments on commit fead4b1

Please sign in to comment.