@wandelbots/nova-js 3.9.0-pr.280.fed6955 → 3.9.0

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.
@@ -1,8 +1,6 @@
1
1
  const require_LoginWithAuth0 = require("./LoginWithAuth0-oZFpwe7m.cjs");
2
2
  let axios = require("axios");
3
3
  axios = require_LoginWithAuth0.__toESM(axios, 1);
4
- let url_join = require("url-join");
5
- url_join = require_LoginWithAuth0.__toESM(url_join, 1);
6
4
  let mobx = require("mobx");
7
5
  let three = require("three");
8
6
  three = require_LoginWithAuth0.__toESM(three, 1);
@@ -1882,7 +1880,7 @@ var NovaClient = class {
1882
1880
  if (this.config.instanceUrl === "https://mock.example.com") this.mock = new MockNovaInstance();
1883
1881
  this.instanceUrl = require_LoginWithAuth0.parseNovaInstanceUrl(this.config.instanceUrl);
1884
1882
  const axiosInstance = axios.default.create({
1885
- baseURL: (0, url_join.default)(this.config.instanceUrl, "/api/v1"),
1883
+ baseURL: new URL("/api/v1", this.config.instanceUrl).href,
1886
1884
  headers: typeof window !== "undefined" && window.location.origin.includes("localhost") ? {} : { "X-Wandelbots-Client": "Wandelbots-Nova-JS-SDK" }
1887
1885
  });
1888
1886
  axiosInstance.interceptors.request.use(async (request) => {
@@ -1912,7 +1910,7 @@ var NovaClient = class {
1912
1910
  });
1913
1911
  this.api = new NovaCellAPIClient(cellId, {
1914
1912
  ...config,
1915
- basePath: (0, url_join.default)(this.instanceUrl.href, "/api/v1"),
1913
+ basePath: new URL("/api/v1", this.instanceUrl).href,
1916
1914
  isJsonMime: (mime) => {
1917
1915
  return mime === "application/json";
1918
1916
  },
@@ -1942,7 +1940,7 @@ var NovaClient = class {
1942
1940
  }
1943
1941
  }
1944
1942
  makeWebsocketURL(path) {
1945
- const url = new URL((0, url_join.default)(this.instanceUrl.href, `/api/v1/cells/${this.config.cellId}`, path));
1943
+ const url = new URL(new URL(`/api/v1/cells/${this.config.cellId}/${path.replace(/^\/+/, "")}`, this.instanceUrl).href);
1946
1944
  url.protocol = url.protocol.replace("http", "ws");
1947
1945
  url.protocol = url.protocol.replace("https", "wss");
1948
1946
  if (this.accessToken) url.searchParams.append("token", this.accessToken);
@@ -2040,4 +2038,4 @@ Object.defineProperty(exports, "poseToWandelscriptString", {
2040
2038
  }
2041
2039
  });
2042
2040
 
2043
- //# sourceMappingURL=wandelscriptUtils-wnSvJKp0.cjs.map
2041
+ //# sourceMappingURL=wandelscriptUtils-P0WYSZww.cjs.map