bruce-models 4.2.0 → 4.2.2

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.
@@ -1337,6 +1337,9 @@ var BruceApi;
1337
1337
  get ConfigLoadAttempted() {
1338
1338
  return this.configLoadAttempted;
1339
1339
  }
1340
+ get Version() {
1341
+ return this.version;
1342
+ }
1340
1343
  get Loading() {
1341
1344
  return this.loadProm;
1342
1345
  }
@@ -1386,6 +1389,16 @@ var BruceApi;
1386
1389
  forceLoad: true
1387
1390
  });
1388
1391
  }
1392
+ // Get the version.
1393
+ if (this.baseUrl) {
1394
+ const data = yield this.get(this.baseUrl + "version");
1395
+ if (data === null || data === void 0 ? void 0 : data["Bruce-API"]) {
1396
+ this.version = data["Bruce-API"];
1397
+ }
1398
+ else {
1399
+ this.version = "UNKNOWN";
1400
+ }
1401
+ }
1389
1402
  // Start web socket connection.
1390
1403
  if (loadWebSocket == true) {
1391
1404
  try {
@@ -1443,21 +1456,23 @@ var BruceApi;
1443
1456
  // Precalculated URLs exist.
1444
1457
  // Soon this will be a stable requirement for any account record.
1445
1458
  if (account.URL) {
1446
- const urls = account.URL;
1447
- if (urls === null || urls === void 0 ? void 0 : urls.Base) {
1448
- this.baseUrl = urls.Base;
1449
- }
1450
- if (urls === null || urls === void 0 ? void 0 : urls.CDNEntities) {
1451
- this.EntityCdnUrl = urls.CDNEntities;
1452
- }
1453
- if (urls === null || urls === void 0 ? void 0 : urls.CDNTileset) {
1454
- this.TilesetCdnUrl = urls.CDNTileset;
1455
- }
1456
- if (urls === null || urls === void 0 ? void 0 : urls.CDNLegacyTileset) {
1457
- this.LegacyTilesetCdnUrl = urls.CDNLegacyTileset;
1458
- }
1459
- if (urls === null || urls === void 0 ? void 0 : urls.CDNBase) {
1460
- this.cdnBaseUrl = urls.CDNBase;
1459
+ if (!this.loadCancelled) {
1460
+ const urls = account.URL;
1461
+ if (urls === null || urls === void 0 ? void 0 : urls.Base) {
1462
+ this.baseUrl = urls.Base;
1463
+ }
1464
+ if (urls === null || urls === void 0 ? void 0 : urls.CDNEntities) {
1465
+ this.EntityCdnUrl = urls.CDNEntities;
1466
+ }
1467
+ if (urls === null || urls === void 0 ? void 0 : urls.CDNTileset) {
1468
+ this.TilesetCdnUrl = urls.CDNTileset;
1469
+ }
1470
+ if (urls === null || urls === void 0 ? void 0 : urls.CDNLegacyTileset) {
1471
+ this.LegacyTilesetCdnUrl = urls.CDNLegacyTileset;
1472
+ }
1473
+ if (urls === null || urls === void 0 ? void 0 : urls.CDNBase) {
1474
+ this.cdnBaseUrl = urls.CDNBase;
1475
+ }
1461
1476
  }
1462
1477
  }
1463
1478
  // Deprecated and will eventually stop working at all.
@@ -13164,7 +13179,7 @@ var DataSource;
13164
13179
  })(DataSource || (DataSource = {}));
13165
13180
 
13166
13181
  // This is updated with the package.json version on build.
13167
- const VERSION = "4.2.0";
13182
+ const VERSION = "4.2.2";
13168
13183
 
13169
13184
  export { VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityTypeVisualSettings, EntityAttribute, EntityHistoricData, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, AccountLimits, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
13170
13185
  //# sourceMappingURL=bruce-models.es5.js.map