jsgar 1.2.1 → 1.2.3
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/dist/gar.umd.js +8 -7
- package/package.json +1 -1
package/dist/gar.umd.js
CHANGED
|
@@ -373,17 +373,17 @@
|
|
|
373
373
|
this.registerHeartbeatHandler((u_milliseconds) => this.log('DEBUG', `Heartbeat received ${u_milliseconds}}`));
|
|
374
374
|
this.registerLogoffHandler(() => this.log('INFO', 'Logoff received'));
|
|
375
375
|
this.registerTopicIntroductionHandler((topicId, name) =>
|
|
376
|
-
this.log('
|
|
376
|
+
this.log('DEBUG', `New server topic: ${name} (Server ID: ${topicId})`));
|
|
377
377
|
this.registerKeyIntroductionHandler((keyId, name, _class) =>
|
|
378
|
-
this.log('
|
|
378
|
+
this.log('DEBUG', `New server key: ${name} (Server ID: ${keyId})`));
|
|
379
379
|
this.registerDeleteKeyHandler((keyId) =>
|
|
380
|
-
this.log('
|
|
380
|
+
this.log('DEBUG', `Delete key: ${this.serverKeyMap.get(keyId) || 'unknown'} (Server ID: ${keyId})`));
|
|
381
381
|
this.registerSubscriptionStatusHandler((name, status) =>
|
|
382
382
|
this.log('INFO', `Subscription ${name} status: ${status}`));
|
|
383
383
|
this.registerDeleteRecordHandler((keyId, topicId) =>
|
|
384
|
-
this.log('
|
|
384
|
+
this.log('DEBUG', `Delete record: ${this.serverKeyMap.get(keyId) || 'unknown'} - ${this.serverTopicMap.get(topicId) || 'unknown'}`));
|
|
385
385
|
this.registerRecordUpdateHandler((keyId, topicId, value) =>
|
|
386
|
-
this.log('
|
|
386
|
+
this.log('DEBUG', `Record update: ${this.serverKeyMap.get(keyId) || 'unknown'} - ${this.serverTopicMap.get(topicId) || 'unknown'} = ${JSON.stringify(value)}`));
|
|
387
387
|
this.registerShutdownHandler(() => this.log('INFO', 'Shutdown received'));
|
|
388
388
|
}
|
|
389
389
|
|
|
@@ -689,9 +689,10 @@
|
|
|
689
689
|
* @param {string} keyName - Key name
|
|
690
690
|
* @param {string} topicName - Topic name
|
|
691
691
|
* @param {any} value - JSON-serializable value
|
|
692
|
+
* @param class_name - Class name for key (optional)
|
|
692
693
|
*/
|
|
693
|
-
publishRecord(keyName, topicName, value) {
|
|
694
|
-
const keyId = this.getAndPossiblyIntroduceKeyId(keyName);
|
|
694
|
+
publishRecord(keyName, topicName, value, class_name = null) {
|
|
695
|
+
const keyId = this.getAndPossiblyIntroduceKeyId(keyName, class_name);
|
|
695
696
|
const topicId = this.getAndPossiblyIntroduceTopicId(topicName);
|
|
696
697
|
this.publishRecordWithIds(keyId, topicId, value);
|
|
697
698
|
}
|