systeminformation 5.21.12 → 5.21.13

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
@@ -456,6 +456,20 @@ const AMDBaseFrequencies = {
456
456
  '5800X': '3.8',
457
457
  '5900X': '3.7',
458
458
  '5950X': '3.4',
459
+ '5945WX': '4.1',
460
+ '5955WX': '4.0',
461
+ '5965WX': '3.8',
462
+ '5975WX': '3.6',
463
+ '5995WX': '2.7',
464
+
465
+ '7960X': '4.2',
466
+ '7970X': '4.0',
467
+ '7980X': '3.2',
468
+
469
+ '7965WX': '4.2',
470
+ '7975WX': '4.0',
471
+ '7985WX': '3.2',
472
+ '7995WX': '2.5',
459
473
 
460
474
  // ZEN4
461
475
  '9754': '2.25',
package/lib/graphics.js CHANGED
@@ -759,7 +759,7 @@ function graphics(callback) {
759
759
  if (lines.length > 1 && stdout.toString().indexOf('gpu=') >= -1) {
760
760
  result.controllers.push({
761
761
  vendor: 'Broadcom',
762
- model: 'VideoCore IV',
762
+ model: util.getRpiGpu(),
763
763
  bus: '',
764
764
  vram: util.getValue(lines, 'gpu', '=').replace('M', ''),
765
765
  vramDynamic: true
package/lib/util.js CHANGED
@@ -33,6 +33,7 @@ let _cores = 0;
33
33
  let wmicPath = '';
34
34
  let codepage = '';
35
35
  let _smartMonToolsInstalled = null;
36
+ let _rpi_cpuinfo = null;
36
37
 
37
38
  const WINDIR = process.env.WINDIR || 'C:\\Windows';
38
39
 
@@ -602,17 +603,25 @@ function isRaspberry() {
602
603
  'BCM2709',
603
604
  'BCM2710',
604
605
  'BCM2711',
606
+ 'BCM2712',
605
607
  'BCM2835',
606
608
  'BCM2836',
607
609
  'BCM2837',
608
610
  'BCM2837B0'
609
611
  ];
610
612
  let cpuinfo = [];
611
- try {
612
- cpuinfo = fs.readFileSync('/proc/cpuinfo', { encoding: 'utf8' }).toString().split('\n');
613
- } catch (e) {
614
- return false;
613
+
614
+ if (_rpi_cpuinfo !== null) {
615
+ cpuinfo = _rpi_cpuinfo;
616
+ } else {
617
+ try {
618
+ cpuinfo = fs.readFileSync('/proc/cpuinfo', { encoding: 'utf8' }).toString().split('\n');
619
+ _rpi_cpuinfo = cpuinfo;
620
+ } catch (e) {
621
+ return false;
622
+ }
615
623
  }
624
+
616
625
  const hardware = getValue(cpuinfo, 'hardware');
617
626
  return (hardware && PI_MODEL_NO.indexOf(hardware) > -1);
618
627
  }
@@ -819,6 +828,10 @@ function getFilesInPath(source) {
819
828
 
820
829
  function decodePiCpuinfo(lines) {
821
830
 
831
+ if (_rpi_cpuinfo === null) {
832
+ _rpi_cpuinfo = lines;
833
+ }
834
+
822
835
  // https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
823
836
 
824
837
  const oldRevisionCodes = {
@@ -948,6 +961,7 @@ function decodePiCpuinfo(lines) {
948
961
  'BCM2836',
949
962
  'BCM2837',
950
963
  'BCM2711',
964
+ 'BCM2712',
951
965
  ];
952
966
  const manufacturerList = [
953
967
  'Sony UK',
@@ -977,7 +991,8 @@ function decodePiCpuinfo(lines) {
977
991
  '12': 'Zero 2 W',
978
992
  '13': '400',
979
993
  '14': 'CM4',
980
- '15': 'CM4S'
994
+ '15': 'CM4S',
995
+ '17': '5B',
981
996
  };
982
997
 
983
998
  const revisionCode = getValue(lines, 'revision', ':', true);
@@ -1021,6 +1036,25 @@ function decodePiCpuinfo(lines) {
1021
1036
  return result;
1022
1037
  }
1023
1038
 
1039
+ function getRpiGpu() {
1040
+ let cpuinfo = null;
1041
+ if (_rpi_cpuinfo !== null) {
1042
+ cpuinfo = _rpi_cpuinfo;
1043
+ } else {
1044
+ try {
1045
+ cpuinfo = fs.readFileSync('/proc/cpuinfo', { encoding: 'utf8' }).toString().split('\n');
1046
+ _rpi_cpuinfo = cpuinfo;
1047
+ } catch (e) {
1048
+ return false;
1049
+ }
1050
+ }
1051
+
1052
+ const rpi = decodePiCpuinfo(cpuinfo);
1053
+ if (rpi.type === '4B' || rpi.type === 'CM4' || rpi.type === 'CM4S' || rpi.type === '400') { return 'VideoCore VI'; }
1054
+ if (rpi.type === '5B') { return 'VideoCore VII'; }
1055
+ return 'VideoCore IV';
1056
+ }
1057
+
1024
1058
  function promiseAll(promises) {
1025
1059
  const resolvingPromises = promises.map(function (promise) {
1026
1060
  return new Promise(function (resolve) {
@@ -1291,6 +1325,7 @@ exports.isRaspbian = isRaspbian;
1291
1325
  exports.sanitizeShellString = sanitizeShellString;
1292
1326
  exports.isPrototypePolluted = isPrototypePolluted;
1293
1327
  exports.decodePiCpuinfo = decodePiCpuinfo;
1328
+ exports.getRpiGpu = getRpiGpu;
1294
1329
  exports.promiseAll = promiseAll;
1295
1330
  exports.promisify = promisify;
1296
1331
  exports.promisifySave = promisifySave;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.21.12",
3
+ "version": "5.21.13",
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)",