@pusher/push-notifications-server
Advanced tools
Comparing version 0.10.4 to 0.10.5
{ | ||
"name": "@pusher/push-notifications-server", | ||
"version": "0.10.4", | ||
"version": "0.10.5", | ||
"description": "NodeJS Server SDK for Pusher Push Notifications", | ||
@@ -5,0 +5,0 @@ "main": "push-notifications.js", |
const https = require('https'); | ||
const SDK_VERSION = '0.10.2'; | ||
const INTERESTS_REGEX = new RegExp('^(_|\\-|=|@|,|\\.|:|[A-Z]|[a-z]|[0-9])*$'); | ||
const SDK_VERSION = '0.10.5'; | ||
const INTERESTS_REGEX = new RegExp('^(_|\\-|=|@|,|\\.|;|[A-Z]|[a-z]|[0-9])*$'); | ||
const INTEREST_STRING_MAX_LENGTH = 164; | ||
@@ -6,0 +6,0 @@ const INTEREST_ARRAY_MAX_LENGTH = 100; |
[![Build Status](https://travis-ci.org/pusher/push-notifications-node.svg?branch=master)](https://travis-ci.org/pusher/push-notifications-node) | ||
# Pusher Push Notifications Node.js Server SDK | ||
Full documentation for this SDK can be found [here](https://docs.pusher.com/push-notifications/reference/server-sdk-node) | ||
# Pusher Beams Node.js Server SDK | ||
Full documentation for this SDK can be found [here](https://docs.pusher.com/beams/reference/server-sdk-node) | ||
## Installation | ||
The Pusher Notifications Node.js server SDK is available on npm [here](https://www.npmjs.com/package/pusher-push-notifications-node). | ||
The Beams Node.js server SDK is available on npm [here](https://www.npmjs.com/package/@pusher/push-notifications-server). | ||
@@ -20,3 +20,3 @@ You can install this SDK by using [npm](https://npmjs.com): | ||
### Configuring the SDK for Your Instance | ||
Use your instance id and secret (you can get these from the [dashboard](https://dash.pusher.com)) to create a PushNotifications instance: | ||
Use your instance id and secret (you can get these from the [dashboard](https://dash.pusher.com/beams)) to create a Beams PushNotifications instance: | ||
```javascript | ||
@@ -32,3 +32,3 @@ const PushNotifications = require('@pusher/push-notifications-server'); | ||
### Publishing a Notification | ||
Once you have created your PushNotifications instance you can publish a push notification to your registered & subscribed devices: | ||
Once you have created your Beams PushNotifications instance you can publish a push notification to your registered & subscribed devices: | ||
```javascript | ||
@@ -35,0 +35,0 @@ pushNotifications.publish(['hello'], { |
@@ -120,3 +120,3 @@ const expect = require('chai').expect; | ||
authorization: 'Bearer SECRET_KEY', | ||
'x-pusher-library': 'pusher-push-notifications-node 0.10.2', | ||
'x-pusher-library': 'pusher-push-notifications-node 0.10.5', | ||
host: 'instance_id.pushnotifications.pusher.com' | ||
@@ -192,2 +192,6 @@ }); | ||
).to.throw('contains a forbidden character'); | ||
expect(() => | ||
pn.publish(['good-interest', 'bad:interest'], {}) | ||
).to.throw('contains a forbidden character'); | ||
}); | ||
@@ -194,0 +198,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
49524
387
1