From 4803bdd2065e61f8424145edefeefc5faa0e3dca Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 30 Jan 2021 07:26:03 +0100 Subject: [PATCH] typescript typings fix cpuCurrentSpeed --- CHANGELOG.md | 1 + README.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/index.d.ts | 2 +- lib/index.js | 14 ++++++-------- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6ba7c3..e5ac599 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.8 | 2020-01-30 | typescript typings fix cpuCurrentSpeed | | 5.0.7 | 2020-01-29 | `fsSize()` available fixed windows and typescript typings | | 5.0.6 | 2020-01-28 | `osinfo()` added hypervisor (win only) | | 5.0.5 | 2020-01-27 | `networkInterfaces()` type detection improved (win) | diff --git a/README.md b/README.md index 4bef4b9..3305471 100644 --- a/README.md +++ b/README.md @@ -443,6 +443,7 @@ Full function reference with examples can be found at [https://systeminformation | | [0].type | X | X | X | X | | type of file system | | | [0].size | X | X | X | X | | sizes in bytes | | | [0].used | X | X | X | X | | used in bytes | +| | [0].available | X | X | X | X | | used in bytes | | | [0].use | X | X | X | X | | used in % | | | [0].mount | X | X | X | X | | mount point | | si.fsOpenFiles(cb) | {...} | X | X | X | | | count max/allocated file descriptors | diff --git a/docs/history.html b/docs/history.html index 1f18959..5f73015 100644 --- a/docs/history.html +++ b/docs/history.html @@ -56,6 +56,11 @@ + + 5.0.8 + 2020-01-30 + typescript typings fix cpuCurrentSpeed + 5.0.7 2020-01-29 diff --git a/docs/index.html b/docs/index.html index 230e283..5e6471f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.0.7
+
New Version: 5.0.8
diff --git a/lib/index.d.ts b/lib/index.d.ts index 1f58d28..13c8f20 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -790,7 +790,7 @@ export function uuid(cb?: (data: Systeminformation.UuidData) => any): Promise any): Promise; export function cpuFlags(cb?: (data: string) => any): Promise; export function cpuCache(cb?: (data: Systeminformation.CpuCacheData) => any): Promise; -export function cpuCurrentspeed(cb?: (data: Systeminformation.CpuCurrentSpeedData) => any): Promise; +export function cpuCurrentSpeed(cb?: (data: Systeminformation.CpuCurrentSpeedData) => any): Promise; export function cpuTemperature(cb?: (data: Systeminformation.CpuTemperatureData) => any): Promise; export function currentLoad(cb?: (data: Systeminformation.CurrentLoadData) => any): Promise; export function fullLoad(cb?: (data: number) => any): Promise; diff --git a/lib/index.js b/lib/index.js index 2f440fd..8cce78e 100755 --- a/lib/index.js +++ b/lib/index.js @@ -145,7 +145,7 @@ function getDynamicData(srv, iface, callback) { // use closure to track ƒ completion let functionProcessed = (function () { let totalFunctions = 15; - if (_windows) { totalFunctions = 11; } + if (_windows) { totalFunctions = 13; } if (_freebsd || _openbsd || _netbsd) { totalFunctions = 11; } if (_sunos) { totalFunctions = 6; } @@ -191,12 +191,10 @@ function getDynamicData(srv, iface, callback) { functionProcessed(); }); - if (!_windows) { - processes.processes().then(res => { - data.processes = res; - functionProcessed(); - }); - } + processes.processes().then(res => { + data.processes = res; + functionProcessed(); + }); cpu.currentLoad().then(res => { data.currentLoad = res; @@ -236,7 +234,7 @@ function getDynamicData(srv, iface, callback) { }); } - if (!_windows && !_sunos) { + if (!_sunos) { processes.services(srv).then(res => { data.services = res; functionProcessed();