@cendarsoss/pusher-js 8.4.11 → 8.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cendarsoss/pusher-js",
3
- "version": "8.4.11",
3
+ "version": "8.4.12",
4
4
  "description": "Pusher Channels JavaScript library for browsers, React Native, NodeJS and web workers",
5
5
  "types": "index.d.ts",
6
6
  "main": "dist/node/pusher.js",
@@ -198,30 +198,43 @@ export default class DeltaCompressionManager {
198
198
  baseMessage = channelState.getBaseMessage(conflationKey, baseIndex);
199
199
  if (!baseMessage) {
200
200
  this.error(
201
- `No base message for channel ${channel}, key ${conflationKey}, index ${baseIndex}`,
202
- );
203
- if (this.options.debug) {
204
- this.log('Current conflation cache snapshot', {
201
+ `No base message (conflation path) for channel ${channel}`,
202
+ {
203
+ path: 'conflation',
205
204
  channel,
206
- conflationKey: channelState.conflationKey,
207
- cacheSizes: Array.from(
205
+ deltaConflationKey: conflationKey,
206
+ deltaBaseIndex: baseIndex,
207
+ deltaSeq: sequence,
208
+ channelStateConflationKey: channelState.conflationKey,
209
+ channelStateBaseMessage: channelState.baseMessage ? 'exists' : null,
210
+ channelStateBaseSequence: channelState.baseSequence,
211
+ channelStateLastSequence: channelState.lastSequence,
212
+ conflationCacheKeys: Array.from(channelState.conflationCaches.keys()),
213
+ conflationCacheSizes: Array.from(
208
214
  channelState.conflationCaches.entries(),
209
215
  ).map(([key, cache]) => ({ key, size: cache.length })),
210
- });
211
- }
216
+ },
217
+ );
212
218
  this.requestResync(channel);
213
219
  return null;
214
220
  }
215
221
  } else {
216
222
  baseMessage = channelState.baseMessage;
217
223
  if (!baseMessage) {
218
- this.error(`No base message for channel ${channel}`);
219
- if (this.options.debug) {
220
- this.log('Channel state missing base', {
224
+ this.error(
225
+ `No base message (legacy path) for channel ${channel}`,
226
+ {
227
+ path: 'legacy',
221
228
  channel,
222
- lastSequence: channelState.lastSequence,
223
- });
224
- }
229
+ deltaConflationKey: conflationKey,
230
+ deltaBaseIndex: baseIndex,
231
+ deltaSeq: sequence,
232
+ channelStateConflationKey: channelState.conflationKey,
233
+ channelStateBaseMessage: null,
234
+ channelStateBaseSequence: channelState.baseSequence,
235
+ channelStateLastSequence: channelState.lastSequence,
236
+ },
237
+ );
225
238
  this.requestResync(channel);
226
239
  return null;
227
240
  }