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

mpns

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mpns - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

.npmignore

133

lib/mpns.js

@@ -56,5 +56,5 @@ // Copyright Jeff Wilcox

if (options) {
copyOfInterest(options, this, propertiesOfInterest, this.pushType === 'tile');
copyOfInterest(options, this, sslProperties);
copyOfInterest(options, this, httpProperties);
copyOfInterest(options, this, properties.ofInterest, this.pushType === 'tile');
copyOfInterest(options, this, properties.ssl);
copyOfInterest(options, this, properties.http);
}

@@ -95,3 +95,3 @@ }

copyOfInterest(me, options, sslProperties);
copyOfInterest(me, options, properties.ssl);

@@ -116,3 +116,3 @@ //opt out of connection pooling - otherwise error handling gets a lot more complicated

// Store the fields that were sent to make it easy to log.
copyOfInterest(me, result, propertiesOfInterest, this.pushType === 'tile');
copyOfInterest(me, result, properties.ofInterest, this.pushType === 'tile');

@@ -288,18 +288,2 @@ switch (message.statusCode) {

exports.sendTile = function () {
send('tile', tileProperties, LiveTile, arguments);
}
exports.sendFlipTile = function() {
send('tile', flipTileProperties, FlipTile, arguments);
}
exports.sendToast = function () {
send('toast', toastProperties, Toast, arguments);
}
exports.sendRaw = function () {
send('raw', ['payload'], RawNotification, arguments);
}
function send(type, typeProperties, objectType, args) {

@@ -315,4 +299,4 @@ var pushUri = Array.prototype.shift.apply(args);

copyOfInterest(payload, params, typeProperties, type === 'tile');
copyOfInterest(payload, params, sslProperties, false);
copyOfInterest(payload, params, httpProperties, false);
copyOfInterest(payload, params, properties.ssl, false);
copyOfInterest(payload, params, properties.http, false);
}

@@ -344,47 +328,70 @@ else {

var httpProperties = [
'proxy'
];
var properties = {
http: [
'proxy'
],
ssl: [
'pfx',
'key',
'passphrase',
'cert',
'ca',
'ciphers',
'rejectUnauthorized'
],
toast: [
'text1',
'text2',
'param'
],
tile: [
'backgroundImage',
'count',
'title',
'backBackgroundImage',
'backTitle',
'backContent',
'id'
],
flipTile: [
'smallBackgroundImage',
'wideBackgroundImage',
'wideBackContent',
'wideBackBackgroundImage'
],
ofInterest: [
'payload',
'pushType',
'tileTemplate'
]
};
//tls.connect ssl params
var sslProperties = [
'pfx',
'key',
'passphrase',
'cert',
'ca',
'ciphers',
'rejectUnauthorized'
];
properties.flipTile = properties.flipTile.concat(properties.tile);
properties.ofInterest = properties.ofInterest.concat(properties.toast, properties.flipTile);
var toastProperties = [
'text1',
'text2',
'param'
];
module.exports = {
sendTile: function () {
send('tile', properties.tile, LiveTile, arguments);
},
var tileProperties = [
'backgroundImage',
'count',
'title',
'backBackgroundImage',
'backTitle',
'backContent',
'id'
];
sendFlipTile: function() {
send('tile', properties.flipTile, FlipTile, arguments);
},
var flipTileProperties = tileProperties.concat([
'smallBackgroundImage',
'wideBackgroundImage',
'wideBackContent',
'wideBackBackgroundImage'
]);
sendToast: function () {
send('toast', properties.toast, Toast, arguments);
},
var propertiesOfInterest = toastProperties.concat(flipTileProperties);
propertiesOfInterest.push('payload', 'pushType', 'tileTemplate');
sendRaw: function () {
send('raw', ['payload'], RawNotification, arguments);
},
// These object constructors are effectively deprecated. Consider using
// sendToast, sendTile or sendRaw methods going forward.
exports.liveTile = LiveTile;
exports.toast = Toast;
exports.rawNotification = RawNotification;
// These object constructors are effectively deprecated. Consider using
// sendToast, sendTile or sendRaw methods going forward.
liveTile: LiveTile,
toast: Toast,
rawNotification: RawNotification,
// Used for testing
Properties: properties
};
{
"name": "mpns",
"description": "A Node.js interface to the Microsoft Push Notification Service (MPNS) for Windows Phone.",
"version": "1.2.6",
"version": "1.2.7",
"author": "Jeff Wilcox <jeffwilcox+github@gmail.com>",

@@ -13,3 +13,8 @@ "contributors": [

"main": "./lib/mpns.js",
"engines": { "node":">= 0.5.0" }
}
"engines": { "node":">= 0.5.0" },
"test": "make test",
"devDependencies": {
"should": "*",
"mocha": "*"
}
}
#mpns
[![build status](https://secure.travis-ci.org/jeffwilcox/mpns.png)](http://travis-ci.org/jeffwilcox/mpns)
Send toast and live tile updates to Windows Phones through the Microsoft Push Notification Service (MPNS). Intended for the cloud and Node.js.

@@ -4,0 +6,0 @@

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