diff --git a/web/frontend/package-lock.json b/web/frontend/package-lock.json index 071cb7b0072..6c1945e430b 100644 --- a/web/frontend/package-lock.json +++ b/web/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "@viamrobotics/remote-control", - "version": "2.23.0", + "version": "2.24.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@viamrobotics/remote-control", - "version": "2.23.0", + "version": "2.24.0", "license": "Apache-2.0", "devDependencies": { "@improbable-eng/grpc-web": "0.15.0", @@ -25,7 +25,7 @@ "@viamrobotics/prime-blocks": "^0.1.3", "@viamrobotics/prime-core": "^0.0.87", "@viamrobotics/rpc": "0.2.3", - "@viamrobotics/sdk": "0.23.1", + "@viamrobotics/sdk": "0.24.0", "@viamrobotics/three": "^0.0.3", "@viamrobotics/typescript-config": "^0.1.0", "cypress": "12.17.3", @@ -60,7 +60,7 @@ "@improbable-eng/grpc-web": ">=0.15", "@viamrobotics/prime": ">=0.5", "@viamrobotics/rpc": ">=0.2", - "@viamrobotics/sdk": "0.23.1", + "@viamrobotics/sdk": "0.24.0", "google-protobuf": ">=3", "maplibre-gl": ">=4", "tailwindcss": ">=3.3", @@ -1546,10 +1546,11 @@ } }, "node_modules/@viamrobotics/sdk": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@viamrobotics/sdk/-/sdk-0.23.1.tgz", - "integrity": "sha512-Xy+TF4chfMTq15NSvDpofQ9+WIyi6f0vhgwIlChtG7JvzenrU/BM2uBE6w76cvGXKpbZAr86r5tl0LwR5Gih1g==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@viamrobotics/sdk/-/sdk-0.24.0.tgz", + "integrity": "sha512-yrcgu2w3++KltlgwrUro6Bt+2Ywc2NEStVGB4sNsGZfno68ZhMv+1nkTsLgP1ccFUBnjXkpZJ0OLJ7cS/tSVWw==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@viamrobotics/rpc": "^0.2.6", "exponential-backoff": "^3.1.1" diff --git a/web/frontend/package.json b/web/frontend/package.json index 1c1b47ec3f3..dd2ca39b19f 100644 --- a/web/frontend/package.json +++ b/web/frontend/package.json @@ -1,6 +1,6 @@ { "name": "@viamrobotics/remote-control", - "version": "2.23.0", + "version": "2.24.0", "license": "Apache-2.0", "type": "module", "scripts": { @@ -37,7 +37,7 @@ "@improbable-eng/grpc-web": ">=0.15", "@viamrobotics/prime": ">=0.5", "@viamrobotics/rpc": ">=0.2", - "@viamrobotics/sdk": "0.23.1", + "@viamrobotics/sdk": "0.24.0", "google-protobuf": ">=3", "maplibre-gl": ">=4", "tailwindcss": ">=3.3", @@ -60,7 +60,7 @@ "@viamrobotics/prime-blocks": "^0.1.3", "@viamrobotics/prime-core": "^0.0.87", "@viamrobotics/rpc": "0.2.3", - "@viamrobotics/sdk": "0.23.1", + "@viamrobotics/sdk": "0.24.0", "@viamrobotics/three": "^0.0.3", "@viamrobotics/typescript-config": "^0.1.0", "cypress": "12.17.3", diff --git a/web/frontend/src/lib/components/robot-client.svelte b/web/frontend/src/lib/components/robot-client.svelte index 027983cbb2d..9aca6a284fc 100644 --- a/web/frontend/src/lib/components/robot-client.svelte +++ b/web/frontend/src/lib/components/robot-client.svelte @@ -9,6 +9,7 @@ import { robotApi, commonApi, type ServiceError, + type CredentialType, } from '@viamrobotics/sdk'; import { notify } from '@viamrobotics/prime'; import { StreamManager } from '@/lib/stream-manager'; @@ -441,9 +442,20 @@ const start = () => { const connect = async (creds?: Credentials, authEntity?: string) => { $connectionStatus = 'connecting'; + let sdkCreds = undefined; + const c = creds ?? bakedAuth.creds; + const ae = authEntity ?? bakedAuth.authEntity; + if (c && ae) { + sdkCreds = { + type: c.type as CredentialType, + payload: c.payload, + authEntity: ae, + }; + } + await $robotClient.connect({ authEntity: authEntity ?? bakedAuth.authEntity, - creds: creds ?? bakedAuth.creds, + creds: sdkCreds, priority: 1, });