@parse/push-adapter 3.2.0 → 4.0.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/CHANGELOG.md CHANGED
@@ -2,7 +2,36 @@
2
2
 
3
3
  ### master
4
4
 
5
- [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.2.0...master)
5
+ [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/4.0.0...master)
6
+
7
+ ## 4.0.0
8
+ [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.4.1...4.0.0)
9
+
10
+ ### BREAKING CHANGE
11
+ - node-apns 5 requires node >= 12 ([#198](https://github.com/parse-community/parse-server-push-adapter/pull/198))
12
+
13
+ ### Bug Fixes
14
+ - bump node-apns to 5.0 ([#198](https://github.com/parse-community/parse-server-push-adapter/pull/198))
15
+
16
+ ## 3.4.1
17
+ [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.4.0...3.4.1)
18
+
19
+ - Security fixes (Manuel Trezza) [#193](https://github.com/parse-community/parse-server-push-adapter/pull/193)
20
+
21
+ ## [3.4.0](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.4.0) (2020-10-19)
22
+ [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.3.0...3.4.0)
23
+
24
+ - Support installing from branch ([#177](https://github.com/parse-community/parse-server-push-adapter/pull/177)) (thanks to [@dplewis](https://github.com/dplewis))
25
+ - Update @parse/node-apn@4.0.0
26
+ - Update parse@2.17.0
27
+
28
+ ## [3.3.0](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.3.0) (2020-09-24)
29
+ [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.2.0...3.3.0)
30
+
31
+ - Update @parse/node-apn ([#170](https://github.com/parse-community/parse-server-push-adapter/pull/170))
32
+ - 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))
33
+ - 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))
34
+ - parse@2.16.0
6
35
 
7
36
  ## [3.2.0](https://github.com/parse-server-modules/parse-server-push-adapter/tree/3.2.0) (2019-10-26)
8
37
  [Full Changelog](https://github.com/parse-server-modules/parse-server-push-adapter/compare/3.1.0...3.2.0)
package/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # parse-server-push-adapter
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
3
  [![NPM Version](https://img.shields.io/npm/v/@parse/push-adapter.svg?style=flat-square)](https://www.npmjs.com/package/@parse/push-adapter)
4
+ [![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)
5
+ <a href="https://github.com/parse-community/parse-server-push-adapter/actions?query=workflow%3Aci+branch%3Amaster">
6
+ <img alt="Build status" src="https://github.com/parse-community/parse-server-push-adapter/workflows/ci/badge.svg?branch=master">
7
+ </a>
7
8
 
8
9
  Official Push adapter for parse-server
9
10
 
@@ -59,3 +60,19 @@ const server = new ParseServer(options);
59
60
 
60
61
  /* continue with the initialization of parse-server */
61
62
  ```
63
+
64
+ ## Want to ride the bleeding edge?
65
+
66
+ We recommend using the most recent tagged build published to npm for production. However, you can test not-yet-released versions of the parse-server-push-adapter by referencing specific branches in your `package.json`. For example, to use the master branch:
67
+
68
+ ```
69
+ npm install parse-community/parse-server-push-adapter.git#master
70
+ ```
71
+
72
+ ### Experimenting
73
+
74
+ You can also use your own forks, and work in progress branches by specifying them:
75
+
76
+ ```
77
+ npm install github:myUsername/parse-server-push-adapter#my-awesome-feature
78
+ ```
package/lib/GCM.js CHANGED
@@ -32,7 +32,7 @@ function GCM(args) {
32
32
  if ((typeof args === 'undefined' ? 'undefined' : _typeof(args)) !== 'object' || !args.apiKey) {
33
33
  throw new _parse2.default.Error(_parse2.default.Error.PUSH_MISCONFIGURED, 'GCM Configuration is invalid');
34
34
  }
35
- this.sender = new _nodeGcm2.default.Sender(args.apiKey);
35
+ this.sender = new _nodeGcm2.default.Sender(args.apiKey, args.requestOptions);
36
36
  }
37
37
 
38
38
  GCM.GCMRegistrationTokensMax = GCMRegistrationTokensMax;
@@ -160,8 +160,8 @@ function generateGCMPayload(requestData, pushId, timeStamp, expirationTime) {
160
160
  push_id: pushId,
161
161
  time: new Date(timeStamp).toISOString()
162
162
  };
163
- var optionalKeys = ['content_available', 'notification'];
164
- optionalKeys.forEach(function (key, index, array) {
163
+ var optionalKeys = ['contentAvailable', 'notification'];
164
+ optionalKeys.forEach(function (key) {
165
165
  if (requestData.hasOwnProperty(key)) {
166
166
  payload[key] = requestData[key];
167
167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parse/push-adapter",
3
- "version": "3.2.0",
3
+ "version": "4.0.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,22 @@
23
23
  "author": "Parse",
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "babel-cli": "^6.26.0",
27
- "babel-core": "^6.26.3",
28
- "babel-preset-es2015": "^6.24.1",
29
- "babel-preset-stage-0": "^6.24.0",
30
- "codecov": "^3.5.0",
26
+ "babel-cli": "6.26.0",
27
+ "babel-core": "6.26.3",
28
+ "babel-preset-es2015": "6.24.1",
29
+ "babel-preset-stage-0": "6.24.1",
30
+ "codecov": "3.7.1",
31
31
  "jasmine": "2.8.0",
32
- "jasmine-spec-reporter": "^4.0.0",
33
- "nyc": "^14.1.1"
32
+ "jasmine-spec-reporter": "4.0.0",
33
+ "nyc": "14.1.1"
34
34
  },
35
35
  "dependencies": {
36
- "@parse/node-apn": "^3.1.0",
37
- "@parse/node-gcm": "^1.0.0",
38
- "npmlog": "^4.0.2",
39
- "parse": "2.8.0"
36
+ "@parse/node-apn": "5.0.0",
37
+ "@parse/node-gcm": "1.0.2",
38
+ "npmlog": "4.1.2",
39
+ "parse": "3.3.0"
40
40
  },
41
41
  "engines": {
42
- "node": ">= 8.9.1"
42
+ "node": ">= 12"
43
43
  }
44
44
  }