@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.
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lib/deprecated/v1/index.cjs +1 -1
- package/dist/lib/deprecated/v1/index.d.cts +1 -1
- package/dist/lib/deprecated/v1/index.d.mts +1 -1
- package/dist/lib/deprecated/v1/index.mjs +1 -1
- package/dist/lib/v2/index.cjs +24 -34
- package/dist/lib/v2/index.cjs.map +1 -1
- package/dist/lib/v2/index.d.cts +26 -30
- package/dist/lib/v2/index.d.cts.map +1 -1
- package/dist/lib/v2/index.d.mts +26 -30
- package/dist/lib/v2/index.d.mts.map +1 -1
- package/dist/lib/v2/index.mjs +23 -34
- package/dist/lib/v2/index.mjs.map +1 -1
- package/dist/{wandelscriptUtils-pySXnBlX.d.mts → wandelscriptUtils-CPA7fIA5.d.mts} +2 -1
- package/dist/{wandelscriptUtils-pySXnBlX.d.mts.map → wandelscriptUtils-CPA7fIA5.d.mts.map} +1 -1
- package/dist/{wandelscriptUtils-1A9uFPV_.d.cts → wandelscriptUtils-DxH6xiW6.d.cts} +2 -1
- package/dist/{wandelscriptUtils-1A9uFPV_.d.cts.map → wandelscriptUtils-DxH6xiW6.d.cts.map} +1 -1
- package/dist/{wandelscriptUtils-C7hQePlo.mjs → wandelscriptUtils-W_rEVq6i.mjs} +5 -4
- package/dist/{wandelscriptUtils-C7hQePlo.mjs.map → wandelscriptUtils-W_rEVq6i.mjs.map} +1 -1
- package/dist/{wandelscriptUtils-P0WYSZww.cjs → wandelscriptUtils-wnSvJKp0.cjs} +6 -4
- package/dist/{wandelscriptUtils-P0WYSZww.cjs.map → wandelscriptUtils-wnSvJKp0.cjs.map} +1 -1
- package/package.json +3 -2
- package/src/lib/deprecated/v1/NovaClient.ts +9 -7
- package/src/lib/deprecated/v2/NovaClient.ts +8 -7
- package/src/lib/v2/Nova.ts +4 -3
- 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:
|
|
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:
|
|
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(
|
|
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-
|
|
2005
|
+
//# sourceMappingURL=wandelscriptUtils-W_rEVq6i.mjs.map
|