Comparing version 5.0.12 to 5.0.13
/// <reference types="node" /> | ||
import EventEmitter from 'events'; | ||
import { EventEmitter } from 'events'; | ||
import Command, { ICommandOptions, CommandHandler } from './Command'; | ||
@@ -102,2 +102,3 @@ import Options, { IOptionsInput } from './Options'; | ||
showHelp(): this; | ||
getHelp(): string; | ||
/** | ||
@@ -104,0 +105,0 @@ * Show version in console |
@@ -12,3 +12,3 @@ 'use strict'; | ||
var path = _interopDefault(require('path')); | ||
var EventEmitter = _interopDefault(require('events')); | ||
var events = require('events'); | ||
var minimost = _interopDefault(require('minimost')); | ||
@@ -260,3 +260,3 @@ var JoyCon = _interopDefault(require('joycon')); | ||
} | ||
class Cac extends EventEmitter { | ||
class Cac extends events.EventEmitter { | ||
constructor({ bin, pkg, defaultOpts } = {}) { | ||
@@ -368,4 +368,8 @@ super(); | ||
showHelp() { | ||
process.stdout.write(this.getHelp()); | ||
return this; | ||
} | ||
getHelp() { | ||
if (!this.started) { | ||
throw new Error('[cac] You have to call .parse() before running .showHelp()'); | ||
throw new Error('[cac] You have to call .parse() first!'); | ||
} | ||
@@ -378,4 +382,3 @@ // Do not display `<command>` in help if it's a sub command | ||
}); | ||
help.output(); | ||
return this; | ||
return help.getHelp(); | ||
} | ||
@@ -382,0 +385,0 @@ /** |
{ | ||
"name": "cac", | ||
"version": "5.0.12", | ||
"version": "5.0.13", | ||
"description": "Command-line queen.", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33178
698