app-notify
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "app-notify", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Send SMS and email notifications from within your node.js app", | ||
@@ -26,3 +26,16 @@ "main": "index.js", | ||
}, | ||
"homepage": "https://github.com/chovy/app-notify" | ||
"homepage": "https://github.com/chovy/app-notify", | ||
"dependencies": { | ||
"async": "^0.9.0", | ||
"lodash": "^2.4.1", | ||
"nodemailer": "^1.3.0", | ||
"q": "^1.1.2", | ||
"twilio": "^1.10.0" | ||
}, | ||
"devDependencies": { | ||
"chai": "^1.10.0", | ||
"gulp": "^3.8.10", | ||
"gulp-mocha": "^2.0.0", | ||
"mocha": "^2.0.1" | ||
} | ||
} |
@@ -5,1 +5,92 @@ app-notify | ||
Send SMS and email notifications from within your node.js app | ||
# usage (promises) | ||
Send an email message: | ||
//setup smtp server | ||
var smtp = { | ||
host: xxx, | ||
user: user, | ||
pass: pass, | ||
port: port | ||
}; | ||
//setup email headers | ||
var email = { | ||
to: user@example.com, | ||
from: sender@example.com' | ||
}; | ||
var notify = require('app-notify'); | ||
//set your configuration | ||
notify.cfg.email = email; | ||
notify.cfg.smtp = smtp; | ||
//send an email | ||
notify.email({ | ||
subject: 'This is a test', | ||
message: 'Hello world!' | ||
}) | ||
.then(function(data){ | ||
console.log(data); | ||
}) | ||
.catch(function(err){ | ||
console.error(err); | ||
}); | ||
Send an SMS message | ||
//setup sms configuration | ||
var sms = { | ||
sid: twilio-sid-id, | ||
auth: twilio-auth-id, | ||
to: xxx-xxx-xxxx, //recipient | ||
from: yyy-yyy-yyyy //your twilio assigned phone number | ||
}; | ||
var notify = require('app-notify'); | ||
//set your configuration | ||
notify.cfg.sms = sms; | ||
notify.sms({ | ||
message: 'Hello world' | ||
}) | ||
.then(function(data){ | ||
console.log(data); | ||
}) | ||
.catch(function(err){ | ||
console.error(err); | ||
}); | ||
Send to whichever services we have enabled (both sms and email): | ||
var notify = require('app-notify'); | ||
//set your configuration | ||
notify.cfg.email = email; | ||
notify.cfg.smtp = smtp; | ||
notify.cfg.sms = sms; | ||
//sends both | ||
notify.send({ | ||
subject: 'This is a test', | ||
message: 'Hello world' | ||
}); | ||
notify.cfg.email.disabled = true; | ||
//sends only sms | ||
notify.send({ | ||
message: 'Hello world', | ||
}); | ||
# usage (callbacks) | ||
app-notify can be used with callbacks too! | ||
# run tests | ||
gulp test |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
8385
12
184
96
5
4
+ Addedasync@^0.9.0
+ Addedlodash@^2.4.1
+ Addednodemailer@^1.3.0
+ Addedq@^1.1.2
+ Addedtwilio@^1.10.0
+ Addedaddressparser@0.3.2(transitive)
+ Addedasn1@0.1.11(transitive)
+ Addedassert-plus@0.1.5(transitive)
+ Addedasync@0.9.2(transitive)
+ Addedaws-sign@0.3.0(transitive)
+ Addedboom@0.4.2(transitive)
+ Addedbuildmail@2.0.0(transitive)
+ Addedclone@1.0.4(transitive)
+ Addedcombined-stream@0.0.7(transitive)
+ Addedcookie-jar@0.3.0(transitive)
+ Addedcryptiles@0.2.2(transitive)
+ Addedctype@0.5.3(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddelayed-stream@0.0.5(transitive)
+ Addedforever-agent@0.5.2(transitive)
+ Addedform-data@0.1.4(transitive)
+ Addedhawk@1.0.0(transitive)
+ Addedhoek@0.9.1(transitive)
+ Addedhttp-signature@0.10.1(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjwt-simple@0.1.0(transitive)
+ Addedlibbase64@0.1.0(transitive)
+ Addedlibmime@1.2.0(transitive)
+ Addedlibqp@1.1.0(transitive)
+ Addedlodash@2.4.2(transitive)
+ Addedmailcomposer@2.1.0(transitive)
+ Addedmime@1.2.11(transitive)
+ Addedms@2.0.0(transitive)
+ Addedneedle@0.10.00.11.0(transitive)
+ Addednode-uuid@1.4.8(transitive)
+ Addednodemailer@1.11.0(transitive)
+ Addednodemailer-direct-transport@1.1.0(transitive)
+ Addednodemailer-smtp-transport@1.1.0(transitive)
+ Addednodemailer-wellknown@0.1.10(transitive)
+ Addedoauth-sign@0.3.0(transitive)
+ Addedq@0.9.71.5.1(transitive)
+ Addedqs@0.6.6(transitive)
+ Addedrequest@2.27.0(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedscmp@0.0.3(transitive)
+ Addedsmtp-connection@1.3.8(transitive)
+ Addedsntp@0.2.4(transitive)
+ Addedtunnel-agent@0.3.0(transitive)
+ Addedtwilio@1.11.1(transitive)
+ Addedunderscore@1.13.7(transitive)