@nxtedition/deepstream.io-client-js 31.0.17 → 31.0.20
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/client.d.ts +1 -1
- package/src/record/record.js +12 -1
- package/.claude/settings.local.json +0 -9
package/package.json
CHANGED
package/src/client.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ type EventKey = keyof EventConstants
|
|
|
79
79
|
type EventName = EventConstants[EventKey]
|
|
80
80
|
|
|
81
81
|
export interface DeepstreamClient<
|
|
82
|
-
Records
|
|
82
|
+
Records,
|
|
83
83
|
Methods extends Record<string, RpcMethodDef> = Record<string, RpcMethodDef>,
|
|
84
84
|
> {
|
|
85
85
|
nuid: () => string
|
package/src/record/record.js
CHANGED
|
@@ -407,7 +407,18 @@ class Record {
|
|
|
407
407
|
? this._version !== version
|
|
408
408
|
: utils.compareRev(version, this._version) > 0
|
|
409
409
|
) {
|
|
410
|
-
|
|
410
|
+
let parsedData
|
|
411
|
+
try {
|
|
412
|
+
parsedData = jsonPath.parse(data)
|
|
413
|
+
} catch (err) {
|
|
414
|
+
throw Object.assign(new Error('invalid data'), {
|
|
415
|
+
name: this.name,
|
|
416
|
+
version,
|
|
417
|
+
data,
|
|
418
|
+
cause: err
|
|
419
|
+
})
|
|
420
|
+
}
|
|
421
|
+
this._data = jsonPath.set(this._data, null, parsedData, true)
|
|
411
422
|
this._version = version
|
|
412
423
|
}
|
|
413
424
|
|