node-notifier
Advanced tools
+27
| Changelog | ||
| === | ||
| ### `v3.2.1` | ||
| 1. Fixes support for notifications from folders with spaces on Windows. | ||
| ### `v3.2.0` | ||
| 1. Adds native Windows 8 support. | ||
| ### `v3.1.0` | ||
| 1. Adds Growl as fallback for Mac OS X pre 10.8. | ||
| ### `v3.0.6` | ||
| 1. Fixes typo: Changes Growl app name from `Gulp` to `Node`. | ||
| ### `v3.0.5` | ||
| 1. Maps common options between the different notifiers. Allowing for common usage with different notifiers. | ||
| ### `v3.0.4` | ||
| 1. Fixes expires for notify-send (Issue #13) | ||
| ### `v3.0.2` | ||
| 1. Fixes version check for Mac OS X Yosemite | ||
| ### `v3.0.0` | ||
| 1. Updates terminal-notifier to version 1.6.0; adding support for appIcon and contentImage | ||
| 2. Removes parsing of output sent from notifier (Notification Center) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
@@ -38,3 +38,7 @@ /** | ||
| argsList = utils.constructArgumentList(options, initial, "-", allowedArguments); | ||
| argsList = utils.constructArgumentList(options, { | ||
| initial: initial, | ||
| keyExtra: '-', | ||
| allowedArguments: allowedArguments | ||
| }); | ||
@@ -41,0 +45,0 @@ utils.command(notifier, argsList, callback); |
@@ -33,4 +33,7 @@ /** | ||
| options = utils.mapToWin8(options); | ||
| var argsList = utils.constructArgumentList(options); | ||
| utils.command(notifier, argsList, callback); | ||
| var argsList = utils.constructArgumentList(options, { | ||
| wrapper: '', | ||
| noEscape: true | ||
| }); | ||
| utils.windowsCommand(notifier, argsList, callback); | ||
| return this; | ||
@@ -37,0 +40,0 @@ }; |
+23
-13
@@ -42,12 +42,13 @@ var cp = require('child_process') | ||
| module.exports.command = function (notifier, options, cb) { | ||
| return cp.exec(shellwords.escape(notifier) + ' ' + options.join(' '), function (error, stdout, stderr) { | ||
| if (error) return cb(error); | ||
| cb(stderr, stdout); | ||
| }); | ||
| }; | ||
| var notifyApp = cp.exec(shellwords.escape(notifier) + ' ' + options.join(' '), function (error, stdout, stderr) { | ||
| if (error) { | ||
| return cb(error); | ||
| } | ||
| module.exports.windowsCommand = function (notifier, options, cb) { | ||
| return cp.execFile(notifier, options, function (error, stdout, stderr) { | ||
| if (error) return cb(error); | ||
| cb(stderr, stdout); | ||
| }); | ||
| return notifyApp; | ||
| }; | ||
@@ -125,13 +126,22 @@ | ||
| module.exports.constructArgumentList = function (options, initial, keyExtra, allowedArguments) { | ||
| module.exports.constructArgumentList = function (options, extra) { | ||
| var args = []; | ||
| keyExtra = keyExtra || ""; | ||
| var checkForAllowed = allowedArguments !== void 0; | ||
| extra = extra || {}; | ||
| (initial || []).forEach(function (val) { | ||
| args.push('"' + escapeQuotes(val) + '"'); | ||
| // Massive ugly setup. Default args | ||
| var initial = extra.initial || []; | ||
| var keyExtra = extra.keyExtra || ""; | ||
| var allowedArguments = extra.allowedArguments || []; | ||
| var noEscape = extra.noEscape !== void 0; | ||
| var checkForAllowed = extra.allowedArguments !== void 0; | ||
| var wrapper = extra.wrapper === void 0 ? '"' : extra.wrapper; | ||
| var escapeFn = noEscape ? function (i) { return i; } : escapeQuotes; | ||
| initial.forEach(function (val) { | ||
| args.push(wrapper + escapeFn(val) + wrapper); | ||
| }); | ||
| for(var key in options) { | ||
| if (options.hasOwnProperty(key) && (!checkForAllowed || inArray(allowedArguments, key))) { | ||
| args.push('-' + keyExtra + key, '"' + escapeQuotes(options[key]) + '"'); | ||
| args.push('-' + keyExtra + key, wrapper + escapeFn(options[key]) + wrapper); | ||
| } | ||
@@ -138,0 +148,0 @@ } |
+1
-1
| { | ||
| "name": "node-notifier", | ||
| "version": "3.2.0", | ||
| "version": "3.2.1", | ||
| "description": "A Node.js module for sending notifications on mac, windows and linux", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+7
-27
| # node-notifier [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url] | ||
| A node module for sending notification using node. Uses terminal-notifier on mac, | ||
| notify-send for Linux, toaster for Windows 8.1 and Growl for others. | ||
| notify-send for Linux, toaster for Windows 8 and Growl for others. | ||
|  | ||
|  | ||
|  | ||
| ## Requirements | ||
| - Mac OS X >= 10.8. | ||
| - Linux with the notify-osd/notify-send module | ||
| - Windows >= 8.1. | ||
| - Windows >= 8. | ||
| - Or if no of the above requirements are met, Growl is used. | ||
@@ -16,3 +20,3 @@ | ||
| This also goes for native Windows (version >=8.1) as well, where | ||
| This also goes for native Windows (version >=8) as well, where | ||
| [toaster.exe](https://github.com/nels-o/toaster) is bundled. Note, for native | ||
@@ -186,26 +190,2 @@ Windows notifications [a toast must have a shortcut installed (though not | ||
| ## Changelog | ||
| ### `v3.2.0` | ||
| 1. Adds native Windows 8.1 support. | ||
| ### `v3.1.0` | ||
| 1. Adds Growl as fallback for Mac OS X pre 10.8. | ||
| ### `v3.0.6` | ||
| 1. Fixes typo: Changes Growl app name from `Gulp` to `Node`. | ||
| ### `v3.0.5` | ||
| 1. Maps common options between the different notifiers. Allowing for common usage with different notifiers. | ||
| ### `v3.0.4` | ||
| 1. Fixes expires for notify-send (Issue #13) | ||
| ### `v3.0.2` | ||
| 1. Fixes version check for Mac OS X Yosemite | ||
| ### `v3.0.0` | ||
| 1. Updates terminal-notifier to version 1.6.0; adding support for appIcon and contentImage | ||
| 2. Removes parsing of output sent from notifier (Notification Center) | ||
| [![NPM downloads][npm-downloads]][npm-url] | ||
@@ -212,0 +192,0 @@ |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1238776
3.56%34
13.33%819
2.12%0
-100%205
-8.89%5
25%