Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amvn

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amvn - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

38

index.js

@@ -14,3 +14,2 @@ 'use strict';

cp = require('cp'),
debounce = require('debounce'),
mkdirp = require('mkdirp');

@@ -21,2 +20,5 @@

function now() {
return new Date().getTime();
}

@@ -32,3 +34,7 @@ function AwesomeMaven(mvnPath, options) {

var starting = 0;
function runMaven(cleanStart) {
starting = starting || now();
if (!cleanStart) {

@@ -50,2 +56,4 @@ log('[AMVN] restarting mvn...'.yellow);

}
starting = 0;
}

@@ -55,2 +63,9 @@

// already starting
if (starting) {
return;
}
starting = now();
if (mvn) {

@@ -66,9 +81,20 @@ log('[AMVN] sending KILL to mvn...'.yellow);

delayedRestartMaven();
var timer = setInterval(function() {
try {
process.kill(mvn.pid, 0);
} catch (e) {
// does not exist
log('[AMVN] mvn gone'.yellow);
// clear timer
clearInterval(timer);
// restart
runMaven();
}
}, 500);
}
var delayedReloadMaven = debounce(reloadMaven, 2000);
var delayedRestartMaven = debounce(runMaven, 4000);
function registerWatch() {

@@ -103,3 +129,3 @@

watcher.on('change', delayedReloadMaven);
watcher.on('change', reloadMaven);
}

@@ -106,0 +132,0 @@

2

package.json

@@ -13,3 +13,3 @@ {

],
"version": "0.1.3",
"version": "0.2.0",
"scripts": {

@@ -16,0 +16,0 @@ "test": "echo \"Error: no test specified\" && exit 1"

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