systeminformation 5.14.0 → 5.14.2
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/memory.js +6 -2
- package/lib/osinfo.js +13 -10
- package/package.json +1 -1
package/lib/memory.js
CHANGED
|
@@ -323,12 +323,16 @@ function memLayout(callback) {
|
|
|
323
323
|
let lines = device.split('\n');
|
|
324
324
|
const sizeString = util.getValue(lines, 'Size');
|
|
325
325
|
const size = sizeString.indexOf('GB') >= 0 ? parseInt(sizeString, 10) * 1024 * 1024 * 1024 : parseInt(sizeString, 10) * 1024 * 1024;
|
|
326
|
+
let bank = util.getValue(lines, 'Bank Locator');
|
|
327
|
+
if (bank.toLowerCase().indexOf('bad') >= 0) {
|
|
328
|
+
bank = '';
|
|
329
|
+
}
|
|
326
330
|
if (parseInt(util.getValue(lines, 'Size'), 10) > 0) {
|
|
327
331
|
const totalWidth = util.toInt(util.getValue(lines, 'Total Width'));
|
|
328
332
|
const dataWidth = util.toInt(util.getValue(lines, 'Data Width'));
|
|
329
333
|
result.push({
|
|
330
334
|
size,
|
|
331
|
-
bank
|
|
335
|
+
bank,
|
|
332
336
|
type: util.getValue(lines, 'Type:'),
|
|
333
337
|
ecc: dataWidth && totalWidth ? totalWidth > dataWidth : false,
|
|
334
338
|
clockSpeed: (util.getValue(lines, 'Configured Clock Speed:') ? parseInt(util.getValue(lines, 'Configured Clock Speed:'), 10) : (util.getValue(lines, 'Speed:') ? parseInt(util.getValue(lines, 'Speed:'), 10) : null)),
|
|
@@ -343,7 +347,7 @@ function memLayout(callback) {
|
|
|
343
347
|
} else {
|
|
344
348
|
result.push({
|
|
345
349
|
size: 0,
|
|
346
|
-
bank
|
|
350
|
+
bank,
|
|
347
351
|
type: 'Empty',
|
|
348
352
|
ecc: null,
|
|
349
353
|
clockSpeed: 0,
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.14.
|
|
3
|
+
"version": "5.14.2",
|
|
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)",
|