jsgar 3.8.3 → 3.8.8

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 +14 -1
  2. package/package.json +1 -1
package/dist/gar.umd.js CHANGED
@@ -903,6 +903,7 @@
903
903
  * @param {number} [snapshotSizeLimit=0] - Limit snapshot size
904
904
  * @param {number} [nagleInterval=0] - Nagle interval in milliseconds
905
905
  * @param {number} [limit=0] - Limits records in initial snapshot (0 = all)
906
+ * @param {string|Array<string>|null} [referencingClassList=null] - Referencing class name(s); if provided, include referencing keys and records per proto.gar subscribe.referencing_class_list
906
907
  */
907
908
  subscribe(
908
909
  name,
@@ -924,7 +925,8 @@
924
925
  subscriptionSet = null,
925
926
  snapshotSizeLimit = 0,
926
927
  nagleInterval = 0,
927
- limit = 0
928
+ limit = 0,
929
+ referencingClassList = null
928
930
  ) {
929
931
  // Validate mutually exclusive parameters
930
932
  if (keyName && (keyFilter || excludeKeyFilter)) {
@@ -948,6 +950,14 @@
948
950
  classList = className;
949
951
  }
950
952
 
953
+ // Normalize referencingClassList to an array
954
+ let referencingClasses = null;
955
+ if (typeof referencingClassList === 'string') {
956
+ referencingClasses = referencingClassList.split(/\s+/).filter(Boolean);
957
+ } else if (Array.isArray(referencingClassList)) {
958
+ referencingClasses = referencingClassList;
959
+ }
960
+
951
961
  let singleClass = Array.isArray(classList) && classList.length === 1 ? classList[0] : null;
952
962
 
953
963
  // Convert keyName to array
@@ -1014,6 +1024,9 @@
1014
1024
  if (classList) {
1015
1025
  valueDict.class_list = classList;
1016
1026
  }
1027
+ if (referencingClasses && referencingClasses.length > 0) {
1028
+ valueDict.referencing_class_list = referencingClasses;
1029
+ }
1017
1030
  if (keyFilter) {
1018
1031
  valueDict.key_filter = keyFilter;
1019
1032
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsgar",
3
- "version": "3.8.3",
3
+ "version": "3.8.8",
4
4
  "description": "A Javascript client for the GAR protocol",
5
5
  "type": "module",
6
6
  "main": "dist/gar.umd.js",