twilio-sync
Advanced tools
Comparing version 3.1.1-rc.1 to 3.2.0-rc.0
@@ -6,2 +6,16 @@ # Change Log | ||
## [3.2.0-rc.0](https://github.com/twilio/rtd-sdk-monorepo-js/compare/twilio-sync@3.1.1-rc.1...twilio-sync@3.2.0-rc.0) (2022-04-13) | ||
### Features | ||
* Migrate Sync to ReplayEventEmitter ([62c0f71](https://github.com/twilio/rtd-sdk-monorepo-js/commit/62c0f7134683197e36508446b9b8ad61097a84f5)) | ||
### Bug Fixes | ||
* Fix client initialization when a connected Twilsock is passed ([49aa87e](https://github.com/twilio/rtd-sdk-monorepo-js/commit/49aa87ecc8cc0dd30ac56fd563fb4a2af832610b)) | ||
### [3.1.1-rc.1](https://github.com/twilio/rtd-sdk-monorepo-js/compare/twilio-sync@3.1.1-rc.0...twilio-sync@3.1.1-rc.1) (2022-03-16) | ||
@@ -8,0 +22,0 @@ |
@@ -106,3 +106,2 @@ /* | ||
var tslib_es6 = require('./node_modules/tslib/tslib.es6.js'); | ||
var _polyfillNode_events = require('./_virtual/_polyfill-node_events.js'); | ||
var declarativeTypeValidator = require('@twilio/declarative-type-validator'); | ||
@@ -126,2 +125,3 @@ var twilsock = require('twilsock'); | ||
var _package = require('./packages/sync/package.json.js'); | ||
var browser = require('./packages/replay-event-emitter/builds/browser.js'); | ||
@@ -159,3 +159,3 @@ const SYNC_PRODUCT_ID = 'data_sync'; | ||
*/ | ||
class Client extends _polyfillNode_events['default'] { | ||
class Client extends browser.ReplayEventEmitter { | ||
/** | ||
@@ -166,2 +166,3 @@ * @param fpaToken Twilio access token. | ||
constructor(fpaToken, options = {}) { | ||
var _a; | ||
super(); | ||
@@ -195,7 +196,7 @@ if (!fpaToken) { | ||
} | ||
let twilsock$1 = options.twilsockClient = options.twilsockClient || new twilsock.Twilsock(fpaToken, productId, options); | ||
twilsock$1.on('tokenAboutToExpire', ttl => this.emit('tokenAboutToExpire', ttl)); | ||
let twilsock$1 = options.twilsockClient = (_a = options.twilsockClient) !== null && _a !== void 0 ? _a : new twilsock.Twilsock(fpaToken, productId, options); | ||
twilsock$1.on('tokenAboutToExpire', () => this.emit('tokenAboutToExpire')); | ||
twilsock$1.on('tokenExpired', () => this.emit('tokenExpired')); | ||
twilsock$1.on('connectionError', err => this.emit('connectionError', err)); | ||
twilsock$1.on('stateChanged', (state) => { | ||
twilsock$1.onWithReplay('stateChanged', (state) => { | ||
this.emit('connectionStateChanged', state); | ||
@@ -202,0 +203,0 @@ /** |
@@ -105,6 +105,6 @@ /* | ||
var _polyfillNode_events = require('./_virtual/_polyfill-node_events.js'); | ||
var uuid = require('uuid'); | ||
var browser = require('./packages/replay-event-emitter/builds/browser.js'); | ||
class Closeable extends _polyfillNode_events['default'] { | ||
class Closeable extends browser.ReplayEventEmitter { | ||
constructor() { | ||
@@ -111,0 +111,0 @@ super(); |
@@ -169,5 +169,5 @@ /* | ||
} | ||
broadcastEventToListeners(eventName, args) { | ||
broadcastEventToListeners(eventName, ...args) { | ||
for (let listener of this._attachedListeners.values()) { | ||
listener.emit(eventName, args); | ||
listener.emit(eventName, ...args); | ||
} | ||
@@ -174,0 +174,0 @@ } |
@@ -109,3 +109,2 @@ /* | ||
var logger = require('./utils/logger.js'); | ||
var _polyfillNode_events = require('./_virtual/_polyfill-node_events.js'); | ||
var entity = require('./entity.js'); | ||
@@ -115,2 +114,3 @@ var closeable = require('./closeable.js'); | ||
var declarativeTypeValidator = require('@twilio/declarative-type-validator'); | ||
var browser = require('./packages/replay-event-emitter/builds/browser.js'); | ||
@@ -357,3 +357,3 @@ /** | ||
*/ | ||
class InstantQuery extends _polyfillNode_events['default'] { | ||
class InstantQuery extends browser.ReplayEventEmitter { | ||
/** | ||
@@ -360,0 +360,0 @@ * @internal |
@@ -105,5 +105,5 @@ /* | ||
var version = "3.1.1-rc.1"; | ||
var version = "3.2.0-rc.0"; | ||
exports.version = version; | ||
//# sourceMappingURL=package.json.js.map |
{ | ||
"name": "twilio-sync", | ||
"version": "3.1.1-rc.1", | ||
"version": "3.2.0-rc.0", | ||
"description": "Twilio Sync client library", | ||
@@ -45,3 +45,3 @@ "main": "./builds/lib.js", | ||
"platform": "^1.3.6", | ||
"twilsock": "^0.12.2", | ||
"twilsock": "^0.13.0-rc.0", | ||
"uuid": "^3.4.0" | ||
@@ -48,0 +48,0 @@ }, |
Sorry, the diff of this file is too big to display
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
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
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
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
11498254
103
53133
+ Added@twilio/declarative-type-validator@0.2.8(transitive)
+ Addedtwilsock@0.13.7(transitive)
- Removedtwilsock@0.12.2(transitive)
Updatedtwilsock@^0.13.0-rc.0