Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "terminate", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Terminate a Node.js Process based on the Process ID", | ||
"main": "terminate.js", | ||
"scripts": { | ||
"test": "tape" | ||
"test": "./node_modules/.bin/istanbul cover ./node_modules/tape/bin/tape ./test/*.js", | ||
"coverage": "./node_modules/.bin/istanbul cover ./node_modules/tape/bin/tape ./test/*.js && ./node_modules/.bin/istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100", | ||
"jshint": "./node_modules/jshint/bin/jshint -c .jshintrc --exclude-path .gitignore .", | ||
"codeclimate": "CODECLIMATE_REPO_TOKEN=cb9cb09b16b317fb2d65ebf34df7039bb62976fe3cb3eadc71b4fd7991033c47 ./node_modules/codeclimate-test-reporter/bin/codeclimate.js < ./coverage/lcov.info" | ||
}, | ||
@@ -25,3 +28,22 @@ "repository": { | ||
}, | ||
"homepage": "https://github.com/nelsonic/terminate" | ||
"homepage": "https://github.com/nelsonic/terminate", | ||
"devDependencies": { | ||
"chalk": "^1.0.0", | ||
"codeclimate-test-reporter": "0.0.4", | ||
"istanbul": "^0.3.4", | ||
"jshint": "^2.5.10", | ||
"pre-commit": "0.0.9", | ||
"tape": "^3.0.3" | ||
}, | ||
"pre-commit": [ | ||
"jshint", | ||
"coverage", | ||
"codeclimate" | ||
], | ||
"engines": { | ||
"node": ">=0.10" | ||
}, | ||
"dependencies": { | ||
"ps-tree": "0.0.3" | ||
} | ||
} |
@@ -6,2 +6,10 @@ # terminate | ||
[![Build Status](https://travis-ci.org/nelsonic/terminate.svg)](https://travis-ci.org/nelsonic/terminate) | ||
[![Code Climate](https://codeclimate.com/github/nelsonic/terminate/badges/gpa.svg)](https://codeclimate.com/github/nelsonic/terminate) | ||
[![Test Coverage](https://codeclimate.com/github/nelsonic/terminate/badges/coverage.svg)](https://codeclimate.com/github/nelsonic/terminate) | ||
[![npm version](https://badge.fury.io/js/terminate.svg)](http://badge.fury.io/js/terminate) | ||
[![Node.js Version][node-version-image]][node-version-url] | ||
[![Dependency Status](https://david-dm.org/nelsonic/terminate.svg)](https://david-dm.org/nelsonic/terminate) | ||
[node-version-image]: https://img.shields.io/node/v/listdirs.svg?style=flat | ||
[node-version-url]: http://nodejs.org/download/ | ||
@@ -12,2 +20,20 @@ | ||
# tl;dr | ||
## Research | ||
### Background Reading | ||
+ How to terminate node processes: https://github.com/joyent/node/issues/1172 (history lesson) | ||
+ nodejs exec command failing with no useful error message: | ||
https://github.com/joyent/node/issues/4590 | ||
### Useful StackOverflow Questions/Answers | ||
+ http://stackoverflow.com/questions/26694100/why-does-my-node-app-process-keep-getting-stopped-when-i-use-forever | ||
+ http://stackoverflow.com/questions/18275809/kill-all-child-process-when-node-process-is-killed | ||
+ http://stackoverflow.com/questions/26004519/why-doesnt-my-node-js-process-terminate-once-all-listeners-have-been-removed | ||
+ http://stackoverflow.com/questions/14319724/nodejs-exec-command-failing-with-no-useful-error-message | ||
+ http://stackoverflow.com/questions/9275654/how-many-child-processes-can-a-node-js-cluster-spawn-on-a-64bit-wintel-pc | ||
## Background / Motivation | ||
@@ -19,9 +45,34 @@ | ||
As a result, we need to be able to kill those processes in order to re-start the app. | ||
**Terminate** seemed like the *best* (of the available) name, | ||
if you have a better suggestion, please share! | ||
### Why not use an *Existing* Module? | ||
We investigated using **terminate**: https://github.com/indexzero/terminate/ | ||
it was *un-maintained* and had *no tests* | ||
so we submitted an [***issue***](https://github.com/indexzero/terminate/issues/10) | ||
offering to update the module *with tests*. | ||
[*Charlie*](https://github.com/indexzero/terminate/issues/10#issuecomment-86795133) | ||
replied welcoming an update so we submitted | ||
a [***Pull Request***](https://github.com/indexzero/terminate/pull/12) | ||
with ***100% test coverage*** | ||
Other potential modules: | ||
+ **nexpect**: https://github.com/nodejitsu/nexpect | ||
+ **node-ps**: https://github.com/neekey/ps (has basic tests but no cov) | ||
+ **tree-kill**: https://www.npmjs.com/package/tree-kill (no tests!!) | ||
### Name | ||
[**Terminate**](https://www.google.co.uk/search?q=terminate) | ||
seemed like the *best* (of the available) name, | ||
if you have a *better suggestion*, please share! | ||
<br /> | ||
## Close Second intro Image: (which do *you prefer*?) | ||
<br /> | ||
## This Project Reminded me of Two *xkcd* Comics: | ||
![xkcd terminate](http://i.imgur.com/KQ9v7ll.png) | ||
![xkcd time robot](http://imgs.xkcd.com/comics/time_robot.png) |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
10386
9
110
76
1
6
3
+ Addedps-tree@0.0.3
+ Addedevent-stream@0.5.3(transitive)
+ Addedoptimist@0.2.8(transitive)
+ Addedps-tree@0.0.3(transitive)
+ Addedwordwrap@0.0.3(transitive)