bruce-models 3.7.6 → 3.7.7

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.
@@ -183,7 +183,6 @@
183
183
  return null;
184
184
  }
185
185
  id = String(id);
186
- // Prioritize memory over storage because it's faster to access.
187
186
  let record = this.memory.get(id);
188
187
  if (!record) {
189
188
  return {
@@ -337,8 +336,7 @@
337
336
  this.Cache.Set({
338
337
  id: key,
339
338
  data: value,
340
- duration,
341
- persistence: "memory"
339
+ duration
342
340
  });
343
341
  }
344
342
  /**
@@ -6612,7 +6610,10 @@
6612
6610
  if (cdnUrl) {
6613
6611
  return cdnUrl;
6614
6612
  }
6615
- return `${api.GetBaseUrl()}${urlSuffix}`;
6613
+ let url = `${api.GetBaseUrl()}${urlSuffix}`;
6614
+ // Invalidating cache manually because we have a wave of invalid headers now cached across devices.
6615
+ url = exports.UrlUtils.AddQueryParam(url, "cc", "1");
6616
+ return url;
6616
6617
  }
6617
6618
  ClientFile.GetUrl = GetUrl;
6618
6619
  /**
@@ -6630,7 +6631,10 @@
6630
6631
  if (cdnUrl) {
6631
6632
  return cdnUrl;
6632
6633
  }
6633
- return `${api.GetBaseUrl()}${urlSuffix}`;
6634
+ let url = `${api.GetBaseUrl()}${urlSuffix}`;
6635
+ // Invalidating cache manually because we have a wave of invalid headers now cached across devices.
6636
+ url = exports.UrlUtils.AddQueryParam(url, "cc", "1");
6637
+ return url;
6634
6638
  }
6635
6639
  ClientFile.GetUrlWithExt = GetUrlWithExt;
6636
6640
  /**
@@ -9902,6 +9906,20 @@
9902
9906
  return str;
9903
9907
  }
9904
9908
  UrlUtils.ToHumanReadable = ToHumanReadable;
9909
+ /**
9910
+ * Adds a query parameter to a url.
9911
+ * Eg: AddQueryParam('http://example.com', 'key', 'value') => 'http://example.com?key=value'
9912
+ * @param url
9913
+ * @param key
9914
+ * @param value
9915
+ * @returns
9916
+ */
9917
+ function AddQueryParam(url, key, value) {
9918
+ const urlObj = new URL(url);
9919
+ urlObj.searchParams.append(key, value);
9920
+ return urlObj.toString();
9921
+ }
9922
+ UrlUtils.AddQueryParam = AddQueryParam;
9905
9923
  })(exports.UrlUtils || (exports.UrlUtils = {}));
9906
9924
 
9907
9925
  (function (DataLab) {
@@ -10861,7 +10879,7 @@
10861
10879
  })(exports.DataSource || (exports.DataSource = {}));
10862
10880
 
10863
10881
  // This is updated with the package.json version on build.
10864
- const VERSION = "3.7.6";
10882
+ const VERSION = "3.7.7";
10865
10883
 
10866
10884
  exports.VERSION = VERSION;
10867
10885
  exports.AbstractApi = AbstractApi;