Socket
Socket
Sign inDemoInstall

node-notifier-cli

Package Overview
Dependencies
28
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

45

bin.js

@@ -21,6 +21,15 @@ #!/usr/bin/env node

alias: aliases,
string: [ 'icon', 'message', 'open', 'subtitle', 'title', 'host', 'port', 'failsafe' ]
string: [
'icon',
'message',
'open',
'subtitle',
'title',
'host',
'port',
'failsafe'
]
});
readme(aliases, [ 'host' ]);
readme(aliases, ['host']);

@@ -42,3 +51,2 @@ var validOpts = Object.keys(aliases).concat('host');

this.end();
return;
}

@@ -54,3 +62,5 @@ });

if (typeof passedOptions.failsafe !== 'undefined') {
setTimeout(function() { doNotification(passedOptions) }, passedOptions.failsafe);
setTimeout(function() {
doNotification(passedOptions);
}, passedOptions.failsafe);
delete passedOptions.failsafe; // Do not pass failsafe to notifier

@@ -81,3 +91,4 @@ }

if (key && argv[key]) {
options[key] = (key == 'sound' && argv[key] == 'none') ? false : argv[key];
options[key] =
key === 'sound' && argv[key] === 'none' ? false : argv[key];
}

@@ -92,3 +103,4 @@ });

str += '$ notify -t "Hello" -m "My Message" -s --open http://github.com\n';
str += '$ notify -t "Agent Coulson" --icon https://raw.githubusercontent.com/mikaelbr/node-notifier/master/example/coulson.jpg \n';
str +=
'$ notify -t "Agent Coulson" --icon https://raw.githubusercontent.com/mikaelbr/node-notifier/master/example/coulson.jpg \n';
str += '$ notify -m "My Message" -s Glass\n';

@@ -100,17 +112,14 @@ str += '$ echo "My Message" | notify -t "Hello"```\n\n';

function params(input, extra) {
var withAlias = Object.keys(input).reduce(
function(acc, key) {
return acc + ' * --' + key + ' (alias -' + input[key] + ')\n';
},
''
);
var withAlias = Object.keys(input).reduce(function(acc, key) {
return acc + ' * --' + key + ' (alias -' + input[key] + ')\n';
}, '');
if (!extra) return withAlias;
return withAlias + extra.reduce(
function(acc, key) {
return acc + ' * --' + key + '\n';
},
''
);
return (
withAlias +
extra.reduce(function(acc, key) {
return acc + ' * --' + key + '\n';
}, '')
);
}

8

package.json
{
"name": "node-notifier-cli",
"version": "1.1.1",
"version": "1.1.2",
"description": "CLI API for node-notifier",

@@ -10,3 +10,3 @@ "main": "bin.js",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"lint": "eslint bin.js"
},

@@ -31,2 +31,4 @@ "keywords": [

"eslint-config-standard": "^11.0.0-beta.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.4.0",

@@ -38,3 +40,3 @@ "eslint-plugin-standard": "^3.0.1"

"minimist": "^1.2.0",
"node-notifier": "^5.2.0"
"node-notifier": "^5.2.1"
},

@@ -41,0 +43,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc