@nxtedition/deepstream.io-client-js 28.1.0 → 28.1.1
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.js +7 -7
package/package.json
CHANGED
package/src/record/record.js
CHANGED
|
@@ -183,13 +183,9 @@ class Record {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
put(
|
|
186
|
+
put(version, data) {
|
|
187
187
|
const connection = this._handler._connection
|
|
188
188
|
|
|
189
|
-
if (typeof name !== 'string') {
|
|
190
|
-
throw new Error('invalid argument: name')
|
|
191
|
-
}
|
|
192
|
-
|
|
193
189
|
if (typeof version !== 'string' || !/^\d+-.+/.test(version)) {
|
|
194
190
|
throw new Error('invalid argument: version')
|
|
195
191
|
}
|
|
@@ -198,9 +194,13 @@ class Record {
|
|
|
198
194
|
throw new Error('invalid argument: data')
|
|
199
195
|
}
|
|
200
196
|
|
|
201
|
-
connection.sendMsg(C.TOPIC.RECORD, C.ACTIONS.PUT, [
|
|
197
|
+
connection.sendMsg(C.TOPIC.RECORD, C.ACTIONS.PUT, [
|
|
198
|
+
this._name,
|
|
199
|
+
version,
|
|
200
|
+
jsonPath.stringify(data),
|
|
201
|
+
])
|
|
202
202
|
|
|
203
|
-
this._onUpdate([
|
|
203
|
+
this._onUpdate([this._name, version, jsonPath.stringify(data), 'F'])
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
when(stateOrNil, optionsOrNil) {
|