systeminformation 5.25.9 → 5.25.11

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
@@ -35,6 +35,11 @@ lines of code, > 650 versions published, up to 8 mio downloads per month, > 330
35
35
  mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who
36
36
  contributed to this project!
37
37
 
38
+ > **Upcoming Version 6**
39
+ >
40
+ > With a lot of new features, improvements and a cleaned up API where will also
41
+ > be some breaking changes. We will release the first beta soon.
42
+
38
43
  ## Please support this project ... ☕️
39
44
 
40
45
  Over the past few years I spent **more than 3.000 hours** working on this
@@ -48,9 +53,9 @@ add new features and support more platforms. Thank you in advance!
48
53
 
49
54
  ## Node.js ✅, Bun ✅ and Deno ✅
50
55
 
51
- I tested this library with Node.js, Bun and Deno (V2.x) with no issues. There is
52
- currently only one problem on Denos side: os.freemem() pollyfill is currently
53
- not correct (version 2.1.4) but there is already a fix (not yet published).
56
+ I tested this library with Node.js, Bun and Deno (V2.x) with no issues. There
57
+ was only one problem on Denos side in version <= 2.1.4: os.freemem() pollyfill
58
+ was not correct but this is now fixed with Deno >= 2.1.5.
54
59
 
55
60
  **Attention**: This library is supposed to be used as a backend/server-side
56
61
  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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.25.9",
3
+ "version": "5.25.11",
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)",