jsgar 3.1.4 → 3.3.0

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.
Files changed (2) hide show
  1. package/dist/gar.umd.js +13 -6
  2. package/package.json +1 -1
package/dist/gar.umd.js CHANGED
@@ -50,7 +50,7 @@
50
50
  this.user = user;
51
51
  this.working_namespace = working_namespace;
52
52
  this.heartbeatTimeoutInterval = heartbeatTimeoutInterval;
53
- this.version = 650706;
53
+ this.version = 650707;
54
54
 
55
55
  if (typeof window !== 'undefined' && window.location) {
56
56
  this.application = window.location.href;
@@ -318,13 +318,13 @@
318
318
 
319
319
  /**
320
320
  * Register handler for KeyIntroduction message.
321
- * @param {Function} handler - Callback with (keyId, name, class_list)
321
+ * @param {Function} handler - Callback with (keyId, name, class_list, deleted_class)
322
322
  * @param subscriptionGroup - The subscription group for callback (default 0)
323
323
  */
324
324
  registerKeyIntroductionHandler(handler, subscriptionGroup = 0) {
325
325
  this.registerHandler('KeyIntroduction', (msg) => {
326
326
  const value = msg.value;
327
- handler(value.key_id, value.name, value.class_list || null);
327
+ handler(value.key_id, value.name, value.class_list || null, value.deleted_class || null);
328
328
  }, subscriptionGroup);
329
329
  }
330
330
 
@@ -419,8 +419,8 @@
419
419
  this.registerLogoffHandler(() => this.log('INFO', 'Logoff received'));
420
420
  this.registerTopicIntroductionHandler((topicId, name) =>
421
421
  this.log('DEBUG', `New server topic: ${name} (Server ID: ${topicId})`));
422
- this.registerKeyIntroductionHandler((keyId, name, classList) =>
423
- this.log('DEBUG', `New server key: ${name} : ${keyId} (Classes: ${JSON.stringify(classList)})`));
422
+ this.registerKeyIntroductionHandler((keyId, name, classList, deletedClass) =>
423
+ this.log('DEBUG', `Key: ${name} : ${keyId} (Classes: ${JSON.stringify(classList)}/-${deletedClass})`));
424
424
  this.registerDeleteKeyHandler((keyId) =>
425
425
  this.log('DEBUG', `Delete key: ${this.serverKeyIdToName.get(keyId) || 'unknown'} (Server ID: ${keyId})`));
426
426
  this.registerSubscriptionStatusHandler(this._defaultSubscriptionStatusHandler.bind(this));
@@ -655,7 +655,8 @@
655
655
  value: {
656
656
  key_id: keyId,
657
657
  name: keyName,
658
- ...(keyClasses ? { class_list: keyClasses } : {})
658
+ ...(keyClasses ? { class_list: keyClasses } : {}),
659
+ deleted_class: null
659
660
  }
660
661
  };
661
662
  keyHandler(keyIntroMsg);
@@ -734,6 +735,7 @@
734
735
  * @param {string|null} [maxHistory] - Maximum history to include
735
736
  * @param {boolean} [includeReferencedKeys=false] - Add keys from key references in matched records
736
737
  * @param {boolean} [includeReferencingKeys=false] - Add keys that have one or more records referencing any matched keys
738
+ * @param {boolean} [includeDerived=false] - Include derived topics
737
739
  * @param {boolean} [trimDefaultValues=false] - Trim records containing default values from the snapshot
738
740
  * @param {string|null} [workingNamespace] - Namespace for matching relative paths
739
741
  * @param {string|null} [restrictNamespace=false] - Restricts topics and keys to children of restrict_namespace. Defaults to the working namespace. Use "::" for root / no restriction.
@@ -757,6 +759,7 @@
757
759
  maxHistory = null,
758
760
  includeReferencedKeys = false,
759
761
  includeReferencingKeys = false,
762
+ includeDerived = false,
760
763
  trimDefaultValues = false,
761
764
  workingNamespace = null,
762
765
  restrictNamespace = null,
@@ -840,6 +843,9 @@
840
843
  if (includeReferencingKeys) {
841
844
  valueDict.include_referencing_keys = includeReferencingKeys;
842
845
  }
846
+ if (includeDerived) {
847
+ valueDict.include_derived = includeDerived;
848
+ }
843
849
  if (restrictNamespace) {
844
850
  valueDict.restrict_namespace = restrictNamespace;
845
851
  }
@@ -918,6 +924,7 @@
918
924
  false,
919
925
  false,
920
926
  false,
927
+ false,
921
928
  null,
922
929
  null,
923
930
  null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsgar",
3
- "version": "3.1.4",
3
+ "version": "3.3.0",
4
4
  "description": "A Javascript client for the GAR protocol",
5
5
  "type": "module",
6
6
  "main": "dist/gar.umd.js",