Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

node-notifier

Package Overview
Dependencies
0
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

34

lib/node-notifier.js

@@ -9,9 +9,7 @@ /**

var child_process = require('child_process')
, spawn = child_process.spawn
, exec = child_process.exec
, os = require('os')
, notifier = 'vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier'
, osVersionError = 'Incorrect OS. Requires Mac OS X 10.8 or higher';
, path = require('path')
, notifier = path.resolve(__dirname, '../vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier')
, osVersionError = 'Incorrect OS. node-notify requires Mac OS 10.8 or higher';
var isMacOSX = function (cb) {

@@ -32,3 +30,3 @@ if (process.platform != 'darwin') {

});
}
};

@@ -47,3 +45,3 @@ var Notifier = function () {

args.push('-' + key, val);
};
}

@@ -54,19 +52,10 @@ return args;

, command = function (options, cb) {
var notifyApp = spawn(notifier, options);
var notifyApp = exec(notifier + ' ' + options.join(' '), function (error, stdout, stderr) {
if (error !== null) {
return cb(error);
}
notifyApp.stdout.on('data', function (data) {
cb(null, data.toString());
});
cb(stderr, stdout);
});
notifyApp.stderr.on('data', function (data) {
cb(data.toString());
});
notifyApp.on('exit', function (code, message) {
if (!code) {
return cb(message);
}
cb(null, message);
});
return notifyApp;

@@ -77,2 +66,3 @@ };

var argsList = constructArgumentList(options);
callback = callback || function () {};

@@ -79,0 +69,0 @@ if(this.isOSX) {

{
"name": "node-notifier",
"version": "0.0.1",
"version": "0.0.2",
"description": "A Node.js wrapper for the terminal-notifier application",

@@ -5,0 +5,0 @@ "main": "index.js",

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