systeminformation 5.14.1 → 5.14.3
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 +3 -3
- package/lib/docker.js +1 -1
- package/lib/graphics.js +6 -3
- package/lib/internet.js +1 -1
- package/lib/network.js +0 -1
- package/lib/osinfo.js +13 -10
- package/lib/system.js +0 -2
- package/lib/users.js +0 -1
- package/lib/util.js +0 -1
- package/package.json +1 -1
package/lib/cpu.js
CHANGED
|
@@ -525,11 +525,11 @@ function getSocketTypesByName(str) {
|
|
|
525
525
|
let result = '';
|
|
526
526
|
for (const key in socketTypesByName) {
|
|
527
527
|
const names = socketTypesByName[key].split(' ');
|
|
528
|
-
|
|
529
|
-
if (str.indexOf(
|
|
528
|
+
names.forEach(element => {
|
|
529
|
+
if (str.indexOf(element) >= 0) {
|
|
530
530
|
result = key;
|
|
531
531
|
}
|
|
532
|
-
}
|
|
532
|
+
});
|
|
533
533
|
}
|
|
534
534
|
return result;
|
|
535
535
|
}
|
package/lib/docker.js
CHANGED
|
@@ -458,7 +458,7 @@ function dockerContainerStats(containerIDs, callback) {
|
|
|
458
458
|
containerIDsSanitized = '';
|
|
459
459
|
const s = (util.isPrototypePolluted() ? '' : util.sanitizeShellString(containerIDs, true)).trim();
|
|
460
460
|
for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
|
|
461
|
-
if (
|
|
461
|
+
if (s[i] !== undefined) {
|
|
462
462
|
s[i].__proto__.toLowerCase = util.stringToLower;
|
|
463
463
|
const sl = s[i].toLowerCase();
|
|
464
464
|
if (sl && sl[0] && !sl[1]) {
|
package/lib/graphics.js
CHANGED
|
@@ -864,10 +864,13 @@ function graphics(callback) {
|
|
|
864
864
|
if (_pixelDepth) {
|
|
865
865
|
result.displays[0].pixelDepth = _pixelDepth;
|
|
866
866
|
}
|
|
867
|
-
if (_refreshRate && !result.displays[0].currentRefreshRate) {
|
|
868
|
-
result.displays[0].currentRefreshRate = _refreshRate;
|
|
869
|
-
}
|
|
870
867
|
}
|
|
868
|
+
result.displays = result.displays.map(element => {
|
|
869
|
+
if (_refreshRate && !element.currentRefreshRate) {
|
|
870
|
+
element.currentRefreshRate = _refreshRate;
|
|
871
|
+
}
|
|
872
|
+
return element;
|
|
873
|
+
});
|
|
871
874
|
|
|
872
875
|
if (callback) {
|
|
873
876
|
callback(result);
|
package/lib/internet.js
CHANGED
|
@@ -46,7 +46,7 @@ function inetChecksite(url, callback) {
|
|
|
46
46
|
let urlSanitized = '';
|
|
47
47
|
const s = util.sanitizeShellString(url, true);
|
|
48
48
|
for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
|
|
49
|
-
if (!
|
|
49
|
+
if (!s[i] !== undefined) {
|
|
50
50
|
s[i].__proto__.toLowerCase = util.stringToLower;
|
|
51
51
|
const sl = s[i].toLowerCase();
|
|
52
52
|
if (sl && sl[0] && !sl[1] && sl[0].length === 1) {
|
package/lib/network.js
CHANGED
package/lib/osinfo.js
CHANGED
|
@@ -263,16 +263,19 @@ function osInfo(callback) {
|
|
|
263
263
|
if (_freebsd || _openbsd || _netbsd) {
|
|
264
264
|
|
|
265
265
|
exec('sysctl kern.ostype kern.osrelease kern.osrevision kern.hostuuid machdep.bootmethod', function (error, stdout) {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
266
|
+
let lines = stdout.toString().split('\n');
|
|
267
|
+
const distro = util.getValue(lines, 'kern.ostype');
|
|
268
|
+
const logofile = util.getValue(lines, 'kern.ostype');
|
|
269
|
+
const release = util.getValue(lines, 'kern.osrelease').split('-')[0];
|
|
270
|
+
const serial = util.getValue(lines, 'kern.uuid');
|
|
271
|
+
const uefi = util.getValue(lines, 'machdep.bootmethod').toLowerCase().indexOf('uefi') >= 0;
|
|
272
|
+
result.distro = distro || result.distro;
|
|
273
|
+
result.logofile = logofile || result.logofile;
|
|
274
|
+
result.release = release || result.release;
|
|
275
|
+
result.serial = serial || result.serial;
|
|
276
|
+
result.codename = '';
|
|
277
|
+
result.codepage = util.getCodepage();
|
|
278
|
+
result.uefi = uefi || result.uefi;
|
|
276
279
|
if (callback) {
|
|
277
280
|
callback(result);
|
|
278
281
|
}
|
package/lib/system.js
CHANGED
|
@@ -47,7 +47,6 @@ function system(callback) {
|
|
|
47
47
|
|
|
48
48
|
if (_linux || _freebsd || _openbsd || _netbsd) {
|
|
49
49
|
exec('export LC_ALL=C; dmidecode -t system 2>/dev/null; unset LC_ALL', function (error, stdout) {
|
|
50
|
-
// if (!error) {
|
|
51
50
|
let lines = stdout.toString().split('\n');
|
|
52
51
|
result.manufacturer = util.getValue(lines, 'manufacturer');
|
|
53
52
|
result.model = util.getValue(lines, 'product name');
|
|
@@ -55,7 +54,6 @@ function system(callback) {
|
|
|
55
54
|
result.serial = util.getValue(lines, 'serial number');
|
|
56
55
|
result.uuid = util.getValue(lines, 'uuid').toLowerCase();
|
|
57
56
|
result.sku = util.getValue(lines, 'sku number');
|
|
58
|
-
// }
|
|
59
57
|
// Non-Root values
|
|
60
58
|
const cmd = `echo -n "product_name: "; cat /sys/devices/virtual/dmi/id/product_name 2>/dev/null; echo;
|
|
61
59
|
echo -n "product_serial: "; cat /sys/devices/virtual/dmi/id/product_serial 2>/dev/null; echo;
|
package/lib/users.js
CHANGED
|
@@ -350,7 +350,6 @@ function parseWinUsersQuery(lines) {
|
|
|
350
350
|
if (lines[i].trim()) {
|
|
351
351
|
const user = lines[i].substring(headerDelimiter[0] + 1, headerDelimiter[1]).trim() || '';
|
|
352
352
|
const tty = lines[i].substring(headerDelimiter[1] + 1, headerDelimiter[2] - 2).trim() || '';
|
|
353
|
-
// const dateTime = util.parseDateTime(lines[i].substring(headerDelimiter[5] + 1, 2000).trim(), culture) || '';
|
|
354
353
|
result.push({
|
|
355
354
|
user: user,
|
|
356
355
|
tty: tty,
|
package/lib/util.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.14.
|
|
3
|
+
"version": "5.14.3",
|
|
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)",
|