UNPKG

hhurley

Version:

Tool to find lost security patches for Linux distributions.

51 lines (35 loc) 1.07 kB
#!/usr/bin/env node /* Copyright IBM Research Emergent Solutions Jesús Pérez <jesusprubio@gmail.com> This code may only be used under the MIT license found at https://opensource.org/licenses/MIT. */ /* eslint-disable no-console */ 'use strict'; const Hhurley = require('../'); // const Cli = require('patchfinder'); const hhurley = new Hhurley({ // forceDown: true, // default: false }); const patchesInfo = []; console.log('Version:'); console.log(hhurley.version); // Optional events, to get partial results -> less perf. hhurley.on('file:downloading', () => console.log('\nDonwloading the base file, please wait a bit ...')); hhurley.on('file:downloaded', () => console.log('\nBase file downloaded correctly.')); hhurley.on('new', (info) => { console.log('\nNew patch found:'); console.log(info); patchesInfo.push(info); }); hhurley.on('end', () => { console.log('\n\nDone, patches info:'); console.log(patchesInfo); }); hhurley.on('error', (err) => { console.log('\n\nError:'); console.log(err); }); hhurley.search();