Socket
Socket
Sign inDemoInstall

html-reporter

Package Overview
Dependencies
Maintainers
7
Versions
310
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-reporter - npm Package Compare versions

Comparing version 2.9.3 to 2.10.0

lib/static/bundle.min.css

15

CHANGELOG.md

@@ -5,2 +5,17 @@ # Change Log

<a name="2.10.0"></a>
# [2.10.0](https://github.com/gemini-testing/html-reporter/compare/v2.9.3...v2.10.0) (2018-04-04)
### Bug Fixes
* **hack:** do not close connection on event source error ([376b88a](https://github.com/gemini-testing/html-reporter/commit/376b88a))
### Features
* save data file on process exit ([bb36c00](https://github.com/gemini-testing/html-reporter/commit/bb36c00))
<a name="2.9.3"></a>

@@ -7,0 +22,0 @@ ## [2.9.3](https://github.com/gemini-testing/html-reporter/compare/v2.9.2...v2.9.3) (2018-04-01)

@@ -8,2 +8,6 @@ 'use strict';

module.exports = class App {
static create(paths, tool, configs) {
return new this(paths, tool, configs);
}
constructor(paths, tool, configs) {

@@ -22,2 +26,6 @@ const {program} = configs;

finalize() {
this._tool.finalize();
}
run(tests) {

@@ -24,0 +32,0 @@ return _.isEmpty(tests)

12

lib/gui/server.js

@@ -10,5 +10,7 @@ 'use strict';

const {MAX_REQUEST_SIZE} = require('./constants/server');
const {logger} = require('../server-utils');
exports.start = (paths, tool, configs) => {
const app = new App(paths, tool, configs);
const {options, pluginConfig} = configs;
const app = App.create(paths, tool, configs);
const server = express();

@@ -18,3 +20,3 @@

server.use(express.static(path.join(__dirname, '../static'), {index: 'gui.html'}));
server.use('/images', express.static(path.join(process.cwd(), configs.pluginConfig.path, 'images')));
server.use('/images', express.static(path.join(process.cwd(), pluginConfig.path, 'images')));

@@ -48,5 +50,7 @@ server.get('/', (req, res) => res.sendFile(path.join(__dirname, '../static', 'gui.html')));

onExit(() => console.log('server shutting down'));
onExit(() => {
app.finalize();
logger.log('server shutting down');
});
const {options} = configs;
return app.initialize()

@@ -53,0 +57,0 @@ .then(() => {

@@ -44,2 +44,6 @@ 'use strict';

finalize() {
this._reportBuilder.saveDataFileSync();
}
addClient(connection) {

@@ -46,0 +50,0 @@ this._eventSource.addConnection(connection);

@@ -155,7 +155,5 @@ 'use strict';

save() {
const reportDir = this._pluginConfig.path;
return fs.mkdirsAsync(reportDir)
return fs.mkdirsAsync(this._pluginConfig.path)
.then(() => Promise.all([
fs.writeFileAsync(path.join(reportDir, 'data.js'), this._prepareData(), 'utf8'),
this.saveDataFileAsync(),
this._copyToReportDir(['index.html', 'report.min.js', 'report.min.css'])

@@ -167,2 +165,14 @@ ]))

saveDataFileAsync() {
return this._saveDataFile(fs.writeFileAsync);
}
saveDataFileSync() {
return this._saveDataFile(fs.writeFileSync);
}
_saveDataFile(saveFn) {
return saveFn(path.join(this._pluginConfig.path, 'data.js'), this._prepareData(), 'utf8');
}
_prepareData() {

@@ -169,0 +179,0 @@ const data = this.getResult();

@@ -49,7 +49,2 @@ 'use strict';

});
eventSource.onerror = () => {
console.error('Seems like servers went down. Closing connection...');
eventSource.close();
};
}

@@ -56,0 +51,0 @@

{
"name": "html-reporter",
"version": "2.9.3",
"version": "2.10.0",
"description": "Plugin for gemini and hermione which is intended to aggregate the results of tests running into html report",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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