systeminformation 5.20.0 → 5.21.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 +2 -1
- package/lib/graphics.js +17 -1
- package/lib/index.d.ts +1 -0
- package/lib/memory.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -328,7 +328,8 @@ Full function reference with examples can be found at [https://systeminformation
|
|
|
328
328
|
| --------------- | ------------------------- | ----- | --- | --- | --- | --- | ------------------------------------------- |
|
|
329
329
|
| si.graphics(cb) | {...} | X | | X | X | | arrays of graphics controllers and displays |
|
|
330
330
|
| | controllers[] | X | | X | X | | graphics controllers array |
|
|
331
|
-
| | ...[0].vendor | X | | X | X | | e.g.
|
|
331
|
+
| | ...[0].vendor | X | | X | X | | e.g. NVIDIA |
|
|
332
|
+
| | ...[0].subvendor | X | | | | | e.g. Gigabyte |
|
|
332
333
|
| | ...[0].vendorId | | | X | | | vendor ID |
|
|
333
334
|
| | ...[0].model | X | | X | X | | graphics controller model |
|
|
334
335
|
| | ...[0].deviceId | | | X | | | device ID |
|
package/lib/graphics.js
CHANGED
|
@@ -204,6 +204,7 @@ function graphics(callback) {
|
|
|
204
204
|
let controllers = [];
|
|
205
205
|
let currentController = {
|
|
206
206
|
vendor: '',
|
|
207
|
+
subvendor: '',
|
|
207
208
|
model: '',
|
|
208
209
|
bus: '',
|
|
209
210
|
busAddress: '',
|
|
@@ -225,7 +226,15 @@ function graphics(callback) {
|
|
|
225
226
|
} catch (e) {
|
|
226
227
|
util.noop();
|
|
227
228
|
}
|
|
229
|
+
let i = 1;
|
|
228
230
|
lines.forEach((line) => {
|
|
231
|
+
let subsystem = '';
|
|
232
|
+
if (i < lines.length && lines[i]) { // get next line;
|
|
233
|
+
subsystem = lines[i];
|
|
234
|
+
if (subsystem.indexOf(':') > 0) {
|
|
235
|
+
subsystem = subsystem.split(':')[1];
|
|
236
|
+
}
|
|
237
|
+
}
|
|
229
238
|
if ('' !== line.trim()) {
|
|
230
239
|
if (' ' !== line[0] && '\t' !== line[0]) { // first line of new entry
|
|
231
240
|
let isExternal = (pciIDs.indexOf(line.split(' ')[0]) >= 0);
|
|
@@ -259,7 +268,7 @@ function graphics(callback) {
|
|
|
259
268
|
parts[1] = parts[1].trim();
|
|
260
269
|
if (parts[1].toLowerCase().indexOf('corporation') >= 0) {
|
|
261
270
|
currentController.vendor = parts[1].substr(0, parts[1].toLowerCase().indexOf('corporation') + 11).trim();
|
|
262
|
-
currentController.model = parts[1].substr(parts[1].toLowerCase().indexOf('corporation') + 11, 200).
|
|
271
|
+
currentController.model = parts[1].substr(parts[1].toLowerCase().indexOf('corporation') + 11, 200).split('(')[0].trim();
|
|
263
272
|
currentController.bus = (pciIDs.length > 0 && isExternal) ? 'PCIe' : 'Onboard';
|
|
264
273
|
currentController.vram = null;
|
|
265
274
|
currentController.vramDynamic = false;
|
|
@@ -283,6 +292,12 @@ function graphics(callback) {
|
|
|
283
292
|
currentController.model = parts[1].substr(parts[1].toLowerCase().indexOf(' ltd.') + 5, 200).trim().split('(')[0].trim();
|
|
284
293
|
}
|
|
285
294
|
}
|
|
295
|
+
if (currentController.model && subsystem.indexOf(currentController.model) !== -1) {
|
|
296
|
+
const subvendor = subsystem.split(currentController.model)[0].trim();
|
|
297
|
+
if (subvendor) {
|
|
298
|
+
currentController.subvendor = subvendor;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
286
301
|
}
|
|
287
302
|
|
|
288
303
|
} else {
|
|
@@ -300,6 +315,7 @@ function graphics(callback) {
|
|
|
300
315
|
}
|
|
301
316
|
}
|
|
302
317
|
}
|
|
318
|
+
i++;
|
|
303
319
|
});
|
|
304
320
|
|
|
305
321
|
if (currentController.vendor || currentController.model || currentController.bus || currentController.busAddress || currentController.vram !== null || currentController.vramDynamic) { // already a controller found
|
package/lib/index.d.ts
CHANGED
package/lib/memory.js
CHANGED
|
@@ -525,7 +525,8 @@ function memLayout(callback) {
|
|
|
525
525
|
resolve(result);
|
|
526
526
|
}
|
|
527
527
|
if (_windows) {
|
|
528
|
-
|
|
528
|
+
// https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0a.pdf
|
|
529
|
+
const memoryTypes = 'Unknown|Other|DRAM|Synchronous DRAM|Cache DRAM|EDO|EDRAM|VRAM|SRAM|RAM|ROM|FLASH|EEPROM|FEPROM|EPROM|CDRAM|3DRAM|SDRAM|SGRAM|RDRAM|DDR|DDR2|DDR2 FB-DIMM|Reserved|DDR3|FBD2|DDR4|LPDDR|LPDDR2|LPDDR3|LPDDR4|Logical non-volatile device|HBM|HBM2|DDR5|LPDDR5'.split('|');
|
|
529
530
|
const FormFactors = 'Unknown|Other|SIP|DIP|ZIP|SOJ|Proprietary|SIMM|DIMM|TSOP|PGA|RIMM|SODIMM|SRIMM|SMD|SSMP|QFP|TQFP|SOIC|LCC|PLCC|BGA|FPBGA|LGA'.split('|');
|
|
530
531
|
|
|
531
532
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.21.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)",
|