systeminformation
Advanced tools
Comparing version 5.25.1 to 5.25.2
@@ -184,3 +184,3 @@ 'use strict'; | ||
if (_darwin) { | ||
exec('ioreg -n AppleSmartBattery -r | egrep "CycleCount|IsCharging|DesignCapacity|MaxCapacity|CurrentCapacity|BatterySerialNumber|TimeRemaining|Voltage"; pmset -g batt | grep %', function (error, stdout) { | ||
exec('ioreg -n AppleSmartBattery -r | egrep "CycleCount|IsCharging|DesignCapacity|MaxCapacity|CurrentCapacity|DeviceName|BatterySerialNumber|Serial|TimeRemaining|Voltage"; pmset -g batt | grep %', function (error, stdout) { | ||
if (stdout) { | ||
@@ -195,3 +195,4 @@ let lines = stdout.toString().replace(/ +/g, '').replace(/"+/g, '').replace(/-/g, '').split('\n'); | ||
result.manufacturer = 'Apple'; | ||
result.serial = util.getValue(lines, 'BatterySerialNumber', '='); | ||
result.serial = util.getValue(lines, 'BatterySerialNumber', '=') || util.getValue(lines, 'Serial', '='); | ||
result.model = util.getValue(lines, 'DeviceName', '='); | ||
let percent = null; | ||
@@ -198,0 +199,0 @@ const line = util.getValue(lines, 'internal', 'Battery'); |
@@ -51,7 +51,7 @@ 'use strict'; | ||
let lines = stdout.toString().split('\n'); | ||
result.manufacturer = util.getValue(lines, 'manufacturer'); | ||
result.model = util.getValue(lines, 'product name'); | ||
result.manufacturer = cleanDefaults(util.getValue(lines, 'manufacturer')); | ||
result.model = cleanDefaults(util.getValue(lines, 'product name')); | ||
result.version = cleanDefaults(util.getValue(lines, 'version')); | ||
result.serial = cleanDefaults(util.getValue(lines, 'serial number')); | ||
result.uuid = cleanDefaults((util.getValue(lines, 'uuid').toLowerCase())); | ||
result.uuid = cleanDefaults((util.getValue(lines, 'uuid'))).toLowerCase(); | ||
result.sku = cleanDefaults(util.getValue(lines, 'sku number')); | ||
@@ -66,4 +66,4 @@ // Non-Root values | ||
lines = execSync(cmd, util.execOptsLinux).toString().split('\n'); | ||
result.manufacturer = result.manufacturer === '' ? util.getValue(lines, 'sys_vendor') : result.manufacturer; | ||
result.model = result.model === '' ? util.getValue(lines, 'product_name') : result.model; | ||
result.manufacturer = cleanDefaults(result.manufacturer === '' ? util.getValue(lines, 'sys_vendor') : result.manufacturer); | ||
result.model = cleanDefaults(result.model === '' ? util.getValue(lines, 'product_name') : result.model); | ||
result.version = cleanDefaults(result.version === '' ? util.getValue(lines, 'product_version') : result.version); | ||
@@ -70,0 +70,0 @@ result.serial = cleanDefaults(result.serial === '' ? util.getValue(lines, 'product_serial') : result.serial); |
{ | ||
"name": "systeminformation", | ||
"version": "5.25.1", | ||
"version": "5.25.2", | ||
"description": "Advanced, lightweight system and OS information library", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
817117
18375