systeminformation 5.25.10 → 5.26.0
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 +25 -9
- package/lib/cpu.js +22 -13
- package/lib/index.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,13 +35,19 @@ 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
|
+
> The upcoming version 6 of this package (written completely in TypeScript) will
|
|
41
|
+
> come with a lot of new features and improvements. I also cleaned up the API so
|
|
42
|
+
> there will also be some breaking changes. I will release the first beta soon.
|
|
43
|
+
|
|
38
44
|
## Please support this project ... ☕️
|
|
39
45
|
|
|
40
|
-
Over the past few years I spent **more than 3.000 hours** working on
|
|
41
|
-
project and invested in hardware to be able to test on different platforms.
|
|
46
|
+
Over the past few years I spent **more than 3.000 hours** working 💻 😓 ☕️ on
|
|
47
|
+
this project and invested in hardware to be able to test on different platforms.
|
|
42
48
|
Currently I am working very hard on the next **new version 6.0** completely
|
|
43
49
|
rewritten in TypeScript and with a lot of new features. Any support is highly
|
|
44
|
-
appreciated - [Buy me a coffee](https://www.buymeacoffee.com/systeminfo)
|
|
50
|
+
appreciated - [Buy me a coffee](https://www.buymeacoffee.com/systeminfo)... ☕️
|
|
45
51
|
|
|
46
52
|
**Your contribution** make it possible for me to keep working on this project,
|
|
47
53
|
add new features and support more platforms. Thank you in advance!
|
|
@@ -55,9 +61,9 @@ was not correct but this is now fixed with Deno >= 2.1.5.
|
|
|
55
61
|
**Attention**: This library is supposed to be used as a backend/server-side
|
|
56
62
|
library and **will definitely not work within a browser**.
|
|
57
63
|
|
|
58
|
-
##
|
|
64
|
+
## Current Version 5.0
|
|
59
65
|
|
|
60
|
-
The
|
|
66
|
+
The current Version 5 - this major version release 5.0 - came with new
|
|
61
67
|
functionality and several improvements and changes (some of them are breaking
|
|
62
68
|
changes!):
|
|
63
69
|
|
|
@@ -77,9 +83,9 @@ changes!):
|
|
|
77
83
|
examples [systeminformation.io][systeminformation-url]
|
|
78
84
|
- lot of minor improvements
|
|
79
85
|
|
|
80
|
-
Breaking Changes in version 5: you will see several
|
|
81
|
-
sake of a more consistent API interface and to be
|
|
82
|
-
[detailed version 5 changes][changes5-url].
|
|
86
|
+
Breaking Changes in version 5 (compared to version 4.x): you will see several
|
|
87
|
+
breaking changes for the sake of a more consistent API interface and to be
|
|
88
|
+
future proof. Read the [detailed version 5 changes][changes5-url].
|
|
83
89
|
|
|
84
90
|
I did a lot of testing on different platforms and machines but of course there
|
|
85
91
|
might be some issues that I am not aware of. I would be happy if you inform me
|
|
@@ -157,6 +163,7 @@ si.cpu()
|
|
|
157
163
|
|
|
158
164
|
(last 7 major and minor version releases)
|
|
159
165
|
|
|
166
|
+
- Version 5.26.0: `getStatic()`, `getAll()` added usb, audio, bluetooth, printer
|
|
160
167
|
- Version 5.25.0: `versions()` added homebrew
|
|
161
168
|
- Version 5.24.0: `versions()` added bun and deno
|
|
162
169
|
- Version 5.23.0: `usb()` added serial number (linux)
|
|
@@ -190,6 +197,10 @@ si.cpu()
|
|
|
190
197
|
|
|
191
198
|
You can find all changes here: [detailed changelog][changelog-url]
|
|
192
199
|
|
|
200
|
+
## Activity
|
|
201
|
+
|
|
202
|
+

|
|
203
|
+
|
|
193
204
|
## Core concept
|
|
194
205
|
|
|
195
206
|
[Node.js][nodejs-url] comes with some basic OS information, but I always wanted
|
|
@@ -1074,7 +1085,7 @@ Sebastian Hildebrandt, [+innovations](http://www.plus-innovations.com)
|
|
|
1074
1085
|
Written by Sebastian Hildebrandt
|
|
1075
1086
|
[sebhildebrandt](https://github.com/sebhildebrandt)
|
|
1076
1087
|
|
|
1077
|
-
|
|
1088
|
+
### Contributors
|
|
1078
1089
|
|
|
1079
1090
|
- Guillaume Legrain [glegrain](https://github.com/glegrain)
|
|
1080
1091
|
- Riccardo Novaglia [richy24](https://github.com/richy24)
|
|
@@ -1105,6 +1116,11 @@ OSX Temperature: credits here are going to:
|
|
|
1105
1116
|
- Frank Stock [pcafstockf](https://github.com/pcafstockf) - for his work on
|
|
1106
1117
|
[smc-code][smc-code-url]
|
|
1107
1118
|
|
|
1119
|
+
### Powered by
|
|
1120
|
+
|
|
1121
|
+
<a href="https://jb.gg/OpenSourceSupport"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg" alt="Alt Text" width="160"></a>
|
|
1122
|
+
<a href="https://plus-innovations.com"><img src="https://www.plus-innovations.com/wp-content/themes/bootstrap3/img/logo1000.png" alt="Alt Text" width="150" style="margin-bottom: 8px"></a>
|
|
1123
|
+
|
|
1108
1124
|
## Copyright Information
|
|
1109
1125
|
|
|
1110
1126
|
Linux is a registered trademark of Linus Torvalds. Apple, macOS, OS X are
|
package/lib/cpu.js
CHANGED
|
@@ -994,7 +994,7 @@ function getCpuCurrentSpeedSync() {
|
|
|
994
994
|
let cores = [];
|
|
995
995
|
let speeds = [];
|
|
996
996
|
|
|
997
|
-
if (cpus && cpus.length && cpus[0].speed) {
|
|
997
|
+
if (cpus && cpus.length && cpus[0].hasOwnProperty('speed')) {
|
|
998
998
|
for (let i in cpus) {
|
|
999
999
|
speeds.push(cpus[i].speed > 100 ? (cpus[i].speed + 1) / 1000 : cpus[i].speed / 10);
|
|
1000
1000
|
}
|
|
@@ -1010,19 +1010,28 @@ function getCpuCurrentSpeedSync() {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
|
|
1012
1012
|
if (speeds && speeds.length) {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1013
|
+
try {
|
|
1014
|
+
for (let i in speeds) {
|
|
1015
|
+
avgFreq = avgFreq + speeds[i];
|
|
1016
|
+
if (speeds[i] > maxFreq) { maxFreq = speeds[i]; }
|
|
1017
|
+
if (speeds[i] < minFreq) { minFreq = speeds[i]; }
|
|
1018
|
+
cores.push(parseFloat(speeds[i].toFixed(2)));
|
|
1019
|
+
}
|
|
1020
|
+
avgFreq = avgFreq / speeds.length;
|
|
1021
|
+
return {
|
|
1022
|
+
min: parseFloat(minFreq.toFixed(2)),
|
|
1023
|
+
max: parseFloat(maxFreq.toFixed(2)),
|
|
1024
|
+
avg: parseFloat((avgFreq).toFixed(2)),
|
|
1025
|
+
cores: cores
|
|
1026
|
+
};
|
|
1027
|
+
} catch (e) {
|
|
1028
|
+
return {
|
|
1029
|
+
min: 0,
|
|
1030
|
+
max: 0,
|
|
1031
|
+
avg: 0,
|
|
1032
|
+
cores: cores
|
|
1033
|
+
};
|
|
1018
1034
|
}
|
|
1019
|
-
avgFreq = avgFreq / speeds.length;
|
|
1020
|
-
return {
|
|
1021
|
-
min: parseFloat(minFreq.toFixed(2)),
|
|
1022
|
-
max: parseFloat(maxFreq.toFixed(2)),
|
|
1023
|
-
avg: parseFloat((avgFreq).toFixed(2)),
|
|
1024
|
-
cores: cores
|
|
1025
|
-
};
|
|
1026
1035
|
} else {
|
|
1027
1036
|
return {
|
|
1028
1037
|
min: 0,
|
package/lib/index.js
CHANGED
|
@@ -95,7 +95,11 @@ function getStaticData(callback) {
|
|
|
95
95
|
graphics.graphics(),
|
|
96
96
|
network.networkInterfaces(),
|
|
97
97
|
memory.memLayout(),
|
|
98
|
-
filesystem.diskLayout()
|
|
98
|
+
filesystem.diskLayout(),
|
|
99
|
+
audio.audio(),
|
|
100
|
+
bluetooth.bluetoothDevices(),
|
|
101
|
+
usb.usb(),
|
|
102
|
+
printer.printer(),
|
|
99
103
|
]).then((res) => {
|
|
100
104
|
data.system = res[0];
|
|
101
105
|
data.bios = res[1];
|
|
@@ -110,6 +114,10 @@ function getStaticData(callback) {
|
|
|
110
114
|
data.net = res[10];
|
|
111
115
|
data.memLayout = res[11];
|
|
112
116
|
data.diskLayout = res[12];
|
|
117
|
+
data.audio = res[13];
|
|
118
|
+
data.bluetooth = res[14];
|
|
119
|
+
data.usb = res[15];
|
|
120
|
+
data.printer = res[16];
|
|
113
121
|
if (callback) { callback(data); }
|
|
114
122
|
resolve(data);
|
|
115
123
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.26.0",
|
|
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)",
|