+1
-0
@@ -23,1 +23,2 @@ language: node_js | ||
| tags: true | ||
| node: '4.1' |
+6
-0
| ## Changelog | ||
| 1.7.6: | ||
| * Emit an error when retry limit is exceeded (#333) | ||
| * Documentation fixes (#229, #343, #379) | ||
| * Reinstate broken aps behaviour (#377) | ||
| 1.7.5: | ||
@@ -4,0 +10,0 @@ |
@@ -276,2 +276,3 @@ "use strict"; | ||
| this.rejectBuffer(Errors.connectionRetryLimitExceeded); | ||
| this.emit("error", error); | ||
| this.shutdown(); | ||
@@ -278,0 +279,0 @@ this.terminated = true; |
@@ -483,5 +483,5 @@ "use strict"; | ||
| aps.badge = this.badge; | ||
| aps.sound = this.sound; | ||
| aps.alert = this.alert; | ||
| aps.badge = this.badge || aps.badge; | ||
| aps.sound = this.sound || aps.sound; | ||
| aps.alert = this.alert || aps.alert; | ||
| if (this.contentAvailable) { | ||
@@ -491,4 +491,4 @@ aps["content-available"] = 1; | ||
| aps["url-args"] = this.urlArgs; | ||
| aps.category = this.category; | ||
| aps["url-args"] = this.urlArgs || aps["url-args"]; | ||
| aps.category = this.category || aps.category; | ||
@@ -495,0 +495,0 @@ return Object.keys(aps).reduce(function(populated, key) { |
+1
-1
| { | ||
| "name": "apn", | ||
| "description": "An interface to the Apple Push Notification service for Node.js", | ||
| "version": "1.7.5", | ||
| "version": "1.7.6", | ||
| "author": "Andrew Naylor <argon@mkbot.net>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
+2
-2
@@ -99,3 +99,3 @@ #node-apn | ||
| You should only create one `Connection` for each certificate/key pair you have, you do not need to create a new one for each notification. If you are only sending notifications to one app then there is no need for more than one `Connection`, if throughput is a problem then look at the `maxConnections` property. | ||
| You should only create one `Connection` per-process for each certificate/key pair you have. You do not need to create a new `Connection` for each notification. If you are only sending notifications to one app then there is no need for more than one `Connection`, if throughput is a problem then look at the `maxConnections` property. | ||
@@ -171,3 +171,3 @@ ### Setting up the feedback service | ||
| [pl]: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW1 "Local and Push Notification Programming Guide: Apple Push Notification Service" | ||
| [fs]: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW3 "The Feedback Service" | ||
| [fs]: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Appendixes/BinaryProviderAPI.html#//apple_ref/doc/uid/TP40008194-CH106-SW4 "The Feedback Service" | ||
| [tn2265]: http://developer.apple.com/library/ios/#technotes/tn2265/_index.html "Troubleshooting Push Notifications" | ||
@@ -174,0 +174,0 @@ [googlegroup]:https://groups.google.com/group/node-apn "node-apn Google Group" |
+27
-2
@@ -531,7 +531,32 @@ var apn = require("../"); | ||
| describe("when aps payload is present", function() { | ||
| beforeEach(function() { | ||
| note.payload = {"foo": "bar", "baz": 1, "aps": { "badge": 1, "alert": "Hi there!" }}; | ||
| }); | ||
| it("contains all original payload properties", function() { | ||
| note.payload = {"foo": "bar", "baz": 1}; | ||
| expect(note.toJSON()).to.contain.all.keys(["foo", "baz"]); | ||
| expect(note.toJSON()).to.have.property("foo", "bar"); | ||
| expect(note.toJSON()).to.have.property("baz", 1); | ||
| }); | ||
| it("contains the correct aps properties", function() { | ||
| expect(note.toJSON()).to.have.deep.property("aps.badge", 1); | ||
| expect(note.toJSON()).to.have.deep.property("aps.alert", "Hi there!"); | ||
| }); | ||
| }); | ||
| context("when passed in the notification constructor", function() { | ||
| beforeEach(function() { | ||
| note = new apn.Notification({"foo": "bar", "baz": 1, "aps": { "badge": 1, "alert": "Hi there!" }}); | ||
| }); | ||
| it("contains all original payload properties", function() { | ||
| expect(note.toJSON()).to.have.property("foo", "bar"); | ||
| expect(note.toJSON()).to.have.property("baz", 1); | ||
| }); | ||
| it("contains the correct aps properties", function() { | ||
| expect(note.toJSON()).to.have.deep.property("aps.badge", 1); | ||
| expect(note.toJSON()).to.have.deep.property("aps.alert", "Hi there!"); | ||
| }); | ||
| }); | ||
| }); | ||
@@ -538,0 +563,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
245309
0.48%3829
0.55%