twilio-sync
Advanced tools
Comparing version 0.3.0-alpha.11 to 0.3.0-alpha.12
@@ -23,5 +23,5 @@ 'use strict'; | ||
var _loglevel = require('loglevel'); | ||
var _logger = require('./logger'); | ||
var _loglevel2 = _interopRequireDefault(_loglevel); | ||
var _logger2 = _interopRequireDefault(_logger); | ||
@@ -75,3 +75,3 @@ var _utils = require('./utils'); | ||
value: function onMessage(type, message) { | ||
_loglevel2.default.trace('DSS I: message ', type, ': ', message); | ||
_logger2.default.trace('Notification type: ', type, 'content: ', message); | ||
@@ -90,3 +90,3 @@ var id = void 0; | ||
default: | ||
_loglevel2.default.warn('DSS: unknown message type', type, ' ignoring'); | ||
_logger2.default.warn('Unknown message type: ', type, ' ignoring'); | ||
} | ||
@@ -103,16 +103,2 @@ | ||
/** | ||
* Notifiy all other local instances of entity about changes | ||
*/ | ||
}, { | ||
key: 'emulateUpdate', | ||
value: function emulateUpdate(sid, source, data) { | ||
this._subscriptions.getSubscribers(sid).forEach(function (subscriber) { | ||
if (subscriber !== source) { | ||
subscriber._update((0, _utils.deepClone)(data)); | ||
} | ||
}); | ||
} | ||
/** | ||
* Subscribe for events | ||
@@ -119,0 +105,0 @@ */ |
@@ -43,5 +43,5 @@ 'use strict'; | ||
var _loglevel = require('loglevel'); | ||
var _logger = require('./logger'); | ||
var _loglevel2 = _interopRequireDefault(_loglevel); | ||
var _logger2 = _interopRequireDefault(_logger); | ||
@@ -64,3 +64,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
_network: { value: network }, | ||
_subscriptions: { value: new _map2.default() } | ||
_subscriptions: { value: new _map2.default() }, | ||
_serverSubscriptions: { value: new _map2.default() } | ||
}); | ||
@@ -135,3 +136,3 @@ } | ||
}).catch(function (err) { | ||
_loglevel2.default.error('DSS E: subscription failed: ', err); | ||
_logger2.default.error('Subscription failed: ', err); | ||
return _this2._subscribeWithBackoff(sid, entity, backoff, shouldRetry); | ||
@@ -193,3 +194,3 @@ }); | ||
}).catch(function (err) { | ||
_loglevel2.default.error('DSS E: subscription failed: ', err); | ||
_logger2.default.error('Subscription failed: ', err); | ||
return _this4._subscribeWithBackoff(sid, entity, backoff, shouldRetry); | ||
@@ -196,0 +197,0 @@ }); |
@@ -249,6 +249,2 @@ 'use strict'; | ||
_this4._data = result.data; | ||
_this4._router.emulateUpdate(_this4, _this4.uri, { | ||
revision: result.revision, | ||
data: result.data | ||
}); | ||
return data; | ||
@@ -255,0 +251,0 @@ }).then(function (_data) { |
{ | ||
"name": "twilio-sync", | ||
"version": "0.3.0-alpha.11", | ||
"version": "0.3.0-alpha.12", | ||
"description": "Twilio Sync client library", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
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
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 too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2629889
33406