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

twilio-notifications

Package Overview
Dependencies
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twilio-notifications - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

9

lib/client.js

@@ -48,6 +48,9 @@ 'use strict';

this._twilsock.on('message', (type, message) => this._routeMessage(type, message));
this._registrar.on('transportReady', state => this.emit('transportReady', state));
this._registrar.on('stateChanged', (state) => { this._onRegistrationStateChange(state); });
this._registrar.on('needReliableTransport', this._onNeedReliableTransport.bind(this));
this._twilsock.on('message', (type, message) => this._routeMessage(type, message));
this._twilsock.on('connected', (notificationId) => {

@@ -92,5 +95,9 @@ this._onTransportStateChange(true);

&& this._reliableTransportState.registration;
console.log('Overall state ', overallState);
if (this._reliableTransportState.overall !== overallState) {
this._reliableTransportState.overall = overallState;
console.log(' -- Overall state ', overallState);
log.info('NTFCN I: Transport ready ' + overallState);

@@ -97,0 +104,0 @@ this.emit('transportReady', overallState);

@@ -23,5 +23,9 @@ 'use strict';

.substring(0, 128);
this._connectors.set('twilsock', new TwilsockConnector({ productId, platform }, twilsock, config));
this._connectors.set('gcm', new ErsConnector({ productId, platform }, transport, config, 'gcm'));
this._connectors.get('twilsock')
.on('transportReady', state => this.emit('transportReady', state));
EventEmitter.call(this);

@@ -28,0 +32,0 @@ }

'use strict';
const EventEmitter = require('events').EventEmitter;
const inherits = require('util').inherits;
const uuid = require('uuid');

@@ -25,6 +28,17 @@ const log = require('loglevel');

_messageTypes: { value: new Set() },
config: { value: config },
context: { value: context }
});
twilsock.on('disconnected', () => this.emit('transportReady', false));
twilsock.on('registered', id => {
if (context && id === context.id) {
this.emit('transportReady', true);
}
});
EventEmitter.call(this);
}
inherits(TwilsockConnector, EventEmitter);

@@ -31,0 +45,0 @@ TwilsockConnector.prototype.setNotificationId = function() {

8

package.json
{
"name": "twilio-notifications",
"version": "0.1.1",
"version": "0.1.2",
"description": "Client library for Twilio Notifications service",
"main": "lib/client.js",
"repository": {
"type": "git",
"url": "https://github.com/twilio/twilio-notifications.js"
},
"scripts": {

@@ -16,3 +20,3 @@ "test": "gulp unit-test"

"twilio-transport": "0.0.1",
"twilsock": "0.1.0",
"twilsock": "0.1.1",
"uuid": "^2.0.2"

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

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

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