@depup/systeminformation 5.33.13-depup.0 → 5.33.15-depup.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 -2
- package/changes.json +1 -1
- package/lib/graphics.js +1 -1
- package/lib/network.js +10 -1
- package/lib/users.js +1 -1
- package/lib/util.js +39 -7
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/systeminformation
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [systeminformation](https://www.npmjs.com/package/systeminformation) @ 5.33.
|
|
17
|
-
| Processed | 2026-
|
|
16
|
+
| Original | [systeminformation](https://www.npmjs.com/package/systeminformation) @ 5.33.15 |
|
|
17
|
+
| Processed | 2026-10-04 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
19
|
| Deps updated | 0 |
|
|
20
20
|
|
package/changes.json
CHANGED
package/lib/graphics.js
CHANGED
|
@@ -228,7 +228,7 @@ function graphics(callback) {
|
|
|
228
228
|
// PCI bus IDs
|
|
229
229
|
let pciIDs = [];
|
|
230
230
|
try {
|
|
231
|
-
pciIDs = execSync('export LC_ALL=C; dmidecode -t 9 2>/dev/null
|
|
231
|
+
pciIDs = execSync('export LC_ALL=C; dmidecode -t 9 2>/dev/null | grep "Bus Address: "', util.execOptsLinux).toString().split('\n');
|
|
232
232
|
for (let i = 0; i < pciIDs.length; i++) {
|
|
233
233
|
pciIDs[i] = pciIDs[i].replace('Bus Address:', '').replace('0000:', '').trim();
|
|
234
234
|
}
|
package/lib/network.js
CHANGED
|
@@ -1360,6 +1360,13 @@ function networkStatsSingle(iface) {
|
|
|
1360
1360
|
ms: 0
|
|
1361
1361
|
};
|
|
1362
1362
|
|
|
1363
|
+
// an interface name never starts with a dash - passed on to ifconfig / netstat it would be
|
|
1364
|
+
// read as an option instead of as an interface name (index access, so a polluted
|
|
1365
|
+
// String.prototype cannot bypass it)
|
|
1366
|
+
if (ifaceSanitized[0] === '-') {
|
|
1367
|
+
return resolve(result);
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1363
1370
|
let operstate = 'unknown';
|
|
1364
1371
|
let rx_bytes = 0;
|
|
1365
1372
|
let tx_bytes = 0;
|
|
@@ -1375,7 +1382,9 @@ function networkStatsSingle(iface) {
|
|
|
1375
1382
|
(_network[ifaceSanitized] && _network[ifaceSanitized].ms && Date.now() - _network[ifaceSanitized].ms >= 500)
|
|
1376
1383
|
) {
|
|
1377
1384
|
if (_linux) {
|
|
1378
|
-
|
|
1385
|
+
// interface name must stay a single path segment inside /sys/class/net (no traversal)
|
|
1386
|
+
const ifaceIsSegment = ifaceSanitized !== '' && ifaceSanitized !== '.' && ifaceSanitized !== '..' && ifaceSanitized.split('').every((c) => c !== '/');
|
|
1387
|
+
if (ifaceIsSegment && fs.existsSync('/sys/class/net/' + ifaceSanitized)) {
|
|
1379
1388
|
cmd =
|
|
1380
1389
|
'cat /sys/class/net/' +
|
|
1381
1390
|
ifaceSanitized +
|
package/lib/users.js
CHANGED
|
@@ -175,7 +175,7 @@ function users(callback) {
|
|
|
175
175
|
|
|
176
176
|
// linux
|
|
177
177
|
if (_linux) {
|
|
178
|
-
exec('export LC_ALL=C; who --ips; echo "---"; w
|
|
178
|
+
exec('export LC_ALL=C; who --ips; echo "---"; w | tail -n +2', (error, stdout) => {
|
|
179
179
|
if (!error) {
|
|
180
180
|
// lines / split
|
|
181
181
|
let lines = stdout.toString().split('\n');
|
package/lib/util.js
CHANGED
|
@@ -95,7 +95,7 @@ const stringStartWith = new String().startsWith;
|
|
|
95
95
|
const mathMin = Math.min;
|
|
96
96
|
|
|
97
97
|
function isFunction(functionToCheck) {
|
|
98
|
-
|
|
98
|
+
const getType = {};
|
|
99
99
|
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -103,7 +103,7 @@ function unique(obj) {
|
|
|
103
103
|
const uniques = [];
|
|
104
104
|
const stringify = {};
|
|
105
105
|
for (let i = 0; i < obj.length; i++) {
|
|
106
|
-
|
|
106
|
+
const keys = Object.keys(obj[i]);
|
|
107
107
|
keys.sort((a, b) => {
|
|
108
108
|
return a - b;
|
|
109
109
|
});
|
|
@@ -202,7 +202,7 @@ function parseTime(t, pmDesignator) {
|
|
|
202
202
|
parts[1] += parts[2];
|
|
203
203
|
}
|
|
204
204
|
const p1 = (parts[1] || '').toLowerCase();
|
|
205
|
-
|
|
205
|
+
const isPM =
|
|
206
206
|
p1.indexOf('pm') > -1 ||
|
|
207
207
|
p1.indexOf('p.m.') > -1 ||
|
|
208
208
|
p1.indexOf('p. m.') > -1 ||
|
|
@@ -670,7 +670,7 @@ function execWin(cmd, opts, callback) {
|
|
|
670
670
|
callback = opts;
|
|
671
671
|
opts = execOptsWin;
|
|
672
672
|
}
|
|
673
|
-
|
|
673
|
+
const newCmd = 'chcp 65001 > nul && cmd /C ' + cmd + ' && chcp ' + codepage + ' > nul';
|
|
674
674
|
exec(newCmd, opts, (error, stdout) => {
|
|
675
675
|
callback(error, stdout);
|
|
676
676
|
});
|
|
@@ -1118,7 +1118,7 @@ function decodePiCpuinfo(lines) {
|
|
|
1118
1118
|
model,
|
|
1119
1119
|
serial,
|
|
1120
1120
|
revisionCode,
|
|
1121
|
-
memory: 256 *
|
|
1121
|
+
memory: 256 * 2 ** memSizeCode,
|
|
1122
1122
|
manufacturer,
|
|
1123
1123
|
processor,
|
|
1124
1124
|
type: {}.hasOwnProperty.call(typeList, typeCode) ? typeList[typeCode] : '',
|
|
@@ -1237,7 +1237,7 @@ function plistParser(xmlStr) {
|
|
|
1237
1237
|
const startStr = '<plist version';
|
|
1238
1238
|
|
|
1239
1239
|
let pos = xmlStr.indexOf(startStr);
|
|
1240
|
-
|
|
1240
|
+
const len = xmlStr.length;
|
|
1241
1241
|
while (xmlStr[pos] !== '>' && pos < len) {
|
|
1242
1242
|
pos++;
|
|
1243
1243
|
}
|
|
@@ -1246,7 +1246,7 @@ function plistParser(xmlStr) {
|
|
|
1246
1246
|
let inTagStart = false;
|
|
1247
1247
|
let inTagContent = false;
|
|
1248
1248
|
let inTagEnd = false;
|
|
1249
|
-
|
|
1249
|
+
const metaData = [{ tagStart: '', tagEnd: '', tagContent: '', key: '', data: null }];
|
|
1250
1250
|
let c = '';
|
|
1251
1251
|
let cn = xmlStr[pos];
|
|
1252
1252
|
|
|
@@ -1447,6 +1447,38 @@ function semverCompare(v1, v2) {
|
|
|
1447
1447
|
|
|
1448
1448
|
function getAppleModel(key) {
|
|
1449
1449
|
const appleModelIds = [
|
|
1450
|
+
{
|
|
1451
|
+
key: 'Mac18,5',
|
|
1452
|
+
name: 'Mac mini',
|
|
1453
|
+
size: '',
|
|
1454
|
+
processor: 'M6',
|
|
1455
|
+
year: '2026',
|
|
1456
|
+
additional: ''
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
key: 'Mac17,16',
|
|
1460
|
+
name: 'Mac mini',
|
|
1461
|
+
size: '',
|
|
1462
|
+
processor: 'M5 Pro',
|
|
1463
|
+
year: '2026',
|
|
1464
|
+
additional: ''
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
key: 'Mac17,15',
|
|
1468
|
+
name: 'Mac Studio',
|
|
1469
|
+
size: '',
|
|
1470
|
+
processor: 'M5 Ultra',
|
|
1471
|
+
year: '2026',
|
|
1472
|
+
additional: ''
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
key: 'Mac17,14',
|
|
1476
|
+
name: 'Mac Studio',
|
|
1477
|
+
size: '',
|
|
1478
|
+
processor: 'M5 Max',
|
|
1479
|
+
year: '2026',
|
|
1480
|
+
additional: ''
|
|
1481
|
+
},
|
|
1450
1482
|
{
|
|
1451
1483
|
key: 'Mac17,9',
|
|
1452
1484
|
name: 'MacBook Pro',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/systeminformation",
|
|
3
|
-
"version": "5.33.
|
|
3
|
+
"version": "5.33.15-depup.0",
|
|
4
4
|
"description": "Advanced, lightweight system and OS information library (with updated dependencies)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|
|
@@ -111,8 +111,8 @@
|
|
|
111
111
|
"changes": {},
|
|
112
112
|
"depsUpdated": 0,
|
|
113
113
|
"originalPackage": "systeminformation",
|
|
114
|
-
"originalVersion": "5.33.
|
|
115
|
-
"processedAt": "2026-
|
|
114
|
+
"originalVersion": "5.33.15",
|
|
115
|
+
"processedAt": "2026-10-04T01:30:45.352Z",
|
|
116
116
|
"smokeTest": "passed"
|
|
117
117
|
}
|
|
118
118
|
}
|