systeminformation 5.21.13 → 5.21.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cpu.js +1 -1
- package/lib/filesystem.js +1 -1
- package/lib/system.js +11 -9
- package/lib/util.js +4 -3
- package/lib/wifi.js +4 -1
- package/package.json +1 -1
package/lib/cpu.js
CHANGED
|
@@ -1604,7 +1604,7 @@ function getLoad() {
|
|
|
1604
1604
|
// linux: try to get other cpu stats
|
|
1605
1605
|
if (_linux) {
|
|
1606
1606
|
try {
|
|
1607
|
-
const lines = execSync('cat /proc/stat 2>/dev/null | grep cpu').split('\n');
|
|
1607
|
+
const lines = execSync('cat /proc/stat 2>/dev/null | grep cpu').toString().split('\n');
|
|
1608
1608
|
if (lines.length > 1) {
|
|
1609
1609
|
lines.shift();
|
|
1610
1610
|
if (lines.length === cpus.length) {
|
package/lib/filesystem.js
CHANGED
|
@@ -1406,7 +1406,7 @@ function diskLayout(callback) {
|
|
|
1406
1406
|
workload.push(util.powerShell('Get-PhysicalDisk | select BusType,MediaType,FriendlyName,Model,SerialNumber,Size | fl'));
|
|
1407
1407
|
if (util.smartMonToolsInstalled()) {
|
|
1408
1408
|
try {
|
|
1409
|
-
const smartDev = JSON.parse(execSync('smartctl --scan -j'));
|
|
1409
|
+
const smartDev = JSON.parse(execSync('smartctl --scan -j').toString());
|
|
1410
1410
|
if (smartDev && smartDev.devices && smartDev.devices.length > 0) {
|
|
1411
1411
|
smartDev.devices.forEach((dev) => {
|
|
1412
1412
|
workload.push(execPromiseSave(`smartctl -j -a ${dev.name}`, util.execOptsWin));
|
package/lib/system.js
CHANGED
|
@@ -507,15 +507,17 @@ function baseboard(callback) {
|
|
|
507
507
|
} catch (e) {
|
|
508
508
|
util.noop();
|
|
509
509
|
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
510
|
+
if (linesRpi) {
|
|
511
|
+
const hardware = util.getValue(linesRpi, 'hardware');
|
|
512
|
+
if (hardware.startsWith('BCM')) {
|
|
513
|
+
const rpi = util.decodePiCpuinfo(linesRpi);
|
|
514
|
+
result.manufacturer = rpi.manufacturer;
|
|
515
|
+
result.model = 'Raspberry Pi';
|
|
516
|
+
result.serial = rpi.serial;
|
|
517
|
+
result.version = rpi.type + ' - ' + rpi.revision;
|
|
518
|
+
result.memMax = os.totalmem();
|
|
519
|
+
result.memSlots = 0;
|
|
520
|
+
}
|
|
519
521
|
}
|
|
520
522
|
|
|
521
523
|
if (callback) { callback(result); }
|
package/lib/util.js
CHANGED
|
@@ -705,22 +705,23 @@ function sanitizeShellString(str, strict) {
|
|
|
705
705
|
s[i] === '$' ||
|
|
706
706
|
s[i] === ';' ||
|
|
707
707
|
s[i] === '&' ||
|
|
708
|
-
s[i] === '(' ||
|
|
709
|
-
s[i] === ')' ||
|
|
710
708
|
s[i] === ']' ||
|
|
711
709
|
s[i] === '#' ||
|
|
712
710
|
s[i] === '\\' ||
|
|
713
711
|
s[i] === '\t' ||
|
|
714
712
|
s[i] === '\n' ||
|
|
713
|
+
s[i] === '\r' ||
|
|
715
714
|
s[i] === '\'' ||
|
|
716
715
|
s[i] === '`' ||
|
|
717
716
|
s[i] === '"' ||
|
|
718
717
|
s[i].length > 1 ||
|
|
718
|
+
(strict && s[i] === '(') ||
|
|
719
|
+
(strict && s[i] === ')') ||
|
|
719
720
|
(strict && s[i] === '@') ||
|
|
720
721
|
(strict && s[i] === ' ') ||
|
|
721
722
|
(strict && s[i] == '{') ||
|
|
722
723
|
(strict && s[i] == ';') ||
|
|
723
|
-
(strict && s[i] == '
|
|
724
|
+
(strict && s[i] == '}'))) {
|
|
724
725
|
result = result + s[i];
|
|
725
726
|
}
|
|
726
727
|
}
|
package/lib/wifi.js
CHANGED
|
@@ -147,7 +147,7 @@ function ifaceListLinux() {
|
|
|
147
147
|
} catch (e) {
|
|
148
148
|
try {
|
|
149
149
|
const all = execSync('nmcli -t -f general,wifi-properties,wired-properties,interface-flags,capabilities,nsp device show 2>/dev/null').toString();
|
|
150
|
-
const parts = all.split('\
|
|
150
|
+
const parts = all.split('\n\n');
|
|
151
151
|
let i = 1;
|
|
152
152
|
parts.forEach(ifaceDetails => {
|
|
153
153
|
const lines = ifaceDetails.split('\n');
|
|
@@ -209,6 +209,9 @@ function nmiConnectionLinux(ssid) {
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
function wpaConnectionLinux(iface) {
|
|
212
|
+
if (!iface) {
|
|
213
|
+
return {};
|
|
214
|
+
}
|
|
212
215
|
const cmd = `wpa_cli -i ${iface} status 2>&1`;
|
|
213
216
|
try {
|
|
214
217
|
const lines = execSync(cmd).toString().split('\n');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.21.
|
|
3
|
+
"version": "5.21.15",
|
|
4
4
|
"description": "Advanced, lightweight system and OS information library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|