osinfo() added hypervisor (win only)
This commit is contained in:
parent
2c53de806b
commit
6f60c6816c
@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
|
| 5.0.6 | 2020-01-28 | `osinfo()` added hypervisor (win only) |
|
||||||
| 5.0.5 | 2020-01-27 | `networkInterfaces()` type detection improved (win) |
|
| 5.0.5 | 2020-01-27 | `networkInterfaces()` type detection improved (win) |
|
||||||
| 5.0.4 | 2020-01-27 | `cpu()` improved manufacturer decoding (linux) |
|
| 5.0.4 | 2020-01-27 | `cpu()` improved manufacturer decoding (linux) |
|
||||||
| 5.0.3 | 2020-01-27 | `cpu()` fix virtualization, `wifi()` fix raspberry |
|
| 5.0.3 | 2020-01-27 | `cpu()` fix virtualization, `wifi()` fix raspberry |
|
||||||
|
|||||||
@ -176,6 +176,7 @@
|
|||||||
<li><span class="code">networkInterfaces()</span>: type detection improved (win - wireless)</li>
|
<li><span class="code">networkInterfaces()</span>: type detection improved (win - wireless)</li>
|
||||||
<li><span class="code">memoryLayout()</span>: extended manufacturer list (decoding)</li>
|
<li><span class="code">memoryLayout()</span>: extended manufacturer list (decoding)</li>
|
||||||
<li><span class="code">osInfo()</span>: better fqdn (win)</li>
|
<li><span class="code">osInfo()</span>: better fqdn (win)</li>
|
||||||
|
<li><span class="code">osinfo()</span>: added <span class="code">hypervizor</span> if hyper-v is enabled (win only)</li>
|
||||||
<li><span class="code">system()</span>: better Raspberry PI detection</li>
|
<li><span class="code">system()</span>: better Raspberry PI detection</li>
|
||||||
<li><span class="code">system()</span>: added <span class="code">virtual</span> and <span class="code">virtualHost</span> (if system is virtual instance)</li>
|
<li><span class="code">system()</span>: added <span class="code">virtual</span> and <span class="code">virtualHost</span> (if system is virtual instance)</li>
|
||||||
<li><span class="code">uuid()</span>: better value support</li>
|
<li><span class="code">uuid()</span>: better value support</li>
|
||||||
@ -184,8 +185,8 @@
|
|||||||
<li><span class="code">Apple M1 Silicon</span> extended support (now everything supported except of cpu temperature)</li>
|
<li><span class="code">Apple M1 Silicon</span> extended support (now everything supported except of cpu temperature)</li>
|
||||||
<li>updated TypeScript definitions </li>
|
<li>updated TypeScript definitions </li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4>Test full functionality and view Version 5 results</h4>
|
<h4>Test full version 5 functionality</h4>
|
||||||
<p>If you want to see all function results on your machine, please head over to <a href="testing.html">Testing section</a>. Here you can easily test all functions without coding.<br><br></p>
|
<p>If you want to see all function results on your machine, please <a href="tests.html">head over to Testing section</a>. We implemented a tiny test suite where you can easily go through all functions and test resuls on your machine without coding.<br><br></p>
|
||||||
<h2>Major Changes - Version 4</h2>
|
<h2>Major Changes - Version 4</h2>
|
||||||
<h4>New Functions</h4>
|
<h4>New Functions</h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
10
docs/os.html
10
docs/os.html
@ -216,6 +216,16 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td>OS uses UEFI on startup</td>
|
<td>OS uses UEFI on startup</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>hypervizor</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>X</td>
|
||||||
|
<td></td>
|
||||||
|
<td>hyper-v detected (win only)</td>
|
||||||
|
</tr>
|
||||||
<tr class="example">
|
<tr class="example">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="7">
|
<td colspan="7">
|
||||||
|
|||||||
1
lib/index.d.ts
vendored
1
lib/index.d.ts
vendored
@ -311,6 +311,7 @@ export namespace Systeminformation {
|
|||||||
build: string;
|
build: string;
|
||||||
servicepack: string;
|
servicepack: string;
|
||||||
uefi: boolean;
|
uefi: boolean;
|
||||||
|
hypervizor?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface UuidData {
|
interface UuidData {
|
||||||
|
|||||||
@ -327,6 +327,12 @@ function osInfo(callback) {
|
|||||||
result.build = util.getValue(lines, 'BuildNumber', '=').trim();
|
result.build = util.getValue(lines, 'BuildNumber', '=').trim();
|
||||||
result.servicepack = util.getValue(lines, 'ServicePackMajorVersion', '=').trim() + '.' + util.getValue(lines, 'ServicePackMinorVersion', '=').trim();
|
result.servicepack = util.getValue(lines, 'ServicePackMajorVersion', '=').trim() + '.' + util.getValue(lines, 'ServicePackMinorVersion', '=').trim();
|
||||||
result.codepage = util.getCodepage();
|
result.codepage = util.getCodepage();
|
||||||
|
try {
|
||||||
|
const systeminfo = execSync('systeminfo').toString();
|
||||||
|
result.hypervisor = (systeminfo.indexOf('hypervisor has been detected') !== -1) || (systeminfo.indexOf('Es wurde ein Hypervisor erkannt') !== -1) || (systeminfo.indexOf('Un hyperviseur a ') !== -1);
|
||||||
|
} catch (e) {
|
||||||
|
util.noop();
|
||||||
|
}
|
||||||
isUefiWindows().then(uefi => {
|
isUefiWindows().then(uefi => {
|
||||||
result.uefi = uefi;
|
result.uefi = uefi;
|
||||||
if (callback) {
|
if (callback) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user