systeminformation 5.25.8 → 5.25.10

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/README.md CHANGED
@@ -30,27 +30,6 @@
30
30
 
31
31
  ## The Systeminformation Project
32
32
 
33
- ```
34
- .''.
35
- .''. . *''* :_\/_:
36
- :_\/_: _\(/_ .:.*_\/_* : /\ :
37
- .''.: /\ : ./)\ ':'* /\ * : '..'.
38
- :_\/_:'.:::. ' *''* * '.\'/.' _\(/_
39
- : /\ : ::::: *_\/_* -= o =- /)\
40
- '..' ':::' * /\ * .'/.\'. '
41
- *..* :
42
- *
43
- * /.\ * * . *
44
- . /..'\ . . * .
45
- */'.'\* . . . * *
46
- * /.''.'\ * . . . *
47
- . */.'.'.\*
48
- .........".""""/'.''.'.\""."."........".".".......................
49
- ^^^[_]^^^*
50
- ```
51
-
52
- I wish you all a Merry Christmas and a peaceful New Year 2025.
53
-
54
33
  This is amazing. Started as a small project just for myself, it now has > 17,000
55
34
  lines of code, > 650 versions published, up to 8 mio downloads per month, > 330
56
35
  mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who
@@ -69,9 +48,9 @@ add new features and support more platforms. Thank you in advance!
69
48
 
70
49
  ## Node.js ✅, Bun ✅ and Deno ✅
71
50
 
72
- I tested this library with Node.js, Bun and Deno (V2.x) with no issues. There is
73
- currently only one problem on Denos side: os.freemem() pollyfill is currently
74
- not correct (version 2.1.4) but there is already a fix (not yet published).
51
+ I tested this library with Node.js, Bun and Deno (V2.x) with no issues. There
52
+ was only one problem on Denos side in version <= 2.1.4: os.freemem() pollyfill
53
+ was not correct but this is now fixed with Deno >= 2.1.5.
75
54
 
76
55
  **Attention**: This library is supposed to be used as a backend/server-side
77
56
  library and **will definitely not work within a browser**.
package/lib/graphics.js CHANGED
@@ -768,51 +768,55 @@ function graphics(callback) {
768
768
  vramDynamic: true
769
769
  });
770
770
  }
771
- if (callback) {
772
- callback(result);
773
- }
774
- resolve(result);
771
+ // if (callback) {
772
+ // callback(result);
773
+ // }
774
+ // resolve(result);
775
775
  });
776
- } else {
777
- let cmd = 'lspci -vvv 2>/dev/null';
778
- exec(cmd, function (error, stdout) {
779
- if (!error) {
780
- let lines = stdout.toString().split('\n');
776
+ }
777
+ // } else {
778
+ let cmd = 'lspci -vvv 2>/dev/null';
779
+ exec(cmd, function (error, stdout) {
780
+ if (!error) {
781
+ let lines = stdout.toString().split('\n');
782
+ if (result.controllers.length === 0) {
781
783
  result.controllers = parseLinesLinuxControllers(lines);
784
+
782
785
  const nvidiaData = nvidiaDevices();
783
786
  // needs to be rewritten ... using no spread operators
784
787
  result.controllers = result.controllers.map((controller) => { // match by busAddress
785
788
  return mergeControllerNvidia(controller, nvidiaData.find((contr) => contr.pciBus.toLowerCase().endsWith(controller.busAddress.toLowerCase())) || {});
786
789
  });
787
790
  }
788
- let cmd = 'clinfo --raw';
791
+ }
792
+ let cmd = 'clinfo --raw';
793
+ exec(cmd, function (error, stdout) {
794
+ if (!error) {
795
+ let lines = stdout.toString().split('\n');
796
+ result.controllers = parseLinesLinuxClinfo(result.controllers, lines);
797
+ }
798
+ let cmd = 'xdpyinfo 2>/dev/null | grep \'depth of root window\' | awk \'{ print $5 }\'';
789
799
  exec(cmd, function (error, stdout) {
800
+ let depth = 0;
790
801
  if (!error) {
791
802
  let lines = stdout.toString().split('\n');
792
- result.controllers = parseLinesLinuxClinfo(result.controllers, lines);
803
+ depth = parseInt(lines[0]) || 0;
793
804
  }
794
- let cmd = 'xdpyinfo 2>/dev/null | grep \'depth of root window\' | awk \'{ print $5 }\'';
805
+ let cmd = 'xrandr --verbose 2>/dev/null';
795
806
  exec(cmd, function (error, stdout) {
796
- let depth = 0;
797
807
  if (!error) {
798
808
  let lines = stdout.toString().split('\n');
799
- depth = parseInt(lines[0]) || 0;
809
+ result.displays = parseLinesLinuxDisplays(lines, depth);
800
810
  }
801
- let cmd = 'xrandr --verbose 2>/dev/null';
802
- exec(cmd, function (error, stdout) {
803
- if (!error) {
804
- let lines = stdout.toString().split('\n');
805
- result.displays = parseLinesLinuxDisplays(lines, depth);
806
- }
807
- if (callback) {
808
- callback(result);
809
- }
810
- resolve(result);
811
- });
811
+ if (callback) {
812
+ callback(result);
813
+ }
814
+ resolve(result);
812
815
  });
813
816
  });
814
817
  });
815
- }
818
+ });
819
+ // }
816
820
  }
817
821
  if (_freebsd || _openbsd || _netbsd) {
818
822
  if (callback) { callback(null); }
package/lib/memory.js CHANGED
@@ -409,10 +409,12 @@ function memLayout(callback) {
409
409
  '0': 400,
410
410
  '1': 450,
411
411
  '2': 450,
412
- '3': 3200
412
+ '3': 3200,
413
+ '4': 4267
413
414
  };
414
415
  result[0].type = 'LPDDR2';
415
- result[0].type = version && version[2] && version[2] === '3' ? 'LPDDR4' : result[0].type;
416
+ result[0].type = version && version[2] && (version[2] === '3') ? 'LPDDR4' : result[0].type;
417
+ result[0].type = version && version[2] && (version[2] === '4') ? 'LPDDR4X' : result[0].type;
416
418
  result[0].ecc = false;
417
419
  result[0].clockSpeed = version && version[2] && clockSpeed[version[2]] || 400;
418
420
  result[0].clockSpeed = version && version[4] && version[4] === 'd' ? 500 : result[0].clockSpeed;
package/lib/util.js CHANGED
@@ -1094,9 +1094,11 @@ function decodePiCpuinfo(lines) {
1094
1094
  return result;
1095
1095
  }
1096
1096
 
1097
- function getRpiGpu() {
1098
- let cpuinfo = null;
1099
- if (_rpi_cpuinfo !== null) {
1097
+ function getRpiGpu(cpuinfo) {
1098
+
1099
+ if (_rpi_cpuinfo === null && cpuinfo !== undefined) {
1100
+ _rpi_cpuinfo = cpuinfo;
1101
+ } else if (cpuinfo === undefined && _rpi_cpuinfo !== null) {
1100
1102
  cpuinfo = _rpi_cpuinfo;
1101
1103
  } else {
1102
1104
  try {
@@ -1109,7 +1111,7 @@ function getRpiGpu() {
1109
1111
 
1110
1112
  const rpi = decodePiCpuinfo(cpuinfo);
1111
1113
  if (rpi.type === '4B' || rpi.type === 'CM4' || rpi.type === 'CM4S' || rpi.type === '400') { return 'VideoCore VI'; }
1112
- if (rpi.type === '5') { return 'VideoCore VII'; }
1114
+ if (rpi.type === '5' || rpi.type === '500') { return 'VideoCore VII'; }
1113
1115
  return 'VideoCore IV';
1114
1116
  }
1115
1117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.25.8",
3
+ "version": "5.25.10",
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)",