@nxtedition/deepstream.io-client-js 28.1.9 → 28.1.10

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": "28.1.9",
3
+ "version": "28.1.10",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "type": "module",
@@ -16,13 +16,15 @@ const PIPE = rxjs.pipe(
16
16
  return JSON.stringify(value)
17
17
  } catch (err) {
18
18
  const bigIntPaths = /BigInt/.test(err.message) ? findBigIntPaths(value) : undefined
19
- throw Object.assign(new Error(`invalid value: ${value}`), { cause: err, data: { bigIntPaths }})
19
+ throw Object.assign(new Error(`invalid value: ${value}`), {
20
+ cause: err,
21
+ data: { bigIntPaths },
22
+ })
20
23
  }
21
24
  } else {
22
25
  throw new Error(`invalid value: ${value}`)
23
26
  }
24
27
  }),
25
- rxjs.takeWhile((data) => data != null),
26
28
  rxjs.distinctUntilChanged(),
27
29
  )
28
30
 
@@ -76,11 +78,12 @@ export default class Listener {
76
78
  if (value$) {
77
79
  const subscription = value$.pipe(PIPE).subscribe({
78
80
  next: (data) => {
79
- const version = `INF-${h64ToString(data)}`
80
- this._connection.sendMsg(this._topic, C.ACTIONS.UPDATE, [name, version, data])
81
- },
82
- complete: () => {
83
- this._connection.sendMsg(this._topic, C.ACTIONS.LISTEN_REJECT, [this._pattern, name])
81
+ if (data == null) {
82
+ const version = `INF-${h64ToString(data)}`
83
+ this._connection.sendMsg(this._topic, C.ACTIONS.UPDATE, [name, version, data])
84
+ } else {
85
+ this._connection.sendMsg(this._topic, C.ACTIONS.LISTEN_REJECT, [this._pattern, name])
86
+ }
84
87
  },
85
88
  error: (err) => {
86
89
  this._error(name, err)