@nxtedition/deepstream.io-client-js 24.0.14 → 24.0.16

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": "@nxtedition/deepstream.io-client-js",
3
- "version": "24.0.14",
3
+ "version": "24.0.16",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "bugs": {
@@ -226,11 +226,14 @@ class RecordHandler {
226
226
  }
227
227
  }
228
228
 
229
- async sync({ timeout, signal }) {
229
+ async sync(opts) {
230
230
  // TODO (fix): Sync pending? What about VOID state?
231
231
 
232
232
  let onAbort
233
233
 
234
+ const signal = opts?.signal
235
+ const timeout = opts?.timeout
236
+
234
237
  const signalPromise = signal
235
238
  ? new Promise((resolve, reject) => {
236
239
  onAbort = () => {
@@ -257,7 +260,7 @@ class RecordHandler {
257
260
  Object.assign(new Error('sync patching timeout'), { data: { patching, timeout } })
258
261
  )
259
262
  resolve(null)
260
- }, timeout ?? 10 * 60e3)
263
+ }, timeout ?? 2 * 60e3)
261
264
  }),
262
265
  signalPromise,
263
266
  ]).finally(() => {
@@ -280,7 +283,7 @@ class RecordHandler {
280
283
  Object.assign(new Error('sync updating timeout'), { data: { updating, timeout } })
281
284
  )
282
285
  resolve(null)
283
- }, timeout ?? 10 * 60e3)
286
+ }, timeout ?? 2 * 60e3)
284
287
  }),
285
288
  signalPromise,
286
289
  ]).finally(() => {
@@ -303,7 +306,7 @@ class RecordHandler {
303
306
  Object.assign(new Error('sync server timeout'), { data: { token, timeout } })
304
307
  )
305
308
  resolve(null)
306
- }, timeout ?? 10 * 60e3)
309
+ }, timeout ?? 2 * 60e3)
307
310
  }),
308
311
  signalPromise,
309
312
  ]).finally(() => {
@@ -352,7 +355,7 @@ class RecordHandler {
352
355
  return this._observe(
353
356
  {
354
357
  state: C.RECORD_STATE.SERVER,
355
- timeout: 10 * 60e3,
358
+ timeout: 2 * 60e3,
356
359
  dataOnly: true,
357
360
  },
358
361
  ...args
@@ -396,7 +399,7 @@ class RecordHandler {
396
399
  observe2(...args) {
397
400
  return this._observe(
398
401
  {
399
- timeout: 10 * 60e3,
402
+ timeout: 2 * 60e3,
400
403
  },
401
404
  ...args
402
405
  )