systeminformation 4.34.19 → 4.34.23

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/CHANGELOG.md CHANGED
@@ -30,6 +30,10 @@ For major (breaking) changes - version 3 and 2 see end of page.
30
30
 
31
31
  | Version | Date | Comment |
32
32
  | -------------- | -------------- | -------- |
33
+ | 4.34.23 | 2021-05-05 | `networkInterfaces()` fixed Windows XP bug (WMIC NetEnabled) |
34
+ | 4.34.22 | 2021-05-05 | restored Node 4.x compatibility |
35
+ | 4.34.21 | 2021-05-04 | `dockerContainerInspect()`, `dockerContainerProcesses()` parameter validation fix |
36
+ | 4.34.20 | 2021-04-08 | `versions()` parameter validation |
33
37
  | 4.34.19 | 2021-03-16 | `inetLatency()` `ineChecksite()` schema validation |
34
38
  | 4.34.18 | 2021-03-16 | code refactoring |
35
39
  | 4.34.17 | 2021-03-15 | `sanitizeShellString()` and other security improvements |
package/README.md CHANGED
@@ -811,7 +811,7 @@ Sebastian Hildebrandt, [+innovations](http://www.plus-innovations.com)
811
811
 
812
812
  Written by Sebastian Hildebrandt [sebhildebrandt](https://github.com/sebhildebrandt)
813
813
 
814
- #### Contributers
814
+ #### Contributors
815
815
 
816
816
  - Guillaume Legrain [glegrain](https://github.com/glegrain)
817
817
  - Riccardo Novaglia [richy24](https://github.com/richy24)
package/lib/docker.js CHANGED
@@ -192,7 +192,7 @@ function dockerContainerInspect(containerID, payload) {
192
192
  process.nextTick(() => {
193
193
  containerID = containerID || '';
194
194
  if (typeof containerID !== 'string') {
195
- resolve();
195
+ return resolve();
196
196
  }
197
197
  const containerIdSanitized = (util.isPrototypePolluted() ? '' : util.sanitizeShellString(containerID, true)).trim();
198
198
  if (containerIdSanitized) {
@@ -497,7 +497,7 @@ function dockerContainerProcesses(containerID, callback) {
497
497
  process.nextTick(() => {
498
498
  containerID = containerID || '';
499
499
  if (typeof containerID !== 'string') {
500
- resolve(result);
500
+ return resolve(result);
501
501
  }
502
502
  const containerIdSanitized = (util.isPrototypePolluted() ? '' : util.sanitizeShellString(containerID, true)).trim();
503
503
 
package/lib/graphics.js CHANGED
@@ -721,7 +721,7 @@ function graphics(callback) {
721
721
  const nvidiaData = nvidiaDevices();
722
722
  // needs to be rewritten ... using no spread operators
723
723
  result.controllers = result.controllers.map((controller) => { // match by busAddress
724
- return mergeControllerNvidia(controller, nvidiaData.find(({ pciBus }) => pciBus.endsWith(controller.busAddress)) || {});
724
+ return mergeControllerNvidia(controller, nvidiaData.find((contr) => contr.pciBus.toLowerCase().endsWith(controller.busAddress.toLowerCase())) || {});
725
725
  })
726
726
  }
727
727
  let cmd = "clinfo --raw";
package/lib/network.js CHANGED
@@ -239,7 +239,7 @@ function parseLinesWindowsNics(sections, nconfigsections) {
239
239
  }
240
240
 
241
241
  function getWindowsNics() {
242
- const cmd = util.getWmic() + ' nic get MACAddress, name, NetEnabled, Speed, NetConnectionStatus, AdapterTypeId /value';
242
+ const cmd = util.getWmic() + ' nic get /value';
243
243
  const cmdnicconfig = util.getWmic() + ' nicconfig get dhcpEnabled /value';
244
244
  try {
245
245
  const nsections = execSync(cmd, util.execOptsWin).split(/\n\s*\n/);
@@ -677,12 +677,15 @@ function testVirtualNic(iface, ifaceName, mac) {
677
677
  } else return false;
678
678
  }
679
679
 
680
- function networkInterfaces(callback, rescan = true) {
680
+ function networkInterfaces(callback, rescan) {
681
681
 
682
682
  if (typeof callback === 'boolean') {
683
683
  rescan = callback;
684
684
  callback = null;
685
685
  }
686
+ if (typeof rescan === 'undefined') {
687
+ rescan = true;
688
+ }
686
689
  return new Promise((resolve) => {
687
690
  process.nextTick(() => {
688
691
  let result = [];
package/lib/osinfo.js CHANGED
@@ -457,6 +457,10 @@ function versions(apps, callback) {
457
457
  apps = '*';
458
458
  } else {
459
459
  apps = apps || '*';
460
+ if (typeof apps !== 'string') {
461
+ if (callback) { callback({}); }
462
+ return resolve({});
463
+ }
460
464
  }
461
465
  const appsObj = checkVersionParam(apps);
462
466
  let totalFunctions = appsObj.counter;
package/lib/util.js CHANGED
@@ -536,7 +536,8 @@ function countLines(lines, startingWith) {
536
536
  return uniqueLines.length;
537
537
  }
538
538
 
539
- function sanitizeShellString(str, strict = false) {
539
+ function sanitizeShellString(str, strict) {
540
+ if (typeof strict === 'undefined') { strict = false; }
540
541
  const s = str || '';
541
542
  let result = '';
542
543
  for (let i = 0; i <= mathMin(s.length, 2000); i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "4.34.19",
3
+ "version": "4.34.23",
4
4
  "description": "Simple system and OS information library",
5
5
  "license": "MIT",
6
6
  "author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",