systeminformation 5.25.9 → 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 +3 -3
- package/lib/graphics.js +30 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,9 +48,9 @@ add new features and support more platforms. Thank you in advance!
|
|
|
48
48
|
|
|
49
49
|
## Node.js ✅, Bun ✅ and Deno ✅
|
|
50
50
|
|
|
51
|
-
I tested this library with Node.js, Bun and Deno (V2.x) with no issues. There
|
|
52
|
-
|
|
53
|
-
not correct
|
|
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.
|
|
54
54
|
|
|
55
55
|
**Attention**: This library is supposed to be used as a backend/server-side
|
|
56
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
|
-
|
|
773
|
-
}
|
|
774
|
-
resolve(result);
|
|
771
|
+
// if (callback) {
|
|
772
|
+
// callback(result);
|
|
773
|
+
// }
|
|
774
|
+
// resolve(result);
|
|
775
775
|
});
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
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
|
-
|
|
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
|
-
|
|
803
|
+
depth = parseInt(lines[0]) || 0;
|
|
793
804
|
}
|
|
794
|
-
let cmd = '
|
|
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
|
-
|
|
809
|
+
result.displays = parseLinesLinuxDisplays(lines, depth);
|
|
800
810
|
}
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
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.
|
|
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)",
|