Comparing version 2.0.20 to 2.0.21
@@ -0,4 +1,6 @@ | ||
/// <reference types="node" /> | ||
import StreamOutput from './stream'; | ||
import deps from './deps'; | ||
export default abstract class Base { | ||
import * as EventEmitter from 'events'; | ||
export default abstract class Base extends EventEmitter { | ||
stdout: StreamOutput; | ||
@@ -5,0 +7,0 @@ stderr: StreamOutput; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const deps_1 = require("./deps"); | ||
class Base { | ||
const EventEmitter = require("events"); | ||
class Base extends EventEmitter { | ||
constructor() { | ||
super(); | ||
this.config = deps_1.default.Config; | ||
@@ -7,0 +9,0 @@ this.stdout = new deps_1.default.StreamOutput('stdout', process.stdout); |
@@ -57,2 +57,3 @@ "use strict"; | ||
warn(err, options = {}) { | ||
this.emit('warn', typeof err === 'string' ? new Error(err) : err); | ||
this.action.pause(() => { | ||
@@ -63,2 +64,3 @@ return this.Errors.warn(err, options); | ||
error(err, options = {}) { | ||
this.emit('error', typeof err === 'string' ? new Error(err) : err); | ||
this.action.pause(() => { | ||
@@ -143,1 +145,3 @@ return this.Errors.error(err, options); | ||
exports.default = exports.cli; | ||
// swallow error event so it does not cause a crash | ||
exports.cli.on('error', () => { }); |
{ | ||
"name": "cli-ux", | ||
"description": "set of CLI output utilities", | ||
"version": "2.0.20", | ||
"version": "2.0.21", | ||
"author": "Jeff Dickey", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/heroku/cli-ux/issues", |
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
50826
1533