Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

boost

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boost - npm Package Compare versions

Comparing version 0.63.0 to 0.63.1

8

lib/Console.d.ts

@@ -67,2 +67,6 @@ /**

/**
* Handle the final render before exiting.
*/
handleFinalRender: (error?: Error | null) => void;
/**
* Handle the entire rendering and flushing process.

@@ -96,2 +100,6 @@ */

/**
* Reset both the render and background refresh timers.
*/
resetTimers(): this;
/**
* Show the console cursor.

@@ -98,0 +106,0 @@ */

74

lib/Console.js

@@ -55,2 +55,28 @@ "use strict";

/**
* Handle the final render before exiting.
*/
_this.handleFinalRender = function (error) {
if (error === void 0) { error = null; }
_this.resetTimers();
_this.clearLinesOutput();
_this.flushBufferedStreams();
_this.displayHeader();
_this.emit('render');
if (error) {
_this.emit('error', [error]);
}
else if (_this.errorLogs.length > 0) {
_this.displayLogs(_this.errorLogs);
}
else if (_this.logs.length > 0) {
_this.displayLogs(_this.logs);
}
_this.displayFooter();
_this.flushBufferedOutput();
_this.flushBufferedStreams();
// Remover listeners so that we avoid unwanted re-renders
_this.flushListeners('render');
_this.flushListeners('error');
};
/**
* Handle the entire rendering and flushing process.

@@ -61,39 +87,9 @@ */

if (final === void 0) { final = false; }
if (_this.renderTimer) {
clearTimeout(_this.renderTimer);
_this.renderTimer = null;
}
if (_this.refreshTimer) {
clearTimeout(_this.refreshTimer);
_this.refreshTimer = null;
}
// Clear all previous output
_this.resetTimers();
_this.clearLinesOutput();
// Flush buffered `stdout` and `stderr`
_this.flushBufferedStreams();
// Prepend the header
if (final) {
_this.displayHeader();
}
// Render output from all reporters
_this.emit('render');
// Render error at the bottom of the output
if (error) {
_this.emit('error', [error]);
}
else if (final) {
if (_this.errorLogs.length > 0) {
_this.displayLogs(_this.errorLogs);
}
else if (_this.logs.length > 0) {
_this.displayLogs(_this.logs);
}
}
if (final) {
// Append the footer
_this.displayFooter();
// Remover all listeners so that we avoid unwanted re-renders
_this.getListeners('render').clear();
}
// Flush buffered output from `render` and `error` events
_this.flushBufferedOutput();

@@ -187,3 +183,3 @@ };

// Render final output
this.handleRender(error, true);
this.handleFinalRender(error);
// Unwrap our streams

@@ -277,2 +273,16 @@ this.unwrapStream(process.stderr);

/**
* Reset both the render and background refresh timers.
*/
Console.prototype.resetTimers = function () {
if (this.renderTimer) {
clearTimeout(this.renderTimer);
this.renderTimer = null;
}
if (this.refreshTimer) {
clearTimeout(this.refreshTimer);
this.refreshTimer = null;
}
return this;
};
/**
* Show the console cursor.

@@ -279,0 +289,0 @@ */

@@ -25,2 +25,6 @@ /**

/**
* Remove all listeners for the defined event name.
*/
flushListeners(eventName: string): this;
/**
* Return all event names with registered listeners.

@@ -27,0 +31,0 @@ */

@@ -43,2 +43,9 @@ "use strict";

/**
* Remove all listeners for the defined event name.
*/
Emitter.prototype.flushListeners = function (eventName) {
this.getListeners(eventName).clear();
return this;
};
/**
* Return all event names with registered listeners.

@@ -45,0 +52,0 @@ */

@@ -91,5 +91,5 @@ "use strict";

// Initialize the console first so we can start logging
_this.console = new Console_1.default();
_this.console = new Console_1.default(_this.options.console);
// Add a reporter to catch errors during initialization
_this.addReporter(new ErrorReporter_1.default(_this.options.console));
_this.addReporter(new ErrorReporter_1.default());
// Cleanup when an exit occurs

@@ -102,2 +102,4 @@ /* istanbul ignore next */

}
// eslint-disable-next-line global-require
_this.debug('Using boost v%s', require('../package.json').version);
return _this;

@@ -171,4 +173,2 @@ }

this.debug('Initializing %s', chalk_1.default.green(appName));
// eslint-disable-next-line global-require
this.debug('Using boost v%s', require('../package.json').version);
this.loadConfig();

@@ -175,0 +175,0 @@ this.loadPlugins();

{
"name": "boost",
"version": "0.63.0",
"version": "0.63.1",
"description": "Robust pipeline for creating build tools that separate logic into routines and tasks.",

@@ -45,3 +45,3 @@ "keywords": [

},
"gitHead": "e2662f4b8d3ffbfa71b0ca250c705f2ff2353884"
"gitHead": "d1f2a4a6683f33de28a1602b52317e6e1b30fc54"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc