Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apn

Package Overview
Dependencies
Maintainers
2
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 2.1.4 to 2.1.5

.nvmrc

6

ChangeLog.md
## Changelog
2.1.5:
* Improve typescript type definitions (#536)
* Several documentation improvements (#537, #547, #550, #555, #560, #560)
* Update dependencies (#566)
* Update .gitignore and add .nvmrc (#573)
2.1.4:

@@ -4,0 +10,0 @@ * Don't mutate passed in payload object

30

index.d.ts

@@ -0,1 +1,5 @@

/// <reference types="node" />
import { EventEmitter } from 'events';
export interface ProviderToken {

@@ -55,2 +59,24 @@ /**

interface ApsAlert {
body?: string
"loc-key"?: string
"loc-args"?: any[]
title?: string
"title-loc-key"?: string
"title-loc-args"?: any[]
action?: string
"action-loc-key"?: string
}
interface Aps {
alert?: string | ApsAlert
"launch-image"?: string
badge?: number
sound?: string
"content-available"?: undefined | 1
"mutable-content"?: undefined | 1
"url-args"?: string[]
category?: string
}
export interface ResponseSent {

@@ -74,3 +100,3 @@ device: string;

export class Provider {
export class Provider extends EventEmitter {
constructor(options: ProviderOptions);

@@ -135,2 +161,4 @@ /**

public payload: any;
public aps: Aps;
/**

@@ -137,0 +165,0 @@ * If supplied this payload will be encoded and transmitted as-is. The convenience setters will have no effect on the JSON output.

10

package.json
{
"name": "apn",
"description": "An interface to the Apple Push Notification service for Node.js",
"version": "2.1.4",
"version": "2.1.5",
"author": "Andrew Naylor <argon@mkbot.net>",

@@ -31,7 +31,7 @@ "contributors": [

"dependencies": {
"debug": "^2.6.0",
"debug": "^2.6.8",
"http2": "https://github.com/node-apn/node-http2/archive/apn-2.1.4.tar.gz",
"node-forge": "^0.6.48",
"jsonwebtoken": "^7.2.1",
"verror": "^1.9.0"
"node-forge": "^0.7.1",
"jsonwebtoken": "^7.4.1",
"verror": "^1.10.0"
},

@@ -38,0 +38,0 @@ "devDependencies": {

@@ -60,5 +60,5 @@ [<p align="center"><img src="doc/logo.png" alt="node-apn" width="450" height="auto"></p>][node-apn]

token: {
key: "path/to/key.p8",
keyId: "T0K3NK3Y1D",
teamId: "T34M1D"
key: "path/to/APNsAuthKey_XXXXXXXXXX.p8",
keyId: "key-id",
teamId: "developer-team-id"
},

@@ -111,4 +111,6 @@ production: false

You should only create one `Provider` per-process for each certificate/key pair you have. You do not need to create a new `Provider` for each notification. If you are only sending notifications to one app then there is no need for more than one `Provider`.
You should only create one `Provider` per-process for each certificate/key pair you have. You do not need to create a new `Provider` for each notification. If you are only sending notifications to one app then there is no need for more than one `Provider`.
If you are constantly creating `Provider` instances in your app, make sure to call `Provider.shutdown()` when you are done with each provider to release its resources and memory.
## Troubleshooting

@@ -115,0 +117,0 @@

@@ -68,3 +68,3 @@ "use strict";

.and
.to.eql(new Date("2015-01-01T00:00:00"));
.to.eql(new Date("2015-01-01T00:00:00Z"));
});

@@ -76,3 +76,3 @@

.and
.to.eql(new Date("2025-01-01T00:00:00"));
.to.eql(new Date("2025-01-01T00:00:00Z"));
});

@@ -79,0 +79,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

Sorry, the diff of this file is not supported yet

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