@wandelbots/nova-js 3.9.0-pr.280.641b7e2 → 3.9.0-pr.280.74e07a8

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.
Files changed (29) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.d.cts +1 -1
  3. package/dist/index.d.mts +1 -1
  4. package/dist/index.mjs +1 -1
  5. package/dist/lib/deprecated/v1/index.cjs +1 -1
  6. package/dist/lib/deprecated/v1/index.d.cts +1 -1
  7. package/dist/lib/deprecated/v1/index.d.mts +1 -1
  8. package/dist/lib/deprecated/v1/index.mjs +1 -1
  9. package/dist/lib/v2/index.cjs +24 -34
  10. package/dist/lib/v2/index.cjs.map +1 -1
  11. package/dist/lib/v2/index.d.cts +26 -30
  12. package/dist/lib/v2/index.d.cts.map +1 -1
  13. package/dist/lib/v2/index.d.mts +26 -30
  14. package/dist/lib/v2/index.d.mts.map +1 -1
  15. package/dist/lib/v2/index.mjs +23 -34
  16. package/dist/lib/v2/index.mjs.map +1 -1
  17. package/dist/{wandelscriptUtils-pySXnBlX.d.mts → wandelscriptUtils-CPA7fIA5.d.mts} +2 -1
  18. package/dist/{wandelscriptUtils-pySXnBlX.d.mts.map → wandelscriptUtils-CPA7fIA5.d.mts.map} +1 -1
  19. package/dist/{wandelscriptUtils-1A9uFPV_.d.cts → wandelscriptUtils-DxH6xiW6.d.cts} +2 -1
  20. package/dist/{wandelscriptUtils-1A9uFPV_.d.cts.map → wandelscriptUtils-DxH6xiW6.d.cts.map} +1 -1
  21. package/dist/{wandelscriptUtils-C7hQePlo.mjs → wandelscriptUtils-W_rEVq6i.mjs} +5 -4
  22. package/dist/{wandelscriptUtils-C7hQePlo.mjs.map → wandelscriptUtils-W_rEVq6i.mjs.map} +1 -1
  23. package/dist/{wandelscriptUtils-P0WYSZww.cjs → wandelscriptUtils-wnSvJKp0.cjs} +6 -4
  24. package/dist/{wandelscriptUtils-P0WYSZww.cjs.map → wandelscriptUtils-wnSvJKp0.cjs.map} +1 -1
  25. package/package.json +3 -2
  26. package/src/lib/deprecated/v1/NovaClient.ts +9 -7
  27. package/src/lib/deprecated/v2/NovaClient.ts +8 -7
  28. package/src/lib/v2/Nova.ts +4 -3
  29. package/src/lib/v2/NovaAPIClient.ts +93 -81
@@ -1,5 +1,6 @@
1
1
  import { a as isSameCoordinateSystem, m as AutoReconnectingWebsocket, n as loginWithAuth0, p as availableStorage, s as parseNovaInstanceUrl, u as tryParseJson } from "./LoginWithAuth0-DeirP_w9.mjs";
2
2
  import axios, { AxiosError, isAxiosError } from "axios";
3
+ import urlJoin from "url-join";
3
4
  import { makeAutoObservable, runInAction } from "mobx";
4
5
  import * as THREE from "three";
5
6
  import { Vector3 } from "three";
@@ -1878,7 +1879,7 @@ var NovaClient = class {
1878
1879
  if (this.config.instanceUrl === "https://mock.example.com") this.mock = new MockNovaInstance();
1879
1880
  this.instanceUrl = parseNovaInstanceUrl(this.config.instanceUrl);
1880
1881
  const axiosInstance = axios.create({
1881
- baseURL: new URL("/api/v1", this.config.instanceUrl).href,
1882
+ baseURL: urlJoin(this.config.instanceUrl, "/api/v1"),
1882
1883
  headers: typeof window !== "undefined" && window.location.origin.includes("localhost") ? {} : { "X-Wandelbots-Client": "Wandelbots-Nova-JS-SDK" }
1883
1884
  });
1884
1885
  axiosInstance.interceptors.request.use(async (request) => {
@@ -1908,7 +1909,7 @@ var NovaClient = class {
1908
1909
  });
1909
1910
  this.api = new NovaCellAPIClient(cellId, {
1910
1911
  ...config,
1911
- basePath: new URL("/api/v1", this.instanceUrl).href,
1912
+ basePath: urlJoin(this.instanceUrl.href, "/api/v1"),
1912
1913
  isJsonMime: (mime) => {
1913
1914
  return mime === "application/json";
1914
1915
  },
@@ -1938,7 +1939,7 @@ var NovaClient = class {
1938
1939
  }
1939
1940
  }
1940
1941
  makeWebsocketURL(path) {
1941
- const url = new URL(new URL(`/api/v1/cells/${this.config.cellId}/${path.replace(/^\/+/, "")}`, this.instanceUrl).href);
1942
+ const url = new URL(urlJoin(this.instanceUrl.href, `/api/v1/cells/${this.config.cellId}`, path));
1942
1943
  url.protocol = url.protocol.replace("http", "ws");
1943
1944
  url.protocol = url.protocol.replace("https", "wss");
1944
1945
  if (this.accessToken) url.searchParams.append("token", this.accessToken);
@@ -2001,4 +2002,4 @@ function poseToWandelscriptString(pose) {
2001
2002
  //#endregion
2002
2003
  export { JoggerConnection as a, MotionStreamConnection as i, NovaClient as n, ConnectedMotionGroup as o, NovaCellAPIClient as r, poseToWandelscriptString as t };
2003
2004
 
2004
- //# sourceMappingURL=wandelscriptUtils-C7hQePlo.mjs.map
2005
+ //# sourceMappingURL=wandelscriptUtils-W_rEVq6i.mjs.map