diff --git a/package.json b/package.json index 9496a9c..3712590 100755 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "gtt": "src/gtt.js" }, "engines": { - "node": ">=6.11" + "node": ">=8.17" }, "pkg": { "scripts": "src/**/*.js", @@ -34,41 +34,38 @@ "license": "GPL-2.0", "dependencies": { "app-module-path": "^2.2.0", - "async": "^2.6.1", - "camelcase": "^4.1.0", - "cli-cursor": "^2.1.0", + "async": "^3.2.0", + "cli-cursor": "^3.1.0", "cli-table": "^0.3.1", - "colors": "^1.3.1", + "colors": "^1.4.0", "commander": "kriskbx/commander.js", "csv-string": "^2.3.2", - "find-in-files": "^0.4.0", - "hash-sum": "^1.0.2", - "hashids": "^1.1.1", - "markdown-pdf": "^9.0.0", - "markdown-table": "^1.1.0", - "moment": "^2.22.2", - "moment-timezone": "^0.5.21", + "find-in-files": "^0.5.0", + "hash-sum": "^2.0.0", + "hashids": "^2.2.1", + "markdown-pdf": "^10.0.0", + "markdown-table": "^2.0.0", + "moment": "^2.26.0", + "moment-timezone": "^0.5.31", "node-spinner": "^0.0.4", "open": "^0.0.5", - "progress": "^2.0.0", + "progress": "^2.0.3", "prompt": "^1.0.0", "read-yaml": "^1.1.0", - "request": "^2.87.0", + "request": "^2.88.2", "request-promise-native": "^1.0.4", - "shelljs": "^0.8.3", - "tempfile": "^2.0.0", + "shelljs": "^0.8.4", "throttled-queue": "^1.0.7", - "underscore": "^1.9.1", - "xdg-basedir": "^3.0.0", - "xlsx": "^0.13.5" + "underscore": "^1.10.2", + "xdg-basedir": "^4.0.0", + "xlsx": "^0.16.2" }, "devDependencies": { - "chai": "^4.1.2", - "coveralls": "^2.13.1", + "chai": "^4.2.0", + "coveralls": "^3.1.0", "istanbul": "^0.4.5", - "mocha": "^5", - "mocha-lcov-reporter": "^1.3.0", - "pkg": "^4.3.4", - "sinon": "^3.2.1" + "mocha": "^7.2.0", + "pkg": "^4.4.8", + "sinon": "^9.0.2" } -} +} \ No newline at end of file diff --git a/src/models/base.js b/src/models/base.js index 754aac5..3f15cc7 100755 --- a/src/models/base.js +++ b/src/models/base.js @@ -117,12 +117,7 @@ class base { * @returns {Promise} */ parallel(tasks, worker, runners = this._parallel) { - return new Promise((resolve, reject) => { - async.eachLimit(Array.from(tasks), runners, worker, error => { - if (error) return reject(error); - resolve(); - }); - }); + return async.eachLimit(Array.from(tasks), runners, worker); } /** diff --git a/src/models/baseFrame.js b/src/models/baseFrame.js index ef4e940..5332169 100755 --- a/src/models/baseFrame.js +++ b/src/models/baseFrame.js @@ -1,8 +1,7 @@ const Config = require('../include/config'); const moment = require('moment-timezone'); -const Hashids = require('hashids'); -const hashids = new Hashids(); +const hashids = require('hashids/cjs')(); class baseFrame { /** diff --git a/src/models/reportCollection.js b/src/models/reportCollection.js index eb0d6e8..aa144a6 100755 --- a/src/models/reportCollection.js +++ b/src/models/reportCollection.js @@ -1,4 +1,5 @@ const Base = require('./base'); +let projlist= []; class reportCollection extends Base { constructor(config) { @@ -13,6 +14,10 @@ class reportCollection extends Base { push(report) { this.reports.push(report); + if (projlist.indexOf(report.project.name) === -1) { + projlist.push(report.project.name); + this.reports.push(report); + } } get length() { @@ -20,4 +25,4 @@ class reportCollection extends Base { } } -module.exports = reportCollection; \ No newline at end of file +module.exports = reportCollection;