| 5.6.0 |
2021-03-03 |
diff --git a/docs/index.html b/docs/index.html
index 662f62f..4ba67fa 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -170,7 +170,7 @@
systeminformation
- New Version: 5.6.0
+ New Version: 5.6.1
diff --git a/lib/docker.js b/lib/docker.js
index 845f0cd..235487e 100644
--- a/lib/docker.js
+++ b/lib/docker.js
@@ -98,6 +98,9 @@ function dockerImages(all, callback) {
callback = all;
all = false;
}
+ if (typeof all === 'string' && all === 'true') {
+ all = true;
+ }
if (typeof all !== 'boolean' && all !== undefined) {
all = false;
}
@@ -218,6 +221,9 @@ function dockerContainers(all, callback) {
callback = all;
all = false;
}
+ if (typeof all === 'string' && all === 'true') {
+ all = true;
+ }
if (typeof all !== 'boolean' && all !== undefined) {
all = false;
}
diff --git a/lib/index.js b/lib/index.js
index 4e804a4..68b46d1 100755
--- a/lib/index.js
+++ b/lib/index.js
@@ -362,12 +362,17 @@ function get(valueObject, callback) {
// result is in an array, go through all elements of array and pick only the right ones
const partialArray = [];
data[i].forEach(element => {
- const partialRes = {};
- keys.forEach(k => {
- if ({}.hasOwnProperty.call(element, k)) {
- partialRes[k] = element[k];
- }
- });
+ let partialRes = {};
+ if (keys.length === 1 && (keys[0] === '*' || keys[0] === 'all')) {
+ partialRes = element;
+ } else {
+ keys.forEach(k => {
+ if ({}.hasOwnProperty.call(element, k)) {
+ partialRes[k] = element[k];
+ }
+ });
+ }
+ // if there is a filter, then just take those elements
if (filter && filterParts.length === 2) {
if ({}.hasOwnProperty.call(partialRes, filterParts[0].trim())) {
const val = partialRes[filterParts[0].trim()];
diff --git a/lib/processes.js b/lib/processes.js
index 83a90cc..400c01f 100644
--- a/lib/processes.js
+++ b/lib/processes.js
@@ -164,6 +164,10 @@ function services(srv, callback) {
}
}
}
+ if ((_darwin) && srvString === '*') { // service enumeration mnot yet suported on mac OS
+ if (callback) { callback(result); }
+ resolve(result);
+ }
let comm = (_darwin) ? 'ps -caxo pcpu,pmem,pid,command' : 'ps -axo pcpu,pmem,pid,command';
if (srvString !== '' && srvs.length > 0) {
exec(comm + ' | grep -v grep | grep -iE "' + srvString + '"', { maxBuffer: 1024 * 20000 }, function (error, stdout) { // lgtm [js/shell-command-constructed-from-input]