systeminformation
Advanced tools
Comparing version 5.23.4 to 5.23.5
@@ -1008,3 +1008,3 @@ 'use strict'; | ||
const procSanitized = util.isPrototypePolluted() ? '' : util.sanitizeShellString(proc); | ||
const procSanitized = util.isPrototypePolluted() ? '' : (util.sanitizeShellString(proc) || '*'); | ||
@@ -1153,8 +1153,10 @@ // from here new | ||
}); | ||
lines.shift(); | ||
lines.forEach(function (line) { | ||
let data = line.trim().replace(/ +/g, ' ').split(' '); | ||
if (data.length > 4) { | ||
const linuxName = data[4].indexOf('/') >= 0 ? data[4].substring(0, data[4].indexOf('/')) : data[4]; | ||
const name = _linux ? (linuxName) : data[4].substring(data[4].lastIndexOf('/') + 1); | ||
procStats.push({ | ||
name: data[4].substring(data[4].lastIndexOf('/') + 1), | ||
name, | ||
pid: parseInt(data[0]) || 0, | ||
@@ -1171,3 +1173,3 @@ ppid: parseInt(data[1]) || 0, | ||
let inList = false; | ||
let name = ''; | ||
let name = item.name; | ||
for (let j = 0; j < result.length; j++) { | ||
@@ -1187,9 +1189,11 @@ if (item.name.toLowerCase().indexOf(result[j].proc.toLowerCase()) >= 0) { | ||
if (listPos < 0) { | ||
result.push({ | ||
proc: name, | ||
pid: item.pid, | ||
pids: [item.pid], | ||
cpu: item.cpu, | ||
mem: item.mem | ||
}); | ||
if (name) { | ||
result.push({ | ||
proc: name, | ||
pid: item.pid, | ||
pids: [item.pid], | ||
cpu: item.cpu, | ||
mem: item.mem | ||
}); | ||
} | ||
} else { | ||
@@ -1196,0 +1200,0 @@ if (item.ppid < 10) { |
{ | ||
"name": "systeminformation", | ||
"version": "5.23.4", | ||
"version": "5.23.5", | ||
"description": "Advanced, lightweight system and OS information library", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
747096
15833