Socket
Socket
Sign inDemoInstall

amass

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amass - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

46

bin/amass.js

@@ -14,2 +14,47 @@ #!/usr/bin/env node

var getopt = require('posix-getopt');
var latest = require('latest');
var package = require('../package.json');
/**
* Usage
*
* return the usage message
*/
function usage() {
return [
'Usage: amass',
'',
'Gather system information and expose it as JSON',
'',
'-h, --help print this message and exit',
'-u, --updates check for available updates',
'-v, --version print the version number and exit'
].join('\n');
}
// command line arguments
var options = [
'h(help)',
'u(updates)',
'v(version)'
].join('');
var parser = new getopt.BasicParser(options, process.argv);
var option;
while ((option = parser.getopt()) !== undefined) {
switch (option.option) {
case 'h': console.log(usage()); process.exit(0);
case 'u': // check for updates
latest.checkupdate(package, function(ret, msg) {
console.log(msg);
process.exit(ret);
});
return;
case 'v': console.log(package.version); process.exit(0);
default: console.error(usage()); process.exit(1); break;
}
}
amass(function(errors, data) {

@@ -19,3 +64,4 @@ if (errors) errors.forEach(function(err) {

});
data.amass = package.version;
console.log(JSON.stringify(data, null, 2));
});

8

package.json

@@ -5,3 +5,3 @@ {

"author": "Dave Eddy <dave@daveeddy.com> (http://www.daveeddy.com)",
"version": "0.0.0",
"version": "0.0.1",
"bin": {

@@ -21,3 +21,7 @@ "amass": "./bin/amass.js"

],
"license": "MIT"
"license": "MIT",
"dependencies": {
"latest": "~0.1.0",
"posix-getopt": "~1.0.0"
}
}

@@ -29,4 +29,6 @@ amass

`data` is an object representing all of the data that was amassed, and errors,
if set, is an array of any errors encountered from any of the plugins.
* `data` is an object representing all of the system information that was
amassed.
* `errors`, if set, is an array of any errors encountered from any of
the plugins.

@@ -38,3 +40,3 @@ Command line tool

$ amass | json os.type
x64
Darwin
$ amass | json os.cpus.0

@@ -41,0 +43,0 @@ {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc