@parse/push-adapter 3.3.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,19 +1,31 @@
1
- # parse-server-push-adapter
1
+ # Parse Server Push Adapter <!-- omit in toc -->
2
2
 
3
- [![Build
4
- Status](https://travis-ci.org/parse-community/parse-server-push-adapter.svg?branch=master)](https://travis-ci.org/parse-community/parse-server-push-adapter)
5
- [![codecov.io](https://codecov.io/github/parse-community/parse-server-push-adapter/coverage.svg?branch=master)](https://codecov.io/github/parse-community/parse-server-push-adapter?branch=master)
6
- [![NPM Version](https://img.shields.io/npm/v/@parse/push-adapter.svg?style=flat-square)](https://www.npmjs.com/package/@parse/push-adapter)
3
+ [![Build Status](https://github.com/parse-community/parse-server-push-adapter/workflows/ci/badge.svg?branch=master)](https://github.com/parse-community/parse-server-push-adapter/actions?query=workflow%3Aci+branch%3Amaster)
4
+ [![Snyk Badge](https://snyk.io/test/github/parse-community/parse-server-push-adapter/badge.svg)](https://snyk.io/test/github/parse-community/parse-server-push-adapter)
5
+ [![Coverage](https://img.shields.io/codecov/c/github/parse-community/parse-server-push-adapter/master.svg)](https://codecov.io/github/parse-community/parse-server-push-adapter?branch=master)
6
+ [![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-server-push-adapter/releases)
7
7
 
8
- Official Push adapter for parse-server
8
+ [![npm latest version](https://img.shields.io/npm/v/@parse/push-adapter.svg)](https://www.npmjs.com/package/@parse/push-adapter)
9
9
 
10
- See [parse-server push configuration](http://docs.parseplatform.org/parse-server/guide/#push-notifications)
10
+ ---
11
11
 
12
- ## Silent Notifications
12
+ The official Push Notification adapter for Parse Server. See [Parse Server Push Configuration](http://docs.parseplatform.org/parse-server/guide/#push-notifications) for more details.
13
+
14
+ ---
15
+
16
+ - [Silent Notifications](#silent-notifications)
17
+ - [Logging](#logging)
18
+ - [Using a Custom Version on Parse Server](#using-a-custom-version-on-parse-server)
19
+ - [Install Push Adapter](#install-push-adapter)
20
+ - [Configure Parse Server](#configure-parse-server)
21
+
22
+
23
+
24
+ # Silent Notifications
13
25
 
14
26
  If you have migrated from parse.com and you are seeing situations where silent (newsstand-like presentless) notifications are failing to deliver please ensure that your payload is setting the content-available attribute to Int(1) and not "1" This value will be explicitly checked.
15
27
 
16
- ### see more logs
28
+ # Logging
17
29
 
18
30
  You can enable verbose logging with environment variables:
19
31
 
@@ -27,9 +39,9 @@ VERBOSE_PARSE_SERVER_PUSH_ADAPTER=1
27
39
 
28
40
  This will produce a more verbose output for all the push sending attempts
29
41
 
30
- ### Using a custom version on parse-server
42
+ # Using a Custom Version on Parse Server
31
43
 
32
- #### Install the push adapter
44
+ ## Install Push Adapter
33
45
 
34
46
  ```
35
47
  npm install --save @parse/push-adapter@VERSION
@@ -37,7 +49,7 @@ npm install --save @parse/push-adapter@VERSION
37
49
 
38
50
  Replace VERSION with the version you want to install.
39
51
 
40
- #### Configure parse-server
52
+ ## Configure Parse Server
41
53
 
42
54
  ```js
43
55
  const PushAdapter = require('@parse/push-adapter').default;
package/lib/APNS.js CHANGED
@@ -302,6 +302,12 @@ var APNS = exports.APNS = function () {
302
302
  var isMutable = coreData['mutable-content'] === 1;
303
303
  notification.setMutableContent(isMutable);
304
304
  break;
305
+ case 'targetContentIdentifier':
306
+ notification.setTargetContentIdentifier(coreData.targetContentIdentifier);
307
+ break;
308
+ case 'interruptionLevel':
309
+ notification.setInterruptionLevel(coreData.interruptionLevel);
310
+ break;
305
311
  case 'category':
306
312
  notification.setCategory(coreData.category);
307
313
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parse/push-adapter",
3
- "version": "3.3.0",
3
+ "version": "4.1.0",
4
4
  "description": "Base parse-server-push-adapter",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -9,7 +9,7 @@
9
9
  "scripts": {
10
10
  "build": "./node_modules/.bin/babel src/ -d lib/",
11
11
  "test": "TESTING=1 nyc ./node_modules/.bin/jasmine",
12
- "prepublish": "npm run build"
12
+ "prepare": "npm run build"
13
13
  },
14
14
  "keywords": [
15
15
  "parse-server",
@@ -23,22 +23,29 @@
23
23
  "author": "Parse",
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
+ "@semantic-release/changelog": "5.0.1",
27
+ "@semantic-release/commit-analyzer": "8.0.1",
28
+ "@semantic-release/git": "9.0.0",
29
+ "@semantic-release/github": "7.2.3",
30
+ "@semantic-release/npm": "7.1.3",
31
+ "@semantic-release/release-notes-generator": "9.0.3",
26
32
  "babel-cli": "6.26.0",
27
33
  "babel-core": "6.26.3",
28
34
  "babel-preset-es2015": "6.24.1",
29
35
  "babel-preset-stage-0": "6.24.1",
30
- "codecov": "3.5.0",
36
+ "codecov": "3.7.1",
31
37
  "jasmine": "2.8.0",
32
38
  "jasmine-spec-reporter": "4.0.0",
33
- "nyc": "14.1.1"
39
+ "nyc": "14.1.1",
40
+ "semantic-release": "17.4.6"
34
41
  },
35
42
  "dependencies": {
36
- "@parse/node-apn": "3.2.0",
43
+ "@parse/node-apn": "5.1.0",
37
44
  "@parse/node-gcm": "1.0.2",
38
- "npmlog": "4.0.2",
39
- "parse": "2.16.0"
45
+ "npmlog": "4.1.2",
46
+ "parse": "3.3.0"
40
47
  },
41
48
  "engines": {
42
- "node": ">= 8.9.1"
49
+ "node": ">= 12"
43
50
  }
44
51
  }
package/CHANGELOG.md DELETED
@@ -1,198 +0,0 @@
1
- # Change Log
2
-
3
- ### master
4
-
5
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.3.0...master)
6
-
7
- ## [3.3.0](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.3.0) (2020-09-24)
8
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.2.0...3.3.0)
9
-
10
- - Update @parse/node-apn ([#170](https://github.com/parse-community/parse-server-push-adapter/pull/170))
11
- - Fixed wrong usage of contentAvailable for iOS push notifications via Firebase ([#165](https://github.com/parse-community/parse-server-push-adapter/pull/165)) (thanks to [@supermar1010](https://github.com/supermar1010))
12
- - Adds request options for the gcm.Sender ([#153](https://github.com/parse-community/parse-server-push-adapter/pull/153)) (thanks to [@simonegiacco](https://github.com/simonegiacco))
13
- - parse@2.16.0
14
-
15
- ## [3.2.0](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.2.0) (2019-10-26)
16
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.1.0...3.2.0)
17
-
18
- - Support headers (expiration_time, collapse_id, push_type, priority) in data field ([#148](https://github.com/parse-community/parse-server-push-adapter/pull/148)) (thanks to [@dplewis](https://github.com/dplewis))
19
- - parse@2.8.0
20
-
21
- ## [3.1.0](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.1.0) (2019-10-03)
22
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.0.10...3.1.0)
23
-
24
- - Update @parse/node-apn.
25
- - Update parse.
26
-
27
- ## [3.0.10](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.0.10) (2019-08-26)
28
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.0.9...3.0.10)
29
-
30
- Use @parse/node-apn served from npm instead of using our fork served from github.
31
-
32
-
33
- ## [3.0.9](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.0.9) (2019-07-30)
34
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.0.8...3.0.9)
35
-
36
- Fix: Update node-apn version and improve publish script ([#141](https://github.com/parse-community/parse-server-push-adapter/pull/141)) (thanks to [@davimacedo](https://github.com/davimacedo))
37
-
38
- ## [3.0.8](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.0.8) (2019-07-26)
39
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.0.7...3.0.8)
40
-
41
- Last release had its lib/ folder published but it's failing in parse-server tests. Trying to fix.
42
-
43
- ## [3.0.7](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.0.7) (2019-07-26)
44
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.0.6...3.0.7)
45
-
46
- New attempt to fix last release since it was published empty to npm.
47
-
48
- ## [3.0.6](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.0.6) (2019-07-26)
49
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.0.5...3.0.6)
50
-
51
- Fix last release since it was published empty to npm.
52
-
53
- ## [3.0.5](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.0.5) (2019-07-26)
54
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.0.4...3.0.5)
55
-
56
- Trying to make Travis publish to npm.
57
-
58
- ## [3.0.4](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.0.4) (2019-07-26)
59
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.0.3...3.0.4)
60
-
61
- **What's new**
62
-
63
- - Add support for apns-push-type [\#1](https://github.com/parse-community/parse-server-push-adapter/pull/127) (thanks to [@funkenstrahlen](https://github.com/funkenstrahlen))
64
-
65
- ## [3.0.3](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.0.3) (2019-07-12)
66
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.0.2...3.0.3)
67
-
68
- Continuing attempt to get travis to deploy to npm on release. Third time's a charm?
69
-
70
- ## [3.0.2](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.0.2) (2019-07-12)
71
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.0.1...3.0.2)
72
-
73
- Update Travis to deploy the correct repo to npm
74
-
75
- ## [3.0.1](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.0.1) (2019-07-11)
76
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v2.0.3...3.0.1)
77
-
78
- Update Packages to address security alerts
79
-
80
-
81
- ## [2.0.3](https://github.com/parse-server-modules/parse-server-push-adapter/tree/v2.0.3) (2018-04-13)
82
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v2.0.2...v2.0.3)
83
-
84
- **What's new**
85
-
86
- - Use updated node-gcm version from @parse org. with safe request version
87
-
88
- ## [2.0.2](https://github.com/parse-server-modules/parse-server-push-adapter/tree/v2.0.2) (2017-10-22)
89
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v2.0.1...v2.0.2)
90
-
91
- **What's new**
92
-
93
- - Adds ability to pass apn key for iOS pushes
94
-
95
- ## [2.0.1](https://github.com/parse-server-modules/parse-server-push-adapter/tree/v2.0.1) (2017-10-21)
96
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v2.0.0...v2.0.1)
97
-
98
- **What's new**
99
-
100
- - Fixes issue setting the push notificaiton title
101
-
102
- ## [2.0.0](https://github.com/parse-server-modules/parse-server-push-adapter/tree/v2.0.0) (2017-03-14)
103
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v2.0.0-alpha.1...v2.0.0)
104
-
105
- **What's new**
106
-
107
- - Adds support for APNS notification title
108
- - Adds support for APN collapse-id
109
-
110
-
111
- ## [2.0.0-alpha.1](https://github.com/parse-server-modules/parse-server-push-adapter/tree/2.0.0-alpha.1) (2017-03-14)
112
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v1.3.0...v2.0.0-alpha.1)
113
-
114
- **What's new**
115
-
116
- - Adds support for APNS with HTTP/2.0
117
- - Improvements in testing, tooling
118
-
119
- ## [1.3.0](https://github.com/parse-server-modules/parse-server-push-adapter/tree/1.3.0) (2017-03-14)
120
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v1.2.0...1.3.0)
121
-
122
- **Closed issues:**
123
-
124
- - Modernize dependencies and test tools [\#60](https://github.com/parse-server-modules/parse-server-push-adapter/issues/60)
125
- - Fixed link for Parse-server push configuration [\#57](https://github.com/parse-server-modules/parse-server-push-adapter/issues/57)
126
-
127
- **Merged pull requests:**
128
-
129
- - Add macOS and tvOS push notification support [\#58](https://github.com/parse-server-modules/parse-server-push-adapter/pull/58) ([funkenstrahlen](https://github.com/funkenstrahlen))
130
- - Require node version >= 4.6.0 [\#53](https://github.com/parse-server-modules/parse-server-push-adapter/pull/53) ([flovilmart](https://github.com/flovilmart))
131
-
132
- ## [1.2.0](https://github.com/parse-server-modules/parse-server-push-adapter/tree/1.2.0) (2017-01-16)
133
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v1.1.0...1.2.0)
134
-
135
- **Closed issues:**
136
-
137
- - Classify installation with pushType and failback with deviceType [\#31](https://github.com/parse-server-modules/parse-server-push-adapter/issues/31)
138
- - Send deviceType key to push handler [\#39](https://github.com/parse-server-modules/parse-server-push-adapter/issues/39)
139
- - Added notification field for fcm [\#41](https://github.com/parse-server-modules/parse-server-push-adapter/issues/41)
140
- - fixes 64k limit on GCM push. [\#49](https://github.com/parse-server-modules/parse-server-push-adapter/issues/49)
141
-
142
- ## [1.1.0](https://github.com/parse-server-modules/parse-server-push-adapter/tree/1.1.0) (2016-08-25)
143
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v1.0.4...1.1.0)
144
-
145
- **Closed issues:**
146
-
147
- - New release for `mutableContent` [\#28](https://github.com/parse-server-modules/parse-server-push-adapter/issues/28)
148
- - APNS TypeError: Cannot read property 'key' of undefined [\#24](https://github.com/parse-server-modules/parse-server-push-adapter/issues/24)
149
- - Can not find sender for push type android/ios [\#16](https://github.com/parse-server-modules/parse-server-push-adapter/issues/16)
150
- - APNS adapter failure -- cannot find valid connection [\#15](https://github.com/parse-server-modules/parse-server-push-adapter/issues/15)
151
- - pushing to thousands of installations [\#9](https://github.com/parse-server-modules/parse-server-push-adapter/issues/9)
152
- - Push is not delivered to iOS device [\#8](https://github.com/parse-server-modules/parse-server-push-adapter/issues/8)
153
- - Push not sent to iOS Device [\#4](https://github.com/parse-server-modules/parse-server-push-adapter/issues/4)
154
-
155
- **Merged pull requests:**
156
-
157
- - Support `mutable-content` [\#27](https://github.com/parse-server-modules/parse-server-push-adapter/pull/27) ([alexanderedge](https://github.com/alexanderedge))
158
- - Update README.md [\#18](https://github.com/parse-server-modules/parse-server-push-adapter/pull/18) ([tingham](https://github.com/tingham))
159
- - APNS expects expiration time to be in seconds, not MS. [\#14](https://github.com/parse-server-modules/parse-server-push-adapter/pull/14) ([0x18B2EE](https://github.com/0x18B2EE))
160
- - Push notifications to APNS per batches [\#10](https://github.com/parse-server-modules/parse-server-push-adapter/pull/10) ([flovilmart](https://github.com/flovilmart))
161
-
162
- ## [v1.0.4](https://github.com/parse-server-modules/parse-server-push-adapter/tree/v1.0.4) (2016-03-30)
163
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v1.0.3...v1.0.4)
164
-
165
- **Closed issues:**
166
-
167
- - Push notifications not sent [\#2](https://github.com/parse-server-modules/parse-server-push-adapter/issues/2)
168
-
169
- **Merged pull requests:**
170
-
171
- - :tada: v1.0.4 [\#7](https://github.com/parse-server-modules/parse-server-push-adapter/pull/7) ([flovilmart](https://github.com/flovilmart))
172
- - Fixed error when sending pushes to one pushType [\#6](https://github.com/parse-server-modules/parse-server-push-adapter/pull/6) ([Gameleon12](https://github.com/Gameleon12))
173
-
174
- ## [v1.0.3](https://github.com/parse-server-modules/parse-server-push-adapter/tree/v1.0.3) (2016-03-26)
175
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v1.0.2...v1.0.3)
176
-
177
- **Merged pull requests:**
178
-
179
- - Adds verbose logging [\#5](https://github.com/parse-server-modules/parse-server-push-adapter/pull/5) ([flovilmart](https://github.com/flovilmart))
180
-
181
- ## [v1.0.2](https://github.com/parse-server-modules/parse-server-push-adapter/tree/v1.0.2) (2016-03-26)
182
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v1.0.1...v1.0.2)
183
-
184
- **Merged pull requests:**
185
-
186
- - reports all sending error for mis-configurations [\#3](https://github.com/parse-server-modules/parse-server-push-adapter/pull/3) ([flovilmart](https://github.com/flovilmart))
187
-
188
- ## [v1.0.1](https://github.com/parse-server-modules/parse-server-push-adapter/tree/v1.0.1) (2016-03-25)
189
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/v1.0.0...v1.0.1)
190
-
191
- **Merged pull requests:**
192
-
193
- - Expose these two methods [\#1](https://github.com/parse-server-modules/parse-server-push-adapter/pull/1) ([rogerhu](https://github.com/rogerhu))
194
-
195
- ## [v1.0.0](https://github.com/parse-server-modules/parse-server-push-adapter/tree/v1.0.0) (2016-03-25)
196
-
197
-
198
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*