@wandelbots/nova-js 3.0.0 → 3.0.1
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/README.md +3 -19
- package/dist/LoginWithAuth0.d.ts.map +1 -1
- package/dist/chunk-B2C22PTK.js +53 -0
- package/dist/chunk-B2C22PTK.js.map +1 -0
- package/dist/{chunk-DOFCSS2H.js → chunk-I3PUV6ZD.js} +2 -2
- package/dist/chunk-I3PUV6ZD.js.map +1 -0
- package/dist/index.cjs +3 -99
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -30
- package/dist/index.js.map +1 -1
- package/dist/lib/AutoReconnectingWebsocket.d.ts +2 -2
- package/dist/lib/AutoReconnectingWebsocket.d.ts.map +1 -1
- package/dist/lib/availableStorage.d.ts +1 -1
- package/dist/lib/availableStorage.d.ts.map +1 -1
- package/dist/lib/converters.d.ts.map +1 -1
- package/dist/lib/errorHandling.d.ts.map +1 -1
- package/dist/lib/v1/ConnectedMotionGroup.d.ts.map +1 -1
- package/dist/lib/v1/JoggerConnection.d.ts.map +1 -1
- package/dist/lib/v1/MotionStreamConnection.d.ts +1 -0
- package/dist/lib/v1/MotionStreamConnection.d.ts.map +1 -1
- package/dist/lib/v1/NovaCellAPIClient.d.ts +2 -0
- package/dist/lib/v1/NovaCellAPIClient.d.ts.map +1 -1
- package/dist/lib/v1/NovaClient.d.ts.map +1 -1
- package/dist/lib/v1/ProgramStateConnection.d.ts +6 -2
- package/dist/lib/v1/ProgramStateConnection.d.ts.map +1 -1
- package/dist/lib/v1/index.cjs +19 -1036
- package/dist/lib/v1/index.cjs.map +1 -1
- package/dist/lib/v1/index.js +20 -16
- package/dist/lib/v1/index.js.map +1 -1
- package/dist/lib/v1/motionStateUpdate.d.ts.map +1 -1
- package/dist/lib/v2/NovaCellAPIClient.d.ts +2 -0
- package/dist/lib/v2/NovaCellAPIClient.d.ts.map +1 -1
- package/dist/lib/v2/NovaClient.d.ts +1 -0
- package/dist/lib/v2/NovaClient.d.ts.map +1 -1
- package/dist/lib/v2/index.cjs +5 -15
- package/dist/lib/v2/index.cjs.map +1 -1
- package/dist/lib/v2/index.js +5 -15
- package/dist/lib/v2/index.js.map +1 -1
- package/dist/lib/v2/mock/MockNovaInstance.d.ts.map +1 -1
- package/package.json +11 -8
- package/src/LoginWithAuth0.ts +5 -0
- package/src/lib/AutoReconnectingWebsocket.ts +2 -2
- package/src/lib/availableStorage.ts +1 -1
- package/src/lib/converters.ts +1 -0
- package/src/lib/errorHandling.ts +2 -3
- package/src/lib/v1/ConnectedMotionGroup.ts +2 -0
- package/src/lib/v1/JoggerConnection.ts +8 -5
- package/src/lib/v1/MotionStreamConnection.ts +2 -1
- package/src/lib/v1/NovaCellAPIClient.ts +2 -0
- package/src/lib/v1/NovaClient.ts +3 -1
- package/src/lib/v1/ProgramStateConnection.ts +9 -6
- package/src/lib/v1/mock/MockNovaInstance.ts +5 -5
- package/src/lib/v1/motionStateUpdate.ts +1 -0
- package/src/lib/v2/NovaCellAPIClient.ts +2 -0
- package/src/lib/v2/NovaClient.ts +2 -1
- package/src/lib/v2/mock/MockNovaInstance.ts +3 -7
- package/dist/chunk-4FP7NTKS.js +0 -1080
- package/dist/chunk-4FP7NTKS.js.map +0 -1
- package/dist/chunk-DOFCSS2H.js.map +0 -1
- package/dist/lib/v2/vectorUtils.d.ts +0 -7
- package/dist/lib/v2/vectorUtils.d.ts.map +0 -1
- package/src/lib/v2/vectorUtils.ts +0 -36
|
@@ -796,9 +796,9 @@ export class MockNovaInstance {
|
|
|
796
796
|
},
|
|
797
797
|
orientation: {
|
|
798
798
|
x: 0,
|
|
799
|
-
y: -
|
|
799
|
+
y: -Math.SQRT1_2,
|
|
800
800
|
z: 0,
|
|
801
|
-
w:
|
|
801
|
+
w: Math.SQRT1_2,
|
|
802
802
|
},
|
|
803
803
|
},
|
|
804
804
|
id: "link2_capsule",
|
|
@@ -840,10 +840,10 @@ export class MockNovaInstance {
|
|
|
840
840
|
z: 40,
|
|
841
841
|
},
|
|
842
842
|
orientation: {
|
|
843
|
-
x: -
|
|
843
|
+
x: -Math.SQRT1_2,
|
|
844
844
|
y: 0,
|
|
845
845
|
z: 0,
|
|
846
|
-
w:
|
|
846
|
+
w: Math.SQRT1_2,
|
|
847
847
|
},
|
|
848
848
|
},
|
|
849
849
|
id: "link4_capsule",
|
|
@@ -942,7 +942,7 @@ export class MockNovaInstance {
|
|
|
942
942
|
]
|
|
943
943
|
|
|
944
944
|
const method = config.method?.toUpperCase() || "GET"
|
|
945
|
-
const path =
|
|
945
|
+
const path = `/cells${config.url?.split("/cells")[1]?.split("?")[0]}`
|
|
946
946
|
|
|
947
947
|
for (const handler of apiHandlers) {
|
|
948
948
|
const match = pathToRegexp.match(handler.path)(path || "")
|
|
@@ -11,6 +11,7 @@ export function jointValuesEqual(
|
|
|
11
11
|
|
|
12
12
|
for (let jointIndex = 0; jointIndex < newJointValues.length; jointIndex++) {
|
|
13
13
|
if (
|
|
14
|
+
// biome-ignore lint/style/noNonNullAssertion: legacy code
|
|
14
15
|
Math.abs(newJointValues[jointIndex]! - oldJointValues[jointIndex]!) >
|
|
15
16
|
changeDeltaThreshold
|
|
16
17
|
) {
|
package/src/lib/v2/NovaClient.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** biome-ignore-all lint/style/noNonNullAssertion: legacy code */
|
|
1
2
|
import type { Configuration as BaseConfiguration } from "@wandelbots/nova-api/v2"
|
|
2
3
|
import type { AxiosRequestConfig } from "axios"
|
|
3
4
|
import axios, { isAxiosError } from "axios"
|
|
@@ -91,7 +92,7 @@ export class NovaClient {
|
|
|
91
92
|
if (this.accessToken) {
|
|
92
93
|
request.headers.Authorization = `Bearer ${this.accessToken}`
|
|
93
94
|
} else if (this.config.username && this.config.password) {
|
|
94
|
-
request.headers.Authorization = `Basic ${btoa(config.username
|
|
95
|
+
request.headers.Authorization = `Basic ${btoa(`${config.username}:${config.password}`)}`
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
return request
|
|
@@ -555,9 +555,7 @@ export class MockNovaInstance {
|
|
|
555
555
|
},
|
|
556
556
|
init_pose: {
|
|
557
557
|
position: [-450, 40, 170],
|
|
558
|
-
orientation: [
|
|
559
|
-
0, -0.7071067811865475, 0, 0.7071067811865476,
|
|
560
|
-
],
|
|
558
|
+
orientation: [0, -Math.SQRT1_2, 0, Math.SQRT1_2],
|
|
561
559
|
},
|
|
562
560
|
id: "link2_capsule",
|
|
563
561
|
},
|
|
@@ -584,9 +582,7 @@ export class MockNovaInstance {
|
|
|
584
582
|
},
|
|
585
583
|
init_pose: {
|
|
586
584
|
position: [0, 300, 40],
|
|
587
|
-
orientation: [
|
|
588
|
-
-0.7071067811865475, 0, 0, 0.7071067811865476,
|
|
589
|
-
],
|
|
585
|
+
orientation: [-Math.SQRT1_2, 0, 0, Math.SQRT1_2],
|
|
590
586
|
},
|
|
591
587
|
id: "link4_capsule",
|
|
592
588
|
},
|
|
@@ -663,7 +659,7 @@ export class MockNovaInstance {
|
|
|
663
659
|
]
|
|
664
660
|
|
|
665
661
|
const method = config.method?.toUpperCase() || "GET"
|
|
666
|
-
const path =
|
|
662
|
+
const path = `/cells${config.url?.split("/cells")[1]?.split("?")[0]}`
|
|
667
663
|
|
|
668
664
|
for (const handler of apiHandlers) {
|
|
669
665
|
const match = pathToRegexp.match(handler.path)(path || "")
|