Comparing version 1.2.3 to 1.2.4
@@ -7,9 +7,12 @@ var Errors = require('./errors'); | ||
var util = require('./util'); | ||
try { | ||
var debug = require('debug')('apn'); | ||
var debug = function() {}; | ||
if(process.env.DEBUG) { | ||
try { | ||
debug = require('debug')('apn'); | ||
} | ||
catch (e) { | ||
console.log("Notice: 'debug' module is not available. This should be installed with `npm install debug` to enable debug messages", e); | ||
debug = function() {}; | ||
} | ||
} | ||
catch (e) { | ||
console.log("Notice: Unable to load 'debug' module", e); | ||
var debug = function() {}; | ||
} | ||
@@ -16,0 +19,0 @@ /** |
@@ -8,10 +8,12 @@ var Device = require('./device'); | ||
var util = require('./util'); | ||
try { | ||
var debug = require('debug')('apnfb'); | ||
var debug = function() {}; | ||
if(process.env.DEBUG) { | ||
try { | ||
debug = require('debug')('apnfb'); | ||
} | ||
catch (e) { | ||
console.log("Notice: 'debug' module is not available. This should be installed with `npm install debug` to enable debug messages", e); | ||
debug = function() {}; | ||
} | ||
} | ||
catch (e) { | ||
console.log("Notice: Unable to load 'debug' module", e); | ||
var debug = function() {}; | ||
} | ||
/** | ||
@@ -140,3 +142,3 @@ * Create a new connection to the APN Feedback. | ||
this.options['port'], | ||
this.options['gateway'], | ||
this.options['address'], | ||
socketOptions, | ||
@@ -153,3 +155,3 @@ function () { | ||
this.receiveBuffer = new Buffer(0); | ||
this.readBuffer = new Buffer(0); | ||
this.socket.on('data', this.receive.bind(this)); | ||
@@ -156,0 +158,0 @@ this.socket.on("error", this.destroyConnection.bind(this)); |
{ | ||
"name": "apn", | ||
"description": "An interface to the Apple Push Notification service for Node.js", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"author": "Andrew Naylor <argon@mkbot.net>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -44,3 +44,3 @@ #node-apn | ||
passphrase: null, /* A passphrase for the Key file */ | ||
ca: null /* String or Buffer of CA data to use for the TLS connection */ | ||
ca: null, /* String or Buffer of CA data to use for the TLS connection */ | ||
gateway: 'gateway.push.apple.com',/* gateway address */ | ||
@@ -135,2 +135,8 @@ port: 2195, /* gateway port */ | ||
## Debugging | ||
If you experience difficulties sending notifications or using the feedback service you can enable debug messages within the library by running your application with `DEBUG=apn` or `DEBUG=apnfb`. | ||
You will need the `debug` module which can be installed with `npm install debug`. | ||
## Credits | ||
@@ -140,3 +146,3 @@ | ||
Contributors: [Ian Babrou][bobrik], [dgthistle][dgthistle], [Keith Larsen][keithnlarsen], [Mike P][mypark], [Greg Bergé][neoziro] | ||
Contributors: [Ian Babrou][bobrik], [dgthistle][dgthistle], [Keith Larsen][keithnlarsen], [Mike P][mypark], [Greg Bergé][neoziro], [Asad ur Rehman][AsadR] | ||
@@ -172,2 +178,3 @@ ## License | ||
[neoziro]: https://github.com/neoziro | ||
[AsadR]: https://github.com/AsadR | ||
[q]: https://github.com/kriskowal/q | ||
@@ -177,2 +184,7 @@ | ||
1.2.4: | ||
* Fixed some typos in the feedback methods | ||
* Added some debug messages available during development, see debug section above. | ||
1.2.3: | ||
@@ -179,0 +191,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
43023
826
273
4