systeminformation 5.31.6 → 5.31.8

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/cpu.js CHANGED
@@ -929,7 +929,7 @@ function getCpu() {
929
929
  result.socket = 'SOC';
930
930
  try {
931
931
  const clusters = execSync('ioreg -c IOPlatformDevice -d 3 -r | grep cluster-type').toString().split('\n');
932
- const efficiencyCores = clusters.filter((line) => line.indexOf('"E"') >= 0).length;
932
+ const efficiencyCores = clusters.filter((line) => line.indexOf('"E"') >= 0).length + clusters.filter((line) => line.indexOf('"M"') >= 0).length;
933
933
  const performanceCores = clusters.filter((line) => line.indexOf('"P"') >= 0).length;
934
934
  result.efficiencyCores = efficiencyCores;
935
935
  result.performanceCores = performanceCores;
package/lib/network.js CHANGED
@@ -17,6 +17,7 @@ const os = require('os');
17
17
  const exec = require('child_process').exec;
18
18
  const execSync = require('child_process').execSync;
19
19
  const execFileSync = require('child_process').execFileSync;
20
+ const readFileSync = require('fs').readFileSync;
20
21
 
21
22
  const fs = require('fs');
22
23
  const util = require('./util');
@@ -548,8 +549,8 @@ function getLinuxIfaceConnectionName(interfaceName) {
548
549
  function checkLinuxDCHPInterfaces(file) {
549
550
  let result = [];
550
551
  try {
551
- const cmd = `cat ${file} 2> /dev/null | grep 'iface\\|source'`;
552
- const lines = execSync(cmd, util.execOptsLinux).toString().split('\n');
552
+ const content = readFileSync(file, { encoding: 'utf8' });
553
+ const lines = content.split('\n').filter((l) => /iface|source/.test(l));
553
554
 
554
555
  lines.forEach((line) => {
555
556
  const parts = line.replace(/\s+/g, ' ').trim().split(' ');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.31.6",
3
+ "version": "5.31.8",
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)",