Socket
Socket
Sign inDemoInstall

twilio-sync

Package Overview
Dependencies
Maintainers
1
Versions
608
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twilio-sync - npm Package Compare versions

Comparing version 3.2.0-rc.0 to 3.2.0-rc.1

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [3.2.0-rc.1](https://github.com/twilio/rtd-sdk-monorepo-js/compare/twilio-sync@3.2.0-rc.0...twilio-sync@3.2.0-rc.1) (2022-05-02)
### Bug Fixes
* Add @twilio/replay-event-emitter dependency into package.json ([2ccb45d](https://github.com/twilio/rtd-sdk-monorepo-js/commit/2ccb45d40fa38bc99f0faae4ced525f1706a4118))
* Fix faulty type definitions by upgrading tooling ([b6d25ce](https://github.com/twilio/rtd-sdk-monorepo-js/commit/b6d25cecb08ab4e0d369430b90a786e1b275af91))
* Update pinning tools to new Python version ([50a6c78](https://github.com/twilio/rtd-sdk-monorepo-js/commit/50a6c78b9d717b0e7531919e1f7cb409474c3df5))
## [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)

@@ -8,0 +19,0 @@

2

dist/cache.js

@@ -173,3 +173,3 @@ /*

exports.Cache = Cache;
exports.default = Cache;
exports["default"] = Cache;
//# sourceMappingURL=cache.js.map

@@ -124,3 +124,3 @@ /*

var _package = require('./packages/sync/package.json.js');
var browser = require('./packages/replay-event-emitter/builds/browser.js');
var replayEventEmitter = require('@twilio/replay-event-emitter');

@@ -158,3 +158,3 @@ const SYNC_PRODUCT_ID = 'data_sync';

*/
class Client extends browser.ReplayEventEmitter {
class Client extends replayEventEmitter.ReplayEventEmitter {
/**

@@ -171,6 +171,6 @@ * @param fpaToken Twilio access token.

if (options.hasOwnProperty('logLevel')) {
logger['default'].setLevel(options.logLevel);
logger["default"].setLevel(options.logLevel);
}
else {
logger['default'].setLevel('silent');
logger["default"].setLevel('silent');
}

@@ -209,3 +209,3 @@ const productId = options.productId = options.productId || SYNC_PRODUCT_ID;

let config = new configuration.Configuration(options);
let network$1 = new network.NetworkService(new clientInfo['default'](SDK_VERSION), config, twilsock$1);
let network$1 = new network.NetworkService(new clientInfo["default"](SDK_VERSION), config, twilsock$1);
let storage$1 = new storage.SessionStorage(config);

@@ -240,3 +240,3 @@ this.services = {

_routeMessage(type, message) {
logger['default'].trace('Notification type:', type, 'content:', message);
logger["default"].trace('Notification type:', type, 'content:', message);
switch (type) {

@@ -296,3 +296,3 @@ case SYNC_DOCUMENT_NOTIFICATION_TYPE:

catch (e) {
logger['default'].warn('Failed to initialize storage', e);
logger["default"].warn('Failed to initialize storage', e);
}

@@ -299,0 +299,0 @@ }

@@ -116,5 +116,3 @@ /*

enumerable: true,
get: function () {
return e[k];
}
get: function () { return e[k]; }
});

@@ -124,3 +122,3 @@ }

}
n['default'] = e;
n["default"] = e;
return Object.freeze(n);

@@ -143,3 +141,3 @@ }

exports.ClientInfo = ClientInfo;
exports.default = ClientInfo;
exports["default"] = ClientInfo;
//# sourceMappingURL=clientInfo.js.map

@@ -106,5 +106,5 @@ /*

var uuid = require('uuid');
var browser = require('./packages/replay-event-emitter/builds/browser.js');
var replayEventEmitter = require('@twilio/replay-event-emitter');
class Closeable extends browser.ReplayEventEmitter {
class Closeable extends replayEventEmitter.ReplayEventEmitter {
constructor() {

@@ -130,3 +130,3 @@ super();

exports.Closeable = Closeable;
exports.default = Closeable;
exports["default"] = Closeable;
//# sourceMappingURL=closeable.js.map

@@ -177,3 +177,3 @@ /*

exports.SyncEntity = SyncEntity;
exports.default = SyncEntity;
exports["default"] = SyncEntity;
//# sourceMappingURL=entity.js.map

@@ -113,3 +113,3 @@ /*

var declarativeTypeValidator = require('@twilio/declarative-type-validator');
var browser = require('./packages/replay-event-emitter/builds/browser.js');
var replayEventEmitter = require('@twilio/replay-event-emitter');

@@ -197,3 +197,3 @@ /**

if (this.shouldIgnoreEvent(key, revision)) {
logger['default'].trace(`Item ${key} update skipped, revision: ${revision}`);
logger["default"].trace(`Item ${key} update skipped, revision: ${revision}`);
}

@@ -209,3 +209,3 @@ else {

if (this.shouldIgnoreEvent(key, revision)) {
logger['default'].trace(`Item ${key} delete skipped, revision: ${revision}`);
logger["default"].trace(`Item ${key} delete skipped, revision: ${revision}`);
}

@@ -358,3 +358,3 @@ else {

*/
class InstantQuery extends browser.ReplayEventEmitter {
class InstantQuery extends replayEventEmitter.ReplayEventEmitter {
/**

@@ -401,3 +401,3 @@ * @internal

.catch((err) => {
logger['default'].error(`Error '${err.message}' while executing query '${queryExpression}'`);
logger["default"].error(`Error '${err.message}' while executing query '${queryExpression}'`);
this.queryExpression = null;

@@ -474,4 +474,4 @@ throw err;

exports.LiveQueryImpl = LiveQueryImpl;
exports.default = LiveQuery;
exports["default"] = LiveQuery;
exports.queryItems = queryItems;
//# sourceMappingURL=livequery.js.map

@@ -105,3 +105,3 @@ /*

/*! *****************************************************************************
/******************************************************************************
Copyright (c) Microsoft Corporation.

@@ -108,0 +108,0 @@

@@ -105,5 +105,5 @@ /*

var version = "3.2.0-rc.0";
var version = "3.2.0-rc.1";
exports.version = version;
//# sourceMappingURL=package.json.js.map

@@ -120,5 +120,3 @@ /*

enumerable: true,
get: function () {
return e[k];
}
get: function () { return e[k]; }
});

@@ -128,3 +126,3 @@ }

}
n['default'] = e;
n["default"] = e;
return Object.freeze(n);

@@ -239,3 +237,3 @@ }

let headers = this.createHeaders();
logger['default'].debug('GET', uri, 'ID:', headers['Twilio-Request-Id']);
logger["default"].debug('GET', uri, 'ID:', headers['Twilio-Request-Id']);
return this.executeWithRetry(() => this.transport.get(uri, headers, this.config.productId), true);

@@ -248,3 +246,3 @@ }

}
logger['default'].debug('POST', uri, 'ID:', headers['Twilio-Request-Id']);
logger["default"].debug('POST', uri, 'ID:', headers['Twilio-Request-Id']);
return this.executeWithRetry(() => this.transport.post(uri, headers, body, this.config.productId), retryWhenThrottled);

@@ -257,3 +255,3 @@ }

}
logger['default'].debug('PUT', uri, 'ID:', headers['Twilio-Request-Id']);
logger["default"].debug('PUT', uri, 'ID:', headers['Twilio-Request-Id']);
return this.executeWithRetry(() => this.transport.put(uri, headers, body, this.config.productId), false);

@@ -263,3 +261,3 @@ }

let headers = this.createHeaders();
logger['default'].debug('DELETE', uri, 'ID:', headers['Twilio-Request-Id']);
logger["default"].debug('DELETE', uri, 'ID:', headers['Twilio-Request-Id']);
return this.executeWithRetry(() => this.transport.delete(uri, headers, this.config.productId), false);

@@ -266,0 +264,0 @@ }

@@ -385,3 +385,3 @@ /*

exports.SyncStreamImpl = SyncStreamImpl;
exports.default = SyncStream;
exports["default"] = SyncStream;
//# sourceMappingURL=syncstream.js.map

@@ -211,3 +211,3 @@ /*

this.backoff.reset();
logger['default'].debug('All subscriptions resolved.');
logger["default"].debug('All subscriptions resolved.');
}

@@ -245,3 +245,3 @@ });

if (!this.isConnected) {
logger['default'].debug(`Twilsock connection (required for subscription) not ready; waiting…`);
logger["default"].debug(`Twilsock connection (required for subscription) not ready; waiting…`);
this.backoff.reset();

@@ -281,3 +281,3 @@ return;

else {
logger['default'].error(`Invalid timeout: ${estimatedDeliveryInMs}`);
logger["default"].error(`Invalid timeout: ${estimatedDeliveryInMs}`);
}

@@ -294,7 +294,7 @@ requests.filter(r => r.pendingCorrelationId === correlationId)

if (e instanceof twilsock.TransportUnavailableError) {
logger['default'].debug(`Twilsock connection (required for subscription) not ready (c:${correlationId}); waiting…`);
logger["default"].debug(`Twilsock connection (required for subscription) not ready (c:${correlationId}); waiting…`);
this.backoff.reset();
}
else {
logger['default'].debug(`Failed an attempt to ${action} subscriptions (c:${correlationId}); retrying`, e);
logger["default"].debug(`Failed an attempt to ${action} subscriptions (c:${correlationId}); retrying`, e);
this.persist();

@@ -361,3 +361,3 @@ }

let retriedRequests = objects.filter(a => a.retryCount > 0).length;
logger['default'].debug(`Attempting '${action}' request (c:${correlationId}):`, requests);
logger["default"].debug(`Attempting '${action}' request (c:${correlationId}):`, requests);
const requestBody = {

@@ -389,3 +389,3 @@ event_protocol_version: 4,

add(sid, entity) {
logger['default'].debug(`Establishing intent to subscribe to ${sid}`);
logger["default"].debug(`Establishing intent to subscribe to ${sid}`);
const existingSubscription = this.subscriptions.get(sid);

@@ -412,3 +412,3 @@ if (existingSubscription && entity && existingSubscription.lastEventId === entity.lastEventId) {

remove(sid) {
logger['default'].debug(`Establishing intent to unsubscribe from ${sid}`);
logger["default"].debug(`Establishing intent to unsubscribe from ${sid}`);
const removed = this.subscriptions.delete(sid);

@@ -428,3 +428,3 @@ if (removed) {

acceptMessage(message, isStrictlyOrdered) {
logger['default'].trace('Subscriptions received', message);
logger["default"].trace('Subscriptions received', message);
const eventType = message.event_type;

@@ -482,3 +482,3 @@ const events = typeof message.events !== 'undefined'

default:
logger['default'].debug(`Dropping unknown message type ${eventType}`);
logger["default"].debug(`Dropping unknown message type ${eventType}`);
break;

@@ -493,3 +493,3 @@ }

if (message.replay_status === 'interrupted') {
logger['default'].debug(`Event Replay for subscription to ${sid} (c:${correlationId}) interrupted; continuing eagerly.`);
logger["default"].debug(`Event Replay for subscription to ${sid} (c:${correlationId}) interrupted; continuing eagerly.`);
subscriptionIntent.updatePending(null, null);

@@ -500,3 +500,3 @@ this.persisted.delete(subscriptionIntent.sid);

else if (message.replay_status === 'completed') {
logger['default'].debug(`Event Replay for subscription to ${sid} (c:${correlationId}) completed. Subscription is ready.`);
logger["default"].debug(`Event Replay for subscription to ${sid} (c:${correlationId}) completed. Subscription is ready.`);
subscriptionIntent.complete(message.last_event_id);

@@ -509,3 +509,3 @@ this.persisted.set(message.object_sid, subscriptionIntent);

else {
logger['default'].debug(`Late message for ${message.object_sid} (c:${correlationId}) dropped.`);
logger["default"].debug(`Late message for ${message.object_sid} (c:${correlationId}) dropped.`);
}

@@ -522,3 +522,3 @@ this.persist();

else {
logger['default'].debug(`Late message for ${message.object_sid} (c:${correlationId}) dropped.`);
logger["default"].debug(`Late message for ${message.object_sid} (c:${correlationId}) dropped.`);
}

@@ -533,3 +533,3 @@ this.persist();

if (subscription.pendingCorrelationId === correlationId) {
logger['default'].error(`Failed to subscribe on ${subscription.sid}`, message.error);
logger["default"].error(`Failed to subscribe on ${subscription.sid}`, message.error);
subscription.markAsFailed(message);

@@ -561,3 +561,3 @@ subscription.setSubscriptionState('none');

else {
logger['default'].debug(`Message dropped for SID '${sid}', for which there is no subscription.`);
logger["default"].debug(`Message dropped for SID '${sid}', for which there is no subscription.`);
}

@@ -584,3 +584,3 @@ }

poke(reason) {
logger['default'].debug(`Triggering event replay for all subscriptions, reason=${reason}`);
logger["default"].debug(`Triggering event replay for all subscriptions, reason=${reason}`);
this.pendingPokeReason = reason;

@@ -587,0 +587,0 @@ if (this.subscriptionTtlTimer) {

@@ -176,3 +176,3 @@ /*

if (update.id <= this.lastEventId) {
logger['default'].trace('Document update skipped, current:', this.lastEventId, ', remote:', update.id);
logger["default"].trace('Document update skipped, current:', this.lastEventId, ', remote:', update.id);
break;

@@ -324,3 +324,3 @@ }

else {
logger['default'].error(`Can't get updates for ${this.sid}:`, err);
logger["default"].error(`Can't get updates for ${this.sid}:`, err);
}

@@ -614,3 +614,3 @@ });

exports.SyncDocumentImpl = SyncDocumentImpl;
exports.default = SyncDocument;
exports["default"] = SyncDocument;
//# sourceMappingURL=syncdocument.js.map

@@ -389,3 +389,3 @@ /*

if (this.shouldIgnoreEvent(index, lastEventId)) {
logger['default'].trace(`Item ${index} update skipped, current: ${this.lastEventId}, remote: ${lastEventId}`);
logger["default"].trace(`Item ${index} update skipped, current: ${this.lastEventId}, remote: ${lastEventId}`);
return;

@@ -447,3 +447,3 @@ }

else {
logger['default'].trace('Context update skipped, current:', this.lastEventId, ', remote:', eventId);
logger["default"].trace('Context update skipped, current:', this.lastEventId, ', remote:', eventId);
return false;

@@ -903,3 +903,3 @@ }

exports.SyncListImpl = SyncListImpl;
exports.default = SyncList;
exports["default"] = SyncList;
//# sourceMappingURL=synclist.js.map

@@ -356,3 +356,3 @@ /*

if (this.shouldIgnoreEvent(key, lastEventId)) {
logger['default'].trace('SyncMapItem ', key, ' update skipped, current:', this.lastEventId, ', remote:', lastEventId);
logger["default"].trace('SyncMapItem ', key, ' update skipped, current:', this.lastEventId, ', remote:', lastEventId);
return;

@@ -845,3 +845,3 @@ }

exports.SyncMapImpl = SyncMapImpl;
exports.default = SyncMap;
exports["default"] = SyncMap;
//# sourceMappingURL=syncmap.js.map

@@ -116,5 +116,3 @@ /*

enumerable: true,
get: function () {
return e[k];
}
get: function () { return e[k]; }
});

@@ -124,3 +122,3 @@ }

}
n['default'] = e;
n["default"] = e;
return Object.freeze(n);

@@ -156,3 +154,3 @@ }

exports.default = log$1;
exports["default"] = log$1;
//# sourceMappingURL=logger.js.map

@@ -126,3 +126,3 @@ /*

exports.SyncNetworkError = SyncNetworkError;
exports.default = SyncError;
exports["default"] = SyncError;
//# sourceMappingURL=syncerror.js.map
{
"name": "twilio-sync",
"version": "3.2.0-rc.0",
"version": "3.2.0-rc.1",
"description": "Twilio Sync client library",

@@ -38,5 +38,6 @@ "main": "./builds/lib.js",

"dependencies": {
"@babel/runtime": "^7.14.5",
"@twilio/declarative-type-validator": "^0.1.11",
"@twilio/operation-retrier": "^4.0.7",
"@babel/runtime": "^7.17.0",
"@twilio/declarative-type-validator": "^0.2.0-rc.0",
"@twilio/operation-retrier": "^4.0.8-rc.0",
"@twilio/replay-event-emitter": "^0.3.0-rc.1",
"core-js": "^3.17.3",

@@ -46,12 +47,13 @@ "iso8601-duration": "=1.2.0",

"platform": "^1.3.6",
"twilsock": "^0.13.0-rc.0",
"twilsock": "^0.13.0-rc.1",
"uuid": "^3.4.0"
},
"devDependencies": {
"@babel/core": "^7.14.5",
"@babel/preset-env": "^7.14.5",
"@babel/preset-typescript": "^7.14.5",
"@babel/core": "^7.17.0",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-node-resolve": "^13.2.1",
"@types/chai": "^4.1.7",

@@ -91,10 +93,11 @@ "@types/chai-as-promised": "7.1.0",

"path": "^0.12.7",
"rollup": "^2.51.1",
"rollup": "^2.70.2",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-polyfill-node": "^0.6.2",
"rollup-plugin-polyfill-node": "^0.9.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-ts": "^1.4.0",
"rollup-plugin-ts": "^2.0.7",
"sinon": "^7.3.2",
"sinon-chai": "^3.3.0",
"ts-node": "^8.2.0",
"tslib": "^2.4.0",
"tslint": "^5.17.0",

@@ -101,0 +104,0 @@ "twilio": "^3.55.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 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

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

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