fsSize() available fixed windows and typescript typings
This commit is contained in:
parent
486b959c1e
commit
284ec8cb8f
@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
||||
|
||||
| Version | Date | Comment |
|
||||
| -------------- | -------------- | -------- |
|
||||
| 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) |
|
||||
| 5.0.4 | 2020-01-27 | `cpu()` improved manufacturer decoding (linux) |
|
||||
|
||||
@ -36,13 +36,13 @@ This is amazing. Started as a small project just for myself, it now has > 10,000
|
||||
|
||||
The new Version 5 is here - I spend several weeks finalizing this new version. Any support is highly appreciated - [Buy me a coffee](https://www.buymeacoffee.com/systeminfo)
|
||||
|
||||
This next major version release 5.0 comes with several optimizations and changes (some of them are breaking changes!):
|
||||
This next major version release 5.0 comes with new functionality and several improvements and changes (some of them are breaking changes!):
|
||||
|
||||
- added bluetooth: get detailed bluetooth device information
|
||||
- added usb: get detailed usb controller and device information
|
||||
- added printer: get information from detected printers
|
||||
- added audio: get detailed audio device information
|
||||
- better uuid function to get unique hardware and os UUIDs
|
||||
- better uuid function to get unique hardware and OS UUIDs
|
||||
- better/extended cpu info detection
|
||||
- better/extended system info detection
|
||||
- Apple Silicon M1 support
|
||||
@ -50,7 +50,7 @@ This next major version release 5.0 comes with several optimizations and changes
|
||||
- systeminformation website updated and extendet with full documentation and examples [systeminformation.io][systeminformation-url]
|
||||
- lot of minor improvements
|
||||
|
||||
Breaking Changes in version 5: you will see several breaking changes for the sake of a more consistent API interface and to be future proof. Read the [detailed Version 5 changes][changes5-url].
|
||||
Breaking Changes in version 5: you will see several breaking changes for the sake of a more consistent API interface and to be future proof. Read the [detailed version 5 changes][changes5-url].
|
||||
|
||||
I did a lot of testing on different platforms and machines but of course there might be some issues that I am not aware of. I would be happy if you inform me when you discover any issues. Issues can be [opened here][new-issue].
|
||||
|
||||
@ -73,7 +73,7 @@ $ npm install systeminformation --save
|
||||
|
||||
#### Still need Version 4?
|
||||
|
||||
If you need the lates version 4 release of the package (for compatibility reasons), you can install version 4 (latest release) with
|
||||
If you need version 4 (for compatibility reasons), you can install version 4 (latest release) like this
|
||||
|
||||
```bash
|
||||
$ npm install systeminformation@4 —save
|
||||
|
||||
@ -630,6 +630,16 @@ setInterval(function() {
|
||||
<td></td>
|
||||
<td>used in bytes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].available</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>available in bytes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].use</td>
|
||||
@ -663,6 +673,7 @@ si.fsSize().then(data => console.log(data));</code></pre class="example">
|
||||
type: 'ext4',
|
||||
size: 972577361920,
|
||||
used: 59142635520,
|
||||
available: 913434726400,
|
||||
use: 6.08,
|
||||
mount: '/'
|
||||
},
|
||||
|
||||
@ -56,6 +56,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">5.0.7</th>
|
||||
<td>2020-01-29</td>
|
||||
<td><span class="code">fsSize()</span> available fixed windows and typescript typings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">5.0.6</th>
|
||||
<td>2020-01-28</td>
|
||||
|
||||
@ -170,7 +170,7 @@
|
||||
<img class="logo" src="assets/logo.png">
|
||||
<div class="title">systeminformation</div>
|
||||
<div class="subtitle"><span id="typed"></span> </div>
|
||||
<div class="version">New Version: <span id="version">5.0.6</span></div>
|
||||
<div class="version">New Version: <span id="version">5.0.7</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">
|
||||
@ -201,7 +201,7 @@
|
||||
</div>
|
||||
<div class="row number-section">
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
||||
<div class="numbers">13,086</div>
|
||||
<div class="numbers">13,096</div>
|
||||
<div class="title">Lines of code</div>
|
||||
</div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
||||
|
||||
@ -128,12 +128,13 @@ function fsSize(callback) {
|
||||
if (line !== '') {
|
||||
line = line.trim().split(/\s\s+/);
|
||||
data.push({
|
||||
'fs': line[0],
|
||||
'type': line[1],
|
||||
'size': parseInt(line[3]),
|
||||
'used': parseInt(line[3]) - parseInt(line[2]),
|
||||
'use': parseFloat((100.0 * (parseInt(line[3]) - parseInt(line[2]))) / parseInt(line[3])),
|
||||
'mount': line[0]
|
||||
fs: line[0],
|
||||
type: line[1],
|
||||
size: parseInt(line[3], 10),
|
||||
used: parseInt(line[3], 10) - parseInt(line[2], 10),
|
||||
available: parseInt(line[2], 10),
|
||||
use: parseFloat((100.0 * (parseInt(line[3]) - parseInt(line[2]))) / parseInt(line[3])),
|
||||
mount: line[0]
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
1
lib/index.d.ts
vendored
1
lib/index.d.ts
vendored
@ -368,6 +368,7 @@ export namespace Systeminformation {
|
||||
type: string;
|
||||
size: number;
|
||||
used: number;
|
||||
available: number;
|
||||
use: number;
|
||||
mount: string;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user