New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apn

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apn - npm Package Compare versions

Comparing version 1.2.5 to 1.2.6

doc/apn.markdown

15

lib/notification.js

@@ -28,3 +28,3 @@ /**

var notification = new Notification();
notification.encoding = this.encoding;

@@ -40,3 +40,4 @@ notification.payload = this.payload;

notification.newsstandAvailable = this.newsstandAvailable;
notification.mdm = this.mdm;
return notification

@@ -153,3 +154,3 @@ }

if(typeof this.alert == "string") {
var length = Buffer.byteLength(this.alert.length, this.encoding || 'utf8');
var length = Buffer.byteLength(this.alert, this.encoding || 'utf8');
if (length < tooLong) {

@@ -162,3 +163,3 @@ return length - tooLong;

else if(typeof this.alert == "object" && typeof this.alert.body == "string") {
var length = Buffer.byteLength(this.alert.body.length, this.encoding || 'utf8');
var length = Buffer.byteLength(this.alert.body, this.encoding || 'utf8');
if (length < tooLong) {

@@ -180,2 +181,6 @@ return length - tooLong;

}
if (typeof this.mdm == 'string') {
this.payload.mdm = this.mdm;
return this.payload;
}
if (this.payload.aps === undefined) {

@@ -199,2 +204,2 @@ this.payload.aps = {};

module.exports = Notification;
module.exports = Notification;
{
"name": "apn",
"description": "An interface to the Apple Push Notification service for Node.js",
"version": "1.2.5",
"version": "1.2.6",
"author": "Andrew Naylor <argon@mkbot.net>",

@@ -20,6 +20,6 @@ "contributors": [

"dependencies": {
"q": ">=0.8.5"
"q": "0.8.x"
},
"engines": { "node": ">= 0.6.6" },
"license": "MIT"
}
}

@@ -52,3 +52,3 @@ #node-apn

errorCallback: undefined, /* Callback when error occurs function(err,notification) */
cacheLength: 100 /* Number of notifications to cache for error purposes */
cacheLength: 100, /* Number of notifications to cache for error purposes */
autoAdjustCache: true, /* Whether the cache should grow in response to messages being lost after errors. */

@@ -179,3 +179,3 @@ connectionTimeout: 0 /* The duration the socket should stay alive with no activity in milliseconds. 0 = Disabled. */

Thanks to: [Ian Babrou][bobrik], [dgthistle][dgthistle], [Keith Larsen][keithnlarsen], [Mike P][mypark], [Greg Bergé][neoziro], [Asad ur Rehman][AsadR], [Nebojsa Sabovic][nsabovic], [Alberto Gimeno][gimenete], [Randall Tombaugh][rwtombaugh]
Thanks to: [Ian Babrou][bobrik], [dgthistle][dgthistle], [Keith Larsen][keithnlarsen], [Mike P][mypark], [Greg Bergé][neoziro], [Asad ur Rehman][AsadR], [Nebojsa Sabovic][nsabovic], [Alberto Gimeno][gimenete], [Randall Tombaugh][rwtombaugh], [Michael Stewart][thegreatmichael], [Olivier Louvignes][mgcrea], [porsager][porsager]

@@ -215,2 +215,5 @@ ## License

[rwtombaugh]: https://github.com/rwtombaugh
[thegreatmichael]: https://github.com/thegreatmichael
[mgcrea]: https://github.com/mgcrea
[porsager]: https://porsager
[q]: https://github.com/kriskowal/q

@@ -220,2 +223,9 @@

1.2.6:
* Added mdm support.
* Constrained 'q' module to 0.8.x because 0.9.0 is API incompatible.
* Fixed a `trim()` bug when compiling notification.
* ***NOTICE:*** v1.3.0 which will be released soon will break some API compatibility with error handling and there will be a new sending API (the legacy sending API will remain)
1.2.5:

@@ -222,0 +232,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc