@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.
Files changed (62) hide show
  1. package/README.md +3 -19
  2. package/dist/LoginWithAuth0.d.ts.map +1 -1
  3. package/dist/chunk-B2C22PTK.js +53 -0
  4. package/dist/chunk-B2C22PTK.js.map +1 -0
  5. package/dist/{chunk-DOFCSS2H.js → chunk-I3PUV6ZD.js} +2 -2
  6. package/dist/chunk-I3PUV6ZD.js.map +1 -0
  7. package/dist/index.cjs +3 -99
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.js +4 -30
  10. package/dist/index.js.map +1 -1
  11. package/dist/lib/AutoReconnectingWebsocket.d.ts +2 -2
  12. package/dist/lib/AutoReconnectingWebsocket.d.ts.map +1 -1
  13. package/dist/lib/availableStorage.d.ts +1 -1
  14. package/dist/lib/availableStorage.d.ts.map +1 -1
  15. package/dist/lib/converters.d.ts.map +1 -1
  16. package/dist/lib/errorHandling.d.ts.map +1 -1
  17. package/dist/lib/v1/ConnectedMotionGroup.d.ts.map +1 -1
  18. package/dist/lib/v1/JoggerConnection.d.ts.map +1 -1
  19. package/dist/lib/v1/MotionStreamConnection.d.ts +1 -0
  20. package/dist/lib/v1/MotionStreamConnection.d.ts.map +1 -1
  21. package/dist/lib/v1/NovaCellAPIClient.d.ts +2 -0
  22. package/dist/lib/v1/NovaCellAPIClient.d.ts.map +1 -1
  23. package/dist/lib/v1/NovaClient.d.ts.map +1 -1
  24. package/dist/lib/v1/ProgramStateConnection.d.ts +6 -2
  25. package/dist/lib/v1/ProgramStateConnection.d.ts.map +1 -1
  26. package/dist/lib/v1/index.cjs +19 -1036
  27. package/dist/lib/v1/index.cjs.map +1 -1
  28. package/dist/lib/v1/index.js +20 -16
  29. package/dist/lib/v1/index.js.map +1 -1
  30. package/dist/lib/v1/motionStateUpdate.d.ts.map +1 -1
  31. package/dist/lib/v2/NovaCellAPIClient.d.ts +2 -0
  32. package/dist/lib/v2/NovaCellAPIClient.d.ts.map +1 -1
  33. package/dist/lib/v2/NovaClient.d.ts +1 -0
  34. package/dist/lib/v2/NovaClient.d.ts.map +1 -1
  35. package/dist/lib/v2/index.cjs +5 -15
  36. package/dist/lib/v2/index.cjs.map +1 -1
  37. package/dist/lib/v2/index.js +5 -15
  38. package/dist/lib/v2/index.js.map +1 -1
  39. package/dist/lib/v2/mock/MockNovaInstance.d.ts.map +1 -1
  40. package/package.json +11 -8
  41. package/src/LoginWithAuth0.ts +5 -0
  42. package/src/lib/AutoReconnectingWebsocket.ts +2 -2
  43. package/src/lib/availableStorage.ts +1 -1
  44. package/src/lib/converters.ts +1 -0
  45. package/src/lib/errorHandling.ts +2 -3
  46. package/src/lib/v1/ConnectedMotionGroup.ts +2 -0
  47. package/src/lib/v1/JoggerConnection.ts +8 -5
  48. package/src/lib/v1/MotionStreamConnection.ts +2 -1
  49. package/src/lib/v1/NovaCellAPIClient.ts +2 -0
  50. package/src/lib/v1/NovaClient.ts +3 -1
  51. package/src/lib/v1/ProgramStateConnection.ts +9 -6
  52. package/src/lib/v1/mock/MockNovaInstance.ts +5 -5
  53. package/src/lib/v1/motionStateUpdate.ts +1 -0
  54. package/src/lib/v2/NovaCellAPIClient.ts +2 -0
  55. package/src/lib/v2/NovaClient.ts +2 -1
  56. package/src/lib/v2/mock/MockNovaInstance.ts +3 -7
  57. package/dist/chunk-4FP7NTKS.js +0 -1080
  58. package/dist/chunk-4FP7NTKS.js.map +0 -1
  59. package/dist/chunk-DOFCSS2H.js.map +0 -1
  60. package/dist/lib/v2/vectorUtils.d.ts +0 -7
  61. package/dist/lib/v2/vectorUtils.d.ts.map +0 -1
  62. 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: -0.7071067811865475,
799
+ y: -Math.SQRT1_2,
800
800
  z: 0,
801
- w: 0.7071067811865476,
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: -0.7071067811865475,
843
+ x: -Math.SQRT1_2,
844
844
  y: 0,
845
845
  z: 0,
846
- w: 0.7071067811865476,
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 = "/cells" + config.url?.split("/cells")[1]?.split("?")[0]
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
  ) {
@@ -1,3 +1,5 @@
1
+ /** biome-ignore-all lint/suspicious/noExplicitAny: legacy code */
2
+ /** biome-ignore-all lint/style/noNonNullAssertion: legacy code */
1
3
  import type { Configuration as BaseConfiguration } from "@wandelbots/nova-api/v2"
2
4
  import {
3
5
  ApplicationApi,
@@ -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 + ":" + config.password)}`
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 = "/cells" + config.url?.split("/cells")[1]?.split("?")[0]
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 || "")