bruce-cesium 6.7.7 → 6.7.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.
@@ -13981,11 +13981,16 @@ var TilesetCadRenderManager;
13981
13981
  cacheToken: tileset.generateVersion,
13982
13982
  viaCdn: Boolean(this.item.cdnEnabled == null ? true : this.item.cdnEnabled)
13983
13983
  });
13984
- api.get(modelTreeUrl).then((blob) => {
13984
+ api.get(modelTreeUrl).then(async (result) => {
13985
13985
  if (this.disposed) {
13986
13986
  return;
13987
13987
  }
13988
- this.modelTree = blob || null;
13988
+ // S3 signed URLs may return application/octet-stream instead of application/json,
13989
+ // causing the API to return a Blob rather than a parsed object.
13990
+ if (result instanceof Blob) {
13991
+ result = JSON.parse(await result.text());
13992
+ }
13993
+ this.modelTree = result || null;
13989
13994
  this.modelTreeUpdate.Trigger(this.modelTree);
13990
13995
  }).catch((err) => {
13991
13996
  this.modelTreeError = err.message || "Unknown error";
@@ -13993,12 +13998,15 @@ var TilesetCadRenderManager;
13993
13998
  }
13994
13999
  // In v1 the model-tree is inside the tileset.json.
13995
14000
  else {
13996
- api.get(tileset.loadUrl).then((blob) => {
14001
+ api.get(tileset.loadUrl).then(async (result) => {
13997
14002
  var _a;
13998
14003
  if (this.disposed) {
13999
14004
  return;
14000
14005
  }
14001
- this.modelTree = ((_a = blob === null || blob === void 0 ? void 0 : blob.extensions) === null || _a === void 0 ? void 0 : _a.modelTree) || null;
14006
+ if (result instanceof Blob) {
14007
+ result = JSON.parse(await result.text());
14008
+ }
14009
+ this.modelTree = ((_a = result === null || result === void 0 ? void 0 : result.extensions) === null || _a === void 0 ? void 0 : _a.modelTree) || null;
14002
14010
  this.modelTreeUpdate.Trigger(this.modelTree);
14003
14011
  }).catch((err) => {
14004
14012
  this.modelTreeError = err.message || "Unknown error";
@@ -15827,10 +15835,14 @@ var EntityFilterGetter;
15827
15835
  }
15828
15836
  // API gave us a URL to use.
15829
15837
  else if (curCell.FetchURL) {
15830
- const tmpResponse = await this.api.get(curCell.FetchURL, {
15838
+ let tmpResponse = await this.api.get(curCell.FetchURL, {
15831
15839
  abortSignal: abortController.signal,
15832
15840
  noCache: true
15833
15841
  });
15842
+ // S3 signed URLs may return application/octet-stream, causing a Blob result.
15843
+ if (tmpResponse instanceof Blob) {
15844
+ tmpResponse = JSON.parse(await tmpResponse.text());
15845
+ }
15834
15846
  // Same mapping as bruce-models doing Entity.GetList.
15835
15847
  response = {
15836
15848
  entities: tmpResponse.Items ? tmpResponse.Items : [],
@@ -36504,7 +36516,7 @@ var StyleUtils;
36504
36516
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
36505
36517
  })(StyleUtils || (StyleUtils = {}));
36506
36518
 
36507
- const VERSION = "6.7.7";
36519
+ const VERSION = "6.7.8";
36508
36520
  /**
36509
36521
  * Updates the environment instance used by bruce-cesium to one specified.
36510
36522
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.