@nxtedition/deepstream.io-client-js 24.0.5 → 24.0.6
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 +1 -1
- package/src/record/record-handler.js +0 -9
- package/src/record/record.js +0 -22
package/package.json
CHANGED
|
@@ -70,7 +70,6 @@ class RecordHandler {
|
|
|
70
70
|
created: 0,
|
|
71
71
|
destroyed: 0,
|
|
72
72
|
records: 0,
|
|
73
|
-
pending: 0,
|
|
74
73
|
pruning: 0,
|
|
75
74
|
patching: 0,
|
|
76
75
|
}
|
|
@@ -122,14 +121,6 @@ class RecordHandler {
|
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
|
|
125
|
-
_onPending(rec, value) {
|
|
126
|
-
if (value) {
|
|
127
|
-
this._stats.pending += 1
|
|
128
|
-
} else {
|
|
129
|
-
this._stats.pending -= 1
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
124
|
_onUpdating(rec, value) {
|
|
134
125
|
if (value) {
|
|
135
126
|
this._stats.updating += 1
|
package/src/record/record.js
CHANGED
|
@@ -21,10 +21,7 @@ class Record {
|
|
|
21
21
|
this._emitting = false
|
|
22
22
|
/** @type Map? */ this._updating = null
|
|
23
23
|
/** @type Array? */ this._patching = null
|
|
24
|
-
this._pending = false
|
|
25
24
|
this._subscribed = this._sendMsg1(C.ACTIONS.SUBSCRIBE, this._name)
|
|
26
|
-
|
|
27
|
-
this._onPending(true)
|
|
28
25
|
}
|
|
29
26
|
|
|
30
27
|
/** @type {string} */
|
|
@@ -270,10 +267,6 @@ class Record {
|
|
|
270
267
|
this._subscribed = false
|
|
271
268
|
}
|
|
272
269
|
|
|
273
|
-
if (!this._pending) {
|
|
274
|
-
this._onPending(true)
|
|
275
|
-
}
|
|
276
|
-
|
|
277
270
|
if (this._state > C.RECORD_STATE.CLIENT) {
|
|
278
271
|
this._state = C.RECORD_STATE.CLIENT
|
|
279
272
|
this._emitUpdate()
|
|
@@ -284,7 +277,6 @@ class Record {
|
|
|
284
277
|
invariant(!this._refs, 'must not have refs')
|
|
285
278
|
invariant(!this._patching, 'must not have patches')
|
|
286
279
|
invariant(!this._updating, 'must not have updates')
|
|
287
|
-
invariant(!this._pending, 'must not be pending')
|
|
288
280
|
|
|
289
281
|
if (this._subscribed) {
|
|
290
282
|
this._sendMsg1(C.ACTIONS.UNSUBSCRIBE, this._name)
|
|
@@ -364,10 +356,6 @@ class Record {
|
|
|
364
356
|
this._state = this._version.charAt(0) === 'I' ? C.RECORD_STATE.STALE : C.RECORD_STATE.SERVER
|
|
365
357
|
}
|
|
366
358
|
|
|
367
|
-
if (this._pending) {
|
|
368
|
-
this._onPending(false)
|
|
369
|
-
}
|
|
370
|
-
|
|
371
359
|
if (this._state !== prevState || this._data !== prevData || this._version !== prevVersion) {
|
|
372
360
|
this._emitUpdate()
|
|
373
361
|
}
|
|
@@ -401,16 +389,6 @@ class Record {
|
|
|
401
389
|
this._handler._onUpdating(this, value)
|
|
402
390
|
}
|
|
403
391
|
|
|
404
|
-
_onPending(value) {
|
|
405
|
-
if (value) {
|
|
406
|
-
this._pending = true
|
|
407
|
-
} else {
|
|
408
|
-
this._pending = false
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
this._handler._onPending(this, value)
|
|
412
|
-
}
|
|
413
|
-
|
|
414
392
|
_onSubscriptionHasProvider([, hasProvider]) {
|
|
415
393
|
if (this._state < C.RECORD_STATE.SERVER) {
|
|
416
394
|
return
|