tests improved key handling, updated, fixed graphics mac OS
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ function test(f) {
|
||||
else if (f === ',') { si.getStaticData().then((data) => { if (data !== null) { resolve({ data, title: 'All Static Data' }); } else { resolve('not_supported'); } }); }
|
||||
else if (f === '.') { si.getDynamicData('apache2, postgres, wsearch').then((data) => { if (data !== null) { resolve({ data, title: 'All Dynamic Data' }); } else { resolve('not_supported'); } }); }
|
||||
else if (f === '/') { si.getAllData('apache2, postgres, wsearch').then((data) => { if (data !== null) { resolve({ data, title: 'All Data' }); } else { resolve('not_supported'); } }); }
|
||||
else if (f === '?') {
|
||||
else if (f === 'getObj') {
|
||||
const valueObject = {
|
||||
cpu: '*',
|
||||
osInfo: 'platform, release',
|
||||
|
||||
@@ -79,6 +79,7 @@ process.stdin.on('keypress', (key, data) => {
|
||||
console.time(['Time to complete']);
|
||||
startDots();
|
||||
const siPath = path.join(__dirname, 'si.js');
|
||||
if (key === '?') { key = 'getObj'; }
|
||||
const sanitizedKey = utils.sanitizeShellString(key);
|
||||
exec(`node ${siPath} '${sanitizedKey}'`, { timeout: 30000 }, (error, stdout) => {
|
||||
waiting = false;
|
||||
|
||||
Reference in New Issue
Block a user