bruce-models 6.8.6 → 6.8.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.
@@ -16536,10 +16536,8 @@ class NavigatorChatClient {
16536
16536
  if (path.startsWith("http://") || path.startsWith("https://")) {
16537
16537
  return path;
16538
16538
  }
16539
- if (!path.startsWith("/")) {
16540
- path = `/${path}`;
16541
- }
16542
- return `${this.baseUrl}${path}`;
16539
+ // Use URL constructor to properly handle path joining and avoid double slashes
16540
+ return new URL(path, this.baseUrl).toString();
16543
16541
  }
16544
16542
  fetchFromEndpoint(path, init, auth) {
16545
16543
  var _a;
@@ -16614,7 +16612,7 @@ class NavigatorMcpWebSocketClient {
16614
16612
  }
16615
16613
  }
16616
16614
  connect(auth) {
16617
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
16615
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16618
16616
  if (auth) {
16619
16617
  this.currentAuth = auth;
16620
16618
  }
@@ -16622,14 +16620,14 @@ class NavigatorMcpWebSocketClient {
16622
16620
  (_c = (_b = this.logger()).debug) === null || _c === void 0 ? void 0 : _c.call(_b, "[NavigatorMcpWS] Connection already active or in-flight; skipping connect.");
16623
16621
  return;
16624
16622
  }
16625
- if (!((_d = this.currentAuth) === null || _d === void 0 ? void 0 : _d.accountId) || !((_e = this.currentAuth) === null || _e === void 0 ? void 0 : _e.sessionId)) {
16626
- (_g = (_f = this.logger()).debug) === null || _g === void 0 ? void 0 : _g.call(_f, "[NavigatorMcpWS] Missing auth parameters; connection not started.");
16623
+ if (!((_d = this.currentAuth) === null || _d === void 0 ? void 0 : _d.accountId)) {
16624
+ (_f = (_e = this.logger()).debug) === null || _f === void 0 ? void 0 : _f.call(_e, "[NavigatorMcpWS] Missing accountId; connection not started.");
16627
16625
  return;
16628
16626
  }
16629
16627
  try {
16630
16628
  this.isConnecting = true;
16631
16629
  const url = this.buildUrl();
16632
- (_j = (_h = this.logger()).log) === null || _j === void 0 ? void 0 : _j.call(_h, "[NavigatorMcpWS] Connecting to", url);
16630
+ (_h = (_g = this.logger()).log) === null || _h === void 0 ? void 0 : _h.call(_g, "[NavigatorMcpWS] Connecting to", url);
16633
16631
  this.ws = new WebSocket(url);
16634
16632
  this.ws.onopen = (event) => {
16635
16633
  var _a, _b, _c, _d;
@@ -16656,7 +16654,7 @@ class NavigatorMcpWebSocketClient {
16656
16654
  };
16657
16655
  }
16658
16656
  catch (error) {
16659
- (_l = (_k = this.logger()).error) === null || _l === void 0 ? void 0 : _l.call(_k, "[NavigatorMcpWS] Failed to establish connection", error);
16657
+ (_k = (_j = this.logger()).error) === null || _k === void 0 ? void 0 : _k.call(_j, "[NavigatorMcpWS] Failed to establish connection", error);
16660
16658
  this.isConnecting = false;
16661
16659
  }
16662
16660
  }
@@ -16690,13 +16688,16 @@ class NavigatorMcpWebSocketClient {
16690
16688
  return this.appendAuthParams(url);
16691
16689
  }
16692
16690
  appendAuthParams(url) {
16693
- var _a, _b;
16694
- if (!((_a = this.currentAuth) === null || _a === void 0 ? void 0 : _a.accountId) || !((_b = this.currentAuth) === null || _b === void 0 ? void 0 : _b.sessionId)) {
16691
+ var _a;
16692
+ if (!((_a = this.currentAuth) === null || _a === void 0 ? void 0 : _a.accountId)) {
16695
16693
  return url;
16696
16694
  }
16697
16695
  const urlInstance = new URL(url);
16698
16696
  urlInstance.searchParams.set("accountId", this.currentAuth.accountId);
16699
- urlInstance.searchParams.set("sessionId", this.currentAuth.sessionId);
16697
+ // Only add sessionId if it's provided (support anonymous access)
16698
+ if (this.currentAuth.sessionId) {
16699
+ urlInstance.searchParams.set("sessionId", this.currentAuth.sessionId);
16700
+ }
16700
16701
  // Preserve the hash (unlikely to be used, but consistent with URL semantics)
16701
16702
  return urlInstance.toString();
16702
16703
  }
@@ -16753,7 +16754,7 @@ class NavigatorMcpWebSocketClient {
16753
16754
  }
16754
16755
 
16755
16756
  // This is updated with the package.json version on build.
16756
- const VERSION = "6.8.6";
16757
+ const VERSION = "6.8.8";
16757
16758
 
16758
16759
  export { VERSION, Assembly, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, GeoJson, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewBookmarkGroup, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, UserMfaMethod, Account, AccountInvite, AccountFeatures, AccountLimits, AccountTemplate, AccountType, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataLabGroup, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking, NavigatorChatClient, NavigatorMcpWebSocketClient };
16759
16760
  //# sourceMappingURL=bruce-models.es5.js.map