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

exits

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exits - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

38

bin/exits.js

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

var _cmdArgs = _interopRequireDefault(require("./cmd-args"));
var _constants = require("../constants");

@@ -27,2 +25,4 @@

var _stringArgv = _interopRequireDefault(require("string-argv"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -54,4 +54,11 @@

};
main();
(async () => {
async function main() {
const failedHelp = () => {
_commander.default.outputHelp();
process.exit(1);
};
const pkg = JSON.parse((await (0, _pify.default)(_fs.default.readFile)(_path.default.join(__dirname, '../package.json'))));

@@ -61,7 +68,8 @@ const ajv = new _ajv.default();

_commander.default.version(pkg.version).description('Run a command after a main command terminates.').name('exits').usage('[options] <mainCmd> <...mainArgs> -- <afterCmd> <...afterArgs>').option('--stdio <stdio>', `\n\tstdio options to spawn children processes with.\n\tCan be inherit, pipe, ignore, or a comma separated combination for stdin,stdout,stderr.\n\tDefault: inherit.\n\tExample: --stdio pipe,inherit,inherit`).option('--at <at>', `\n\tIn which termination cases of the main process should the after command run.\n\tCan be signal, error, success, or a comma separated combination of those.\n\tDefault: signal,error,success.\n\tExample: --at signal,error`).option('--log <level>', `\n\tLogging level, one of trace, debug, info, warn, error, or silent.\n\tDefault: ${_constants.DEFAULT_LOG_LEVEL}\n\tExample: --logger info`).parse(_cmdArgs.default.set());
_commander.default.version(pkg.version).description('Run a command after a main command terminates.').name('exits').usage('[options] "mainCmd ...args" "afterCmd ...args"').option('--stdio <stdio>', `\n\tstdio options to spawn children processes with.\n\tCan be inherit, pipe, ignore, or a comma separated combination for stdin,stdout,stderr.\n\tDefault: inherit.\n\tExample: --stdio pipe,inherit,inherit`).option('--at <at>', `\n\tIn which termination cases of the main process should the after command run.\n\tCan be signal, error, success, or a comma separated combination of those.\n\tDefault: signal,error,success.\n\tExample: --at signal,error`).option('--log <level>', `\n\tLogging level, one of trace, debug, info, warn, error, or silent.\n\tDefault: ${_constants.DEFAULT_LOG_LEVEL}\n\tExample: --log info`).option('--fail', `\n\tAlso exit with code 1 if the after command fails.`).parse(process.argv);
const [first, last] = _cmdArgs.default.get(_commander.default.args);
if (first.length < 1) return _commander.default.help();
if (_commander.default.args.length < 1 || _commander.default.args.length > 2) failedHelp();
const first = (0, _stringArgv.default)(_commander.default.args[0]);
const last = _commander.default.args[1] ? (0, _stringArgv.default)(_commander.default.args[1]) : [];
if (!first.length) return failedHelp();
const stdio = _commander.default.stdio ? _commander.default.stdio.split(',') : ['inherit'];

@@ -75,3 +83,3 @@ const at = _commander.default.at ? _commander.default.at.split(',') : ['signal', 'error', 'success'];

});
if (!valid) return _commander.default.help();
if (!valid) return failedHelp();
(0, _.options)({

@@ -109,7 +117,11 @@ logger: log,

await (0, _.spawn)(last[0], last.slice(1), {
stdio: stdio.length === 1 ? stdio[0] : stdio
}).promise;
try {
await (0, _.spawn)(last[0], last.slice(1), {
stdio: stdio.length === 1 ? stdio[0] : stdio
}).promise;
} catch (e) {
if (_commander.default.fail) process.exit(1);else throw e;
}
}, 0);
})();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iaW4vZXhpdHMudHMiXSwibmFtZXMiOlsic2NoZW1hIiwidHlwZSIsInJlcXVpcmVkIiwicHJvcGVydGllcyIsInN0ZGlvIiwiaXRlbXMiLCJlbnVtIiwiYXQiLCJsb2ciLCJwa2ciLCJKU09OIiwicGFyc2UiLCJmcyIsInJlYWRGaWxlIiwicGF0aCIsImpvaW4iLCJfX2Rpcm5hbWUiLCJhanYiLCJBanYiLCJhZGRNZXRhU2NoZW1hIiwiZHJhZnQwNiIsInByb2dyYW0iLCJ2ZXJzaW9uI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dGNoIChlKSB7XG4gICAgICBpZiAocHJvZ3JhbS5mYWlsKSBwcm9jZXNzLmV4aXQoMSk7XG4gICAgICBlbHNlIHRocm93IGU7XG4gICAgfVxuICB9LCAwKTtcbn1cbiJdfQ==

@@ -0,1 +1,28 @@

# [0.4.0](https://github.com/rafamel/exits/compare/v0.3.0...v0.4.0) (2019-02-03)
### Bug Fixes
* **bin:** fixes arguments parsing ([6e6d15e](https://github.com/rafamel/exits/commit/6e6d15e))
### Code Refactoring
* **bin:** changes bin api, commands are now passed within quotes instead of after -- ([427f697](https://github.com/rafamel/exits/commit/427f697))
### Features
* **bin:** adds --fail flag to exit with code 1 when seconds command fails ([9d0bec1](https://github.com/rafamel/exits/commit/9d0bec1))
* **bin:** exits with code 1 when it has failed to parse arguments and help is shown ([d5aee99](https://github.com/rafamel/exits/commit/d5aee99))
### BREAKING CHANGES
* **bin:** bin exits with code 1 at arguments parsing failure
* **bin:** bin takes commands to execute as a single quoted argument
* **bin:** mainCmd on bin must now follow "--"
# [0.3.0](https://github.com/rafamel/exits/compare/v0.2.1...v0.3.0) (2019-01-30)

@@ -2,0 +29,0 @@

{
"name": "exits",
"version": "0.3.0",
"version": "0.4.0",
"author": "Rafa Mel",

@@ -66,5 +66,6 @@ "description": "Run arbitrary functions & commands asynchronously before process termination, programatically or via CLI",

"@types/pify": "^3.0.2",
"@types/string-argv": "^0.1.0",
"@types/uuid": "^3.4.4",
"@typescript-eslint/eslint-plugin": "^1.1.0",
"@typescript-eslint/parser": "^1.1.0",
"@typescript-eslint/eslint-plugin": "^1.2.0",
"@typescript-eslint/parser": "^1.2.0",
"@zerollup/ts-transform-paths": "^1.6.5",

@@ -81,10 +82,10 @@ "babel-eslint": "^10.0.1",

"cz-conventional-changelog": "^2.1.0",
"eslint": "^5.9.0",
"eslint": "^5.13.0",
"eslint-config-prettier": "^4.0.0",
"eslint-config-standard": "^12.0.0",
"eslint-import-resolver-babel-module": "^5.0.0-beta.1",
"eslint-import-resolver-babel-module": "^5.0.1",
"eslint-import-resolver-typescript": "^1.1.1",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jest": "^22.0.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jest": "^22.2.2",
"eslint-plugin-node": "^8.0.0",

@@ -101,3 +102,3 @@ "eslint-plugin-prettier": "^3.0.0",

"onchange": "^5.2.0",
"prettier": "^1.15.2",
"prettier": "^1.16.4",
"shx": "^0.3.2",

@@ -110,3 +111,3 @@ "ttypescript": "^1.5.6",

"@types/loglevel": "^1.5.3",
"ajv": "^6.7.0",
"ajv": "^6.8.1",
"chalk": "^2.4.2",

@@ -118,2 +119,3 @@ "commander": "^2.19.0",

"promist": "^0.5.2",
"string-argv": "^0.1.1",
"uuid": "^3.3.2"

@@ -120,0 +122,0 @@ },

# exits
[![Version](https://img.shields.io/npm/v/exits.svg)](https://www.npmjs.com/package/exits)
[![Types](https://img.shields.io/npm/types/exits.svg)](https://www.npmjs.com/package/exits)
[![Build Status](https://img.shields.io/travis/rafamel/exits.svg)](https://travis-ci.org/rafamel/exits)

@@ -10,2 +9,3 @@ [![Coverage](https://img.shields.io/coveralls/rafamel/exits.svg)](https://coveralls.io/github/rafamel/exits)

[![License](https://img.shields.io/github/license/rafamel/exits.svg)](https://github.com/rafamel/exits/blob/master/LICENSE)
[![Types](https://img.shields.io/npm/types/exits.svg)](https://www.npmjs.com/package/exits)

@@ -32,8 +32,8 @@ <!-- markdownlint-disable MD036 -->

```
Usage: exits [options] "mainCmd ...args" "afterCmd ...args"
Run a command after a main command terminates.
Usage: exits [options] <mainCmd> <...mainArgs> -- <afterCmd> <...afterArgs>
Options:
--stdio <stdio>
--stdio <stdio>
stdio options to spawn children processes with.

@@ -51,3 +51,5 @@ Can be inherit, pipe, ignore, or a comma separated combination for stdin,stdout,stderr.

Default: warn
Example: --logger info
Example: --log info
--fail
Also exit with code 1 if the after command fails.
-h, --help output usage information

@@ -67,3 +69,3 @@ -V, --version output the version number

* [`on()`](#onevent-string-cb-function-void) subscribes to state changes.
* [`control()`](#controlfn-generator-promiseany`) controls *async* execution flow in order to stop parallel execution on triggered termination events.
* [`control()`](#controlfn-generator-promiseany) controls *async* execution flow in order to stop parallel execution on triggered termination events.
* [`terminate()`](#terminatetype-string-arg-string--error--number-promisevoid) explicitly terminates execution while still waiting for `exits` tasks to finish.

@@ -70,0 +72,0 @@ * [`spawn()`](#spawncmd-string-args-string-opts-object-object) safely handles execution of child processes.

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