@loaders.gl/3d-tiles 4.3.1 → 4.4.0-alpha.1

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.
package/dist/index.cjs CHANGED
@@ -48,7 +48,7 @@ var import_loader_utils8 = require("@loaders.gl/loader-utils");
48
48
  var import_tiles2 = require("@loaders.gl/tiles");
49
49
 
50
50
  // dist/lib/utils/version.js
51
- var VERSION = true ? "4.3.0" : "latest";
51
+ var VERSION = true ? "4.4.0-alpha.0" : "latest";
52
52
 
53
53
  // dist/lib/constants.js
54
54
  var TILE3D_TYPE = {
@@ -2217,6 +2217,7 @@ var import_core9 = require("@loaders.gl/core");
2217
2217
  var import_loader_utils9 = require("@loaders.gl/loader-utils");
2218
2218
  var CESIUM_ION_URL = "https://api.cesium.com/v1/assets";
2219
2219
  async function getIonTilesetMetadata(accessToken, assetId) {
2220
+ var _a;
2220
2221
  if (!assetId) {
2221
2222
  const assets = await getIonAssets(accessToken);
2222
2223
  for (const item of assets.items) {
@@ -2226,10 +2227,12 @@ async function getIonTilesetMetadata(accessToken, assetId) {
2226
2227
  }
2227
2228
  }
2228
2229
  const ionAssetMetadata = await getIonAssetMetadata(accessToken, assetId);
2229
- const { type, url } = ionAssetMetadata;
2230
+ const type = ionAssetMetadata.type;
2231
+ const url = ((_a = ionAssetMetadata.options) == null ? void 0 : _a.url) || ionAssetMetadata.url;
2230
2232
  (0, import_loader_utils9.assert)(type === "3DTILES" && url);
2231
2233
  ionAssetMetadata.headers = {
2232
- Authorization: `Bearer ${ionAssetMetadata.accessToken}`
2234
+ // Use provided accessToken if a new token is not provided in the ion response
2235
+ Authorization: `Bearer ${ionAssetMetadata.accessToken || accessToken}`
2233
2236
  };
2234
2237
  return ionAssetMetadata;
2235
2238
  }
@@ -2390,7 +2393,7 @@ var parse3DTilesArchive = async (fileProvider, cb) => {
2390
2393
  };
2391
2394
 
2392
2395
  // dist/3d-tiles-archive-loader.js
2393
- var VERSION2 = true ? "4.3.0" : "latest";
2396
+ var VERSION2 = true ? "4.4.0-alpha.0" : "latest";
2394
2397
  var Tiles3DArchiveFileLoader = {
2395
2398
  dataType: null,
2396
2399
  batchType: null,