systeminformation 5.21.5 → 5.21.6

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.
Files changed (2) hide show
  1. package/lib/system.js +6 -8
  2. package/package.json +1 -1
package/lib/system.js CHANGED
@@ -318,10 +318,11 @@ function system(callback) {
318
318
  exports.system = system;
319
319
 
320
320
  function cleanDefaults(s) {
321
- if (s === 'Default string') { s = ''; }
322
- if (s.toLowerCase().indexOf('o.e.m.') !== -1) { s = ''; }
323
-
324
- return s
321
+ const cmpStr = s.toLowerCase();
322
+ if (cmpStr.indexOf('o.e.m.') === -1 && cmpStr.indexOf('default string') === -1 && cmpStr !== 'default') {
323
+ return s || '';
324
+ }
325
+ return '';
325
326
  }
326
327
  function bios(callback) {
327
328
 
@@ -561,7 +562,7 @@ function baseboard(callback) {
561
562
  const workload = [];
562
563
  const win10plus = parseInt(os.release()) >= 10;
563
564
  const maxCapacityAttribute = win10plus ? 'MaxCapacityEx' : 'MaxCapacity';
564
- workload.push(util.powerShell('Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU,SMBIOSAssetTag | fl'));
565
+ workload.push(util.powerShell('Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU | fl'));
565
566
  workload.push(util.powerShell(`Get-CimInstance Win32_physicalmemoryarray | select ${maxCapacityAttribute}, MemoryDevices | fl`));
566
567
  util.promiseAll(
567
568
  workload
@@ -579,9 +580,6 @@ function baseboard(callback) {
579
580
  if (!result.assetTag) {
580
581
  result.assetTag = cleanDefaults(util.getValue(lines, 'sku', ':'));
581
582
  }
582
- if (!result.assetTag) {
583
- result.assetTag = cleanDefaults(util.getValue(lines, 'SMBIOSAssetTag', ':'));
584
- }
585
583
 
586
584
  // memphysical
587
585
  lines = data.results[1] ? data.results[1].toString().split('\r\n') : [''];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.21.5",
3
+ "version": "5.21.6",
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)",