Socket
Socket
Sign inDemoInstall

auto-apm

Package Overview
Dependencies
8
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

24

autoapm.js
#!/usr/bin/env node
var execSync = require('child_process').execSync;
var chalk = require('chalk');

@@ -10,3 +9,3 @@ var program = require('commander');

program.option('-p, --packages', 'the packages file. Needs to be a .json file')
program.option('-p, --packages [packages_file]', 'the packages file. Needs to be a .json file')
.parse(process.argv);

@@ -16,3 +15,3 @@

path.join(os.homedir(), '.auto-apm.packages.json');
console.log(packagesFile);
if (!packagesFile.endsWith(".json"))

@@ -26,4 +25,3 @@ throw "packages file must end with .json";

installed = installed.user.map(function (p) { return p.name; });
console.log("User installed packages:");
console.log(installed.join(", "));
console.log("User installed packages:" + installed.join(", "));

@@ -34,6 +32,16 @@ packages.forEach(function (pkg) {

} else {
console.log(chalk.green('installing ' + pkg));
var result = execSync('apm install ' + pkg, {encoding: 'utf8'});
console.log(result);
process.stdout.write(chalk.green('installing ' + pkg + '...'));
var error;
try {
execSync('apm install ' + pkg);
}
catch (e) {
console.log('');
console.log(chalk.red(e));
error = e;
}
finally{
if (!error) console.log(chalk.green("done!"));
}
}
});
{
"name": "auto-apm",
"version": "1.0.1",
"version": "1.0.2",
"description": "Only install missing Atom packages and skip installed ones",

@@ -5,0 +5,0 @@ "main": "autoapm.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc