bruce-models 6.9.7 → 6.9.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.
@@ -15731,7 +15731,7 @@
15731
15731
  * @returns
15732
15732
  */
15733
15733
  function GetLoadUrl(params) {
15734
- let { api, pluginId, cacheKey } = params;
15734
+ let { api, pluginId, cacheKey, viaCdn } = params;
15735
15735
  if (!api) {
15736
15736
  api = exports.ENVIRONMENT.Api().GetBruceApi();
15737
15737
  }
@@ -15744,7 +15744,7 @@
15744
15744
  urlParams: {
15745
15745
  "version": String(cacheKey)
15746
15746
  },
15747
- cdn: true
15747
+ cdn: viaCdn
15748
15748
  })
15749
15749
  };
15750
15750
  }
@@ -15855,7 +15855,8 @@
15855
15855
  const { indexFileUrl } = GetLoadUrl({
15856
15856
  api,
15857
15857
  pluginId,
15858
- cacheKey: plugin.Version
15858
+ cacheKey: plugin.Version,
15859
+ viaCdn: !plugin.IsLoginRequired
15859
15860
  });
15860
15861
  req = exports.Api.PrepReqParams(req);
15861
15862
  const cacheData = api.GetCacheItem(GetIndexFileCacheKey(pluginId, indexFileUrl), req);
@@ -15864,7 +15865,13 @@
15864
15865
  fileContentProm = cacheData.data;
15865
15866
  }
15866
15867
  else {
15867
- fileContentProm = fetch(indexFileUrl).then((res) => res.text());
15868
+ const headers = {};
15869
+ if (plugin.IsLoginRequired) {
15870
+ headers[api.GetSessionHeader()] = api.GetSessionId();
15871
+ }
15872
+ fileContentProm = fetch(indexFileUrl, {
15873
+ headers: headers
15874
+ }).then((res) => res.text());
15868
15875
  api.SetCacheItem({
15869
15876
  key: GetIndexFileCacheKey(pluginId, indexFileUrl),
15870
15877
  value: fileContentProm,
@@ -16665,7 +16672,7 @@
16665
16672
  }
16666
16673
 
16667
16674
  // This is updated with the package.json version on build.
16668
- const VERSION = "6.9.7";
16675
+ const VERSION = "6.9.8";
16669
16676
 
16670
16677
  exports.VERSION = VERSION;
16671
16678
  exports.AbstractApi = AbstractApi;