systeminformation 5.21.23 → 5.21.25
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 +2 -2
- package/lib/osinfo.js +6 -2
- package/lib/wifi.js +5 -2
- package/package.json +1 -1
package/lib/cpu.js
CHANGED
|
@@ -766,8 +766,8 @@ function getCpu() {
|
|
|
766
766
|
|
|
767
767
|
const threadsPerCore = util.getValue(lines, 'thread(s) per core') || '1';
|
|
768
768
|
const processors = util.getValue(lines, 'socket(s)') || '1';
|
|
769
|
-
|
|
770
|
-
|
|
769
|
+
const threadsPerCoreInt = parseInt(threadsPerCore, 10); // threads per code (normally only for performance cores)
|
|
770
|
+
const processorsInt = parseInt(processors, 10) || 1; // number of sockets / processor units in machine (normally 1)
|
|
771
771
|
const coresPerSocket = parseInt(util.getValue(lines, 'core(s) per socket'), 10); // number of cores (e.g. 16 on i12900)
|
|
772
772
|
result.physicalCores = coresPerSocket ? coresPerSocket * processorsInt : result.cores / threadsPerCoreInt;
|
|
773
773
|
result.performanceCores = threadsPerCoreInt > 1 ? result.cores - result.physicalCores : result.cores;
|
package/lib/osinfo.js
CHANGED
|
@@ -243,14 +243,18 @@ function osInfo(callback) {
|
|
|
243
243
|
release[line.split('=')[0].trim().toUpperCase()] = line.split('=')[1].trim();
|
|
244
244
|
}
|
|
245
245
|
});
|
|
246
|
+
result.distro = (release.DISTRIB_ID || release.NAME || 'unknown').replace(/"/g, '');
|
|
247
|
+
result.logofile = getLogoFile(result.distro);
|
|
246
248
|
let releaseVersion = (release.VERSION || '').replace(/"/g, '');
|
|
247
249
|
let codename = (release.DISTRIB_CODENAME || release.VERSION_CODENAME || '').replace(/"/g, '');
|
|
250
|
+
const prettyName = (release.PRETTY_NAME || '').replace(/"/g, '');
|
|
251
|
+
if (prettyName.indexOf(result.distro + ' ') === 0) {
|
|
252
|
+
releaseVersion = prettyName.replace(result.distro + ' ', '').trim();
|
|
253
|
+
}
|
|
248
254
|
if (releaseVersion.indexOf('(') >= 0) {
|
|
249
255
|
codename = releaseVersion.split('(')[1].replace(/[()]/g, '').trim();
|
|
250
256
|
releaseVersion = releaseVersion.split('(')[0].trim();
|
|
251
257
|
}
|
|
252
|
-
result.distro = (release.DISTRIB_ID || release.NAME || 'unknown').replace(/"/g, '');
|
|
253
|
-
result.logofile = getLogoFile(result.distro);
|
|
254
258
|
result.release = (releaseVersion || release.DISTRIB_RELEASE || release.VERSION_ID || 'unknown').replace(/"/g, '');
|
|
255
259
|
result.codename = codename;
|
|
256
260
|
result.codepage = util.getCodepage();
|
package/lib/wifi.js
CHANGED
|
@@ -25,7 +25,10 @@ const _darwin = (_platform === 'darwin');
|
|
|
25
25
|
const _windows = (_platform === 'win32');
|
|
26
26
|
|
|
27
27
|
function wifiDBFromQuality(quality) {
|
|
28
|
-
|
|
28
|
+
const qual = parseFloat(quality);
|
|
29
|
+
if (qual < 0) { return 0; }
|
|
30
|
+
if (qual >= 100) { return -50; }
|
|
31
|
+
return (qual / 2 - 100);
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
function wifiQualityFromDB(db) {
|
|
@@ -658,7 +661,7 @@ function wifiConnections(callback) {
|
|
|
658
661
|
const id = lines[2].indexOf(':') >= 0 ? lines[2].split(':')[1].trim() : '';
|
|
659
662
|
const ssid = util.getValue(lines, 'SSID', ':', true);
|
|
660
663
|
const bssid = util.getValue(lines, 'BSSID', ':', true);
|
|
661
|
-
const signalLevel = util.getValue(lines, 'Signal', ':', true);
|
|
664
|
+
const signalLevel = wifiDBFromQuality(util.getValue(lines, 'Signal', ':', true));
|
|
662
665
|
const type = util.getValue(lines, 'Radio type', ':', true) || util.getValue(lines, 'Type de radio', ':', true) || util.getValue(lines, 'Funktyp', ':', true) || null;
|
|
663
666
|
const security = util.getValue(lines, 'authentication', ':', true) || util.getValue(lines, 'Authentification', ':', true) || util.getValue(lines, 'Authentifizierung', ':', true) || null;
|
|
664
667
|
const channel = util.getValue(lines, 'Channel', ':', true) || util.getValue(lines, 'Canal', ':', true) || util.getValue(lines, 'Kanal', ':', true) || null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.21.
|
|
3
|
+
"version": "5.21.25",
|
|
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)",
|