tests improved key handling, updated, fixed graphics mac OS

This commit is contained in:
Sebastian Hildebrandt 2023-06-09 05:59:02 +02:00
parent f4ba8af8a4
commit 9a6e77dedb
7 changed files with 17 additions and 10 deletions

View File

@ -11,20 +11,20 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [10.x, 12.x, 14.x, 16.x, 17.x, 18.x, 19.x]
node-version: [16.x, 17.x, 18.x, 19.x, 20.x]
include:
- os: macos-latest
node-version: 14.x
- os: macos-latest
node-version: 16.x
- os: macos-latest
node-version: 18.x
- os: windows-latest
node-version: 14.x
- os: macos-latest
node-version: 20.x
- os: windows-latest
node-version: 16.x
- os: windows-latest
node-version: 18.x
- os: windows-latest
node-version: 20.x
runs-on: ${{ matrix.os }}

View File

@ -73,7 +73,7 @@ We had to make **several interface changes** to keep systeminformation as consis
#### Test Full Version 5 Functionality
If you want to see all function results on your machine, please head over to (Testing section)[https://systeminformation.io/tests.html]. We implemented a tiny test suite where you can easily go through all functions and test resuls on your machine without coding.
If you want to see all function results on your machine, please head over to [Testing section](https://systeminformation.io/tests.html). We implemented a tiny test suite where you can easily go through all functions and test resuls on your machine without coding.
For major (breaking) changes - **version 4, 3 and 2** - see end of page.
@ -82,6 +82,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.18.3 | 2023-06-09 | `tests` improved key handling, updated docs |
| 5.18.2 | 2023-06-08 | `fsSize()` improved error handling (linux alpine) |
| 5.18.1 | 2023-06-07 | `networkInterfaces()` cleaned up testVirtualNic |
| 5.18.0 | 2023-06-06 | `fsSize()` added optional drive parameter |

View File

@ -57,9 +57,14 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.18.3</th>
<td>2023-06-09</td>
<td><span class="code">tests</span> improved key handling, updated docs</td>
</tr>
<tr>
<th scope="row">5.18.2</th>
<td>2023-06-07</td>
<td>2023-06-08</td>
<td><span class="code">fsSize()</span> improved error handling (alpine linux)</td>
</tr>
<tr>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.18.2</span></div>
<div class="version">New Version: <span id="version">5.18.3</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">

View File

@ -669,7 +669,7 @@ function graphics(callback) {
} catch (e) {
util.noop();
}
stdout = execSync('defaults read /Library/Preferences/com.apple.windowserver.plist 2>/dev/null;defaults read /Library/Preferences/com.apple.windowserver.displays.plist 2>/dev/null; echo ""');
stdout = execSync('defaults read /Library/Preferences/com.apple.windowserver.plist 2>/dev/null;defaults read /Library/Preferences/com.apple.windowserver.displays.plist 2>/dev/null; echo ""', { maxBuffer: 1024 * 20000 });
const output = (stdout || '').toString();
const obj = util.plistReader(output);
if (obj['DisplayAnyUserSets'] && obj['DisplayAnyUserSets']['Configs'] && obj['DisplayAnyUserSets']['Configs'][0] && obj['DisplayAnyUserSets']['Configs'][0]['DisplayConfig']) {

View File

@ -56,7 +56,7 @@ function test(f) {
else if (f === ',') { si.getStaticData().then((data) => { if (data !== null) { resolve({ data, title: 'All Static Data' }); } else { resolve('not_supported'); } }); }
else if (f === '.') { si.getDynamicData('apache2, postgres, wsearch').then((data) => { if (data !== null) { resolve({ data, title: 'All Dynamic Data' }); } else { resolve('not_supported'); } }); }
else if (f === '/') { si.getAllData('apache2, postgres, wsearch').then((data) => { if (data !== null) { resolve({ data, title: 'All Data' }); } else { resolve('not_supported'); } }); }
else if (f === '?') {
else if (f === 'getObj') {
const valueObject = {
cpu: '*',
osInfo: 'platform, release',

View File

@ -79,6 +79,7 @@ process.stdin.on('keypress', (key, data) => {
console.time(['Time to complete']);
startDots();
const siPath = path.join(__dirname, 'si.js');
if (key === '?') { key = 'getObj'; }
const sanitizedKey = utils.sanitizeShellString(key);
exec(`node ${siPath} '${sanitizedKey}'`, { timeout: 30000 }, (error, stdout) => {
waiting = false;