systeminformation 5.16.4 → 5.16.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/internet.js +1 -5
- package/package.json +1 -1
package/lib/internet.js
CHANGED
|
@@ -158,24 +158,20 @@ function inetLatency(host, callback) {
|
|
|
158
158
|
return resolve(null);
|
|
159
159
|
}
|
|
160
160
|
let params;
|
|
161
|
-
let filt;
|
|
162
161
|
if (_linux || _freebsd || _openbsd || _netbsd || _darwin) {
|
|
163
162
|
if (_linux) {
|
|
164
163
|
params = ['-c', '2', '-w', '3', hostSanitized];
|
|
165
|
-
filt = 'rtt';
|
|
166
164
|
}
|
|
167
165
|
if (_freebsd || _openbsd || _netbsd) {
|
|
168
166
|
params = ['-c', '2', '-t', '3', hostSanitized];
|
|
169
|
-
filt = 'round-trip';
|
|
170
167
|
}
|
|
171
168
|
if (_darwin) {
|
|
172
169
|
params = ['-c2', '-t3', hostSanitized];
|
|
173
|
-
filt = 'avg';
|
|
174
170
|
}
|
|
175
171
|
util.execSafe('ping', params).then((stdout) => {
|
|
176
172
|
let result = null;
|
|
177
173
|
if (stdout) {
|
|
178
|
-
const lines = stdout.split('\n').filter(line => line.indexOf(
|
|
174
|
+
const lines = stdout.split('\n').filter((line) => (line.indexOf('rtt') >= 0 || line.indexOf('round-trip') >= 0 || line.indexOf('avg') >= 0)).join('\n');
|
|
179
175
|
|
|
180
176
|
const line = lines.split('=');
|
|
181
177
|
if (line.length > 1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.16.
|
|
3
|
+
"version": "5.16.5",
|
|
4
4
|
"description": "Advanced, lightweight system and OS information library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|