console-ui
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -0,1 +1,11 @@ | ||
## Unreleased (2019-05-02) | ||
## v3.0.3 (2019-05-02) | ||
#### :bug: Bug Fix | ||
* [#75](https://github.com/ember-cli/console-ui/pull/75) Ensure we resume an active spinner after we write or writeLine ([@stefanpenner](https://github.com/stefanpenner)) | ||
#### Committers: 1 | ||
- Stefan Penner ([@stefanpenner](https://github.com/stefanpenner)) | ||
## v3.0.2 (2019-04-03) | ||
@@ -2,0 +12,0 @@ |
@@ -38,7 +38,14 @@ 'use strict'; | ||
// Output stream | ||
this.progress = false; | ||
this.actualOutputStream = options.outputStream || process.stdout; | ||
this.outputStream = through(function (data, enc, callback) { | ||
spinner.stop(); | ||
if (this.process) { | ||
spinner.stop(); | ||
} | ||
callback(null, data); | ||
if (this.process) { | ||
spinner.start(); | ||
} | ||
}); | ||
@@ -190,2 +197,3 @@ this.outputStream.setMaxListeners(0); | ||
} else { | ||
this.progress = true; | ||
this.spinner.text = message; | ||
@@ -198,2 +206,3 @@ this.spinner.start(); | ||
stopProgress() { | ||
this.progress = false; | ||
if (this.writeLevelVisible('INFO') && !this.ci) { | ||
@@ -200,0 +209,0 @@ this.spinner.stop(); |
'use strict'; | ||
const UI = require('./'); | ||
const through = require('through'); | ||
const through = require('through2'); | ||
@@ -10,3 +10,3 @@ module.exports = class MockUI extends UI { | ||
inputStream: through(), | ||
outputStream: through((data) => { | ||
outputStream: through((data, enc, callback) => { | ||
if (options && options.outputStream) { | ||
@@ -17,5 +17,9 @@ options.outputStream.push(data); | ||
this.output += data; | ||
callback(); | ||
}), | ||
errorStream: through((data) => { | ||
errorStream: through((data, enc, callback) => { | ||
this.errors += data; | ||
callback(); | ||
}) | ||
@@ -22,0 +26,0 @@ }); |
{ | ||
"name": "console-ui", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "common interface for abstracting a console ui", | ||
@@ -25,3 +25,3 @@ "homepage": "https://github.com/ember-cli/console-ui#readme", | ||
"json-stable-stringify": "^1.0.1", | ||
"ora": "^3.2.0", | ||
"ora": "^3.4.0", | ||
"through2": "^3.0.1" | ||
@@ -32,3 +32,3 @@ }, | ||
"lerna-changelog": "^0.8.2", | ||
"mocha": "^6.0.2" | ||
"mocha": "^6.1.4" | ||
}, | ||
@@ -35,0 +35,0 @@ "engines": { |
@@ -9,2 +9,6 @@ 'use strict'; | ||
function errorLogToReportPath(log) { | ||
return log.match(/([^\s]+error\.dump\.\w+\.log)/)[0]; | ||
} | ||
describe('UI', function() { | ||
@@ -100,6 +104,2 @@ let ui; | ||
function errorLogToReportPath(log) { | ||
return log.match(/([^\s]+error\.dump\.\w+\.log)/)[0]; | ||
} | ||
it('empty error', function() { | ||
@@ -106,0 +106,0 @@ ui.writeError({}); |
Sorry, the diff of this file is not supported yet
1010
110674
Updatedora@^3.4.0