diskLayout(), osInfo() fix parsing issues (mac OS)
This commit is contained in:
parent
20d5d30722
commit
3fa3341697
@ -82,6 +82,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
|
||||
|
||||
| Version | Date | Comment |
|
||||
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
|
||||
| 5.17.14 | 2023-05-29 | `diskLayout()`, `osInfo()` fix parsing issues (mac OS) |
|
||||
| 5.17.13 | 2023-05-24 | `typings` fix typings dynamicData, networkInterfaceDatass |
|
||||
| 5.17.12 | 2023-02-28 | `uuid()` fix unique mac address issue (Android) |
|
||||
| 5.17.11 | 2023-02-27 | `blockDevices()` raid added label, uuid (linux) |
|
||||
@ -94,10 +95,10 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
|
||||
| 5.17.4 | 2023-01-24 | `networkInterfaces()` sanitizing networkInterfaces device names |
|
||||
| 5.17.3 | 2023-01-10 | `processes()` fix elapsed time parsing (linux) |
|
||||
| 5.17.2 | 2023-01-10 | `utils` fix killing powershell (windows) |
|
||||
| 5.17.1 | 2023-01-06 | `graphics()` positionX, positionY Ventura fix (max OS) |
|
||||
| 5.17.0 | 2023-01-06 | `graphics()` added positionX, positionY (max OS) |
|
||||
| 5.17.1 | 2023-01-06 | `graphics()` positionX, positionY Ventura fix (mac OS) |
|
||||
| 5.17.0 | 2023-01-06 | `graphics()` added positionX, positionY (mac OS) |
|
||||
| 5.16.9 | 2022-12-27 | updated docs |
|
||||
| 5.16.8 | 2022-12-22 | `processes()` params truncated fix (max OS) |
|
||||
| 5.16.8 | 2022-12-22 | `processes()` params truncated fix (mac OS) |
|
||||
| 5.16.7 | 2022-12-22 | `processes()` commandLine missing spaces fix (windows) |
|
||||
| 5.16.6 | 2022-12-12 | `processes()` time format fix (linux) |
|
||||
| 5.16.5 | 2022-12-09 | `inetLatency()` fix for alpine (linux) |
|
||||
|
||||
@ -57,6 +57,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">5.17.14</th>
|
||||
<td>2023-05-29</td>
|
||||
<td><span class="code">diskLayout()</span> <span class="code">osInfo()</span>fix parsing issue (mac OS)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">5.17.13</th>
|
||||
<td>2023-05-24</td>
|
||||
@ -120,12 +125,12 @@
|
||||
<tr>
|
||||
<th scope="row">5.17.1</th>
|
||||
<td>2023-01-06</td>
|
||||
<td><span class="code">graphics()</span> positionX, positionY Ventura fix (max OS)</td>
|
||||
<td><span class="code">graphics()</span> positionX, positionY Ventura fix (mac OS)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">5.17.0</th>
|
||||
<td>2023-01-06</td>
|
||||
<td><span class="code">graphics()</span> added positionX, positionY (max OS)</td>
|
||||
<td><span class="code">graphics()</span> added positionX, positionY (mac OS)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">5.16.9</th>
|
||||
@ -135,7 +140,7 @@
|
||||
<tr>
|
||||
<th scope="row">5.16.8</th>
|
||||
<td>2022-12-22</td>
|
||||
<td><span class="code">processes()</span> params truncated fix (max OS)</td>
|
||||
<td><span class="code">processes()</span> params truncated fix (mac OS)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">5.16.7</th>
|
||||
|
||||
@ -212,7 +212,7 @@
|
||||
<div class="title">Downloads last month</div>
|
||||
</div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
||||
<div class="numbers">612</div>
|
||||
<div class="numbers">613</div>
|
||||
<div class="title">Dependents</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -289,7 +289,7 @@ function osInfo(callback) {
|
||||
let lines = stdout.toString().split('\n');
|
||||
result.serial = util.getValue(lines, 'kern.uuid');
|
||||
result.distro = util.getValue(lines, 'ProductName');
|
||||
result.release = util.getValue(lines, 'ProductVersion');
|
||||
result.release = (util.getValue(lines, 'ProductVersion', ':', true, true) + ' ' + util.getValue(lines, 'ProductVersionExtra', ':', true, true)).trim();
|
||||
result.build = util.getValue(lines, 'BuildVersion');
|
||||
result.logofile = getLogoFile(result.distro);
|
||||
result.codename = 'macOS';
|
||||
|
||||
@ -119,7 +119,7 @@ function getValue(lines, property, separator, trimmed, lineMatch) {
|
||||
trimmed = trimmed || false;
|
||||
lineMatch = lineMatch || false;
|
||||
let result = '';
|
||||
lines.forEach((line) => {
|
||||
lines.some((line) => {
|
||||
let lineLower = line.toLowerCase().replace(/\t/g, '');
|
||||
if (trimmed) {
|
||||
lineLower = lineLower.trim();
|
||||
@ -129,6 +129,7 @@ function getValue(lines, property, separator, trimmed, lineMatch) {
|
||||
if (parts.length >= 2) {
|
||||
parts.shift();
|
||||
result = parts.join(separator).trim();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user