systeminformation 5.14.3 → 5.14.4
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/index.d.ts +1 -1
- package/lib/internet.js +1 -1
- package/lib/osinfo.js +5 -3
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
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/osinfo.js
CHANGED
|
@@ -262,20 +262,22 @@ function osInfo(callback) {
|
|
|
262
262
|
}
|
|
263
263
|
if (_freebsd || _openbsd || _netbsd) {
|
|
264
264
|
|
|
265
|
-
exec('sysctl kern.ostype kern.osrelease kern.osrevision kern.hostuuid machdep.bootmethod', function (error, stdout) {
|
|
265
|
+
exec('sysctl kern.ostype kern.osrelease kern.osrevision kern.hostuuid machdep.bootmethod kern.geom.confxml', function (error, stdout) {
|
|
266
266
|
let lines = stdout.toString().split('\n');
|
|
267
267
|
const distro = util.getValue(lines, 'kern.ostype');
|
|
268
268
|
const logofile = util.getValue(lines, 'kern.ostype');
|
|
269
269
|
const release = util.getValue(lines, 'kern.osrelease').split('-')[0];
|
|
270
270
|
const serial = util.getValue(lines, 'kern.uuid');
|
|
271
|
-
const
|
|
271
|
+
const bootmethod = util.getValue(lines, 'machdep.bootmethod');
|
|
272
|
+
const uefiConf = stdout.toString().indexOf('<type>efi</type>') >= 0;
|
|
273
|
+
const uefi = bootmethod ? bootmethod.toLowerCase().indexOf('uefi') >= 0 : (uefiConf ? uefiConf : null);
|
|
272
274
|
result.distro = distro || result.distro;
|
|
273
275
|
result.logofile = logofile || result.logofile;
|
|
274
276
|
result.release = release || result.release;
|
|
275
277
|
result.serial = serial || result.serial;
|
|
276
278
|
result.codename = '';
|
|
277
279
|
result.codepage = util.getCodepage();
|
|
278
|
-
result.uefi = uefi ||
|
|
280
|
+
result.uefi = uefi || null;
|
|
279
281
|
if (callback) {
|
|
280
282
|
callback(result);
|
|
281
283
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.14.
|
|
3
|
+
"version": "5.14.4",
|
|
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)",
|