diff --git a/package-lock.json b/package-lock.json index 146877d..b78844e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,9 +8,9 @@ "name": "zmk-studio", "version": "0.0.3", "dependencies": { - "@tauri-apps/api": "^2.0.0-beta.16", - "@tauri-apps/plugin-cli": "^2.0.0-beta.8", - "@zmkfirmware/zmk-studio-ts-client": "^0.0.16", + "@tauri-apps/api": "^2.0.0", + "@tauri-apps/plugin-cli": "^2.0.0", + "@zmkfirmware/zmk-studio-ts-client": "^0.0.17", "emittery": "^1.0.3", "immer": "^10.1.1", "lucide-react": "^0.445.0", @@ -5971,14 +5971,10 @@ } }, "node_modules/@tauri-apps/api": { - "version": "2.0.0-beta.16", - "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.0.0-beta.16.tgz", - "integrity": "sha512-YGjkR9HxS/YyIoqoXDkk8o9Yy5NW6u9YxzeqEodwwOUoeS0nac6mzLTW3VYIuSelHmyUQCgbyENVY6e5CJXA4Q==", - "engines": { - "node": ">= 18.18", - "npm": ">= 6.6.0", - "yarn": ">= 1.19.1" - }, + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.0.1.tgz", + "integrity": "sha512-eoQWT+Tq1qSwQpHV+nw1eNYe5B/nm1PoRjQCRiEOS12I1b+X4PUcREfXVX8dPcBT6GrzWGDtaecY0+1p0Rfqlw==", + "license": "Apache-2.0 OR MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/tauri" @@ -6173,11 +6169,12 @@ } }, "node_modules/@tauri-apps/plugin-cli": { - "version": "2.0.0-beta.8", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-cli/-/plugin-cli-2.0.0-beta.8.tgz", - "integrity": "sha512-dzkq29BojSmemtgNWTWyCsK6kBFEzxtcdt3qji1VNvPfeUgLSVqmg+eC6KntpwmoqUAmjtQEGg1hdFV5ErDGew==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-cli/-/plugin-cli-2.0.0.tgz", + "integrity": "sha512-glQmlL1IiCGEa1FHYa/PTPSeYhfu56omLRgHXWlJECDt6DbJyRuJWVgtkQfUxtqnVdYnnU+DGIGeiInoEqtjLw==", + "license": "MIT OR Apache-2.0", "dependencies": { - "@tauri-apps/api": "^2.0.0-beta.16" + "@tauri-apps/api": "^2.0.0" } }, "node_modules/@testing-library/dom": { @@ -6919,9 +6916,9 @@ } }, "node_modules/@zmkfirmware/zmk-studio-ts-client": { - "version": "0.0.16", - "resolved": "https://registry.npmjs.org/@zmkfirmware/zmk-studio-ts-client/-/zmk-studio-ts-client-0.0.16.tgz", - "integrity": "sha512-Lp9ajdSWuMJAk320X39z1KlWI2VGqQQQbQS781xGpG7VDzbp9msMtcga8q11AwDRpA9NzUrSpjAvhw/XWbT9kA==", + "version": "0.0.17", + "resolved": "https://registry.npmjs.org/@zmkfirmware/zmk-studio-ts-client/-/zmk-studio-ts-client-0.0.17.tgz", + "integrity": "sha512-o4Kwpay6Js/jihgL5tl5wQI9mCkzGrXMxlRHdsGv/6UrB7gPGPx89EL2ShGd+VKZf8pkq4TxGrLXJlNCxlvUrg==", "hasInstallScript": true, "dependencies": { "async-mutex": "^0.5.0", @@ -7142,9 +7139,9 @@ } }, "node_modules/async-mutex/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" }, "node_modules/autoprefixer": { "version": "10.4.19", @@ -11721,9 +11718,9 @@ "license": "MIT" }, "node_modules/protobufjs": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.2.tgz", - "integrity": "sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", + "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -17811,9 +17808,9 @@ } }, "@tauri-apps/api": { - "version": "2.0.0-beta.16", - "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.0.0-beta.16.tgz", - "integrity": "sha512-YGjkR9HxS/YyIoqoXDkk8o9Yy5NW6u9YxzeqEodwwOUoeS0nac6mzLTW3VYIuSelHmyUQCgbyENVY6e5CJXA4Q==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.0.1.tgz", + "integrity": "sha512-eoQWT+Tq1qSwQpHV+nw1eNYe5B/nm1PoRjQCRiEOS12I1b+X4PUcREfXVX8dPcBT6GrzWGDtaecY0+1p0Rfqlw==" }, "@tauri-apps/cli": { "version": "2.0.0-beta.20", @@ -17904,11 +17901,11 @@ "optional": true }, "@tauri-apps/plugin-cli": { - "version": "2.0.0-beta.8", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-cli/-/plugin-cli-2.0.0-beta.8.tgz", - "integrity": "sha512-dzkq29BojSmemtgNWTWyCsK6kBFEzxtcdt3qji1VNvPfeUgLSVqmg+eC6KntpwmoqUAmjtQEGg1hdFV5ErDGew==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-cli/-/plugin-cli-2.0.0.tgz", + "integrity": "sha512-glQmlL1IiCGEa1FHYa/PTPSeYhfu56omLRgHXWlJECDt6DbJyRuJWVgtkQfUxtqnVdYnnU+DGIGeiInoEqtjLw==", "requires": { - "@tauri-apps/api": "^2.0.0-beta.16" + "@tauri-apps/api": "^2.0.0" } }, "@testing-library/dom": { @@ -18407,9 +18404,9 @@ } }, "@zmkfirmware/zmk-studio-ts-client": { - "version": "0.0.16", - "resolved": "https://registry.npmjs.org/@zmkfirmware/zmk-studio-ts-client/-/zmk-studio-ts-client-0.0.16.tgz", - "integrity": "sha512-Lp9ajdSWuMJAk320X39z1KlWI2VGqQQQbQS781xGpG7VDzbp9msMtcga8q11AwDRpA9NzUrSpjAvhw/XWbT9kA==", + "version": "0.0.17", + "resolved": "https://registry.npmjs.org/@zmkfirmware/zmk-studio-ts-client/-/zmk-studio-ts-client-0.0.17.tgz", + "integrity": "sha512-o4Kwpay6Js/jihgL5tl5wQI9mCkzGrXMxlRHdsGv/6UrB7gPGPx89EL2ShGd+VKZf8pkq4TxGrLXJlNCxlvUrg==", "requires": { "async-mutex": "^0.5.0", "protobufjs": "^7.3.2" @@ -18556,9 +18553,9 @@ }, "dependencies": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" } } }, @@ -21314,9 +21311,9 @@ } }, "protobufjs": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.2.tgz", - "integrity": "sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", + "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", "requires": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", diff --git a/package.json b/package.json index 981c7f0..f174dc7 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,9 @@ "build-storybook": "storybook build" }, "dependencies": { - "@tauri-apps/api": "^2.0.0-beta.16", - "@tauri-apps/plugin-cli": "^2.0.0-beta.8", - "@zmkfirmware/zmk-studio-ts-client": "^0.0.16", + "@tauri-apps/api": "^2.0.0", + "@tauri-apps/plugin-cli": "^2.0.0", + "@zmkfirmware/zmk-studio-ts-client": "^0.0.17", "emittery": "^1.0.3", "immer": "^10.1.1", "lucide-react": "^0.445.0", diff --git a/src/ConnectModal.tsx b/src/ConnectModal.tsx index 18b0b74..37b4235 100644 --- a/src/ConnectModal.tsx +++ b/src/ConnectModal.tsx @@ -1,6 +1,7 @@ import { useCallback, useEffect, useMemo, useState } from "react"; import type { RpcTransport } from "@zmkfirmware/zmk-studio-ts-client/transport/index"; +import { UserCancelledError } from "@zmkfirmware/zmk-studio-ts-client/transport/errors"; import type { AvailableDevice } from "./tauri/index"; import { Bluetooth, RefreshCw } from "lucide-react"; import { Key, ListBox, ListBoxItem, Selection } from "react-aria-components"; @@ -92,7 +93,9 @@ function deviceList( onClick={onRefresh} > @@ -151,8 +154,12 @@ function simpleDevicePicker( } setSelectedTransport(undefined); } - } catch { + } catch (e) { if (!ignore) { + console.error(e); + if (e instanceof Error && !(e instanceof UserCancelledError)) { + alert(e.message); + } setSelectedTransport(undefined); } }