aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/siginfo
diff options
context:
space:
mode:
Diffstat (limited to 'vanilla/node_modules/siginfo')
-rw-r--r--vanilla/node_modules/siginfo/.travis.yml13
-rw-r--r--vanilla/node_modules/siginfo/LICENSE13
-rw-r--r--vanilla/node_modules/siginfo/README.md47
-rw-r--r--vanilla/node_modules/siginfo/index.js20
-rw-r--r--vanilla/node_modules/siginfo/package.json32
-rw-r--r--vanilla/node_modules/siginfo/test.js16
6 files changed, 141 insertions, 0 deletions
diff --git a/vanilla/node_modules/siginfo/.travis.yml b/vanilla/node_modules/siginfo/.travis.yml
new file mode 100644
index 0000000..4f54568
--- /dev/null
+++ b/vanilla/node_modules/siginfo/.travis.yml
@@ -0,0 +1,13 @@
+notifications:
+ email: false
+language: node_js
+node_js:
+- node
+deploy:
+ provider: npm
+ email:
+ secure: Y10Dvn9UbfpZPbulnl/e7dsiN/1xr06h7k6nJZyxRzr9Hh0UUFPism6k5CFaSegyPIF7sODNBQz4lvXIi2NwcvTLQruw5ehXW0NJ/G7x1TU94pzzhVJ31KBlRWzjKdvVTDsDzFxe5wKWxagPUTkieiIN9CWTQjafByNs3zbK8HL7cmu4Nc42JquVGbtpGgLs7Js+tY+WVB1dMQ4SfqpFgWjm2h05uyXCWHLK5amEAZJLP755lOVgMzw/jQGRg7J4vX4+eRE0r/g0v09x9FUU3ROEmJvqYa14CmGESRhSUyRlv4pnMIs/aK8ZDD8ia3eoTSvMJv8mzdvpkvKzWV1HSZFUX3QZVgWJEmeoF6XP+mdkWu5gnZVlOIBc8NANcS60Dr8QwF470xpPxsyAyf2o9UzX8Xy2qO8XNY/TykGO4soCfOEuVNdw5F9hHEldMHY8p9Z8EJSCn/xfM//LEvxRKREYsMqFtsnwUsv+qiAkHPSHXWQo6HYp+/xDchv63NxtjGHdPs9VpUFr1F8CxZjdis2HZfOnx51W0JIwNYlXNxeqC3WjRUqvRp2NknS982lRHCkHtZfHijGvMm7kj3QL+Ufc7pIfEGnMAKKiNv9kOryjQc29046pRZww9lWjrhoCeEPRhFbkgFV7Mo3bvOExstsSdRnOTlogCe4NviKOwfE=
+ api_key:
+ secure: cAmf8extX/sPl+sxC/6sWTmaiSGrXQY9C/lLg9c76Qn12MLysxDYgCRXfl8Az3RIbRuajq0SbyWXeDa/4wZc1PazuUGjZG82na+kuEDg8m5z0gLiJlhp60C0nj3WMJaRBRsOha1Jbs59eU3XNy+H0U5VczHrdw6v2yCHTlauhT/NYiPXMyKmTIJPB/X7gryFuXVhCPNdRBp3rPicbt0d68J+vWv9KNpjA1WB0WDUSl5rMUQbjjsRF2/DKj9WxXjmci+ac+/pCN3rQxgYZ0Ot5o5/RcWucc21ZdFgsLo8dq5YZDl/EQf/pPmkhquiiLRhiTyCBbEw1sDzYHTbTJThrukrZALg0on7XvxbXSQrxgc/IMJ/RT0PoGLEqyAZUSzGa6HPVlHUBt4LB3zgrswGmGUVkZmbiag0foIFeCKlydwEyBYfnFdRddxF6n3irft1l1NJ1HKNxKLnKvyt8iaOlGteXOOfLXzU17DgMgwTsZsvFmtFQcs6yolLHW9RnRTLf56+x/kJZ4kVJjHuyb/98pS4F7etJ2SpZqt1cVUFd/AYtnxL3jKiUhJLNL8hNUIH3eSpMfZUOUxGv1OWuwgyEhSONkITF2VPn4yuyxS23Ewq4LLj/u/9sPlLaGSN4Avaw21gi6L+M9x620sTZHYtNLniVMTAu6aPiM32zPreK2I=
+ on:
+ tags: true
diff --git a/vanilla/node_modules/siginfo/LICENSE b/vanilla/node_modules/siginfo/LICENSE
new file mode 100644
index 0000000..b45703b
--- /dev/null
+++ b/vanilla/node_modules/siginfo/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2017, Emil Bay <github@tixz.dk>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/vanilla/node_modules/siginfo/README.md b/vanilla/node_modules/siginfo/README.md
new file mode 100644
index 0000000..3552e2a
--- /dev/null
+++ b/vanilla/node_modules/siginfo/README.md
@@ -0,0 +1,47 @@
+# `siginfo`
+
+[![Build Status](https://travis-ci.org/emilbayes/siginfo.svg?branch=master)](https://travis-ci.org/eemilbayes/siginfo)
+
+> Utility module to print pretty messages on SIGINFO/SIGUSR1
+
+`SIGINFO` on BSD / macOS and `SIGUSR1` on Linux, usually triggered by
+`Ctrl + T`, are by convention used to print information about
+a long running process internal state. Eg. `dd` will tell you how many blocks it
+has written and at what speed, while `xz` will tell you progress, compression
+ratio and estimated time remaining.
+
+This module wraps both signals, checks if the process is connected to TTY and
+lets you do whatever you want.
+
+## Usage
+
+```js
+var siginfo = require('siginfo')
+var pkg = require('./package.json')
+
+siginfo(function () {
+ console.dir({
+ version: pkg.version,
+ uptime: process.uptime()
+ })
+})
+
+```
+
+## API
+
+### `var removeListener = siginfo(queryFn, [force])`
+
+`queryFn` can be used for whatever you want (logging, sending a UDP message, etc.).
+Setting `force = true` will attach the event handlers whether a TTY is present
+or not.
+
+## Install
+
+```sh
+npm install siginfo
+```
+
+## License
+
+[ISC](LICENSE)
diff --git a/vanilla/node_modules/siginfo/index.js b/vanilla/node_modules/siginfo/index.js
new file mode 100644
index 0000000..5092b61
--- /dev/null
+++ b/vanilla/node_modules/siginfo/index.js
@@ -0,0 +1,20 @@
+module.exports = function (query, force) {
+ var isAttached = false
+ if (process.stderr.isTTY || force === true) {
+ isAttached = true
+ process.on('SIGINFO', onsiginfo)
+ process.on('SIGUSR1', onsiginfo)
+ }
+
+ return function () {
+ if (isAttached === true) {
+ process.removeListener('SIGINFO', onsiginfo)
+ process.removeListener('SIGUSR1', onsiginfo)
+ isAttached = false
+ }
+ }
+
+ function onsiginfo () {
+ query()
+ }
+}
diff --git a/vanilla/node_modules/siginfo/package.json b/vanilla/node_modules/siginfo/package.json
new file mode 100644
index 0000000..4f0e715
--- /dev/null
+++ b/vanilla/node_modules/siginfo/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "siginfo",
+ "version": "2.0.0",
+ "description": "Utility module to print pretty messages on SIGINFO/SIGUSR1",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "standard": "^14.3.4"
+ },
+ "scripts": {
+ "test": "standard"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/emilbayes/siginfo.git"
+ },
+ "keywords": [
+ "siginfo",
+ "sigusr1",
+ "ctrl",
+ "t",
+ "info",
+ "progress",
+ "inspect"
+ ],
+ "author": "Emil Bay <github@tixz.dk>",
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/emilbayes/siginfo/issues"
+ },
+ "homepage": "https://github.com/emilbayes/siginfo#readme"
+}
diff --git a/vanilla/node_modules/siginfo/test.js b/vanilla/node_modules/siginfo/test.js
new file mode 100644
index 0000000..eaf6824
--- /dev/null
+++ b/vanilla/node_modules/siginfo/test.js
@@ -0,0 +1,16 @@
+var siginfo = require('.')
+var pkg = require('./package.json')
+
+var stop = siginfo(function () {
+ console.dir({
+ version: pkg.version,
+ uptime: process.uptime()
+ })
+})
+
+process.stdout.resume()
+
+setTimeout(function () {
+ stop()
+ process.exit(0)
+}, 2000)