diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0d7c37e..d225255 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
| 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.4 | 2020-01-27 | `cpu()` improved manufacturer decoding (linux) |
| 5.0.3 | 2020-01-27 | `cpu()` fix virtualization, `wifi()` fix raspberry |
diff --git a/docs/changes.html b/docs/changes.html
index 853ee25..0279188 100644
--- a/docs/changes.html
+++ b/docs/changes.html
@@ -176,6 +176,7 @@
networkInterfaces(): type detection improved (win - wireless)
memoryLayout(): extended manufacturer list (decoding)
osInfo(): better fqdn (win)
+ osinfo(): added hypervizor if hyper-v is enabled (win only)
system(): better Raspberry PI detection
system(): added virtual and virtualHost (if system is virtual instance)
uuid(): better value support
@@ -184,8 +185,8 @@
Apple M1 Silicon extended support (now everything supported except of cpu temperature)
updated TypeScript definitions
- Test full functionality and view Version 5 results
- If you want to see all function results on your machine, please head over to Testing section. Here you can easily test all functions without coding.
+ Test full version 5 functionality
+ If you want to see all function results on your machine, please head over to Testing section. We implemented a tiny test suite where you can easily go through all functions and test resuls on your machine without coding.
Major Changes - Version 4
New Functions
diff --git a/docs/os.html b/docs/os.html
index 6d5be9a..efd21b8 100644
--- a/docs/os.html
+++ b/docs/os.html
@@ -216,6 +216,16 @@
|
OS uses UEFI on startup |
+
+ |
+ hypervizor |
+ |
+ |
+ |
+ X |
+ |
+ hyper-v detected (win only) |
+
|
diff --git a/lib/index.d.ts b/lib/index.d.ts
index bf82179..c190e6a 100644
--- a/lib/index.d.ts
+++ b/lib/index.d.ts
@@ -311,6 +311,7 @@ export namespace Systeminformation {
build: string;
servicepack: string;
uefi: boolean;
+ hypervizor?: boolean;
}
interface UuidData {
diff --git a/lib/osinfo.js b/lib/osinfo.js
index a3334e3..a299f31 100644
--- a/lib/osinfo.js
+++ b/lib/osinfo.js
@@ -327,6 +327,12 @@ function osInfo(callback) {
result.build = util.getValue(lines, 'BuildNumber', '=').trim();
result.servicepack = util.getValue(lines, 'ServicePackMajorVersion', '=').trim() + '.' + util.getValue(lines, 'ServicePackMinorVersion', '=').trim();
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 => {
result.uefi = uefi;
if (callback) {
|