summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCan Güney Aksakalli <cgaksakalli@gmail.com>2020-02-18 12:13:56 +0100
committerCan Güney Aksakalli <cgaksakalli@gmail.com>2020-02-18 12:13:56 +0100
commit4adebff5fd75563f061965690ac960113a65a75e (patch)
tree21ad6b96b84820cbdc87cf33984fc6a4aa4c4bf5
parent4f9e3f4073a346f95612a7243d47f0411b997c8d (diff)
lint & upgradev1.0.2
-rw-r--r--lib/gtop.js6
-rw-r--r--lib/monitor/cpu.js21
-rw-r--r--lib/monitor/disk.js20
-rw-r--r--lib/monitor/index.js4
-rw-r--r--lib/monitor/mem.js49
-rw-r--r--lib/monitor/net.js11
-rw-r--r--lib/monitor/proc.js35
-rw-r--r--lib/utils.js17
-rw-r--r--package-lock.json370
-rw-r--r--package.json12
10 files changed, 96 insertions, 449 deletions
diff --git a/lib/gtop.js b/lib/gtop.js
index e19b875..57fb76f 100644
--- a/lib/gtop.js
+++ b/lib/gtop.js
@@ -69,7 +69,7 @@ var procTable = grid.set(8, 6, 4, 6, contrib.table, {
procTable.focus()
screen.render();
-screen.on('resize', function(a) {
+screen.on('resize', function (a) {
cpuLine.emit('attach');
memLine.emit('attach');
memDonut.emit('attach');
@@ -79,7 +79,7 @@ screen.on('resize', function(a) {
procTable.emit('attach');
});
-screen.key(['escape', 'q', 'C-c'], function(ch, key) {
+screen.key(['escape', 'q', 'C-c'], function (ch, key) {
return process.exit(0);
});
@@ -92,7 +92,7 @@ function init() {
}
-process.on('uncaughtException', function(err) {
+process.on('uncaughtException', function (err) {
// avoid exiting due to unsupported system resources in Windows
});
diff --git a/lib/monitor/cpu.js b/lib/monitor/cpu.js
index cc446a8..bae62e8 100644
--- a/lib/monitor/cpu.js
+++ b/lib/monitor/cpu.js
@@ -10,17 +10,19 @@ function Cpu(line) {
return {
title: 'CPU' + (i + 1),
style: {
- line: colors[i % colors.length]
+ line: colors[i % colors.length],
},
- x: Array(61).fill().map((_, i) => 60 - i),
- y: Array(61).fill(0)
- }
- })
+ x: Array(61)
+ .fill()
+ .map((_, i) => 60 - i),
+ y: Array(61).fill(0),
+ };
+ });
this.updateData(data);
this.interval = setInterval(() => {
si.currentLoad(data => {
this.updateData(data);
- })
+ });
}, 1000);
});
}
@@ -31,16 +33,15 @@ Cpu.prototype.updateData = function(data) {
while (loadString.length < 6) {
loadString = ' ' + loadString;
}
- loadString = loadString + '\%';
+ loadString = loadString + '%';
this.cpuData[i].title = 'CPU' + (i + 1) + loadString;
this.cpuData[i].y.shift();
this.cpuData[i].y.push(cpu.load);
- })
+ });
this.line.setData(this.cpuData);
this.line.screen.render();
-}
-
+};
module.exports = Cpu;
diff --git a/lib/monitor/disk.js b/lib/monitor/disk.js
index fa2cbf5..0aff147 100644
--- a/lib/monitor/disk.js
+++ b/lib/monitor/disk.js
@@ -8,28 +8,30 @@ function Disk(donut) {
si.fsSize(data => {
this.updateData(data);
- })
+ });
this.interval = setInterval(() => {
si.fsSize(data => {
this.updateData(data);
- })
+ });
}, 10000);
}
Disk.prototype.updateData = function(data) {
-
var disk = data[0];
- var label = utils.humanFileSize(disk.used, true) +
+ var label =
+ utils.humanFileSize(disk.used, true) +
' of ' +
utils.humanFileSize(disk.size, true);
- this.donut.setData([{
- percent: disk.use / 100,
- label: label,
- 'color': colors[5]
- }, ]);
+ this.donut.setData([
+ {
+ percent: disk.use / 100,
+ label: label,
+ color: colors[5],
+ },
+ ]);
this.donut.screen.render();
};
diff --git a/lib/monitor/index.js b/lib/monitor/index.js
index 945fd3a..89967f3 100644
--- a/lib/monitor/index.js
+++ b/lib/monitor/index.js
@@ -3,5 +3,5 @@ module.exports = {
Mem: require('./mem'),
Net: require('./net'),
Disk: require('./disk'),
- Proc: require('./proc')
-}
+ Proc: require('./proc'),
+};
diff --git a/lib/monitor/mem.js b/lib/monitor/mem.js
index b4ba966..88234b8 100644
--- a/lib/monitor/mem.js
+++ b/lib/monitor/mem.js
@@ -8,36 +8,39 @@ function Mem(line, memDonut, swapDonut) {
this.memDonut = memDonut;
this.swapDonut = swapDonut;
-
si.mem(data => {
- this.memData = [{
+ this.memData = [
+ {
title: 'Memory',
style: {
- line: colors[0]
+ line: colors[0],
},
- x: Array(61).fill().map((_, i) => 60 - i),
- y: Array(61).fill(0)
+ x: Array(61)
+ .fill()
+ .map((_, i) => 60 - i),
+ y: Array(61).fill(0),
},
{
title: 'Swap',
style: {
- line: colors[1]
+ line: colors[1],
},
- x: Array(61).fill().map((_, i) => 60 - i),
- y: Array(61).fill(0)
- }
+ x: Array(61)
+ .fill()
+ .map((_, i) => 60 - i),
+ y: Array(61).fill(0),
+ },
];
this.updateData(data);
this.interval = setInterval(() => {
si.mem(data => {
this.updateData(data);
- })
+ });
}, 1000);
});
}
Mem.prototype.updateData = function(data) {
-
var memPer = (100 * (1 - data.available / data.total)).toFixed();
var swapPer = (100 * (1 - data.swapfree / data.swaptotal)).toFixed();
@@ -60,16 +63,20 @@ Mem.prototype.updateData = function(data) {
utils.humanFileSize(data.swaptotal);
this.line.setData(this.memData);
- this.memDonut.setData([{
- percent: memPer / 100,
- label: memTitle,
- 'color': colors[0]
- }, ]);
- this.swapDonut.setData([{
- percent: swapPer / 100,
- label: swapTitle,
- 'color': colors[1]
- }, ]);
+ this.memDonut.setData([
+ {
+ percent: memPer / 100,
+ label: memTitle,
+ color: colors[0],
+ },
+ ]);
+ this.swapDonut.setData([
+ {
+ percent: swapPer / 100,
+ label: swapTitle,
+ color: colors[1],
+ },
+ ]);
this.line.screen.render();
};
diff --git a/lib/monitor/net.js b/lib/monitor/net.js
index 9fd0d47..474e11c 100644
--- a/lib/monitor/net.js
+++ b/lib/monitor/net.js
@@ -13,14 +13,13 @@ function Net(sparkline) {
si.networkStats(iface, data => {
that.updateData(data[0]);
});
- }
+ };
updater();
this.interval = setInterval(updater, 1000);
- })
+ });
}
Net.prototype.updateData = function(data) {
-
var rx_sec = Math.max(0, data['rx_sec']);
var tx_sec = Math.max(0, data['tx_sec']);
@@ -30,12 +29,14 @@ Net.prototype.updateData = function(data) {
this.netData[1].shift();
this.netData[1].push(tx_sec);
- rx_label = 'Receiving: ' +
+ rx_label =
+ 'Receiving: ' +
utils.humanFileSize(rx_sec) +
'/s \nTotal received: ' +
utils.humanFileSize(data['rx_bytes']);
- tx_label = 'Transferring: ' +
+ tx_label =
+ 'Transferring: ' +
utils.humanFileSize(tx_sec) +
'/s \nTotal transferred: ' +
utils.humanFileSize(data['tx_bytes']);
diff --git a/lib/monitor/proc.js b/lib/monitor/proc.js
index 921cf4c..7993df0 100644
--- a/lib/monitor/proc.js
+++ b/lib/monitor/proc.js
@@ -6,8 +6,8 @@ var colors = utils.colors;
var pars = {
p: 'pid',
c: 'pcpu',
- m: 'pmem'
-}
+ m: 'pmem',
+};
function Proc(table) {
this.table = table;
@@ -21,14 +21,12 @@ function Proc(table) {
var updater = function() {
si.processes(data => {
that.updateData(data);
- })
- }
+ });
+ };
updater();
this.interval = setInterval(updater, 3000);
this.table.screen.key(['m', 'c', 'p'], function(ch, key) {
-
if (pars[ch] == that.pSort) {
-
that.reverse = !that.reverse;
} else {
that.pSort = pars[ch] || that.pSort;
@@ -37,7 +35,6 @@ function Proc(table) {
that.reIndex = true;
updater();
});
-
}
Proc.prototype.updateData = function(data) {
@@ -52,24 +49,24 @@ Proc.prototype.updateData = function(data) {
p.pid,
p.command, //.slice(0,10),
' ' + p.pcpu.toFixed(1),
- p.pmem.toFixed(1)
- ]
-
- })
+ p.pmem.toFixed(1),
+ ];
+ });
var headers = ['PID', 'Command', '%CPU', '%MEM'];
- headers[{
- pid: 0,
- pcpu: 2,
- pmem: 3
- }[this.pSort]] += this.reverse ? '▲' : '▼';
-
+ headers[
+ {
+ pid: 0,
+ pcpu: 2,
+ pmem: 3,
+ }[this.pSort]
+ ] += this.reverse ? '▲' : '▼';
this.table.setData({
headers: headers,
- data: this.reverse ? data.reverse() : data
- })
+ data: this.reverse ? data.reverse() : data,
+ });
if (this.reIndex) {
this.table.rows.select(0);
diff --git a/lib/utils.js b/lib/utils.js
index 843ff08..228aadb 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -1,16 +1,21 @@
-var utils = {}
-
+var utils = {};
utils.humanFileSize = function(bytes, isDecimal) {
- isDecimal = (typeof isDecimal !== 'undefined') ? isDecimal : false;
+ isDecimal = typeof isDecimal !== "undefined" ? isDecimal : false;
if (bytes == 0) {
return "0.00 B";
}
var base = isDecimal ? 1000 : 1024;
var e = Math.floor(Math.log(bytes) / Math.log(base));
- return (bytes / Math.pow(base, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + (isDecimal || e == 0 ? '' : 'i') + 'B';
-}
+ return (
+ (bytes / Math.pow(base, e)).toFixed(2) +
+ " " +
+ " KMGTP".charAt(e) +
+ (isDecimal || e == 0 ? "" : "i") +
+ "B"
+ );
+};
-utils.colors = ['magenta', 'cyan', 'blue', 'yellow', 'green', 'red'];
+utils.colors = ["magenta", "cyan", "blue", "yellow", "green", "red"];
module.exports = utils;
diff --git a/package-lock.json b/package-lock.json
deleted file mode 100644
index 3c9ee2f..0000000
--- a/package-lock.json
+++ /dev/null
@@ -1,370 +0,0 @@
-{
- "name": "gtop",
- "version": "1.0.1",
- "lockfileVersion": 1,
- "requires": true,
- "dependencies": {
- "abbrev": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
- },
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
- },
- "ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
- },
- "ansi-term": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/ansi-term/-/ansi-term-0.0.2.tgz",
- "integrity": "sha1-/XU++kvq2g6smZgbxSo/b/AZ3rc=",
- "requires": {
- "x256": ">=0.0.1"
- }
- },
- "ansicolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.2.1.tgz",
- "integrity": "sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8="
- },
- "blessed": {
- "version": "0.1.81",
- "resolved": "https://registry.npmjs.org/blessed/-/blessed-0.1.81.tgz",
- "integrity": "sha1-+WLWh+wsNpVwrnGvhDJW5tDKESk="
- },
- "blessed-contrib": {
- "version": "4.8.16",
- "resolved": "https://registry.npmjs.org/blessed-contrib/-/blessed-contrib-4.8.16.tgz",
- "integrity": "sha512-B1fEJTR+8IsimEvYQbvXCvnV0L674rFxy9yMwqibiRO2nxa5fzwnoKhJjRJFCBYH27ztW+b6jKvnOvetnj30WA==",
- "requires": {
- "ansi-term": ">=0.0.2",
- "chalk": "^1.1.0",
- "drawille-canvas-blessed-contrib": ">=0.1.3",
- "lodash": "~>=4.17.11",
- "map-canvas": ">=0.1.5",
- "marked": "^0.6.2",
- "marked-terminal": "^1.5.0",
- "memory-streams": "^0.1.0",
- "memorystream": "^0.3.1",
- "picture-tuber": "^1.0.1",
- "sparkline": "^0.1.1",
- "strip-ansi": "^3.0.0",
- "term-canvas": "0.0.5",
- "x256": ">=0.0.1"
- }
- },
- "bresenham": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/bresenham/-/bresenham-0.0.3.tgz",
- "integrity": "sha1-q9q55bGU4nx1fNMU2ERDFPKZh3o="
- },
- "buffers": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz",
- "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s="
- },
- "cardinal": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-1.0.0.tgz",
- "integrity": "sha1-UOIcGwqjdyn5N33vGWtanOyTLuk=",
- "requires": {
- "ansicolors": "~0.2.1",
- "redeyed": "~1.0.0"
- }
- },
- "chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "requires": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- }
- },
- "charm": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/charm/-/charm-0.1.2.tgz",
- "integrity": "sha1-BsIe7RobBq62dVPNxT4jJ0usIpY="
- },
- "cli-table": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz",
- "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=",
- "requires": {
- "colors": "1.0.3"
- }
- },
- "colors": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
- "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs="
- },
- "core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
- },
- "drawille-blessed-contrib": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/drawille-blessed-contrib/-/drawille-blessed-contrib-1.0.0.tgz",
- "integrity": "sha1-FcJ5NPV6AFatE1luFWFje8lB8Lc="
- },
- "drawille-canvas-blessed-contrib": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/drawille-canvas-blessed-contrib/-/drawille-canvas-blessed-contrib-0.1.3.tgz",
- "integrity": "sha1-IS8HinIr/S7MJn6oarbd3BCB/Ug=",
- "requires": {
- "ansi-term": ">=0.0.2",
- "bresenham": "0.0.3",
- "drawille-blessed-contrib": ">=0.0.1",
- "gl-matrix": "^2.1.0",
- "x256": ">=0.0.1"
- }
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
- },
- "esprima": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.0.0.tgz",
- "integrity": "sha1-U88kes2ncxPlUcOqLnM0LT+099k="
- },
- "event-stream": {
- "version": "0.9.8",
- "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-0.9.8.tgz",
- "integrity": "sha1-XanPPHkAl1mJ21powo5bPJjr4Do=",
- "requires": {
- "optimist": "0.2"
- },
- "dependencies": {
- "optimist": {
- "version": "0.2.8",
- "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.2.8.tgz",
- "integrity": "sha1-6YGrfiaLRXlIWTtVZ0wJmoFcrDE=",
- "requires": {
- "wordwrap": ">=0.0.1 <0.1.0"
- }
- }
- }
- },
- "gl-matrix": {
- "version": "2.8.1",
- "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-2.8.1.tgz",
- "integrity": "sha512-0YCjVpE3pS5XWlN3J4X7AiAx65+nqAI54LndtVFnQZB6G/FVLkZH8y8V6R3cIoOQR4pUdfwQGd1iwyoXHJ4Qfw=="
- },
- "has-ansi": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "here": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/here/-/here-0.0.2.tgz",
- "integrity": "sha1-acGvPwISHz2HiOAuhNyLOQXXEZU="
- },
- "inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
- },
- "isarray": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
- },
- "lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
- },
- "lodash.assign": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
- "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc="
- },
- "lodash.toarray": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz",
- "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE="
- },
- "map-canvas": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/map-canvas/-/map-canvas-0.1.5.tgz",
- "integrity": "sha1-i+a63gvz6fmotW6INqHR0TPKsYY=",
- "requires": {
- "drawille-canvas-blessed-contrib": ">=0.0.1",
- "xml2js": "^0.4.5"
- }
- },
- "marked": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.3.tgz",
- "integrity": "sha512-Fqa7eq+UaxfMriqzYLayfqAE40WN03jf+zHjT18/uXNuzjq3TY0XTbrAoPeqSJrAmPz11VuUA+kBPYOhHt9oOQ=="
- },
- "marked-terminal": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-1.7.0.tgz",
- "integrity": "sha1-yMRgiBx3LHYEtkNnAH7l938SWQQ=",
- "requires": {
- "cardinal": "^1.0.0",
- "chalk": "^1.1.3",
- "cli-table": "^0.3.1",
- "lodash.assign": "^4.2.0",
- "node-emoji": "^1.4.1"
- }
- },
- "memory-streams": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.3.tgz",
- "integrity": "sha512-qVQ/CjkMyMInPaaRMrwWNDvf6boRZXaT/DbQeMYcCWuXPEBf1v8qChOc9OlEVQp2uOvRXa1Qu30fLmKhY6NipA==",
- "requires": {
- "readable-stream": "~1.0.2"
- }
- },
- "memorystream": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
- "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI="
- },
- "node-emoji": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.10.0.tgz",
- "integrity": "sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw==",
- "requires": {
- "lodash.toarray": "^4.4.0"
- }
- },
- "nopt": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-2.1.2.tgz",
- "integrity": "sha1-bMzZd7gBMqB3MdbozljCyDA8+a8=",
- "requires": {
- "abbrev": "1"
- }
- },
- "optimist": {
- "version": "0.3.7",
- "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz",
- "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=",
- "requires": {
- "wordwrap": "~0.0.2"
- }
- },
- "picture-tuber": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/picture-tuber/-/picture-tuber-1.0.2.tgz",
- "integrity": "sha512-49/xq+wzbwDeI32aPvwQJldM8pr7dKDRuR76IjztrkmiCkAQDaWFJzkmfVqCHmt/iFoPFhHmI9L0oKhthrTOQw==",
- "requires": {
- "buffers": "~0.1.1",
- "charm": "~0.1.0",
- "event-stream": "~0.9.8",
- "optimist": "~0.3.4",
- "png-js": "~0.1.0",
- "x256": "~0.0.1"
- }
- },
- "png-js": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/png-js/-/png-js-0.1.1.tgz",
- "integrity": "sha1-HMfCEjA6yr50Jj7DrHgAlYAkLZM="
- },
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
- }
- },
- "redeyed": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-1.0.1.tgz",
- "integrity": "sha1-6WwZO0DAgWsArshCaY5hGF5VSYo=",
- "requires": {
- "esprima": "~3.0.0"
- }
- },
- "sax": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
- "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
- },
- "sparkline": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/sparkline/-/sparkline-0.1.2.tgz",
- "integrity": "sha1-w73kYlKxNU5xDEsgDVSBa9nwejI=",
- "requires": {
- "here": "0.0.2",
- "nopt": "~2.1.2"
- }
- },
- "string_decoder": {
- "version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
- },
- "systeminformation": {
- "version": "4.14.4",
- "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-4.14.4.tgz",
- "integrity": "sha512-ib2dodksiiaGOW4rcKvFr5naHkODI9GwQPugLb6FLKppkIsE7rj2dfY2UdMBr7oX0/iZP981hoxmbk2e6zl99Q=="
- },
- "term-canvas": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/term-canvas/-/term-canvas-0.0.5.tgz",
- "integrity": "sha1-WXr6wvpjaabxeGC86cX2bW6gypY="
- },
- "wordwrap": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
- "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc="
- },
- "x256": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/x256/-/x256-0.0.2.tgz",
- "integrity": "sha1-ya8Yh296F1gB1WT+cK2egxd4STQ="
- },
- "xml2js": {
- "version": "0.4.19",
- "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
- "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
- "requires": {
- "sax": ">=0.6.0",
- "xmlbuilder": "~9.0.1"
- }
- },
- "xmlbuilder": {
- "version": "9.0.7",
- "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
- "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
- }
- }
-}
diff --git a/package.json b/package.json
index 9d82d60..2cc47aa 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "gtop",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "graphic top",
"main": "./index.js",
"bin": {
@@ -8,7 +8,8 @@
},
"scripts": {
"test": "echo \"Test will be implemented.\" && exit 0",
- "start": "./bin/gtop"
+ "start": "./bin/gtop",
+ "lint": "prettier --single-quote --trailing-comma es5 --write lib/**/*"
},
"repository": {
"type": "git",
@@ -31,10 +32,13 @@
"homepage": "https://github.com/aksakalli/gtop#readme",
"dependencies": {
"blessed": "^0.1.81",
- "blessed-contrib": "^4.8.16",
- "systeminformation": "^4.14.4"
+ "blessed-contrib": "^4.8.17",
+ "systeminformation": "^4.22.1"
},
"engines": {
"node": ">=4.0.0"
+ },
+ "devDependencies": {
+ "prettier": "1.19.1"
}
}