systeminformation 5.22.11 → 5.23.1

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 (3) hide show
  1. package/README.md +3 -3
  2. package/lib/usb.js +9 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -29,7 +29,7 @@
29
29
  [![MIT license][license-img]][license-url]
30
30
 
31
31
  ## The Systeminformation Project
32
- This is amazing. Started as a small project just for myself, it now has > 15,000 lines of code, > 600 versions published, up to 8 mio downloads per month, > 220 mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who contributed to this project!
32
+ This is amazing. Started as a small project just for myself, it now has > 15,000 lines of code, > 600 versions published, up to 8 mio downloads per month, > 300 mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who contributed to this project!
33
33
 
34
34
  ## Please support this project ... ☕️
35
35
 
@@ -475,7 +475,7 @@ Full function reference with examples can be found at [https://systeminformation
475
475
  | | [0].sectorsPerTrack | | | | X | | sectors per track |
476
476
  | | [0].firmwareRevision | X | | X | X | | firmware revision |
477
477
  | | [0].serialNum | X | | X | X | | serial number |
478
- | | [0].interfaceType | X | | | X | | SATA, PCIe, ... |
478
+ | | [0].interfaceType | X | | X | X | | SATA, PCIe, ... |
479
479
  | | [0].smartStatus | X | | X | X | | S.M.A.R.T Status (see Known Issues) |
480
480
  | | [0].temperature | X | | | | | S.M.A.R.T temperature |
481
481
  | | [0].smartData | X | | | X | | full S.M.A.R.T data from smartctl<br>requires at least smartmontools 7.0 |
@@ -545,7 +545,7 @@ Full function reference with examples can be found at [https://systeminformation
545
545
  | | [0].manufacturer | X | | X | X | | manufacturer |
546
546
  | | [0].maxPower | X | | | | | max power |
547
547
  | | [0].default | X | | X | X | | is default printer |
548
- | | [0].serialNumber | | | X | | | serial number |
548
+ | | [0].serialNumber | X | | X | | | serial number |
549
549
 
550
550
  #### 11. Printer
551
551
 
package/lib/usb.js CHANGED
@@ -35,7 +35,7 @@ function getLinuxUsbType(type, name) {
35
35
  else if (str.indexOf('keyboard') >= 0) { result = 'Keyboard'; }
36
36
  else if (str.indexOf('mouse') >= 0) { result = 'Mouse'; }
37
37
  else if (str.indexOf('stora') >= 0) { result = 'Storage'; }
38
- else if (str.indexOf('mic') >= 0) { result = 'Microphone'; }
38
+ else if (str.indexOf('microp') >= 0) { result = 'Microphone'; }
39
39
  else if (str.indexOf('headset') >= 0) { result = 'Audio'; }
40
40
  else if (str.indexOf('audio') >= 0) { result = 'Audio'; }
41
41
 
@@ -77,6 +77,11 @@ function parseLinuxUsb(usb) {
77
77
  iManufacturerParts.shift();
78
78
  const manufacturer = iManufacturerParts.join(' ');
79
79
 
80
+ const iSerial = util.getValue(lines, 'iSerial', ' ', true).trim();
81
+ let iSerialParts = iSerial.split(' ');
82
+ iSerialParts.shift();
83
+ const serial = iSerialParts.join(' ');
84
+
80
85
  result.id = (idVendor.startsWith('0x') ? idVendor.split(' ')[0].substr(2, 10) : '') + ':' + (idProduct.startsWith('0x') ? idProduct.split(' ')[0].substr(2, 10) : '');
81
86
  result.name = product;
82
87
  result.type = getLinuxUsbType(usbType, product);
@@ -84,7 +89,7 @@ function parseLinuxUsb(usb) {
84
89
  result.vendor = vendor;
85
90
  result.manufacturer = manufacturer;
86
91
  result.maxPower = util.getValue(lines, 'MaxPower', ' ', true);
87
- result.serialNumber = null;
92
+ result.serialNumber = serial;
88
93
 
89
94
  return result;
90
95
  }
@@ -104,7 +109,7 @@ function getDarwinUsbType(name) {
104
109
  else if (name.indexOf('usbhub') >= 0) { result = 'Hub'; }
105
110
  else if (name.indexOf(' hub') >= 0) { result = 'Hub'; }
106
111
  else if (name.indexOf('mouse') >= 0) { result = 'Mouse'; }
107
- else if (name.indexOf('mic') >= 0) { result = 'Microphone'; }
112
+ else if (name.indexOf('microp') >= 0) { result = 'Microphone'; }
108
113
  else if (name.indexOf('removable') >= 0) { result = 'Storage'; }
109
114
  return result;
110
115
  }
@@ -177,6 +182,7 @@ function getWindowsUsbTypeCreation(creationclass, name) {
177
182
  else if (creationclass.indexOf('usbcontroller') >= 0) { result = 'Controller'; }
178
183
  else if (creationclass.indexOf('keyboard') >= 0) { result = 'Keyboard'; }
179
184
  else if (creationclass.indexOf('pointing') >= 0) { result = 'Mouse'; }
185
+ else if (creationclass.indexOf('microp') >= 0) { result = 'Microphone'; }
180
186
  else if (creationclass.indexOf('disk') >= 0) { result = 'Storage'; }
181
187
  return result;
182
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.22.11",
3
+ "version": "5.23.1",
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)",