systeminformation 5.23.19 → 5.23.21

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/osinfo.js CHANGED
@@ -190,17 +190,10 @@ function getFQDN() {
190
190
  let fqdn = os.hostname;
191
191
  if (_linux || _darwin) {
192
192
  try {
193
- const stdout = execSync('hostnamectl --json short 2>/dev/null', util.execOptsLinux);
194
- const json = JSON.parse(stdout.toString());
195
-
196
- fqdn = json['StaticHostname'];
193
+ const stdout = execSync('hostname -f 2>/dev/null', util.execOptsLinux);
194
+ fqdn = stdout.toString().split(os.EOL)[0];
197
195
  } catch (e) {
198
- try {
199
- const stdout = execSync('hostname -f 2>/dev/null', util.execOptsLinux);
200
- fqdn = stdout.toString().split(os.EOL)[0];
201
- } catch (e) {
202
- util.noop();
203
- }
196
+ util.noop();
204
197
  }
205
198
  }
206
199
  if (_freebsd || _openbsd || _netbsd) {
package/lib/util.js CHANGED
@@ -2487,7 +2487,7 @@ function checkWebsite(url, timeout = 5000) {
2487
2487
  const http = ((url.startsWith('https:') || url.indexOf(':443/') > 0 || url.indexOf(':8443/') > 0) ? require('https') : require('http'));
2488
2488
  const t = Date.now();
2489
2489
  return new Promise((resolve) => {
2490
- http
2490
+ const request = http
2491
2491
  .get(url, { rejectUnauthorized: false }, function (res) {
2492
2492
  res.on('data', () => { });
2493
2493
  res.on('end', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.23.19",
3
+ "version": "5.23.21",
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)",