From c114c51ea5966db6d3ff3afcaa4c2815cf9bb771 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 25 Dec 2024 08:35:25 +0100 Subject: [PATCH] osInfo() fix manufacturer Apple Silicon (macOS) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/memory.js | 7 ++++--- lib/network.js | 2 +- lib/wifi.js | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2220dd..bde4d38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.22 | 2024-12-25 | `osInfo()` fix manufacturer Apple Silicon (macOS) | | 5.23.21 | 2024-12-24 | `osInfo()` fix fqdn | | 5.23.20 | 2024-12-24 | `cpu()` fix timeout | | 5.23.19 | 2024-12-24 | `cpu()` refactored using internal node functions | diff --git a/docs/history.html b/docs/history.html index aa3fb19..2d8eeef 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.23.22 + 2024-12-25 + memLayout() fix manufacturer Apple Silicon (macOS) + 5.23.21 2024-12-24 diff --git a/docs/index.html b/docs/index.html index db8ade0..8bb8437 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.21
+
New Version: 5.23.22
diff --git a/lib/memory.js b/lib/memory.js index d70a44f..ebf9683 100644 --- a/lib/memory.js +++ b/lib/memory.js @@ -498,15 +498,16 @@ function memLayout(callback) { const lines = stdout.toString().split('\n'); const size = parseInt(util.getValue(lines, ' Memory:')); const type = util.getValue(lines, ' Type:'); + const manufacturerId = util.getValue(lines, ' Manufacturer:'); if (size && type) { result.push({ size: size * 1024 * 1024 * 1024, bank: '0', type, ecc: false, - clockSpeed: 0, - formFactor: '', - manufacturer: 'Apple', + clockSpeed: null, + formFactor: 'SOC', + manufacturer: getManufacturerDarwin(manufacturerId), partNum: '', serialNum: '', voltageConfigured: null, diff --git a/lib/network.js b/lib/network.js index a843196..69d23cc 100644 --- a/lib/network.js +++ b/lib/network.js @@ -403,7 +403,7 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) { let ifaceSanitized = ''; const s = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(SSID); - const l = util.mathMin(s.length, 2000); + const l = util.mathMin(s.length, 32); for (let i = 0; i <= l; i++) { if (s[i] !== undefined) { diff --git a/lib/wifi.js b/lib/wifi.js index ee8492e..9735094 100644 --- a/lib/wifi.js +++ b/lib/wifi.js @@ -612,7 +612,7 @@ function wifiConnections(callback) { const network = networkList.filter(nw => nw.ssid === ssid); let ssidSanitized = ''; const t = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(ssid, true); - const l = util.mathMin(t.length, 2000); + const l = util.mathMin(t.length, 32); for (let i = 0; i <= l; i++) { if (t[i] !== undefined) { ssidSanitized = ssidSanitized + t[i];