From a203b5a992b890fda8daa34376ab5f16179548b4 Mon Sep 17 00:00:00 2001 From: Francisco Salgueiro <92053465+franciscoBSalgueiro@users.noreply.github.com> Date: Thu, 10 Oct 2024 23:25:01 +0100 Subject: [PATCH] Migrate to Tauri v2 (#407) --- .gitignore | 2 + package.json | 17 +- pnpm-lock.yaml | 212 +- src-tauri/Cargo.lock | 2982 +++++++++-------- src-tauri/Cargo.toml | 21 +- src-tauri/build.rs | 2 +- src-tauri/capabilities/main.json | 35 + src-tauri/capabilities/migrated.json | 12 + src-tauri/src/chess.rs | 18 +- src-tauri/src/db/mod.rs | 150 +- src-tauri/src/db/models.rs | 45 +- src-tauri/src/db/search.rs | 61 +- src-tauri/src/error.rs | 9 +- src-tauri/src/fide.rs | 36 +- src-tauri/src/fs.rs | 13 +- src-tauri/src/lexer.rs | 4 +- src-tauri/src/main.rs | 279 +- src-tauri/src/oauth.rs | 8 +- src-tauri/src/opening.rs | 23 +- src-tauri/src/pgn.rs | 24 +- src-tauri/src/puzzle.rs | 33 +- src-tauri/tauri.conf.json | 159 +- src/App.tsx | 12 +- src/bindings/generated.ts | 453 ++- src/bindings/index.ts | 18 + src/components/About.tsx | 2 +- src/components/TopBar.tsx | 3 +- src/components/boards/Board.tsx | 6 +- src/components/boards/BoardAnalysis.tsx | 7 +- src/components/common/AccountCards.tsx | 2 +- src/components/common/GameInfo.tsx | 2 +- src/components/common/LocalImage.tsx | 2 +- src/components/common/OpenFolderButton.tsx | 2 +- src/components/databases/AddDatabase.tsx | 31 +- src/components/databases/DatabasesPage.tsx | 90 +- src/components/databases/FideInfo.tsx | 7 +- src/components/databases/GameCard.tsx | 8 +- src/components/databases/GameTable.tsx | 69 +- src/components/databases/PlayerCard.tsx | 7 +- .../databases/PlayerSearchInput.tsx | 20 +- src/components/databases/PlayerTable.tsx | 31 +- src/components/databases/TournamentCard.tsx | 9 +- src/components/databases/TournamentTable.tsx | 71 +- src/components/engines/AddEngine.tsx | 10 +- src/components/engines/EngineForm.tsx | 4 +- src/components/engines/EnginesPage.tsx | 4 +- src/components/files/DirectoryTable.tsx | 96 +- src/components/files/FileCard.tsx | 5 +- src/components/files/FilesPage.tsx | 77 +- src/components/files/Modals.tsx | 13 +- src/components/files/file.ts | 65 +- src/components/home/AccountCard.tsx | 23 +- src/components/home/Accounts.tsx | 7 +- src/components/home/Databases.tsx | 36 +- src/components/home/PersonalCard.tsx | 2 +- src/components/panels/analysis/LogsPanel.tsx | 6 +- .../panels/analysis/ReportModal.tsx | 2 +- src/components/panels/database/GamesTable.tsx | 2 +- src/components/panels/info/FenSearch.tsx | 17 +- src/components/panels/info/FileInfo.tsx | 7 +- src/components/panels/info/GameSelector.tsx | 7 +- src/components/panels/info/InfoPanel.tsx | 13 +- src/components/puzzles/AddPuzzle.tsx | 23 +- src/components/puzzles/Puzzles.tsx | 7 +- src/components/settings/SettingsPage.tsx | 2 +- src/components/tabs/BoardsPage.tsx | 2 +- src/components/tabs/ImportModal.tsx | 10 +- src/routes/__root.tsx | 267 +- src/routes/databases/index.tsx | 4 +- src/state/atoms.ts | 6 +- src/state/utils.ts | 10 +- src/utils/chess.com/api.tsx | 16 +- src/utils/chess.ts | 16 +- src/utils/chessdb/api.ts | 17 +- src/utils/db.ts | 315 +- src/utils/engines.ts | 25 +- src/utils/files.ts | 24 +- src/utils/invoke.tsx | 44 - src/utils/lichess/api.tsx | 63 +- src/utils/misc.ts | 10 +- src/utils/puzzles.ts | 32 +- src/utils/tabs.ts | 17 +- src/utils/treeReducer.ts | 17 +- src/utils/unwrap.tsx | 19 + 84 files changed, 3351 insertions(+), 2988 deletions(-) create mode 100644 src-tauri/capabilities/main.json create mode 100644 src-tauri/capabilities/migrated.json delete mode 100644 src/utils/invoke.tsx create mode 100644 src/utils/unwrap.tsx diff --git a/.gitignore b/.gitignore index 9ba8bf9f..9cbcf3ae 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ tsconfig.tsbuildinfo *.njsproj *.sln *.sw? + +src-tauri/gen/ diff --git a/package.json b/package.json index 08fec3c6..9ee3610f 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "start-vite": "vite", "build-vite": "tsc --noEmit && vite build", - "build": "tauri build -b none", + "build": "tauri build", "dev": "tauri dev", "tauri": "tauri", "format": "biome format --write ./src", @@ -32,7 +32,17 @@ "@tabler/icons-react": "^2.22.0", "@tanstack/react-router": "^1.20.0", "@tanstack/react-virtual": "^3.1.3", - "@tauri-apps/api": "^1.5.3", + "@tauri-apps/api": "^2.0.0", + "@tauri-apps/plugin-cli": "^2.0.0", + "@tauri-apps/plugin-dialog": "^2.0.0", + "@tauri-apps/plugin-fs": "^2.0.0", + "@tauri-apps/plugin-http": "^2.0.0", + "@tauri-apps/plugin-log": "^2.0.0", + "@tauri-apps/plugin-os": "^2.0.0", + "@tauri-apps/plugin-process": "^2.0.0", + "@tauri-apps/plugin-shell": "^2.0.0", + "@tauri-apps/plugin-updater": "^2.0.0", + "@tauri-apps/plugin-window-state": "~2", "@tiptap/extension-link": "2.2.4", "@tiptap/extension-placeholder": "2.2.4", "@tiptap/extension-underline": "2.2.4", @@ -67,7 +77,6 @@ "rehype-raw": "^7.0.0", "remark-gfm": "^4.0.0", "swr": "^2.2.5", - "tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1", "tiptap-markdown": "^0.8.9", "ts-fsrs": "^3.5.1", "ts-pattern": "^5.0.8", @@ -79,7 +88,7 @@ "devDependencies": { "@biomejs/biome": "1.9.0", "@tanstack/router-vite-plugin": "^1.20.0", - "@tauri-apps/cli": "^1.5.11", + "@tauri-apps/cli": "2.0.1", "@types/lodash": "^4.17.0", "@types/node": "^20.11.27", "@types/react": "^18.2.65", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 344e5094..f9d0bb11 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,8 +57,38 @@ importers: specifier: ^3.1.3 version: 3.1.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@tauri-apps/api': - specifier: ^1.5.3 - version: 1.5.3 + specifier: ^2.0.0 + version: 2.0.0 + '@tauri-apps/plugin-cli': + specifier: ^2.0.0 + version: 2.0.0 + '@tauri-apps/plugin-dialog': + specifier: ^2.0.0 + version: 2.0.0 + '@tauri-apps/plugin-fs': + specifier: ^2.0.0 + version: 2.0.0 + '@tauri-apps/plugin-http': + specifier: ^2.0.0 + version: 2.0.0 + '@tauri-apps/plugin-log': + specifier: ^2.0.0 + version: 2.0.0 + '@tauri-apps/plugin-os': + specifier: ^2.0.0 + version: 2.0.0 + '@tauri-apps/plugin-process': + specifier: ^2.0.0 + version: 2.0.0 + '@tauri-apps/plugin-shell': + specifier: ^2.0.0 + version: 2.0.0 + '@tauri-apps/plugin-updater': + specifier: ^2.0.0 + version: 2.0.0 + '@tauri-apps/plugin-window-state': + specifier: ~2 + version: 2.0.0 '@tiptap/extension-link': specifier: 2.2.4 version: 2.2.4(@tiptap/core@2.2.4(@tiptap/pm@2.2.4))(@tiptap/pm@2.2.4) @@ -161,9 +191,6 @@ importers: swr: specifier: ^2.2.5 version: 2.2.5(react@18.2.0) - tauri-plugin-log-api: - specifier: github:tauri-apps/tauri-plugin-log#v1 - version: https://codeload.github.com/tauri-apps/tauri-plugin-log/tar.gz/752531f21f626c9f9f1716a28c4a37054c679657 tiptap-markdown: specifier: ^0.8.9 version: 0.8.9(@tiptap/core@2.2.4(@tiptap/pm@2.2.4)) @@ -193,8 +220,8 @@ importers: specifier: ^1.20.0 version: 1.20.0 '@tauri-apps/cli': - specifier: ^1.5.11 - version: 1.5.11 + specifier: 2.0.1 + version: 2.0.1 '@types/lodash': specifier: ^4.17.0 version: 4.17.0 @@ -921,75 +948,104 @@ packages: '@tanstack/virtual-core@3.1.3': resolution: {integrity: sha512-Y5B4EYyv1j9V8LzeAoOVeTg0LI7Fo5InYKgAjkY1Pu9GjtUwX/EKxNcU7ng3sKr99WEf+bPTcktAeybyMOYo+g==} - '@tauri-apps/api@1.5.3': - resolution: {integrity: sha512-zxnDjHHKjOsrIzZm6nO5Xapb/BxqUq1tc7cGkFXsFkGTsSWgCPH1D8mm0XS9weJY2OaR73I3k3S+b7eSzJDfqA==} - engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'} + '@tauri-apps/api@2.0.0': + resolution: {integrity: sha512-moKgCp2EX7X5GiOx/G/bmoEpkFQVVmyS98UaJU4xUVzan+E1BdwlAKcbip+cGldshYOqL4JSwAEN1OkRXeug0Q==} - '@tauri-apps/cli-darwin-arm64@1.5.11': - resolution: {integrity: sha512-2NLSglDb5VfvTbMtmOKWyD+oaL/e8Z/ZZGovHtUFyUSFRabdXc6cZOlcD1BhFvYkHqm+TqGaz5qtPR5UbqDs8A==} + '@tauri-apps/cli-darwin-arm64@2.0.1': + resolution: {integrity: sha512-oWjCZoFbm57V0eLEkIbc6aUmB4iW65QF7J8JVh5sNzH4xHGP9rzlQarbkg7LOn89z7mFSZpaLJAWlaaZwoV2Ug==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@tauri-apps/cli-darwin-x64@1.5.11': - resolution: {integrity: sha512-/RQllHiJRH2fJOCudtZlaUIjofkHzP3zZgxi71ZUm7Fy80smU5TDfwpwOvB0wSVh0g/ciDjMArCSTo0MRvL+ag==} + '@tauri-apps/cli-darwin-x64@2.0.1': + resolution: {integrity: sha512-bARd5yAnDGpG/FPhSh87+tzQ6D0TPyP2mZ5bg6cioeoXDmry68nT/FBzp87ySR1/KHvuhEQYWM/4RPrDjvI1Yg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@tauri-apps/cli-linux-arm-gnueabihf@1.5.11': - resolution: {integrity: sha512-IlBuBPKmMm+a5LLUEK6a21UGr9ZYd6zKuKLq6IGM4tVweQa8Sf2kP2Nqs74dMGIUrLmMs0vuqdURpykQg+z4NQ==} + '@tauri-apps/cli-linux-arm-gnueabihf@2.0.1': + resolution: {integrity: sha512-OK3/RpxujoZAUbV7GHe4IPAUsIO6IuWEHT++jHXP+YW5Y7QezGGjQRc43IlWaQYej/yE8wfcrwrbqisc5wtiCw==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@tauri-apps/cli-linux-arm64-gnu@1.5.11': - resolution: {integrity: sha512-w+k1bNHCU/GbmXshtAhyTwqosThUDmCEFLU4Zkin1vl2fuAtQry2RN7thfcJFepblUGL/J7yh3Q/0+BCjtspKQ==} + '@tauri-apps/cli-linux-arm64-gnu@2.0.1': + resolution: {integrity: sha512-MGSQJduiMEApspMK97mFt4kr6ig0OtxO5SUFpPDfYPw/XmY9utaRa9CEG6LcH8e0GN9xxYMhCv+FeU48spYPhA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@tauri-apps/cli-linux-arm64-musl@1.5.11': - resolution: {integrity: sha512-PN6/dl+OfYQ/qrAy4HRAfksJ2AyWQYn2IA/2Wwpaa7SDRz2+hzwTQkvajuvy0sQ5L2WCG7ymFYRYMbpC6Hk9Pg==} + '@tauri-apps/cli-linux-arm64-musl@2.0.1': + resolution: {integrity: sha512-R6+vgxaPpxgGi4suMkQgGuhjMbZzMJfVyWfv2DOE/xxOzSK1BAOc54/HOjfOLxlnkA6uD6V69MwCwXgxW00A2g==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@tauri-apps/cli-linux-x64-gnu@1.5.11': - resolution: {integrity: sha512-MTVXLi89Nj7Apcvjezw92m7ZqIDKT5SFKZtVPCg6RoLUBTzko/BQoXYIRWmdoz2pgkHDUHgO2OMJ8oKzzddXbw==} + '@tauri-apps/cli-linux-x64-gnu@2.0.1': + resolution: {integrity: sha512-xrasYQnUZVhKJhBxHAeu4KxZbofaQlsG9KfZ9p1Bx+hmjs5BuujzwMnXsVD2a4l6GPW6gwblf2a6d600rySmWQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@tauri-apps/cli-linux-x64-musl@1.5.11': - resolution: {integrity: sha512-kwzAjqFpz7rvTs7WGZLy/a5nS5t15QKr3E9FG95MNF0exTl3d29YoAUAe1Mn0mOSrTJ9Z+vYYAcI/QdcsGBP+w==} + '@tauri-apps/cli-linux-x64-musl@2.0.1': + resolution: {integrity: sha512-SPk+EzRTlbvk46p5aURc7O4GihzxbqG80m74vstm0rolnmQ0FX3qqIh3as3cQpDiZWLod4j6EEmX0mTU3QpvXA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@tauri-apps/cli-win32-arm64-msvc@1.5.11': - resolution: {integrity: sha512-L+5NZ/rHrSUrMxjj6YpFYCXp6wHnq8c8SfDTBOX8dO8x+5283/vftb4vvuGIsLS4UwUFXFnLt3XQr44n84E67Q==} + '@tauri-apps/cli-win32-arm64-msvc@2.0.1': + resolution: {integrity: sha512-LAELK01eOMyEt+JZLmx4EUOdRuPYr1a+mHjlxAxCnCaS3dpeg/c5/NMZfbRAJbAH4id+STRHIfPXTdCT2zUNAw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@tauri-apps/cli-win32-ia32-msvc@1.5.11': - resolution: {integrity: sha512-oVlD9IVewrY0lZzTdb71kNXkjdgMqFq+ohb67YsJb4Rf7o8A9DTlFds1XLCe3joqLMm4M+gvBKD7YnGIdxQ9vA==} + '@tauri-apps/cli-win32-ia32-msvc@2.0.1': + resolution: {integrity: sha512-eMUgOS4mAusk5njU2TBxBjCUO1P4cV4uzY5CHihysoXSL2TVQdWrXT42VGeoahJh+yeQWkYFka2s4Bu0iWDMXg==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@tauri-apps/cli-win32-x64-msvc@1.5.11': - resolution: {integrity: sha512-1CexcqUFCis5ypUIMOKllxUBrna09McbftWENgvVXMfA+SP+yPDPAVb8fIvUcdTIwR/yHJwcIucmTB4anww4vg==} + '@tauri-apps/cli-win32-x64-msvc@2.0.1': + resolution: {integrity: sha512-U9esAOcFIv80/slzlpwjkG31Wx1OqbfDgC5KjGT1Dd9iUOSuJZCwbiY7m3rYG2I6RWLfd9zhNu86CVohsKjBfA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@tauri-apps/cli@1.5.11': - resolution: {integrity: sha512-B475D7phZrq5sZ3kDABH4g2mEoUIHtnIO+r4ZGAAfsjMbZCwXxR/jlMGTEL+VO3YzjpF7gQe38IzB4vLBbVppw==} + '@tauri-apps/cli@2.0.1': + resolution: {integrity: sha512-fCheW0iWYWUtFV3ui3HlMhk3ZJpAQ5KJr7B7UmfhDzBSy1h5JBdrCtvDwy+3AcPN+Fg5Ey3JciF8zEP8eBx+vQ==} engines: {node: '>= 10'} hasBin: true + '@tauri-apps/plugin-cli@2.0.0': + resolution: {integrity: sha512-glQmlL1IiCGEa1FHYa/PTPSeYhfu56omLRgHXWlJECDt6DbJyRuJWVgtkQfUxtqnVdYnnU+DGIGeiInoEqtjLw==} + + '@tauri-apps/plugin-dialog@2.0.0': + resolution: {integrity: sha512-ApNkejXP2jpPBSifznPPcHTXxu9/YaRW+eJ+8+nYwqp0lLUtebFHG4QhxitM43wwReHE81WAV1DQ/b+2VBftOA==} + + '@tauri-apps/plugin-fs@2.0.0': + resolution: {integrity: sha512-BNEeQQ5aH8J5SwYuWgRszVyItsmquRuzK2QRkVj8Z0sCsLnSvJFYI3JHRzzr3ltZGq1nMPtblrlZzuKqVzRawA==} + + '@tauri-apps/plugin-http@2.0.0': + resolution: {integrity: sha512-UfKAICL25ayluV/SjiEQujz8q/2uyAzp3u9uaHFkaIyKS5usBL8DoqSwi4eKz2mEjkbxTwldhDEXG4CEfTE0JQ==} + + '@tauri-apps/plugin-log@2.0.0': + resolution: {integrity: sha512-C+NII9vzswqnOQE8k7oRtnaw0z5TZsMmnirRhXkCKDEhQQH9841Us/PC1WHtGiAaJ8za1A1JB2xXndEq/47X/w==} + + '@tauri-apps/plugin-os@2.0.0': + resolution: {integrity: sha512-M7hG/nNyQYTJxVG/UhTKhp9mpXriwWzrs9mqDreB8mIgqA3ek5nHLdwRZJWhkKjZrnDT4v9CpA9BhYeplTlAiA==} + + '@tauri-apps/plugin-process@2.0.0': + resolution: {integrity: sha512-OYzi0GnkrF4NAnsHZU7U3tjSoP0PbeAlO7T1Z+vJoBUH9sFQ1NSLqWYWQyf8hcb3gVWe7P1JggjiskO+LST1ug==} + + '@tauri-apps/plugin-shell@2.0.0': + resolution: {integrity: sha512-OpW2+ycgJLrEoZityWeWYk+6ZWP9VyiAfbO+N/O8VfLkqyOym8kXh7odKDfINx9RAotkSGBtQM4abyKfJDkcUg==} + + '@tauri-apps/plugin-updater@2.0.0': + resolution: {integrity: sha512-N0cl71g7RPr7zK2Fe5aoIwzw14NcdLcz7XMGFWZVjprsqgDRWoxbnUkknyCQMZthjhGkppCd/wN2MIsUz+eAhQ==} + + '@tauri-apps/plugin-window-state@2.0.0': + resolution: {integrity: sha512-O82iRlrh1BLgBI8CTc+NMTPxQhQo8II5admKq9mLvH45Us5i4Zcr74At6eM46nOflFd7R8bZsVNGy+PxOEqUmQ==} + '@tiptap/core@2.2.4': resolution: {integrity: sha512-cRrI8IlLIhCE1hacBQzXIC8dsRvGq6a4lYWQK/BaHuZg21CG7szp3Vd8Ix+ra1f5v0xPOT+Hy+QFNQooRMKMCw==} peerDependencies: @@ -2799,10 +2855,6 @@ packages: tabbable@6.2.0: resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} - tauri-plugin-log-api@https://codeload.github.com/tauri-apps/tauri-plugin-log/tar.gz/752531f21f626c9f9f1716a28c4a37054c679657: - resolution: {tarball: https://codeload.github.com/tauri-apps/tauri-plugin-log/tar.gz/752531f21f626c9f9f1716a28c4a37054c679657} - version: 0.0.0 - text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -3763,50 +3815,90 @@ snapshots: '@tanstack/virtual-core@3.1.3': {} - '@tauri-apps/api@1.5.3': {} + '@tauri-apps/api@2.0.0': {} - '@tauri-apps/cli-darwin-arm64@1.5.11': + '@tauri-apps/cli-darwin-arm64@2.0.1': optional: true - '@tauri-apps/cli-darwin-x64@1.5.11': + '@tauri-apps/cli-darwin-x64@2.0.1': optional: true - '@tauri-apps/cli-linux-arm-gnueabihf@1.5.11': + '@tauri-apps/cli-linux-arm-gnueabihf@2.0.1': optional: true - '@tauri-apps/cli-linux-arm64-gnu@1.5.11': + '@tauri-apps/cli-linux-arm64-gnu@2.0.1': optional: true - '@tauri-apps/cli-linux-arm64-musl@1.5.11': + '@tauri-apps/cli-linux-arm64-musl@2.0.1': optional: true - '@tauri-apps/cli-linux-x64-gnu@1.5.11': + '@tauri-apps/cli-linux-x64-gnu@2.0.1': optional: true - '@tauri-apps/cli-linux-x64-musl@1.5.11': + '@tauri-apps/cli-linux-x64-musl@2.0.1': optional: true - '@tauri-apps/cli-win32-arm64-msvc@1.5.11': + '@tauri-apps/cli-win32-arm64-msvc@2.0.1': optional: true - '@tauri-apps/cli-win32-ia32-msvc@1.5.11': + '@tauri-apps/cli-win32-ia32-msvc@2.0.1': optional: true - '@tauri-apps/cli-win32-x64-msvc@1.5.11': + '@tauri-apps/cli-win32-x64-msvc@2.0.1': optional: true - '@tauri-apps/cli@1.5.11': + '@tauri-apps/cli@2.0.1': optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 1.5.11 - '@tauri-apps/cli-darwin-x64': 1.5.11 - '@tauri-apps/cli-linux-arm-gnueabihf': 1.5.11 - '@tauri-apps/cli-linux-arm64-gnu': 1.5.11 - '@tauri-apps/cli-linux-arm64-musl': 1.5.11 - '@tauri-apps/cli-linux-x64-gnu': 1.5.11 - '@tauri-apps/cli-linux-x64-musl': 1.5.11 - '@tauri-apps/cli-win32-arm64-msvc': 1.5.11 - '@tauri-apps/cli-win32-ia32-msvc': 1.5.11 - '@tauri-apps/cli-win32-x64-msvc': 1.5.11 + '@tauri-apps/cli-darwin-arm64': 2.0.1 + '@tauri-apps/cli-darwin-x64': 2.0.1 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.1 + '@tauri-apps/cli-linux-arm64-gnu': 2.0.1 + '@tauri-apps/cli-linux-arm64-musl': 2.0.1 + '@tauri-apps/cli-linux-x64-gnu': 2.0.1 + '@tauri-apps/cli-linux-x64-musl': 2.0.1 + '@tauri-apps/cli-win32-arm64-msvc': 2.0.1 + '@tauri-apps/cli-win32-ia32-msvc': 2.0.1 + '@tauri-apps/cli-win32-x64-msvc': 2.0.1 + + '@tauri-apps/plugin-cli@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-dialog@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-fs@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-http@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-log@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-os@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-process@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-shell@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-updater@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 + + '@tauri-apps/plugin-window-state@2.0.0': + dependencies: + '@tauri-apps/api': 2.0.0 '@tiptap/core@2.2.4(@tiptap/pm@2.2.4)': dependencies: @@ -6049,10 +6141,6 @@ snapshots: tabbable@6.2.0: {} - tauri-plugin-log-api@https://codeload.github.com/tauri-apps/tauri-plugin-log/tar.gz/752531f21f626c9f9f1716a28c4a37054c679657: - dependencies: - '@tauri-apps/api': 1.5.3 - text-table@0.2.0: {} tiny-invariant@1.3.3: {} diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 73ddcb60..60a66d72 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -93,6 +93,23 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +[[package]] +name = "android_log-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ecc8056bf6ab9892dcd53216c83d1597487d7dacac16c8df6b877d127df9937" + +[[package]] +name = "android_logger" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b07e8e73d720a1f2e4b6014766e6039fd2e96a4fa44e2a78d0e1fa2ff49826" +dependencies = [ + "android_log-sys", + "env_filter", + "log", +] + [[package]] name = "android_system_properties" version = "0.1.5" @@ -103,205 +120,203 @@ dependencies = [ ] [[package]] -name = "anyhow" -version = "1.0.81" +name = "anstream" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] [[package]] -name = "arbitrary" -version = "1.3.2" +name = "anstyle" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" -dependencies = [ - "derive_arbitrary", -] +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] -name = "arboard" -version = "3.3.2" +name = "anstyle-parse" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2041f1943049c7978768d84e6d0fd95de98b76d6c4727b09e78ec253d29fa58" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ - "clipboard-win", - "core-graphics 0.23.1", - "image", - "log", - "objc", - "objc-foundation", - "objc_id", - "parking_lot", - "thiserror", - "windows-sys 0.48.0", - "wl-clipboard-rs", - "x11rb", + "utf8parse", ] [[package]] -name = "arrayvec" -version = "0.7.4" +name = "anstyle-query" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys 0.52.0", +] [[package]] -name = "async-broadcast" -version = "0.5.1" +name = "anstyle-wincon" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ - "event-listener 2.5.3", - "futures-core", + "anstyle", + "windows-sys 0.52.0", ] [[package]] -name = "async-channel" -version = "2.2.0" +name = "anyhow" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" + +[[package]] +name = "arbitrary" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" dependencies = [ - "concurrent-queue", - "event-listener 5.2.0", - "event-listener-strategy 0.5.0", - "futures-core", - "pin-project-lite", + "derive_arbitrary", ] [[package]] -name = "async-executor" -version = "1.8.0" +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "ashpd" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "bfe7e0dd0ac5a401dc116ed9f9119cf9decc625600474cb41f0fc0a0050abc9a" dependencies = [ - "async-lock 3.3.0", - "async-task", - "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.2.0", - "slab", + "enumflags2", + "futures-channel", + "futures-util", + "rand 0.8.5", + "raw-window-handle", + "serde", + "serde_repr", + "tokio", + "url", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "zbus", ] [[package]] -name = "async-fs" -version = "1.6.0" +name = "async-broadcast" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" dependencies = [ - "async-lock 2.8.0", - "autocfg", - "blocking", - "futures-lite 1.13.0", + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", ] [[package]] -name = "async-io" -version = "1.13.0" +name = "async-channel" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", + "event-listener-strategy", + "futures-core", + "pin-project-lite", ] [[package]] name = "async-io" -version = "2.3.2" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ - "async-lock 3.3.0", + "async-lock", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.2.0", + "futures-lite", "parking", - "polling 3.5.0", - "rustix 0.38.31", + "polling", + "rustix", "slab", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - -[[package]] -name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener", + "event-listener-strategy", "pin-project-lite", ] [[package]] name = "async-process" -version = "1.8.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", + "async-channel", + "async-io", + "async-lock", "async-signal", + "async-task", "blocking", "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.31", - "windows-sys 0.48.0", + "event-listener", + "futures-lite", + "rustix", + "tracing", ] [[package]] name = "async-recursion" -version = "1.0.5" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] name = "async-signal" -version = "0.2.5" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ - "async-io 2.3.2", - "async-lock 2.8.0", + "async-io", + "async-lock", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.31", + "rustix", "signal-hook-registry", "slab", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" @@ -311,31 +326,30 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] name = "atk" -version = "0.15.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd" +checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" dependencies = [ "atk-sys", - "bitflags 1.3.2", "glib", "libc", ] [[package]] name = "atk-sys" -version = "0.15.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58aeb089fb698e06db8089971c7ee317ab9644bade33383f63631437b03aafb6" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.0", + "system-deps", ] [[package]] @@ -344,17 +358,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -470,9 +473,12 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] [[package]] name = "bitvec" @@ -501,51 +507,57 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2", +] + [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ "async-channel", - "async-lock 3.3.0", "async-task", - "fastrand 2.0.1", "futures-io", - "futures-lite 2.2.0", + "futures-lite", "piper", - "tracing", ] [[package]] name = "borsh" -version = "1.3.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667" +checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" dependencies = [ "borsh-derive", - "cfg_aliases", + "cfg_aliases 0.1.1", ] [[package]] name = "borsh-derive" -version = "1.3.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd" +checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 2.0.2", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", "syn_derive", ] [[package]] name = "brotli" -version = "3.4.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -554,24 +566,14 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.5.1" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", ] -[[package]] -name = "bstr" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "btoi" version = "0.4.3" @@ -620,12 +622,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "bytecount" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" - [[package]] name = "bytemuck" version = "1.15.0" @@ -670,36 +666,69 @@ dependencies = [ [[package]] name = "cairo-rs" -version = "0.15.12" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "cairo-sys-rs", "glib", "libc", + "once_cell", "thiserror", ] [[package]] name = "cairo-sys-rs" -version = "0.15.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" dependencies = [ "glib-sys", "libc", - "system-deps 6.2.0", + "system-deps", +] + +[[package]] +name = "camino" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", ] [[package]] name = "cargo_toml" -version = "0.15.3" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" +checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719" dependencies = [ "serde", - "toml 0.7.8", + "toml 0.8.2", ] [[package]] @@ -729,15 +758,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "cfg-expr" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3431df59f28accaf4cb4eed4a9acc66bea3f3c3753aa6cdc2f024174ef232af7" -dependencies = [ - "smallvec", -] - [[package]] name = "cfg-expr" version = "0.15.7" @@ -760,6 +780,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.35" @@ -793,64 +819,42 @@ checksum = "b0fc239e0f6cb375d2402d48afb92f76f5404fd1df208a41930ec81eda078bea" [[package]] name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_lex", - "indexmap 1.9.3", - "strsim 0.10.0", - "termcolor", - "textwrap", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" dependencies = [ - "os_str_bytes", + "clap_builder", ] [[package]] -name = "clipboard-win" -version = "5.2.0" +name = "clap_builder" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f9a0700e0127ba15d1d52dd742097f821cd9c65939303a44d970465040a297" +checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" dependencies = [ - "error-code", + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.0", ] [[package]] -name = "cocoa" -version = "0.24.1" +name = "clap_lex" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics 0.22.3", - "foreign-types 0.3.2", - "libc", - "objc", -] +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cocoa" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" +checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "block", "cocoa-foundation", - "core-foundation", - "core-graphics 0.23.1", + "core-foundation 0.10.0", + "core-graphics", "foreign-types 0.5.0", "libc", "objc", @@ -858,23 +862,23 @@ dependencies = [ [[package]] name = "cocoa-foundation" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" +checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "block", - "core-foundation", + "core-foundation 0.10.0", "core-graphics-types", "libc", "objc", ] [[package]] -name = "color_quant" -version = "1.1.0" +name = "colorchoice" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "combine" @@ -888,9 +892,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -907,6 +911,34 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "cookie" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cookie_store" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4934e6b7e8419148b6ef56950d277af8561060b56afd59e2aadf98b59fce6baa" +dependencies = [ + "cookie", + "idna 0.5.0", + "log", + "publicsuffix", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -917,33 +949,30 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-graphics-types", - "foreign-types 0.3.2", - "libc", -] - -[[package]] -name = "core-graphics" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", + "bitflags 2.6.0", + "core-foundation 0.10.0", "core-graphics-types", "foreign-types 0.5.0", "libc", @@ -951,12 +980,12 @@ dependencies = [ [[package]] name = "core-graphics-types" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 1.3.2", - "core-foundation", + "bitflags 2.6.0", + "core-foundation 0.10.0", "libc", ] @@ -1061,7 +1090,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -1092,7 +1121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" dependencies = [ "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -1116,7 +1145,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -1127,7 +1156,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -1157,6 +1186,12 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "data-url" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" + [[package]] name = "deflate64" version = "0.1.9" @@ -1184,17 +1219,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive-new" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - [[package]] name = "derive_arbitrary" version = "1.3.2" @@ -1203,7 +1227,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -1240,7 +1264,7 @@ dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -1249,7 +1273,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -1264,24 +1288,24 @@ dependencies = [ ] [[package]] -name = "dirs-next" -version = "2.0.0" +name = "dirs" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "cfg-if", - "dirs-sys-next", + "dirs-sys", ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "dirs-sys" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -1298,7 +1322,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -1310,11 +1334,43 @@ dependencies = [ "libloading", ] +[[package]] +name = "dlopen2" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "downcast-rs" -version = "1.2.0" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" +dependencies = [ + "serde", +] [[package]] name = "dtoa" @@ -1337,6 +1393,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + [[package]] name = "either" version = "1.10.0" @@ -1352,7 +1414,7 @@ dependencies = [ "cc", "memchr", "rustc_version", - "toml 0.8.11", + "toml 0.8.2", "vswhom", "winreg 0.52.0", ] @@ -1393,19 +1455,28 @@ dependencies = [ "serde_json", "shakmaty", "specta", + "specta-typescript", "strsim 0.11.0", "sysinfo", "tar", "tauri", "tauri-build", + "tauri-plugin-cli", + "tauri-plugin-dialog", + "tauri-plugin-fs", + "tauri-plugin-http", "tauri-plugin-log", + "tauri-plugin-os", + "tauri-plugin-process", + "tauri-plugin-shell", + "tauri-plugin-updater", + "tauri-plugin-window-state", "tauri-specta", "tempfile", "thiserror", "tokio", "vampirc-uci", - "window-shadows", - "zip 2.1.6", + "zip", "zstd", ] @@ -1418,11 +1489,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + [[package]] name = "enumflags2" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" +checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" dependencies = [ "enumflags2_derive", "serde", @@ -1430,70 +1507,56 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" +checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" +name = "env_filter" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ - "libc", - "windows-sys 0.52.0", + "log", + "regex", ] [[package]] -name = "error-code" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" - -[[package]] -name = "event-listener" -version = "2.5.3" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "event-listener" -version = "3.1.0" +name = "erased-serde" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", + "serde", + "typeid", ] [[package]] -name = "event-listener" -version = "4.0.3" +name = "errno" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", + "libc", + "windows-sys 0.52.0", ] [[package]] name = "event-listener" -version = "5.2.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -1502,21 +1565,11 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.2.0", + "event-listener", "pin-project-lite", ] @@ -1532,15 +1585,6 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.0.1" @@ -1571,7 +1615,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ - "memoffset 0.9.0", + "memoffset", "rustc_version", ] @@ -1583,16 +1627,10 @@ checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "windows-sys 0.52.0", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - [[package]] name = "flate2" version = "1.0.31" @@ -1603,6 +1641,15 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "fluent-uri" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "fnv" version = "1.0.7" @@ -1636,7 +1683,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -1726,26 +1773,11 @@ checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.1", + "fastrand", "futures-core", "futures-io", "parking", @@ -1760,7 +1792,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -1810,11 +1842,10 @@ dependencies = [ [[package]] name = "gdk" -version = "0.15.4" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8" +checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646" dependencies = [ - "bitflags 1.3.2", "cairo-rs", "gdk-pixbuf", "gdk-sys", @@ -1826,35 +1857,35 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.15.11" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" dependencies = [ - "bitflags 1.3.2", "gdk-pixbuf-sys", "gio", "glib", "libc", + "once_cell", ] [[package]] name = "gdk-pixbuf-sys" -version = "0.15.10" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140b2f5378256527150350a8346dbdb08fadc13453a7a2d73aecd5fab3c402a7" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ "gio-sys", "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.0", + "system-deps", ] [[package]] name = "gdk-sys" -version = "0.15.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e7a08c1e8f06f4177fb7e51a777b8c1689f743a7bc11ea91d44d2226073a88" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1864,47 +1895,48 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps 6.2.0", + "system-deps", ] [[package]] name = "gdkwayland-sys" -version = "0.15.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cca49a59ad8cfdf36ef7330fe7bdfbe1d34323220cc16a0de2679ee773aee2c2" +checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a" dependencies = [ "gdk-sys", "glib-sys", "gobject-sys", "libc", "pkg-config", - "system-deps 6.2.0", + "system-deps", ] [[package]] -name = "gdkx11-sys" -version = "0.15.1" +name = "gdkx11" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b7f8c7a84b407aa9b143877e267e848ff34106578b64d1e0a24bf550716178" +checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce" dependencies = [ - "gdk-sys", - "glib-sys", + "gdk", + "gdkx11-sys", + "gio", + "glib", "libc", - "system-deps 6.2.0", "x11", ] [[package]] -name = "generator" -version = "0.7.5" +name = "gdkx11-sys" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" +checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043" dependencies = [ - "cc", + "gdk-sys", + "glib-sys", "libc", - "log", - "rustversion", - "windows 0.48.0", + "system-deps", + "x11", ] [[package]] @@ -1919,12 +1951,12 @@ dependencies = [ [[package]] name = "gethostname" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +checksum = "dc3655aa6818d65bc620d6911f05aa7b6aeb596291e1e9f79e52df85583d1e30" dependencies = [ - "libc", - "windows-targets 0.48.5", + "rustix", + "windows-targets 0.52.6", ] [[package]] @@ -1959,49 +1991,54 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gio" -version = "0.15.12" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68fdbc90312d462781a395f7a16d96a2b379bb6ef8cd6310a2df272771c4283b" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" dependencies = [ - "bitflags 1.3.2", "futures-channel", "futures-core", "futures-io", + "futures-util", "gio-sys", "glib", "libc", "once_cell", + "pin-project-lite", + "smallvec", "thiserror", ] [[package]] name = "gio-sys" -version = "0.15.10" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32157a475271e2c4a023382e9cab31c4584ee30a97da41d3c4e9fdd605abcf8d" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.0", + "system-deps", "winapi", ] [[package]] name = "glib" -version = "0.15.12" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "futures-channel", "futures-core", "futures-executor", "futures-task", + "futures-util", + "gio-sys", "glib-macros", "glib-sys", "gobject-sys", "libc", + "memchr", "once_cell", "smallvec", "thiserror", @@ -2009,27 +2046,26 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.15.13" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10c6ae9f6fa26f4fb2ac16b528d138d971ead56141de489f8111e259b9df3c4a" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ - "anyhow", "heck 0.4.1", - "proc-macro-crate 1.3.1", + "proc-macro-crate 2.0.2", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "glib-sys" -version = "0.15.10" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" dependencies = [ "libc", - "system-deps 6.2.0", + "system-deps", ] [[package]] @@ -2038,28 +2074,15 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "globset" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata 0.4.6", - "regex-syntax 0.8.2", -] - [[package]] name = "gobject-sys" -version = "0.15.10" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ "glib-sys", "libc", - "system-deps 6.2.0", + "system-deps", ] [[package]] @@ -2084,12 +2107,11 @@ dependencies = [ [[package]] name = "gtk" -version = "0.15.5" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e3004a2d5d6d8b5057d2b57b3712c9529b62e82c77f25c1fecde1fd5c23bd0" +checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c" dependencies = [ "atk", - "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", @@ -2100,16 +2122,15 @@ dependencies = [ "gtk-sys", "gtk3-macros", "libc", - "once_cell", "pango", "pkg-config", ] [[package]] name = "gtk-sys" -version = "0.15.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5bc2f0587cba247f60246a0ca11fe25fb733eabc3de12d1965fc07efab87c84" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" dependencies = [ "atk-sys", "cairo-sys-rs", @@ -2120,21 +2141,20 @@ dependencies = [ "gobject-sys", "libc", "pango-sys", - "system-deps 6.2.0", + "system-deps", ] [[package]] name = "gtk3-macros" -version = "0.15.6" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684c0456c086e8e7e9af73ec5b84e35938df394712054550e81558d21c44ab0d" +checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e" dependencies = [ - "anyhow", "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] @@ -2205,33 +2225,27 @@ dependencies = [ [[package]] name = "heck" -version = "0.3.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hermit-abi" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "hex" @@ -2353,7 +2367,7 @@ dependencies = [ "httpdate", "itoa 1.0.10", "pin-project-lite", - "socket2 0.5.6", + "socket2", "tokio", "tower-service", "tracing", @@ -2409,19 +2423,7 @@ dependencies = [ "tokio", "tokio-rustls 0.26.0", "tower-service", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.28", - "native-tls", - "tokio", - "tokio-native-tls", + "webpki-roots 0.26.6", ] [[package]] @@ -2453,7 +2455,7 @@ dependencies = [ "http-body 1.0.1", "hyper 1.4.1", "pin-project-lite", - "socket2 0.5.6", + "socket2", "tokio", "tower", "tower-service", @@ -2501,42 +2503,22 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ "unicode-bidi", "unicode-normalization", ] [[package]] -name = "ignore" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" -dependencies = [ - "crossbeam-deque", - "globset", - "log", - "memchr", - "regex-automata 0.4.6", - "same-file", - "walkdir", - "winapi-util", -] - -[[package]] -name = "image" -version = "0.24.9" +name = "idna" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "num-traits", - "png", - "tiff", + "unicode-bidi", + "unicode-normalization", ] [[package]] @@ -2561,17 +2543,11 @@ dependencies = [ "serde", ] -[[package]] -name = "indoc" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" - [[package]] name = "infer" -version = "0.13.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551f8c3a39f68f986517db0d1759de85881894fdc7db798bd2a9df9cb04b7fc" +checksum = "bc150e5ce2330295b8616ce0e3f53250e53af31759a9dbedad1621ba29151847" dependencies = [ "cfb", ] @@ -2595,21 +2571,35 @@ dependencies = [ ] [[package]] -name = "io-lifetimes" -version = "1.0.11" +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-docker" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.48.0", + "once_cell", ] [[package]] -name = "ipnet" -version = "2.9.0" +name = "is-wsl" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" @@ -2625,9 +2615,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "javascriptcore-rs" -version = "0.16.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf053e7843f2812ff03ef5afe34bb9c06ffee120385caad4f6b9967fcd37d41c" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" dependencies = [ "bitflags 1.3.2", "glib", @@ -2636,28 +2626,30 @@ dependencies = [ [[package]] name = "javascriptcore-rs-sys" -version = "0.4.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905fbb87419c5cde6e3269537e4ea7d46431f3008c5d057e915ef3f115e7793c" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 5.0.0", + "system-deps", ] [[package]] name = "jni" -version = "0.20.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ "cesu8", + "cfg-if", "combine", "jni-sys", "log", "thiserror", "walkdir", + "windows-sys 0.45.0", ] [[package]] @@ -2675,12 +2667,6 @@ dependencies = [ "libc", ] -[[package]] -name = "jpeg-decoder" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" - [[package]] name = "js-sys" version = "0.3.69" @@ -2692,14 +2678,36 @@ dependencies = [ [[package]] name = "json-patch" -version = "1.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" +checksum = "5b1fb8864823fad91877e6caea0baca82e49e8db50f8e5c9f9a453e27d3330fc" dependencies = [ + "jsonptr", "serde", "serde_json", "thiserror", - "treediff", +] + +[[package]] +name = "jsonptr" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c6e529149475ca0b2820835d3dce8fcc41c6b943ca608d32f35b449255e4627" +dependencies = [ + "fluent-uri", + "serde", + "serde_json", +] + +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags 2.6.0", + "serde", + "unicode-segmentation", ] [[package]] @@ -2721,20 +2729,44 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading", + "once_cell", +] + [[package]] name = "libc" -version = "0.2.153" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libloading" -version = "0.8.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "winapi", ] [[package]] @@ -2743,9 +2775,9 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "libc", - "redox_syscall", + "redox_syscall 0.4.1", ] [[package]] @@ -2770,15 +2802,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -2805,21 +2831,6 @@ dependencies = [ "value-bag", ] -[[package]] -name = "loom" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" -dependencies = [ - "cfg-if", - "generator", - "scoped-tls", - "serde", - "serde_json", - "tracing", - "tracing-subscriber", -] - [[package]] name = "lzma-rs" version = "0.3.0" @@ -2836,19 +2847,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" -[[package]] -name = "mac-notification-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51fca4d74ff9dbaac16a01b924bc3693fa2bba0862c2c633abc73f9a8ea21f64" -dependencies = [ - "cc", - "dirs-next", - "objc-foundation", - "objc_id", - "time", -] - [[package]] name = "malloc_buf" version = "0.0.6" @@ -2872,15 +2870,6 @@ dependencies = [ "tendril", ] -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - [[package]] name = "matches" version = "0.1.10" @@ -2899,15 +2888,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -2923,17 +2903,11 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "minisign-verify" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" +checksum = "a05b5d0594e0cb1ad8cee3373018d2b84e25905dc75b2468114cc9a8e86cfc20" [[package]] name = "miniz_oxide" @@ -2956,6 +2930,26 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "muda" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8123dfd4996055ac9b15a60ad263b44b01e539007523ad7a4a533a3d93b0591" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "once_cell", + "png", + "serde", + "thiserror", + "windows-sys 0.59.0", +] + [[package]] name = "native-tls" version = "0.2.11" @@ -2976,14 +2970,16 @@ dependencies = [ [[package]] name = "ndk" -version = "0.6.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "jni-sys", + "log", "ndk-sys", "num_enum", + "raw-window-handle", "thiserror", ] @@ -2995,9 +2991,9 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.3.0" +version = "0.6.0+11769913" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" dependencies = [ "jni-sys", ] @@ -3010,26 +3006,14 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.7.1", -] - -[[package]] -name = "nix" -version = "0.28.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cfg-if", - "cfg_aliases", "libc", + "memoffset", ] [[package]] @@ -3050,35 +3034,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "nonzero_ext" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" -[[package]] -name = "notify-rust" -version = "4.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827c5edfa80235ded4ab3fe8e9dc619b4f866ef16fe9b1c6b8a7f8692c0f2226" -dependencies = [ - "log", - "mac-notification-sys", - "serde", - "tauri-winrt-notification", - "zbus", -] - [[package]] name = "ntapi" version = "0.4.1" @@ -3088,16 +3049,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - [[package]] name = "num-conv" version = "0.1.0" @@ -3125,23 +3076,23 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.11" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.11" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 2.0.2", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] @@ -3184,14 +3135,103 @@ dependencies = [ ] [[package]] -name = "objc-foundation" -version = "0.1.1" +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ - "block", - "objc", - "objc_id", + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.6.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-encode" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.6.0", + "block2", + "dispatch", + "libc", + "objc2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", ] [[package]] @@ -3229,12 +3269,13 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "open" -version = "3.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" +checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" dependencies = [ + "is-wsl", + "libc", "pathdiff", - "windows-sys 0.42.0", ] [[package]] @@ -3243,7 +3284,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -3260,7 +3301,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -3281,6 +3322,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "ordered-stream" version = "0.2.0" @@ -3293,9 +3340,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.8.0" +version = "3.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a07930afc1bd77ac9e1101dc18d3fc4986c6568e939c31d1c26657eb0ccbf5" +checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" dependencies = [ "log", "serde", @@ -3304,33 +3351,21 @@ dependencies = [ [[package]] name = "os_pipe" -version = "1.1.5" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57119c3b893986491ec9aa85056780d3a0f3cf4da7cc09dd3650dbd6c6738fb9" +checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "pango" -version = "0.15.10" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e4045548659aee5313bde6c582b0d83a627b7904dd20dc2d9ef0895d414e4f" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" dependencies = [ - "bitflags 1.3.2", + "gio", "glib", "libc", "once_cell", @@ -3339,21 +3374,21 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.15.10" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2a00081cde4661982ed91d80ef437c20eacaf6aa1a5962c0279ae194662c3aa" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.0", + "system-deps", ] [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -3373,7 +3408,7 @@ checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "smallvec", "windows-targets 0.48.5", ] @@ -3437,7 +3472,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -3451,16 +3486,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "petgraph" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" -dependencies = [ - "fixedbitset", - "indexmap 2.2.5", -] - [[package]] name = "pgn-reader" version = "0.26.0" @@ -3577,7 +3602,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -3624,7 +3649,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -3641,12 +3666,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand", "futures-io", ] @@ -3685,32 +3710,17 @@ dependencies = [ [[package]] name = "polling" -version = "2.8.0" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ - "autocfg", - "bitflags 1.3.2", "cfg-if", "concurrent-queue", - "libc", - "log", + "hermit-abi 0.4.0", "pin-project-lite", - "windows-sys 0.48.0", -] - -[[package]] -name = "polling" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" -dependencies = [ - "cfg-if", - "concurrent-queue", - "pin-project-lite", - "rustix 0.38.31", + "rustix", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3749,11 +3759,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" dependencies = [ - "toml_edit 0.21.1", + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -3788,13 +3799,19 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] +[[package]] +name = "psl-types" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" + [[package]] name = "ptr_meta" version = "0.1.4" @@ -3815,6 +3832,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "publicsuffix" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a8c1bda5ae1af7f99a2962e49df150414a43d62404644d98dd5c3a93d07457" +dependencies = [ + "idna 0.3.0", + "psl-types", +] + [[package]] name = "quanta" version = "0.12.3" @@ -3832,28 +3859,76 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" dependencies = [ "memchr", + "serde", ] [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" dependencies = [ "memchr", - "serde", +] + +[[package]] +name = "quinn" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.23.12", + "socket2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring", + "rustc-hash", + "rustls 0.23.12", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +dependencies = [ + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.52.0", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3962,14 +4037,14 @@ version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", ] [[package]] name = "raw-window-handle" -version = "0.5.2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] name = "rayon" @@ -4000,6 +4075,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "redox_users" version = "0.4.4" @@ -4013,47 +4097,32 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rend" @@ -4080,12 +4149,10 @@ dependencies = [ "http-body 0.4.6", "hyper 0.14.28", "hyper-rustls 0.24.2", - "hyper-tls 0.5.0", "ipnet", "js-sys", "log", "mime", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -4097,16 +4164,13 @@ dependencies = [ "sync_wrapper 0.1.2", "system-configuration", "tokio", - "tokio-native-tls", "tokio-rustls 0.24.1", - "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", - "webpki-roots", + "webpki-roots 0.25.4", "winreg 0.50.0", ] @@ -4118,6 +4182,8 @@ checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" dependencies = [ "base64 0.22.1", "bytes", + "cookie", + "cookie_store", "encoding_rs", "futures-channel", "futures-core", @@ -4128,7 +4194,7 @@ dependencies = [ "http-body-util", "hyper 1.4.1", "hyper-rustls 0.27.2", - "hyper-tls 0.6.0", + "hyper-tls", "hyper-util", "ipnet", "js-sys", @@ -4138,7 +4204,10 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "quinn", + "rustls 0.23.12", "rustls-pemfile 2.1.3", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", @@ -4146,6 +4215,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", + "tokio-rustls 0.26.0", "tokio-util", "tower-service", "url", @@ -4153,31 +4223,31 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", + "webpki-roots 0.26.6", "winreg 0.52.0", ] [[package]] name = "rfd" -version = "0.10.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0149778bd99b6959285b0933288206090c50e2327f47a9c463bfdbf45c8823ea" +checksum = "8af382a047821a08aa6bfc09ab0d80ff48d45d8726f7cd8e44891f7cb4a4278e" dependencies = [ - "block", - "dispatch", + "ashpd", + "block2", "glib-sys", "gobject-sys", "gtk-sys", "js-sys", - "lazy_static", "log", - "objc", - "objc-foundation", - "objc_id", + "objc2", + "objc2-app-kit", + "objc2-foundation", "raw-window-handle", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows 0.37.0", + "windows-sys 0.48.0", ] [[package]] @@ -4260,6 +4330,12 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc_version" version = "0.4.0" @@ -4271,28 +4347,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.31" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys", "windows-sys 0.52.0", ] @@ -4315,6 +4377,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "once_cell", + "ring", "rustls-pki-types", "rustls-webpki 0.102.6", "subtle", @@ -4412,6 +4475,33 @@ dependencies = [ "parking_lot", ] +[[package]] +name = "schemars" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "schemars_derive" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.79", +] + [[package]] name = "scoped-tls" version = "1.0.1" @@ -4447,7 +4537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", "core-foundation-sys", "libc", "security-framework-sys", @@ -4501,6 +4591,17 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-untagged" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2676ba99bd82f75cae5cbd2c8eda6fa0b8760f18978ea840e980dd5567b5c5b6" +dependencies = [ + "erased-serde", + "serde", + "typeid", +] + [[package]] name = "serde_derive" version = "1.0.197" @@ -4509,7 +4610,18 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -4518,7 +4630,6 @@ version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ - "indexmap 2.2.5", "itoa 1.0.10", "ryu", "serde", @@ -4542,7 +4653,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -4593,7 +4704,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -4657,28 +4768,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8969aea589c3356aa6c0251dbd9c27d0586224f2cb1f068f33d756966f58fb7a" dependencies = [ "arrayvec", - "bitflags 2.4.2", + "bitflags 2.6.0", "btoi", "nohash-hasher", ] -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - [[package]] name = "shared_child" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" +checksum = "09fa9338aed9a1df411814a5b2252f7cd206c55ae9bf2fa763f8de84603aa60c" dependencies = [ "libc", - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -4725,76 +4827,104 @@ checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" -version = "0.4.10" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "winapi", + "windows-sys 0.52.0", ] [[package]] -name = "socket2" -version = "0.5.6" +name = "softbuffer" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08" dependencies = [ - "libc", - "windows-sys 0.52.0", + "bytemuck", + "cfg_aliases 0.2.1", + "core-graphics", + "foreign-types 0.5.0", + "js-sys", + "log", + "objc2", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall 0.5.7", + "wasm-bindgen", + "web-sys", + "windows-sys 0.59.0", ] [[package]] -name = "soup2" -version = "0.2.1" +name = "soup3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b4d76501d8ba387cf0fefbe055c3e0a59891d09f0f995ae4e4b16f6b60f3c0" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" dependencies = [ - "bitflags 1.3.2", + "futures-channel", "gio", "glib", "libc", - "once_cell", - "soup2-sys", + "soup3-sys", ] [[package]] -name = "soup2-sys" -version = "0.2.0" +name = "soup3-sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009ef427103fcb17f802871647a7fa6c60cbb654b4c4e4c0ac60a31c5f6dc9cf" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" dependencies = [ - "bitflags 1.3.2", "gio-sys", "glib-sys", "gobject-sys", "libc", - "system-deps 5.0.0", + "system-deps", ] [[package]] name = "specta" -version = "2.0.0-rc.7" +version = "2.0.0-rc.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18938fc0c7c0e8b7c8f4702e8cb53c218d4442f5b7420dd8b3d9640ca9a46712" +checksum = "4ccbb212565d2dc177bc15ecb7b039d66c4490da892436a4eee5b394d620c9bc" dependencies = [ - "once_cell", "paste", - "serde", "specta-macros", - "tauri", "thiserror", ] [[package]] name = "specta-macros" -version = "2.0.0-rc.7" +version = "2.0.0-rc.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05080358d47cc706229b854d51c6477208de2b022ec0e16f1572c8cdc5263c8e" +checksum = "68999d29816965eb9e5201f60aec02a76512139811661a7e8e653abc810b8f72" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", +] + +[[package]] +name = "specta-serde" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12260cbb21abb2e83a0375b1521867910e3aed8a7afa782206150ce552cd2e5a" +dependencies = [ + "specta", + "thiserror", +] + +[[package]] +name = "specta-typescript" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e4472229365ceb6395487e3a60d921ad8e21f9ad06eaecc396f098902c9adc" +dependencies = [ + "specta", + "specta-serde", + "thiserror", ] [[package]] @@ -4818,15 +4948,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "state" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe866e1e51e8260c9eed836a042a5e7f6726bb2b411dffeaa712e19c388f23b" -dependencies = [ - "loom", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -4877,6 +4998,17 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +[[package]] +name = "swift-rs" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + [[package]] name = "syn" version = "1.0.109" @@ -4890,9 +5022,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -4908,7 +5040,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -4925,15 +5057,11 @@ checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" [[package]] name = "sys-locale" -version = "0.2.4" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a11bd9c338fdba09f7881ab41551932ad42e405f61d01e8406baea71c07aee" +checksum = "e801cf239ecd6ccd71f03d270d67dd53d13e90aab208bf4b8fe4ad957ea949b0" dependencies = [ - "js-sys", "libc", - "wasm-bindgen", - "web-sys", - "windows-sys 0.45.0", ] [[package]] @@ -4958,7 +5086,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -4972,56 +5100,36 @@ dependencies = [ "libc", ] -[[package]] -name = "system-deps" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18db855554db7bd0e73e06cf7ba3df39f97812cb11d3f75e71c39bf45171797e" -dependencies = [ - "cfg-expr 0.9.1", - "heck 0.3.3", - "pkg-config", - "toml 0.5.11", - "version-compare 0.0.11", -] - [[package]] name = "system-deps" version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" dependencies = [ - "cfg-expr 0.15.7", + "cfg-expr", "heck 0.4.1", "pkg-config", - "toml 0.8.11", - "version-compare 0.1.1", + "toml 0.8.2", + "version-compare", ] [[package]] name = "tao" -version = "0.16.7" +version = "0.30.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22205b267a679ca1c590b9f178488d50981fc3e48a1b91641ae31593db875ce" +checksum = "06e48d7c56b3f7425d061886e8ce3b6acfab1993682ed70bef50fd133d721ee6" dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "cc", - "cocoa 0.24.1", - "core-foundation", - "core-graphics 0.22.3", + "bitflags 2.6.0", + "cocoa", + "core-foundation 0.10.0", + "core-graphics", "crossbeam-channel", "dispatch", - "gdk", - "gdk-pixbuf", - "gdk-sys", + "dlopen2", + "dpi", "gdkwayland-sys", "gdkx11-sys", - "gio", - "glib", - "glib-sys", "gtk", - "image", "instant", "jni", "lazy_static", @@ -5033,15 +5141,14 @@ dependencies = [ "objc", "once_cell", "parking_lot", - "png", "raw-window-handle", "scopeguard", - "serde", "tao-macros", "unicode-segmentation", - "uuid", - "windows 0.39.0", - "windows-implement", + "url", + "windows", + "windows-core 0.58.0", + "windows-version", "x11-dl", ] @@ -5081,93 +5188,85 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tauri" -version = "1.6.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f078117725e36d55d29fafcbb4b1e909073807ca328ae8deb8c0b3843aac0fed" +checksum = "f3fad474c02a3bcd4a304afff97159a31b9bab84e29563f7109c7b0ce8cd774e" dependencies = [ "anyhow", - "base64 0.21.7", "bytes", - "clap", - "cocoa 0.24.1", - "dirs-next", + "dirs", "dunce", "embed_plist", - "encoding_rs", - "flate2", "futures-util", - "glib", + "getrandom 0.2.12", "glob", "gtk", - "heck 0.4.1", - "http 0.2.12", - "ignore", - "indexmap 1.9.3", - "minisign-verify", - "nix 0.26.4", - "notify-rust", - "objc", - "once_cell", - "open", - "os_info", - "os_pipe", - "percent-encoding", - "rand 0.8.5", + "heck 0.5.0", + "http 1.1.0", + "http-range", + "jni", + "libc", + "log", + "mime", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "percent-encoding", + "plist", "raw-window-handle", - "regex", - "reqwest 0.11.26", - "rfd", - "semver", + "reqwest 0.12.5", "serde", "serde_json", "serde_repr", "serialize-to-javascript", - "shared_child", - "state", - "sys-locale", - "tar", + "specta", + "swift-rs", + "tauri-build", "tauri-macros", "tauri-runtime", "tauri-runtime-wry", "tauri-utils", - "tempfile", "thiserror", - "time", "tokio", + "tray-icon", "url", - "uuid", + "urlpattern", "webkit2gtk", "webview2-com", - "windows 0.39.0", - "zip 0.6.6", + "window-vibrancy", + "windows", ] [[package]] name = "tauri-build" -version = "1.5.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9914a4715e0b75d9f387a285c7e26b5bbfeb1249ad9f842675a82481565c532" +checksum = "935f9b3c49b22b3e2e485a57f46d61cd1ae07b1cbb2ba87387a387caf2d8c4e7" dependencies = [ "anyhow", "cargo_toml", - "dirs-next", - "heck 0.4.1", + "dirs", + "glob", + "heck 0.5.0", "json-patch", + "schemars", "semver", "serde", "serde_json", "tauri-utils", "tauri-winres", + "toml 0.8.2", "walkdir", ] [[package]] name = "tauri-codegen" -version = "1.4.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1554c5857f65dbc377cefb6b97c8ac77b1cb2a90d30d3448114d5d6b48a77fc" +checksum = "95d7443dd4f0b597704b6a14b964ee2ed16e99928d8e6292ae9825f09fbcd30e" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "brotli", "ico", "json-patch", @@ -5175,100 +5274,298 @@ dependencies = [ "png", "proc-macro2", "quote", - "regex", "semver", "serde", "serde_json", "sha2", + "syn 2.0.79", "tauri-utils", "thiserror", "time", + "url", "uuid", "walkdir", ] [[package]] name = "tauri-macros" -version = "1.4.3" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "277abf361a3a6993ec16bcbb179de0d6518009b851090a01adfea12ac89fa875" +checksum = "4d2c0963ccfc3f5194415f2cce7acc975942a8797fbabfb0aa1ed6f59326ae7f" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", "tauri-codegen", "tauri-utils", ] +[[package]] +name = "tauri-plugin" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e6660a409963e4d57b9bfab4addd141eeff41bd3a7fb14e13004a832cf7ef6" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars", + "serde", + "serde_json", + "tauri-utils", + "toml 0.8.2", + "walkdir", +] + +[[package]] +name = "tauri-plugin-cli" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bccd4692b56822a60874542c7655546c8e7aed3c2e2926166e1498e595bd2a2" +dependencies = [ + "clap", + "log", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "thiserror", +] + +[[package]] +name = "tauri-plugin-dialog" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddb2fe88b602461c118722c574e2775ab26a4e68886680583874b2f6520608b7" +dependencies = [ + "log", + "raw-window-handle", + "rfd", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "tauri-plugin-fs", + "thiserror", + "url", +] + +[[package]] +name = "tauri-plugin-fs" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab300488ebec3487ca5f56289692e7e45feb07eea8d5e1dba497f7dc9dd9c407" +dependencies = [ + "anyhow", + "dunce", + "glob", + "percent-encoding", + "schemars", + "serde", + "serde_json", + "serde_repr", + "tauri", + "tauri-plugin", + "thiserror", + "url", + "uuid", +] + +[[package]] +name = "tauri-plugin-http" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784333f1632d96c94346e8145bfe52970923a38a0e6eacd3dccaa12289275acf" +dependencies = [ + "data-url", + "http 1.1.0", + "regex", + "reqwest 0.12.5", + "schemars", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "tauri-plugin-fs", + "thiserror", + "tokio", + "url", + "urlpattern", +] + [[package]] name = "tauri-plugin-log" -version = "0.0.0" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#d95a1b382f512a0be748e7a89e0f8fc4278010e2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a49f2c05d15e6375ab7f7e528b3049150ba4dfafdf61f85e5178d0aef18e3f5" dependencies = [ + "android_logger", "byte-unit", + "cocoa", "fern", "log", + "objc", "serde", "serde_json", "serde_repr", + "swift-rs", + "tauri", + "tauri-plugin", + "thiserror", + "time", +] + +[[package]] +name = "tauri-plugin-os" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc5f23a86f37687c7f4fecfdc706b279087bc44f7a46702f7307ff1551ee03a" +dependencies = [ + "gethostname", + "log", + "os_info", + "serde", + "serde_json", + "serialize-to-javascript", + "sys-locale", + "tauri", + "tauri-plugin", + "thiserror", +] + +[[package]] +name = "tauri-plugin-process" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae06a00087c148962a52814a2d7265b1a0505bced5ffb74f8c284a5f96a4d03d" +dependencies = [ + "tauri", + "tauri-plugin", +] + +[[package]] +name = "tauri-plugin-shell" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "371fb9aca2823990a2d0db7970573be5fdf07881fcaa2b835b29631feb84aec1" +dependencies = [ + "encoding_rs", + "log", + "open", + "os_pipe", + "regex", + "schemars", + "serde", + "serde_json", + "shared_child", + "tauri", + "tauri-plugin", + "thiserror", + "tokio", +] + +[[package]] +name = "tauri-plugin-updater" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd3d2fe0f02bf52eebb5a9d23b987fffac6684646ab6fd683d706dafb18da87" +dependencies = [ + "base64 0.22.1", + "dirs", + "flate2", + "futures-util", + "http 1.1.0", + "infer", + "minisign-verify", + "percent-encoding", + "reqwest 0.12.5", + "semver", + "serde", + "serde_json", + "tar", "tauri", + "tauri-plugin", + "tempfile", + "thiserror", "time", + "tokio", + "url", + "windows-sys 0.59.0", + "zip", +] + +[[package]] +name = "tauri-plugin-window-state" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd1cef203a15b4772898e7bc8e57c1f34696e39848987dfcd294d51ba0525650" +dependencies = [ + "bitflags 2.6.0", + "log", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "thiserror", ] [[package]] name = "tauri-runtime" -version = "0.14.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2d0652aa2891ff3e9caa2401405257ea29ab8372cce01f186a5825f1bd0e76" +checksum = "af12ad1af974b274ef1d32a94e6eba27a312b429ef28fcb98abc710df7f9151d" dependencies = [ + "dpi", "gtk", - "http 0.2.12", - "http-range", - "rand 0.8.5", + "http 1.1.0", + "jni", "raw-window-handle", "serde", "serde_json", "tauri-utils", "thiserror", "url", - "uuid", - "webview2-com", - "windows 0.39.0", + "windows", ] [[package]] name = "tauri-runtime-wry" -version = "0.14.5" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "067c56fc153b3caf406d7cd6de4486c80d1d66c0f414f39e94cb2f5543f6445f" +checksum = "e45e88aa0b11b302d836e6ea3e507a6359044c4a8bc86b865ba99868c695753d" dependencies = [ - "arboard", - "cocoa 0.24.1", "gtk", + "http 1.1.0", + "jni", + "log", + "objc2", + "objc2-app-kit", + "objc2-foundation", "percent-encoding", - "rand 0.8.5", "raw-window-handle", + "softbuffer", + "tao", "tauri-runtime", "tauri-utils", - "uuid", + "url", "webkit2gtk", "webview2-com", - "windows 0.39.0", + "windows", "wry", ] [[package]] name = "tauri-specta" -version = "2.0.0-rc.4" +version = "2.0.0-rc.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9c8e4e35bb01f7b53df4bd7f747626e45c67f41bf40b51a648c953ec779b5c" +checksum = "5d06336a2fa3ead0c8d08719e78cbc1fb73650845789605bd2ab908cbde72815" dependencies = [ - "heck 0.4.1", - "indoc", + "heck 0.5.0", "serde", "serde_json", "specta", + "specta-typescript", "tauri", "tauri-specta-macros", "thiserror", @@ -5276,27 +5573,27 @@ dependencies = [ [[package]] name = "tauri-specta-macros" -version = "2.0.0-rc.4" +version = "2.0.0-rc.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2098cb9333e5ae46629ef74ce89b2fce3978bdcaf9dea6dd0fcb1aca85934ddd" +checksum = "7a4aa93823e07859546aa796b8a5d608190cd8037a3a5dce3eb63d491c34bda8" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] name = "tauri-utils" -version = "1.5.3" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ad0bbb31fccd1f4c56275d0a5c3abdf1f59999f72cb4ef8b79b4ed42082a21" +checksum = "c38b0230d6880cf6dd07b6d7dd7789a0869f98ac12146e0d18d1c1049215a045" dependencies = [ "brotli", + "cargo_metadata", "ctor", "dunce", "glob", - "heck 0.4.1", "html5ever", "infer", "json-patch", @@ -5306,14 +5603,20 @@ dependencies = [ "phf 0.11.2", "proc-macro2", "quote", + "regex", + "schemars", "semver", "serde", + "serde-untagged", "serde_json", "serde_with", + "swift-rs", "thiserror", + "toml 0.8.2", "url", + "urlpattern", + "uuid", "walkdir", - "windows-version", ] [[package]] @@ -5326,16 +5629,6 @@ dependencies = [ "toml 0.7.8", ] -[[package]] -name = "tauri-winrt-notification" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006851c9ccefa3c38a7646b8cec804bb429def3da10497bfa977179869c3e8e2" -dependencies = [ - "quick-xml 0.30.0", - "windows 0.51.1", -] - [[package]] name = "tempfile" version = "3.10.1" @@ -5343,8 +5636,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.1", - "rustix 0.38.31", + "fastrand", + "rustix", "windows-sys 0.52.0", ] @@ -5359,21 +5652,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" - [[package]] name = "thin-slice" version = "0.1.1" @@ -5397,28 +5675,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "tiff" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" -dependencies = [ - "flate2", - "jpeg-decoder", - "weezl", + "syn 2.0.79", ] [[package]] @@ -5483,8 +5740,9 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.6", + "socket2", "tokio-macros", + "tracing", "windows-sys 0.48.0", ] @@ -5496,7 +5754,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -5544,15 +5802,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.7.8" @@ -5567,21 +5816,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.11" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af06656561d28735e9c1cd63dfd57132c8155426aa6af24f36a00a351f88c48e" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.7", + "toml_edit 0.20.2", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] @@ -5596,31 +5845,20 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.5.40", + "winnow", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.2.5", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18769cd1cec395d70860ceb4d932812a0b4d06b1a4bb336745a4d21b9496e992" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.5", + "winnow", ] [[package]] @@ -5671,7 +5909,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -5681,88 +5919,103 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", - "valuable", ] [[package]] -name = "tracing-log" -version = "0.2.0" +name = "tray-icon" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +checksum = "533fc2d4105e0e3d96ce1c71f2d308c9fbbe2ef9c587cab63dd627ab5bde218f" dependencies = [ - "log", + "core-graphics", + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", "once_cell", - "tracing-core", + "png", + "serde", + "thiserror", + "windows-sys 0.59.0", ] [[package]] -name = "tracing-subscriber" -version = "0.3.18" +name = "try-lock" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] -name = "tree_magic_mini" -version = "3.0.3" +name = "typeid" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "uds_windows" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91adfd0607cacf6e4babdb870e9bec4037c1c4b151cfd279ccefc5e0c7feaa6d" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ - "bytecount", - "fnv", - "lazy_static", - "nom", - "once_cell", - "petgraph", + "memoffset", + "tempfile", + "winapi", ] [[package]] -name = "treediff" -version = "4.0.3" +name = "unic-char-property" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d127780145176e2b5d16611cc25a900150e86e9fd79d3bde6ff3a37359c9cb5" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" dependencies = [ - "serde_json", + "unic-char-range", ] [[package]] -name = "try-lock" -version = "0.2.5" +name = "unic-char-range" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" [[package]] -name = "typenum" -version = "1.17.0" +name = "unic-common" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" [[package]] -name = "ucd-trie" -version = "0.1.6" +name = "unic-ucd-ident" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] [[package]] -name = "uds_windows" -version = "1.1.0" +name = "unic-ucd-version" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" dependencies = [ - "memoffset 0.9.0", - "tempfile", - "winapi", + "unic-common", ] [[package]] @@ -5805,11 +6058,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna", + "idna 0.5.0", "percent-encoding", "serde", ] +[[package]] +name = "urlpattern" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d" +dependencies = [ + "regex", + "serde", + "unic-ucd-ident", + "url", +] + [[package]] name = "utf-8" version = "0.7.6" @@ -5822,6 +6087,12 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "1.7.0" @@ -5829,14 +6100,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ "getrandom 0.2.12", + "serde", ] -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - [[package]] name = "value-bag" version = "1.8.0" @@ -5861,12 +6127,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "version-compare" -version = "0.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c18c859eead79d8b95d09e4678566e8d70105c4e7b251f707a03df32442661b" - [[package]] name = "version-compare" version = "0.1.1" @@ -5905,12 +6165,6 @@ dependencies = [ "libc", ] -[[package]] -name = "waker-fn" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" - [[package]] name = "walkdir" version = "2.5.0" @@ -5963,7 +6217,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -5997,7 +6251,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6023,13 +6277,13 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.3" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ "cc", "downcast-rs", - "rustix 0.38.31", + "rustix", "scoped-tls", "smallvec", "wayland-sys", @@ -6037,57 +6291,44 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.2" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" +checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" dependencies = [ - "bitflags 2.4.2", - "rustix 0.38.31", + "bitflags 2.6.0", + "rustix", "wayland-backend", "wayland-scanner", ] [[package]] name = "wayland-protocols" -version = "0.31.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" -dependencies = [ - "bitflags 2.4.2", - "wayland-backend", - "wayland-client", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-wlr" -version = "0.2.0" +version = "0.32.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +checksum = "2b5755d77ae9040bb872a25026555ce4cb0ae75fd923e90d25fba07d81057de0" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols", "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.31.1" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ "proc-macro2", - "quick-xml 0.31.0", + "quick-xml 0.36.2", "quote", ] [[package]] name = "wayland-sys" -version = "0.31.1" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" dependencies = [ "dlib", "log", @@ -6106,9 +6347,9 @@ dependencies = [ [[package]] name = "webkit2gtk" -version = "0.18.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8f859735e4a452aeb28c6c56a852967a8a76c8eb1cc32dbf931ad28a13d6370" +checksum = "76b1bc1e54c581da1e9f179d0b38512ba358fb1af2d634a1affe42e37172361a" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -6124,20 +6365,18 @@ dependencies = [ "javascriptcore-rs", "libc", "once_cell", - "soup2", + "soup3", "webkit2gtk-sys", ] [[package]] name = "webkit2gtk-sys" -version = "0.18.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d76ca6ecc47aeba01ec61e480139dda143796abcae6f83bcddf50d6b5b1dcf3" +checksum = "62daa38afc514d1f8f12b8693d30d5993ff77ced33ce30cd04deebc267a6d57c" dependencies = [ - "atk-sys", "bitflags 1.3.2", "cairo-sys-rs", - "gdk-pixbuf-sys", "gdk-sys", "gio-sys", "glib-sys", @@ -6145,10 +6384,9 @@ dependencies = [ "gtk-sys", "javascriptcore-rs-sys", "libc", - "pango-sys", "pkg-config", - "soup2-sys", - "system-deps 6.2.0", + "soup3-sys", + "system-deps", ] [[package]] @@ -6157,50 +6395,51 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "webpki-roots" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "webview2-com" -version = "0.19.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a769c9f1a64a8734bde70caafac2b96cada12cd4aefa49196b3a386b8b4178" +checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows 0.39.0", + "windows", + "windows-core 0.58.0", "windows-implement", + "windows-interface", ] [[package]] name = "webview2-com-macros" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaebe196c01691db62e9e4ca52c5ef1e4fd837dcae27dae3ada599b5a8fd05ac" +checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "webview2-com-sys" -version = "0.19.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac48ef20ddf657755fdcda8dfed2a7b4fc7e4581acce6fe9b88c3d64f29dee7" +checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886" dependencies = [ - "regex", - "serde", - "serde_json", "thiserror", - "windows 0.39.0", - "windows-bindgen", - "windows-metadata", + "windows", + "windows-core 0.58.0", ] -[[package]] -name = "weezl" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" - [[package]] name = "winapi" version = "0.3.9" @@ -6233,120 +6472,90 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "window-shadows" -version = "0.2.2" +name = "window-vibrancy" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ff424735b1ac21293b0492b069394b0a189c8a463fb015a16dea7c2e221c08" +checksum = "3ea403deff7b51fff19e261330f71608ff2cdef5721d72b64180bb95be7c4150" dependencies = [ - "cocoa 0.25.0", - "objc", + "objc2", + "objc2-app-kit", + "objc2-foundation", "raw-window-handle", - "windows-sys 0.48.0", -] - -[[package]] -name = "windows" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" -dependencies = [ - "windows_aarch64_msvc 0.37.0", - "windows_i686_gnu 0.37.0", - "windows_i686_msvc 0.37.0", - "windows_x86_64_gnu 0.37.0", - "windows_x86_64_msvc 0.37.0", + "windows-sys 0.59.0", + "windows-version", ] [[package]] name = "windows" -version = "0.39.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ - "windows-implement", - "windows_aarch64_msvc 0.39.0", - "windows_i686_gnu 0.39.0", - "windows_i686_msvc 0.39.0", - "windows_x86_64_gnu 0.39.0", - "windows_x86_64_msvc 0.39.0", + "windows-core 0.58.0", + "windows-targets 0.52.6", ] [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] -name = "windows" -version = "0.51.1" +name = "windows-core" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "windows-core 0.51.1", - "windows-targets 0.48.5", + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets 0.52.6", ] [[package]] -name = "windows-bindgen" -version = "0.39.0" +name = "windows-implement" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68003dbd0e38abc0fb85b939240f4bce37c43a5981d3df37ccbaaa981b47cb41" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ - "windows-metadata", - "windows-tokens", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] -name = "windows-core" -version = "0.51.1" +name = "windows-interface" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ - "windows-targets 0.48.5", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] -name = "windows-core" -version = "0.52.0" +name = "windows-result" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ "windows-targets 0.52.6", ] [[package]] -name = "windows-implement" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba01f98f509cb5dc05f4e5fc95e535f78260f15fea8fe1a8abdd08f774f1cee7" -dependencies = [ - "syn 1.0.109", - "windows-tokens", -] - -[[package]] -name = "windows-metadata" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee5e275231f07c6e240d14f34e1b635bf1faa1c76c57cfd59a5cdb9848e4278" - -[[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows-strings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-result", + "windows-targets 0.52.6", ] [[package]] @@ -6376,6 +6585,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -6422,12 +6640,6 @@ dependencies = [ "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-tokens" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f838de2fe15fe6bac988e74b798f26499a8b21a9d97edec321e79b28d1d7f597" - [[package]] name = "windows-version" version = "0.1.0" @@ -6455,18 +6667,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -6485,18 +6685,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" - -[[package]] -name = "windows_i686_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -6521,18 +6709,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" - -[[package]] -name = "windows_i686_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -6551,18 +6727,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -6599,18 +6763,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -6638,15 +6790,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" -dependencies = [ - "memchr", -] - [[package]] name = "winreg" version = "0.50.0" @@ -6667,62 +6810,44 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "wl-clipboard-rs" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b41773911497b18ca8553c3daaf8ec9fe9819caf93d451d3055f69de028adb" -dependencies = [ - "derive-new", - "libc", - "log", - "nix 0.28.0", - "os_pipe", - "tempfile", - "thiserror", - "tree_magic_mini", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-wlr", -] - [[package]] name = "wry" -version = "0.24.7" +version = "0.44.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ad85d0e067359e409fcb88903c3eac817c392e5d638258abfb3da5ad8ba6fc4" +checksum = "440600584cfbd8b0d28eace95c1f2c253db05dae43780b79380aa1e868f04c73" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "block", - "cocoa 0.24.1", - "core-graphics 0.22.3", + "cocoa", + "core-graphics", "crossbeam-channel", + "dpi", "dunce", - "gdk", - "gio", - "glib", + "gdkx11", "gtk", "html5ever", - "http 0.2.12", + "http 1.1.0", + "javascriptcore-rs", + "jni", "kuchikiki", "libc", - "log", + "ndk", "objc", "objc_id", "once_cell", - "serde", - "serde_json", + "percent-encoding", + "raw-window-handle", "sha2", - "soup2", - "tao", + "soup3", + "tao-macros", "thiserror", - "url", "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows 0.39.0", - "windows-implement", + "windows", + "windows-core 0.58.0", + "windows-version", + "x11-dl", ] [[package]] @@ -6755,23 +6880,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "x11rb" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" -dependencies = [ - "gethostname", - "rustix 0.38.31", - "x11rb-protocol", -] - -[[package]] -name = "x11rb-protocol" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34" - [[package]] name = "xattr" version = "1.3.1" @@ -6779,55 +6887,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", - "linux-raw-sys 0.4.13", - "rustix 0.38.31", + "linux-raw-sys", + "rustix", ] [[package]] name = "xdg-home" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" +checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" dependencies = [ "libc", - "winapi", + "windows-sys 0.59.0", ] [[package]] name = "zbus" -version = "3.15.2" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" +checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030" dependencies = [ "async-broadcast", - "async-executor", - "async-fs", - "async-io 1.13.0", - "async-lock 2.8.0", "async-process", "async-recursion", - "async-task", "async-trait", - "blocking", - "byteorder", "derivative", "enumflags2", - "event-listener 2.5.3", + "event-listener", "futures-core", "futures-sink", "futures-util", "hex", - "nix 0.26.4", - "once_cell", + "nix", "ordered-stream", "rand 0.8.5", "serde", "serde_repr", "sha1", "static_assertions", + "tokio", "tracing", "uds_windows", - "winapi", + "windows-sys 0.52.0", "xdg-home", "zbus_macros", "zbus_names", @@ -6836,9 +6937,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.15.2" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" +checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -6850,9 +6951,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "2.6.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", @@ -6876,7 +6977,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -6896,18 +6997,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "byteorder", - "crc32fast", - "crossbeam-utils", + "syn 2.0.79", ] [[package]] @@ -6983,23 +7073,23 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.15.2" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" +checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65" dependencies = [ - "byteorder", + "endi", "enumflags2", - "libc", "serde", "static_assertions", + "url", "zvariant_derive", ] [[package]] name = "zvariant_derive" -version = "3.15.2" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" +checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -7010,9 +7100,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" dependencies = [ "proc-macro2", "quote", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index ee839db9..339a58d2 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -10,13 +10,12 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] -tauri-build = { version = "1.5", features = [] } +tauri-build = { version = "2", features = [] } [dependencies] -tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.6", features = ["cli", "api-all", "updater"] } +tauri = { version = "2", features = ["protocol-asset"] } zip = "2.1.6" tokio = { version = "1.33", features = ["full"] } futures-util = "0.3.24" @@ -46,8 +45,8 @@ vampirc-uci = { git = "https://github.com/franciscoBSalgueiro/vampirc-uci", rev ] } tempfile = "3.6.0" quick-xml = { version = "0.31.0", features = ["serialize"] } -specta = { version = "2.0.0-rc.7", features = ["typescript"] } -tauri-specta = { version = "2.0.0-rc.4", features = ["typescript"] } +specta = { version = "^2.0.0-rc.20", features = ["derive"] } +tauri-specta = { version = "^2.0.0-rc.20", features = ["derive", "typescript"] } strsim = "0.11.0" bincode = "2.0.0-rc.3" thiserror = "1.0.48" @@ -56,9 +55,19 @@ oauth2 = "4.4.2" axum = "0.6.20" tar = "0.4.40" sysinfo = "0.29.10" -window-shadows = "0.2.2" governor = "0.6.3" nonzero_ext = "0.3.0" +specta-typescript = "0.0.7" +tauri-plugin-shell = "2.0.1" +tauri-plugin-http = "2.0.1" +tauri-plugin-fs = "2" +tauri-plugin-dialog = "2.0.1" +tauri-plugin-os = "2.0.1" +tauri-plugin-cli = "2.0.1" +tauri-plugin-updater = "2.0.1" +tauri-plugin-process = "2" +tauri-plugin-log = "2" +tauri-plugin-window-state = "2" [features] # by default Tauri runs in production mode diff --git a/src-tauri/build.rs b/src-tauri/build.rs index 82d481cc..d860e1e6 100644 --- a/src-tauri/build.rs +++ b/src-tauri/build.rs @@ -1,3 +1,3 @@ fn main() { tauri_build::build() -} \ No newline at end of file +} diff --git a/src-tauri/capabilities/main.json b/src-tauri/capabilities/main.json new file mode 100644 index 00000000..e1a6c713 --- /dev/null +++ b/src-tauri/capabilities/main.json @@ -0,0 +1,35 @@ +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "main-capability", + "description": "Capability for the main window", + "windows": [ + "main" + ], + "permissions": [ + "core:window:default", + "core:window:allow-start-dragging", + "core:window:allow-set-decorations", + "core:window:allow-toggle-maximize", + "core:window:allow-minimize", + "core:window:allow-close", + "shell:default", + "http:default", + "dialog:default", + "os:default", + "cli:default", + "updater:default", + "process:default", + "log:default", + "fs:default", + "fs:write-all", + "window-state:default", + { + "identifier": "fs:scope", + "allow": [ + { + "path": "**" + } + ] + } + ] +} \ No newline at end of file diff --git a/src-tauri/capabilities/migrated.json b/src-tauri/capabilities/migrated.json new file mode 100644 index 00000000..3713c50c --- /dev/null +++ b/src-tauri/capabilities/migrated.json @@ -0,0 +1,12 @@ +{ + "identifier": "migrated", + "description": "permissions that were migrated from v1", + "local": true, + "windows": [ + "main" + ], + "permissions": [ + "core:default", + "process:default" + ] +} \ No newline at end of file diff --git a/src-tauri/src/chess.rs b/src-tauri/src/chess.rs index 86734750..9101ddf7 100644 --- a/src-tauri/src/chess.rs +++ b/src-tauri/src/chess.rs @@ -23,7 +23,7 @@ use vampirc_uci::{ }; use crate::{ - db::{is_position_in_db, GameQuery, PositionQuery}, + db::{is_position_in_db, GameQueryJs, PositionQueryJs}, error::Error, AppState, }; @@ -539,7 +539,7 @@ pub async fn get_best_moves( moves: proc.options.moves.clone(), progress, } - .emit_all(&app)?; + .emit(&app)?; proc.last_depth = cur_depth; proc.last_best_moves = proc.best_moves.clone(); proc.last_progress = progress as f32; @@ -558,7 +558,7 @@ pub async fn get_best_moves( moves: proc.options.moves.clone(), progress: 100.0, } - .emit_all(&app)?; + .emit(&app)?; proc.last_progress = 100.0; } _ => {} @@ -644,7 +644,7 @@ pub async fn analyze_game( id: id.clone(), finished: false, } - .emit_all(&app)?; + .emit(&app)?; let mut extra_options = uci_options.clone(); if !extra_options.iter().any(|x| x.name == "MultiPV") { @@ -709,14 +709,18 @@ pub async fn analyze_game( for (i, analysis) in analysis.iter_mut().enumerate() { let fen = &fens[i].0; - let query = PositionQuery::exact_from_fen(&fen.to_string())?; + // let query = PositionQuery::exact_from_fen(&fen.to_string())?; + let query = PositionQueryJs { + fen: fen.to_string(), + type_: "exact".to_string(), + }; analysis.is_sacrifice = fens[i].2; if options.annotate_novelties && !novelty_found { if let Some(reference) = options.reference_db.clone() { analysis.novelty = !is_position_in_db( reference, - GameQuery::new().position(query.clone()).clone(), + GameQueryJs::new().position(query.clone()).clone(), state.clone(), ) .await?; @@ -733,7 +737,7 @@ pub async fn analyze_game( id: id.clone(), finished: true, } - .emit_all(&app)?; + .emit(&app)?; Ok(analysis) } diff --git a/src-tauri/src/db/mod.rs b/src-tauri/src/db/mod.rs index 8a6a215f..f6f2fc2d 100644 --- a/src-tauri/src/db/mod.rs +++ b/src-tauri/src/db/mod.rs @@ -32,18 +32,20 @@ use shakmaty::{ fen::Fen, Board, ByColor, Chess, EnPassantMode, FromSetup, Piece, Position, PositionError, }; use specta::Type; -use std::io::{BufWriter, Write}; use std::{ fs::{remove_file, File, OpenOptions}, path::PathBuf, sync::atomic::{AtomicI32, AtomicUsize, Ordering}, time::{Duration, Instant}, }; -use tauri::State; -use tauri::{ - api::path::{resolve_path, BaseDirectory}, - Manager, +use std::{ + io::{BufWriter, Write}, + str::FromStr, }; +use tauri::{path::BaseDirectory, Manager}; +use tauri::{Emitter, State}; + +use log::info; use tauri_specta::Event as _; use self::encoding::encode_move; @@ -51,7 +53,9 @@ use self::encoding::encode_move; pub use self::models::NormalizedGame; pub use self::models::Puzzle; pub use self::schema::puzzles; -pub use self::search::{is_position_in_db, search_position, PositionQuery, PositionStats}; +pub use self::search::{ + is_position_in_db, search_position, PositionQuery, PositionQueryJs, PositionStats, +}; const DATABASE_VERSION: &str = "1.0.0"; @@ -453,7 +457,7 @@ pub async fn convert_pgn( { if i % 1000 == 0 { let elapsed = start.elapsed().as_millis() as u32; - app.emit_all("convert_progress", (i, elapsed)).unwrap(); + app.emit("convert_progress", (i, elapsed)).unwrap(); } game.insert_to_db(db)?; } @@ -490,14 +494,14 @@ pub async fn convert_pgn( Ok(()) } -#[derive(Serialize)] +#[derive(Serialize, Type)] pub struct DatabaseInfo { title: String, description: String, - player_count: usize, - event_count: usize, - game_count: usize, - storage_size: usize, + player_count: i32, + event_count: i32, + game_count: i32, + storage_size: i32, filename: String, indexed: bool, } @@ -515,6 +519,7 @@ fn check_index_exists(conn: &mut SqliteConnection) -> Result { } #[tauri::command] +#[specta::specta] pub async fn get_db_info( file: PathBuf, app: tauri::AppHandle, @@ -522,19 +527,15 @@ pub async fn get_db_info( ) -> Result { let db_path = PathBuf::from("db").join(file); - let path = resolve_path( - &app.config(), - app.package_info(), - &app.env(), - db_path, - Some(BaseDirectory::AppData), - )?; + info!("get_db_info {:?}", db_path); + + let path = app.path().resolve(db_path, BaseDirectory::AppData)?; let db = &mut get_db_or_create(&state, path.to_str().unwrap(), ConnectionOptions::default())?; - let player_count = players::table.count().get_result::(db)? as usize; - let game_count = games::table.count().get_result::(db)? as usize; - let event_count = events::table.count().get_result::(db)? as usize; + let player_count = players::table.count().get_result::(db)? as i32; + let game_count = games::table.count().get_result::(db)? as i32; + let event_count = events::table.count().get_result::(db)? as i32; let title = match info::table .filter(info::name.eq("Title")) @@ -554,7 +555,7 @@ pub async fn get_db_info( _ => "".to_string(), }; - let storage_size = path.metadata()?.len() as usize; + let storage_size = path.metadata()?.len() as i32; let filename = path.file_name().expect("get filename").to_string_lossy(); let is_indexed = check_index_exists(db)?; @@ -571,6 +572,7 @@ pub async fn get_db_info( } #[tauri::command] +#[specta::specta] pub async fn create_indexes(file: PathBuf, state: tauri::State<'_, AppState>) -> Result<(), Error> { let db = &mut get_db_or_create(&state, file.to_str().unwrap(), ConnectionOptions::default())?; @@ -580,6 +582,7 @@ pub async fn create_indexes(file: PathBuf, state: tauri::State<'_, AppState>) -> } #[tauri::command] +#[specta::specta] pub async fn delete_indexes(file: PathBuf, state: tauri::State<'_, AppState>) -> Result<(), Error> { let db = &mut get_db_or_create(&state, file.to_str().unwrap(), ConnectionOptions::default())?; @@ -589,6 +592,7 @@ pub async fn delete_indexes(file: PathBuf, state: tauri::State<'_, AppState>) -> } #[tauri::command] +#[specta::specta] pub async fn edit_db_info( file: PathBuf, title: Option, @@ -621,14 +625,14 @@ pub async fn edit_db_info( Ok(()) } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash, Type)] pub enum Sides { BlackWhite, WhiteBlack, Any, } -#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)] +#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq, Eq, Hash, Type)] pub enum GameSort { #[default] #[serde(rename = "id")] @@ -643,7 +647,7 @@ pub enum GameSort { PlyCount, } -#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)] +#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash, Type)] pub enum SortDirection { #[serde(rename = "asc")] Asc, @@ -652,16 +656,19 @@ pub enum SortDirection { Desc, } -#[derive(Default, Debug, Clone, Deserialize, PartialEq, Eq, Hash)] +#[derive(Default, Debug, Clone, Deserialize, PartialEq, Eq, Hash, Type)] +#[serde(rename_all = "camelCase")] pub struct QueryOptions { pub skip_count: bool, - pub page: Option, - pub page_size: Option, + #[specta(optional)] + pub page: Option, + #[specta(optional)] + pub page_size: Option, pub sort: SortT, pub direction: SortDirection, } -#[derive(Debug, Clone, Deserialize, Default, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Default, PartialEq, Eq, Hash)] pub struct GameQuery { pub options: Option>, pub player1: Option, @@ -676,26 +683,53 @@ pub struct GameQuery { pub position: Option, } -impl GameQuery { +#[derive(Debug, Clone, Default, Deserialize, PartialEq, Eq, Hash, Type)] +pub struct GameQueryJs { + #[specta(optional)] + pub options: Option>, + #[specta(optional)] + pub player1: Option, + #[specta(optional)] + pub player2: Option, + #[specta(optional)] + pub tournament_id: Option, + #[specta(optional)] + pub start_date: Option, + #[specta(optional)] + pub end_date: Option, + #[specta(optional)] + pub range1: Option<(i32, i32)>, + #[specta(optional)] + pub range2: Option<(i32, i32)>, + #[specta(optional)] + pub sides: Option, + #[specta(optional)] + pub outcome: Option, + #[specta(optional)] + pub position: Option, +} + +impl GameQueryJs { pub fn new() -> Self { Self::default() } - pub fn position(mut self, position: PositionQuery) -> Self { + pub fn position(mut self, position: PositionQueryJs) -> Self { self.position = Some(position); self } } -#[derive(Debug, Clone, Serialize)] +#[derive(Debug, Clone, Serialize, Type)] pub struct QueryResponse { pub data: T, - pub count: Option, + pub count: Option, } #[tauri::command] +#[specta::specta] pub async fn get_games( file: PathBuf, - query: GameQuery, + query: GameQueryJs, state: tauri::State<'_, AppState>, ) -> Result>, Error> { let db = &mut get_db_or_create(&state, file.to_str().unwrap(), ConnectionOptions::default())?; @@ -738,11 +772,11 @@ pub async fn get_games( } if let Some(limit) = query_options.page_size { - sql_query = sql_query.limit(limit); + sql_query = sql_query.limit(limit as i64); } if let Some(page) = query_options.page { - sql_query = sql_query.offset((page - 1) * query_options.page_size.unwrap_or(10)); + sql_query = sql_query.offset(((page - 1) * query_options.page_size.unwrap_or(10)) as i64); } match query.sides { @@ -889,7 +923,7 @@ pub async fn get_games( Ok(QueryResponse { data: normalized_games, - count, + count: count.map(|c| c as i32), }) } @@ -917,11 +951,9 @@ fn normalize_games(games: Vec<(Game, Player, Player, Event, Site)>) -> Vec) -> Vec, + #[specta(optional)] pub name: Option, + #[specta(optional)] pub range: Option<(i32, i32)>, } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize, Type)] pub enum PlayerSort { #[serde(rename = "id")] Id, @@ -963,13 +997,14 @@ pub async fn get_player( } #[tauri::command] +#[specta::specta] pub async fn get_players( file: PathBuf, query: PlayerQuery, state: tauri::State<'_, AppState>, ) -> Result>, Error> { let db = &mut get_db_or_create(&state, file.to_str().unwrap(), ConnectionOptions::default())?; - let mut count = None; + let mut count: Option = None; let mut sql_query = players::table.into_boxed(); let mut count_query = players::table.into_boxed(); @@ -991,11 +1026,11 @@ pub async fn get_players( } if let Some(limit) = query.options.page_size { - sql_query = sql_query.limit(limit); + sql_query = sql_query.limit(limit as i64); } if let Some(page) = query.options.page { - sql_query = sql_query.offset((page - 1) * query.options.page_size.unwrap_or(10)); + sql_query = sql_query.offset(((page - 1) * query.options.page_size.unwrap_or(10)) as i64); } sql_query = match query.options.sort { @@ -1017,11 +1052,11 @@ pub async fn get_players( Ok(QueryResponse { data: players, - count, + count: count.map(|c| c as i32), }) } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize, Type)] pub enum TournamentSort { #[serde(rename = "id")] Id, @@ -1029,20 +1064,21 @@ pub enum TournamentSort { Name, } -#[derive(Debug, Clone, Deserialize)] +#[derive(Debug, Clone, Deserialize, Type)] pub struct TournamentQuery { pub options: QueryOptions, pub name: Option, } #[tauri::command] +#[specta::specta] pub async fn get_tournaments( file: PathBuf, query: TournamentQuery, state: tauri::State<'_, AppState>, ) -> Result>, Error> { let db = &mut get_db_or_create(&state, file.to_str().unwrap(), ConnectionOptions::default())?; - let mut count = None; + let mut count: Option = None; let mut sql_query = events::table.into_boxed(); let mut count_query = events::table.into_boxed(); @@ -1059,11 +1095,11 @@ pub async fn get_tournaments( } if let Some(limit) = query.options.page_size { - sql_query = sql_query.limit(limit); + sql_query = sql_query.limit(limit as i64); } if let Some(page) = query.options.page { - sql_query = sql_query.offset((page - 1) * query.options.page_size.unwrap_or(10)); + sql_query = sql_query.offset(((page - 1) * query.options.page_size.unwrap_or(10)) as i64); } sql_query = match query.options.sort { @@ -1081,7 +1117,7 @@ pub async fn get_tournaments( Ok(QueryResponse { data: events, - count, + count: count.map(|c| c as i32), }) } @@ -1267,7 +1303,7 @@ pub async fn get_players_game_info( id: id.to_string(), progress: (p as f64 / info.len() as f64) * 100_f64, } - .emit_all(&app); + .emit(&app); } }, ); @@ -1307,6 +1343,7 @@ pub async fn get_players_game_info( } #[tauri::command] +#[specta::specta] pub async fn delete_database( file: PathBuf, state: tauri::State<'_, AppState>, @@ -1321,6 +1358,7 @@ pub async fn delete_database( } #[tauri::command] +#[specta::specta] pub async fn delete_duplicated_games( file: PathBuf, state: tauri::State<'_, AppState>, @@ -1346,6 +1384,7 @@ pub async fn delete_duplicated_games( } #[tauri::command] +#[specta::specta] pub async fn delete_empty_games( file: PathBuf, state: tauri::State<'_, AppState>, @@ -1441,6 +1480,7 @@ impl PgnGame { } #[tauri::command] +#[specta::specta] pub async fn export_to_pgn( file: PathBuf, dest_file: PathBuf, @@ -1499,6 +1539,7 @@ pub async fn export_to_pgn( } #[tauri::command] +#[specta::specta] pub async fn delete_db_game( file: PathBuf, game_id: i32, @@ -1557,6 +1598,7 @@ pub async fn merge_players( } #[tauri::command] +#[specta::specta] pub fn clear_games(state: tauri::State<'_, AppState>) { let mut state = state.db_cache.lock().unwrap(); state.clear(); diff --git a/src-tauri/src/db/models.rs b/src-tauri/src/db/models.rs index ed0b0afd..2d06a2ad 100644 --- a/src-tauri/src/db/models.rs +++ b/src-tauri/src/db/models.rs @@ -1,3 +1,5 @@ +use std::str::FromStr; + use diesel::prelude::*; use serde::{Deserialize, Serialize}; use specta::Type; @@ -95,7 +97,7 @@ pub struct NewSite<'a> { pub name: &'a str, } -#[derive(Default, Debug, Queryable, Serialize, Deserialize, Identifiable, Clone)] +#[derive(Default, Debug, Queryable, Serialize, Deserialize, Identifiable, Clone, Type)] pub struct Event { pub id: i32, pub name: Option, @@ -113,7 +115,34 @@ pub struct Info { pub value: Option, } -#[derive(Serialize, Deserialize, Clone)] +#[derive(Serialize, Deserialize, Clone, Default, Type, Eq, PartialEq, Hash)] +pub enum Outcome { + #[serde(rename = "1-0")] + WhiteWin, + #[serde(rename = "0-1")] + BlackWin, + #[serde(rename = "1/2-1/2")] + Draw, + #[serde(rename = "*")] + #[default] + Unknown, +} + +impl FromStr for Outcome { + type Err = String; + + fn from_str(s: &str) -> Result { + match s { + "1-0" => Ok(Outcome::WhiteWin), + "0-1" => Ok(Outcome::BlackWin), + "1/2-1/2" => Ok(Outcome::Draw), + "*" => Ok(Outcome::Unknown), + _ => Err(format!("Invalid outcome: {}", s)), + } + } +} + +#[derive(Serialize, Deserialize, Clone, Type)] pub struct NormalizedGame { pub id: i32, pub fen: String, @@ -121,20 +150,26 @@ pub struct NormalizedGame { pub event_id: i32, pub site: String, pub site_id: i32, + #[specta(optional)] pub date: Option, + #[specta(optional)] pub time: Option, + #[specta(optional)] pub round: Option, pub white: String, pub white_id: i32, + #[specta(optional)] pub white_elo: Option, pub black: String, pub black_id: i32, + #[specta(optional)] pub black_elo: Option, - pub result: Option, + pub result: Outcome, + #[specta(optional)] pub time_control: Option, + #[specta(optional)] pub eco: Option, + #[specta(optional)] pub ply_count: Option, - pub white_material: i32, - pub black_material: i32, pub moves: String, } diff --git a/src-tauri/src/db/search.rs b/src-tauri/src/db/search.rs index 8c87b8f5..a8ae5419 100644 --- a/src-tauri/src/db/search.rs +++ b/src-tauri/src/db/search.rs @@ -4,6 +4,7 @@ use log::info; use rayon::prelude::*; use serde::{Deserialize, Serialize}; use shakmaty::{fen::Fen, san::SanPlus, Bitboard, ByColor, Chess, FromSetup, Position, Setup}; +use specta::Type; use std::{ path::PathBuf, sync::{ @@ -12,7 +13,7 @@ use std::{ }, time::Instant, }; -use tauri::Manager; +use tauri::Emitter; use crate::{ db::{ @@ -23,7 +24,7 @@ use crate::{ AppState, }; -use super::GameQuery; +use super::GameQueryJs; #[derive(Debug, Hash, PartialEq, Eq, Clone)] pub struct ExactData { @@ -69,34 +70,17 @@ impl PositionQuery { } } -impl<'de> Deserialize<'de> for PositionQuery { - fn deserialize(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - let value = serde_json::Value::deserialize(deserializer)?; - match value { - serde_json::Value::Object(map) => { - let type_ = map - .get("type") - .ok_or(serde::de::Error::custom("Missing type"))?; - let value = map - .get("fen") - .ok_or(serde::de::Error::custom("Missing fen"))?; - match type_.as_str().unwrap() { - "exact" => { - let fen = value.as_str().unwrap(); - PositionQuery::exact_from_fen(fen).map_err(serde::de::Error::custom) - } - "partial" => { - let fen = value.as_str().unwrap(); - PositionQuery::partial_from_fen(fen).map_err(serde::de::Error::custom) - } - _ => Err(serde::de::Error::custom("Invalid key")), - } - } - _ => Err(serde::de::Error::custom("Invalid value")), - } +#[derive(Debug, Clone, Deserialize, Type, PartialEq, Eq, Hash)] +pub struct PositionQueryJs { + pub fen: String, + pub type_: String, +} + +fn convert_position_query(query: PositionQueryJs) -> Result { + match query.type_.as_str() { + "exact" => PositionQuery::exact_from_fen(&query.fen), + "partial" => PositionQuery::partial_from_fen(&query.fen), + _ => unreachable!(), } } @@ -158,7 +142,7 @@ fn is_contained(container: Bitboard, subset: Bitboard) -> bool { container & subset == subset } -#[derive(Debug, Serialize, Deserialize, Clone)] +#[derive(Debug, Serialize, Deserialize, Clone, Type)] pub struct PositionStats { #[serde(rename = "move")] pub move_: String, @@ -215,9 +199,10 @@ pub struct ProgressPayload { } #[tauri::command] +#[specta::specta] pub async fn search_position( file: PathBuf, - query: GameQuery, + query: GameQueryJs, app: tauri::AppHandle, tab_id: String, state: tauri::State<'_, AppState>, @@ -285,7 +270,7 @@ pub async fn search_position( let index = processed.load(Ordering::Relaxed); if (index + 1) % 10000 == 0 { info!("{} games processed: {:?}", index + 1, start.elapsed()); - app.emit_all( + app.emit( "search_progress", ProgressPayload { progress: (index as f64 / games.len() as f64) * 100.0, @@ -325,8 +310,10 @@ pub async fn search_position( } if let Some(position_query) = &query.position { + let position_query = + convert_position_query(position_query.clone()).expect("Invalid position query"); if position_query.can_reach(&end_material, *end_pawn_home as u16) { - if let Ok(Some(m)) = get_move_after_match(game, fen, position_query) { + if let Ok(Some(m)) = get_move_after_match(game, fen, &position_query) { if sample_games.lock().unwrap().len() < 10 { sample_games.lock().unwrap().push(*id); } @@ -392,7 +379,7 @@ pub async fn search_position( pub async fn is_position_in_db( file: PathBuf, - query: GameQuery, + query: GameQueryJs, state: tauri::State<'_, AppState>, ) -> Result { let db = &mut get_db_or_create(&state, file.to_str().unwrap(), ConnectionOptions::default())?; @@ -448,8 +435,10 @@ pub async fn is_position_in_db( black: *black_material as u8, }; if let Some(position_query) = &query.position { + let position_query = + convert_position_query(position_query.clone()).expect("Invalid position query"); position_query.can_reach(&end_material, *end_pawn_home as u16) - && get_move_after_match(game, fen, position_query) + && get_move_after_match(game, fen, &position_query) .unwrap_or(None) .is_some() } else { diff --git a/src-tauri/src/error.rs b/src-tauri/src/error.rs index 90fcdcb4..da27ae74 100644 --- a/src-tauri/src/error.rs +++ b/src-tauri/src/error.rs @@ -25,7 +25,7 @@ pub enum Error { Tauri(#[from] tauri::Error), #[error(transparent)] - TauriApi(#[from] tauri::api::Error), + TauriShell(#[from] tauri_plugin_shell::Error), #[error(transparent)] Reqwest(#[from] reqwest::Error), @@ -98,7 +98,10 @@ impl serde::Serialize for Error { } impl Type for Error { - fn inline(_type_map: &mut specta::TypeMap, _generics: &[specta::DataType]) -> specta::DataType { - specta::DataType::Primitive(specta::PrimitiveType::String) + fn inline( + _type_map: &mut specta::TypeMap, + _generics: specta::Generics, + ) -> specta::datatype::DataType { + specta::datatype::DataType::Primitive(specta::datatype::PrimitiveType::String) } } diff --git a/src-tauri/src/fide.rs b/src-tauri/src/fide.rs index d0093a0f..14093f69 100644 --- a/src-tauri/src/fide.rs +++ b/src-tauri/src/fide.rs @@ -8,10 +8,7 @@ use quick_xml::de::from_reader; use serde::{Deserialize, Deserializer, Serialize}; use specta::Type; use strsim::{jaro_winkler, sorensen_dice}; -use tauri::{ - api::path::{app_config_dir, resolve_path, BaseDirectory}, - Manager, -}; +use tauri::{path::BaseDirectory, Manager}; use tauri_specta::Event; use crate::{error::Error, fs::DownloadProgress}; @@ -81,22 +78,17 @@ pub struct PlayersList { } #[tauri::command] +#[specta::specta] pub async fn download_fide_db( state: tauri::State<'_, AppState>, app: tauri::AppHandle, ) -> Result<(), Error> { - let fide_path = resolve_path( - &app.config(), - app.package_info(), - &app.env(), - "fide.bin", - Some(BaseDirectory::AppData), - )?; + let fide_path = app.path().resolve("fide.bin", BaseDirectory::AppData)?; download_file( "fide_db".to_string(), "http://ratings.fide.com/download/players_list_xml.zip".to_string(), - app_config_dir(&app.config()).unwrap(), + app.path().config_dir().unwrap(), app.clone(), None, Some(false), @@ -104,13 +96,9 @@ pub async fn download_fide_db( ) .await?; - let xml_path = resolve_path( - &app.config(), - app.package_info(), - &app.env(), - "players_list_xml_foa.xml", - Some(BaseDirectory::AppData), - )?; + let xml_path = app + .path() + .resolve("players_list_xml_foa.xml", BaseDirectory::AppData)?; let reader = BufReader::new(File::open(&xml_path)?); let players_list: PlayersList = from_reader(reader)?; @@ -126,7 +114,7 @@ pub async fn download_fide_db( id: "fide_db".to_string(), finished: true, } - .emit_all(&app)?; + .emit(&app)?; remove_file(&xml_path)?; @@ -145,13 +133,7 @@ pub async fn find_fide_player( if fide_players.is_empty() { drop(fide_players); let config = config::standard(); - let fide_path = resolve_path( - &app.config(), - app.package_info(), - &app.env(), - "fide.bin", - Some(BaseDirectory::AppData), - )?; + let fide_path = app.path().resolve("fide.bin", BaseDirectory::AppData)?; if let Ok(f) = File::open(&fide_path) { let mut fide_players = state.fide_players.write().await; diff --git a/src-tauri/src/fs.rs b/src-tauri/src/fs.rs index 18ef56d4..b71a3e7f 100644 --- a/src-tauri/src/fs.rs +++ b/src-tauri/src/fs.rs @@ -24,6 +24,7 @@ pub struct DownloadProgress { } #[tauri::command] +#[specta::specta] pub async fn download_file( id: String, url: String, @@ -67,7 +68,7 @@ pub async fn download_file( id: id.clone(), finished: false, } - .emit_all(&app)?; + .emit(&app)?; } } @@ -90,7 +91,7 @@ pub async fn download_file( id, finished: true, } - .emit_all(&app)?; + .emit(&app)?; } // remove_file(&path).await; Ok(()) @@ -128,6 +129,7 @@ pub async fn unzip_file(path: &Path, file: Vec) -> Result<(), Error> { } #[tauri::command] +#[specta::specta] pub async fn set_file_as_executable(_path: String) -> Result<(), Error> { #[cfg(unix)] { @@ -140,13 +142,6 @@ pub async fn set_file_as_executable(_path: String) -> Result<(), Error> { Ok(()) } -#[tauri::command] -pub async fn append_to_file(path: String, text: String) -> Result<(), Error> { - let mut file = std::fs::OpenOptions::new().append(true).open(path)?; - file.write_all(text.as_bytes())?; - Ok(()) -} - #[tauri::command] #[specta::specta] pub async fn file_exists(path: String) -> Result { diff --git a/src-tauri/src/lexer.rs b/src-tauri/src/lexer.rs index 4c61cd0b..8c75475f 100644 --- a/src-tauri/src/lexer.rs +++ b/src-tauri/src/lexer.rs @@ -1,5 +1,6 @@ use pgn_reader::{BufferedReader, Nag, RawHeader, SanPlus, Skip, Visitor}; use serde::Serialize; +use specta::Type; use crate::error::Error; @@ -7,7 +8,7 @@ struct Lexer { tokens: Vec, } -#[derive(Serialize, Clone)] +#[derive(Serialize, Clone, Type)] #[serde(tag = "type", content = "value")] pub enum Token { ParenOpen, @@ -63,6 +64,7 @@ impl Visitor for Lexer { } #[tauri::command] +#[specta::specta] pub async fn lex_pgn(pgn: String) -> Result, Error> { let mut reader = BufferedReader::new(pgn.as_bytes()); diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 1fccb656..71e22c6f 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -20,19 +20,16 @@ use std::{fs::create_dir_all, path::Path}; use chess::{BestMovesPayload, EngineProcess, ReportProgress}; use dashmap::DashMap; -use db::{DatabaseProgress, GameQuery, NormalizedGame, PositionStats}; +use db::{DatabaseProgress, GameQueryJs, NormalizedGame, PositionStats}; use derivative::Derivative; use fide::FidePlayer; use log::LevelFilter; use oauth::AuthState; -use specta::ts::{BigIntExportBehavior, ExportConfig}; +use specta_typescript::{BigIntExportBehavior, Typescript}; use sysinfo::SystemExt; -use tauri::{ - api::path::{resolve_path, BaseDirectory}, - Manager, Window, -}; -use tauri::{CustomMenuItem, Menu, MenuItem, Submenu}; -use tauri_plugin_log::LogTarget; +use tauri::path::BaseDirectory; +use tauri::{Manager, Window}; +use tauri_plugin_log::{Target, TargetKind}; use crate::chess::{ analyze_game, get_engine_config, get_engine_logs, kill_engine, kill_engines, stop_engine, @@ -43,7 +40,7 @@ use crate::db::{ search_position, }; use crate::fide::{download_fide_db, find_fide_player}; -use crate::fs::{append_to_file, set_file_as_executable, DownloadProgress}; +use crate::fs::{set_file_as_executable, DownloadProgress}; use crate::lexer::lex_pgn; use crate::oauth::authenticate; use crate::pgn::{count_pgn_games, delete_game, read_games, write_game}; @@ -58,9 +55,6 @@ use crate::{ }; use tokio::sync::{RwLock, Semaphore}; -#[cfg(any(windows, target_os = "macos"))] -use window_shadows::set_shadow; - pub type GameData = ( i32, i32, @@ -81,7 +75,7 @@ pub struct AppState { String, diesel::r2d2::Pool>, >, - line_cache: DashMap<(GameQuery, PathBuf), (Vec, Vec)>, + line_cache: DashMap<(GameQueryJs, PathBuf), (Vec, Vec)>, db_cache: Mutex>, #[derivative(Default(value = "Arc::new(Semaphore::new(2))"))] new_request: Arc, @@ -107,129 +101,109 @@ const REQUIRED_FILES: &[(BaseDirectory, &str, &str)] = #[specta::specta] async fn close_splashscreen(window: Window) -> Result<(), String> { window - .get_window("main") - .expect("no window labeled 'main' found") - .maximize() - .unwrap(); - window - .get_window("main") + .get_webview_window("main") .expect("no window labeled 'main' found") .show() .unwrap(); Ok(()) } -#[cfg(debug_assertions)] -const LOG_TARGETS: [LogTarget; 2] = [LogTarget::Stdout, LogTarget::Webview]; - -#[cfg(not(debug_assertions))] -const LOG_TARGETS: [LogTarget; 2] = [LogTarget::Stdout, LogTarget::LogDir]; - fn main() { - let specta_builder = { - let specta_builder = tauri_specta::ts::builder() - .config(ExportConfig::new().bigint(BigIntExportBehavior::BigInt)) - .commands(tauri_specta::collect_commands!( - close_splashscreen, - find_fide_player, - get_best_moves, - analyze_game, - stop_engine, - kill_engine, - kill_engines, - get_engine_logs, - memory_size, - get_puzzle, - set_menu_visisble, - is_menu_visisble, - get_opening_from_fen, - get_opening_from_name, - get_players_game_info, - get_engine_config, - file_exists, - get_file_metadata, - merge_players, - convert_pgn, - get_player, - )) - .events(tauri_specta::collect_events!( - BestMovesPayload, - DatabaseProgress, - DownloadProgress, - ReportProgress - )); - - #[cfg(debug_assertions)] - let specta_builder = specta_builder.path("../src/bindings/generated.ts"); - specta_builder.into_plugin() - }; - - let menu = Menu::new() - .add_submenu(Submenu::new( - "File", - Menu::new() - .add_item(CustomMenuItem::new("new_tab".to_string(), "New tab")) - .add_item(CustomMenuItem::new("open_file".to_string(), "Open file")) - .add_native_item(MenuItem::Quit), - )) - .add_submenu(Submenu::new( - "Edit", - Menu::new() - .add_native_item(MenuItem::Undo) - .add_native_item(MenuItem::Redo) - .add_native_item(MenuItem::Separator) - .add_native_item(MenuItem::Cut) - .add_native_item(MenuItem::Copy) - .add_native_item(MenuItem::Paste) - .add_native_item(MenuItem::SelectAll), - )) - .add_submenu(Submenu::new( - "View", - Menu::new() - .add_item(CustomMenuItem::new("reload".to_string(), "Reload")) - .add_native_item(MenuItem::EnterFullScreen) - .add_native_item(MenuItem::Minimize), + let specta_builder = tauri_specta::Builder::new() + .commands(tauri_specta::collect_commands!( + close_splashscreen, + find_fide_player, + get_best_moves, + analyze_game, + stop_engine, + kill_engine, + kill_engines, + get_engine_logs, + memory_size, + get_puzzle, + search_opening_name, + get_opening_from_fen, + get_opening_from_name, + get_players_game_info, + get_engine_config, + file_exists, + get_file_metadata, + merge_players, + convert_pgn, + get_player, + count_pgn_games, + read_games, + lex_pgn, + is_bmi2_compatible, + delete_game, + delete_duplicated_games, + delete_empty_games, + clear_games, + set_file_as_executable, + delete_indexes, + create_indexes, + edit_db_info, + delete_db_game, + delete_database, + export_to_pgn, + authenticate, + write_game, + download_fide_db, + download_file, + get_tournaments, + get_db_info, + get_games, + search_position, + get_players, + get_puzzle_db_info )) - .add_submenu(Submenu::new( - "Help", - Menu::new() - .add_item(CustomMenuItem::new( - "documentation".to_string(), - "Documentation", - )) - .add_item(CustomMenuItem::new( - "clear_saved_data".to_string(), - "Clear saved data", - )) - .add_item(CustomMenuItem::new("open_logs".to_string(), "Open logs")) - .add_item(CustomMenuItem::new( - "check_for_updates".to_string(), - "Check for updates", - )) - .add_item(CustomMenuItem::new("about".to_string(), "About")), + .events(tauri_specta::collect_events!( + BestMovesPayload, + DatabaseProgress, + DownloadProgress, + ReportProgress )); + #[cfg(debug_assertions)] + specta_builder + .export( + Typescript::default().bigint(BigIntExportBehavior::BigInt), + "../src/bindings/generated.ts", + ) + .expect("Failed to export types"); + + #[cfg(debug_assertions)] + let log_targets = [TargetKind::Stdout, TargetKind::Webview]; + + #[cfg(not(debug_assertions))] + let log_targets = [ + TargetKind::Stdout, + TargetKind::LogDir { + file_name: Some(String::from("en-croissant.log")), + }, + ]; + tauri::Builder::default() - .menu(menu) + .plugin(tauri_plugin_window_state::Builder::new().build()) + .plugin(tauri_plugin_process::init()) .plugin( tauri_plugin_log::Builder::default() - .targets(LOG_TARGETS) + .targets(log_targets.map(Target::new)) .level(LevelFilter::Info) .build(), ) - .plugin(specta_builder) - .setup(|app| { + .invoke_handler(specta_builder.invoke_handler()) + .plugin(tauri_plugin_shell::init()) + .plugin(tauri_plugin_http::init()) + .plugin(tauri_plugin_fs::init()) + .plugin(tauri_plugin_dialog::init()) + .plugin(tauri_plugin_os::init()) + .setup(move |app| { log::info!("Setting up application"); log::info!("Checking for required directories"); for (dir, path) in REQUIRED_DIRS.iter() { - let path = resolve_path( - &app.config(), - app.package_info(), - &app.env(), - path, - Some(*dir), - ); + let path = app.path().resolve(path, *dir); if let Ok(path) = path { if !Path::new(&path).exists() { log::info!("Creating directory {}", path.to_string_lossy()); @@ -240,60 +214,36 @@ fn main() { log::info!("Checking for required files"); for (dir, path, contents) in REQUIRED_FILES.iter() { - let path = resolve_path( - &app.config(), - app.package_info(), - &app.env(), - path, - Some(*dir), - ) - .unwrap(); + let path = app.path().resolve(path, *dir).unwrap(); if !Path::new(&path).exists() { log::info!("Creating file {}", path.to_string_lossy()); std::fs::write(&path, contents).unwrap(); } } - #[cfg(any(windows, target_os = "macos"))] - set_shadow(&app.get_window("main").unwrap(), true).unwrap(); + // #[cfg(any(windows, target_os = "macos"))] + // set_shadow(&app.get_webview_window("main").unwrap(), true).unwrap(); + + specta_builder.mount_events(app); + + #[cfg(desktop)] + app.handle().plugin(tauri_plugin_cli::init())?; + + #[cfg(desktop)] + app.handle() + .plugin(tauri_plugin_updater::Builder::new().build())?; + + log::info!("Finished rust initialization"); Ok(()) }) .manage(AppState::default()) - .invoke_handler(tauri::generate_handler![ - download_file, - get_games, - get_players, - get_tournaments, - get_db_info, - get_puzzle_db_info, - edit_db_info, - delete_duplicated_games, - authenticate, - delete_database, - search_position, - is_bmi2_compatible, - clear_games, - set_file_as_executable, - count_pgn_games, - read_games, - append_to_file, - delete_game, - write_game, - delete_indexes, - create_indexes, - lex_pgn, - download_fide_db, - search_opening_name, - delete_db_game, - delete_empty_games, - export_to_pgn - ]) .run(tauri::generate_context!()) .expect("error while running tauri application"); } #[tauri::command] +#[specta::specta] fn is_bmi2_compatible() -> bool { #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] if is_x86_feature_detected!("bmi2") { @@ -302,25 +252,6 @@ fn is_bmi2_compatible() -> bool { false } -#[tauri::command] -#[specta::specta] -async fn is_menu_visisble(window: tauri::Window) -> bool { - window.menu_handle().is_visible().unwrap() -} - -#[tauri::command] -#[specta::specta] -async fn set_menu_visisble(state: bool, window: tauri::Window) { - let menu = window.menu_handle(); - if state { - menu.show().unwrap(); - window.set_decorations(true).unwrap(); - } else { - menu.hide().unwrap(); - window.set_decorations(false).unwrap(); - } -} - #[tauri::command] #[specta::specta] fn memory_size() -> u32 { diff --git a/src-tauri/src/oauth.rs b/src-tauri/src/oauth.rs index 0d489e3a..429c4de4 100644 --- a/src-tauri/src/oauth.rs +++ b/src-tauri/src/oauth.rs @@ -9,7 +9,8 @@ use std::{ net::{SocketAddr, TcpListener}, sync::Arc, }; -use tauri::Manager; +use tauri::{Emitter, Manager}; +use tauri_plugin_shell::ShellExt; use crate::{error::Error, AppState}; @@ -56,6 +57,7 @@ impl Default for AuthState { } #[tauri::command] +#[specta::specta] pub async fn authenticate( username: String, state: tauri::State<'_, AppState>, @@ -70,7 +72,7 @@ pub async fn authenticate( .add_extra_param("username", username) .set_pkce_challenge(state.auth.pkce.0.clone()) .url(); - tauri::api::shell::open(&app.shell_scope(), auth_url, None)?; + app.shell().open(auth_url, None)?; let _server_handle = tauri::async_runtime::spawn(async move { run_server(app).await }); Ok(()) } @@ -101,7 +103,7 @@ async fn authorize( .unwrap(); let access_token = token.access_token().secret(); - app.emit_all("access_token", access_token).unwrap(); + app.emit("access_token", access_token).unwrap(); "authorized".to_string() } diff --git a/src-tauri/src/opening.rs b/src-tauri/src/opening.rs index ff4f5642..05e0d98d 100644 --- a/src-tauri/src/opening.rs +++ b/src-tauri/src/opening.rs @@ -3,27 +3,23 @@ use serde::{ser::SerializeStruct, Deserialize, Serialize}; use shakmaty::{fen::Fen, san::San, Chess, EnPassantMode, Position, Setup}; use lazy_static::lazy_static; +use specta::{specta, Type}; use strsim::{jaro_winkler, sorensen_dice}; use crate::error::Error; #[derive(Debug, Clone)] -pub struct Opening { +struct Opening { eco: String, name: String, setup: Setup, pgn: Option, } -impl Serialize for Opening { - fn serialize(&self, serializer: S) -> Result { - let mut state = serializer.serialize_struct("Opening", 3)?; - state.serialize_field("eco", &self.eco)?; - state.serialize_field("name", &self.name)?; - let fen = Fen::from_setup(self.setup.clone()).to_string(); - state.serialize_field("fen", &fen)?; - state.end() - } +#[derive(Debug, Clone, Type, Serialize)] +pub struct OutOpening { + name: String, + fen: String, } #[derive(Deserialize)] @@ -75,7 +71,8 @@ pub fn get_opening_from_setup(setup: Setup) -> Result { } #[tauri::command] -pub async fn search_opening_name(query: String) -> Result, Error> { +#[specta::specta] +pub async fn search_opening_name(query: String) -> Result, Error> { let lower_query = query.to_lowercase(); let scores = OPENINGS .iter() @@ -98,6 +95,10 @@ pub async fn search_opening_name(query: String) -> Result, Error> { .iter() .map(|(o, _)| o.clone()) .take(15) + .map(|o| OutOpening { + name: o.name, + fen: Fen::from_setup(o.setup.clone()).to_string(), + }) .collect(); Ok(best_matches_names) } diff --git a/src-tauri/src/pgn.rs b/src-tauri/src/pgn.rs index bf1dba20..aa158da3 100644 --- a/src-tauri/src/pgn.rs +++ b/src-tauri/src/pgn.rs @@ -121,10 +121,11 @@ fn ignore_bom(reader: &mut BufReader) -> io::Result { } #[tauri::command] +#[specta::specta] pub async fn count_pgn_games( file: PathBuf, state: tauri::State<'_, AppState>, -) -> Result { +) -> Result { let files_string = file.to_string_lossy().to_string(); let file = File::open(&file)?; @@ -140,7 +141,7 @@ pub async fn count_pgn_games( break; } count += 1; - if count % GAME_OFFSET_FREQ == 0 { + if count % GAME_OFFSET_FREQ as i32 == 0 { let cur_pos = parser.position()?; offsets.push(cur_pos); } @@ -151,19 +152,20 @@ pub async fn count_pgn_games( } #[tauri::command] +#[specta::specta] pub async fn read_games( file: PathBuf, - start: usize, - end: usize, + start: i32, + end: i32, state: tauri::State<'_, AppState>, ) -> Result, Error> { let file_r = File::open(&file)?; let mut parser = PgnParser::new(file_r.try_clone()?); - parser.offset_by_index(start, &state, &file.to_string_lossy().to_string())?; + parser.offset_by_index(start as usize, &state, &file.to_string_lossy().to_string())?; - let mut games: Vec = Vec::with_capacity(end - start); + let mut games: Vec = Vec::with_capacity((end - start) as usize); for _ in start..=end { let game = parser.read_game()?; @@ -176,16 +178,17 @@ pub async fn read_games( } #[tauri::command] +#[specta::specta] pub async fn delete_game( file: PathBuf, - n: usize, + n: i32, state: tauri::State<'_, AppState>, ) -> Result<(), Error> { let file_r = File::open(&file)?; let mut parser = PgnParser::new(file_r.try_clone()?); - parser.offset_by_index(n, &state, &file.to_string_lossy().to_string())?; + parser.offset_by_index(n as usize, &state, &file.to_string_lossy().to_string())?; let starting_bytes = parser.position()?; @@ -207,9 +210,10 @@ fn write_to_end(reader: &mut R, writer: &mut File) -> io::Result<()> { } #[tauri::command] +#[specta::specta] pub async fn write_game( file: PathBuf, - n: usize, + n: i32, pgn: String, state: tauri::State<'_, AppState>, ) -> Result<(), Error> { @@ -225,7 +229,7 @@ pub async fn write_game( let mut parser = PgnParser::new(file_r.try_clone()?); - parser.offset_by_index(n, &state, &file.to_string_lossy().to_string())?; + parser.offset_by_index(n as usize, &state, &file.to_string_lossy().to_string())?; tmpf.seek(SeekFrom::Start(parser.position()?))?; tmpf.write_all(pgn.as_bytes())?; diff --git a/src-tauri/src/puzzle.rs b/src-tauri/src/puzzle.rs index 041a4549..8d7730de 100644 --- a/src-tauri/src/puzzle.rs +++ b/src-tauri/src/puzzle.rs @@ -3,10 +3,8 @@ use std::{collections::VecDeque, path::PathBuf, sync::Mutex}; use diesel::{dsl::sql, sql_types::Bool, Connection, ExpressionMethods, QueryDsl, RunQueryDsl}; use once_cell::sync::Lazy; use serde::Serialize; -use tauri::{ - api::path::{resolve_path, BaseDirectory}, - Manager, -}; +use specta::Type; +use tauri::{path::BaseDirectory, Manager}; use crate::{ db::{puzzles, Puzzle}, @@ -31,12 +29,7 @@ impl PuzzleCache { } } - fn get_puzzles( - &mut self, - file: &str, - min_rating: u16, - max_rating: u16, - ) -> Result<(), Error> { + fn get_puzzles(&mut self, file: &str, min_rating: u16, max_rating: u16) -> Result<(), Error> { if self.cache.is_empty() || self.min_rating != min_rating || self.max_rating != max_rating @@ -81,36 +74,32 @@ pub fn get_puzzle(file: String, min_rating: u16, max_rating: u16) -> Result Result { let db_path = PathBuf::from("puzzles").join(file); - let path = resolve_path( - &app.config(), - app.package_info(), - &app.env(), - db_path, - Some(BaseDirectory::AppData), - )?; + let path = app.path().resolve(db_path, BaseDirectory::AppData)?; let mut db = diesel::SqliteConnection::establish(&path.to_string_lossy()).expect("open database"); - let puzzle_count = puzzles::table.count().get_result::(&mut db)? as usize; + let puzzle_count = puzzles::table.count().get_result::(&mut db)? as i32; - let storage_size = path.metadata()?.len() as usize; + let storage_size = path.metadata()?.len() as i32; let filename = path.file_name().expect("get filename").to_string_lossy(); Ok(PuzzleDatabaseInfo { diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 6de7f915..4e47ba3d 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,119 +1,86 @@ { - "package": { - "productName": "en-croissant" - }, - "build": { - "beforeDevCommand": "pnpm start-vite", - "beforeBuildCommand": "pnpm build-vite", - "devPath": "http://localhost:1420", - "distDir": "../dist", - "withGlobalTauri": false - }, - "tauri": { - "allowlist": { - "all": true, - "protocol": { - "all": false, - "asset": true, - "assetScope": [ - "**" - ] - }, - "fs": { - "all": true, - "scope": [ - "$APPDATA/**", - "$DOCUMENT/**", - "**" - ] - }, - "http": { - "scope": [ - "https://www.encroissant.org/**", - "https://api.chess.com/**", - "https://www.chess.com/**", - "https://lichess.org/**", - "https://explorer.lichess.ovh/**", - "https://tablebase.lichess.ovh/**", - "https://www.chessdb.cn/**" - ] - }, - "window": { - "all": false, - "close": true, - "hide": true, - "show": true, - "maximize": true, - "minimize": true, - "unmaximize": true, - "unminimize": true, - "startDragging": true, - "setFullscreen": true - } + "bundle": { + "active": true, + "category": "BoardGame", + "copyright": "", + "windows": { + "certificateThumbprint": null, + "digestAlgorithm": "sha256", + "timestampUrl": "" }, - "bundle": { - "active": true, - "category": "BoardGame", - "copyright": "", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ], + "linux": { "deb": { "depends": [] }, - "icon": [ - "icons/32x32.png", - "icons/128x128.png", - "icons/128x128@2x.png", - "icons/icon.icns", - "icons/icon.ico" - ], - "identifier": "org.encroissant.app", - "publisher": "Francisco Salgueiro", - "shortDescription": "A Modern Chess Database", - "longDescription": "", - "macOS": { - "entitlements": null, - "exceptionDomain": "", - "frameworks": [], - "providerShortName": null, - "signingIdentity": null - }, - "resources": [], - "targets": "all", - "windows": { - "certificateThumbprint": null, - "digestAlgorithm": "sha256", - "timestampUrl": "" - }, "appimage": { "bundleMediaFramework": true } }, - "security": { - "csp": null + "publisher": "Francisco Salgueiro", + "shortDescription": "Ultimate Chess Toolkit", + "longDescription": "", + "macOS": { + "entitlements": null, + "exceptionDomain": "", + "frameworks": [], + "providerShortName": null, + "signingIdentity": null + }, + "resources": [], + "targets": "all", + "createUpdaterArtifacts": "v1Compatible" + }, + "build": { + "beforeDevCommand": "pnpm start-vite", + "beforeBuildCommand": "pnpm build-vite", + "frontendDist": "../dist", + "devUrl": "http://localhost:1420" + }, + "productName": "en-croissant", + "mainBinaryName": "en-croissant", + "identifier": "org.encroissant.app", + "plugins": { + "cli": { + "args": [ + { + "name": "file", + "index": 1, + "takesValue": true + } + ] }, "updater": { - "active": true, + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDdGOTBFNjg2MzFGM0RDODUKUldTRjNQTXhodWFRZjc2MTNVeXRONGJkRjdGUXlCeW1MSlZESUczT0U4eE5hKzBmY3M2S0U2L0oK", "endpoints": [ "https://www.encroissant.org/updates" - ], - "dialog": true, - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDdGOTBFNjg2MzFGM0RDODUKUldTRjNQTXhodWFRZjc2MTNVeXRONGJkRjdGUXlCeW1MSlZESUczT0U4eE5hKzBmY3M2S0U2L0oK" - }, + ] + } + }, + "app": { + "withGlobalTauri": false, "windows": [ { "title": "En Croissant", "maximized": true, "visible": false, - "decorations": false + "decorations": true } ], - "cli": { - "args": [ - { - "name": "file", - "index": 1, - "takesValue": true - } - ] + "security": { + "assetProtocol": { + "scope": [ + "**" + ], + "enable": true + }, + "csp": null } } } \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 98062bfe..9e4ee628 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,12 +9,13 @@ import { } from "@mantine/core"; import { Notifications } from "@mantine/notifications"; import { RouterProvider, createRouter } from "@tanstack/react-router"; -import { getMatches } from "@tauri-apps/api/cli"; +import { getCurrentWindow } from "@tauri-apps/api/window"; +import { getMatches } from "@tauri-apps/plugin-cli"; +import { attachConsole, info } from "@tauri-apps/plugin-log"; import { getDefaultStore, useAtom, useAtomValue } from "jotai"; import { ContextMenuProvider } from "mantine-contextmenu"; import { useEffect } from "react"; import { Helmet } from "react-helmet"; -import { attachConsole, info } from "tauri-plugin-log-api"; import { activeTabAtom, fontSizeAtom, @@ -81,13 +82,6 @@ export default function App() { const pieceSet = useAtomValue(pieceSetAtom); const [, setTabs] = useAtom(tabsAtom); const [, setActiveTab] = useAtom(activeTabAtom); - const isNative = useAtomValue(nativeBarAtom); - - useEffect(() => { - setTimeout(() => { - commands.setMenuVisisble(isNative); - }, 100); - }, [isNative]); useEffect(() => { (async () => { diff --git a/src/bindings/generated.ts b/src/bindings/generated.ts index ac0bb381..4c8f1bfb 100644 --- a/src/bindings/generated.ts +++ b/src/bindings/generated.ts @@ -1,160 +1,359 @@ - // This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually. - export const commands = { -async closeSplashscreen() : Promise<__Result__> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|close_splashscreen") }; +// This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually. + +/** user-defined commands **/ + + +export const commands = { +async closeSplashscreen() : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("close_splashscreen") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async findFidePlayer(player: string) : Promise<__Result__<{ fideid: number; name: string; country: string; sex: string; title: string | null; w_title: string | null; o_title: string | null; foa_title: string | null; rating: number | null; games: number | null; k: number | null; rapid_rating: number | null; rapid_games: number | null; rapid_k: number | null; blitz_rating: number | null; blitz_games: number | null; blitz_k: number | null; birthday: number | null; flag: string | null } | null, string>> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|find_fide_player", { player }) }; +async findFidePlayer(player: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("find_fide_player", { player }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async getBestMoves(id: string, engine: string, tab: string, goMode: GoMode, options: EngineOptions) : Promise<__Result__<[number, BestMoves[]] | null, string>> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|get_best_moves", { id, engine, tab, goMode, options }) }; +async getBestMoves(id: string, engine: string, tab: string, goMode: GoMode, options: EngineOptions) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_best_moves", { id, engine, tab, goMode, options }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async analyzeGame(id: string, engine: string, goMode: GoMode, options: AnalysisOptions, uciOptions: EngineOption[]) : Promise<__Result__<{ best: BestMoves[]; novelty: boolean; is_sacrifice: boolean }[], string>> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|analyze_game", { id, engine, goMode, options, uciOptions }) }; +async analyzeGame(id: string, engine: string, goMode: GoMode, options: AnalysisOptions, uciOptions: EngineOption[]) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("analyze_game", { id, engine, goMode, options, uciOptions }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async stopEngine(engine: string, tab: string) : Promise<__Result__> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|stop_engine", { engine, tab }) }; +async stopEngine(engine: string, tab: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("stop_engine", { engine, tab }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async killEngine(engine: string, tab: string) : Promise<__Result__> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|kill_engine", { engine, tab }) }; +async killEngine(engine: string, tab: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("kill_engine", { engine, tab }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async killEngines(tab: string) : Promise<__Result__> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|kill_engines", { tab }) }; +async killEngines(tab: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("kill_engines", { tab }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async getEngineLogs(engine: string, tab: string) : Promise<__Result__<({ type: "gui"; value: string } | { type: "engine"; value: string })[], string>> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|get_engine_logs", { engine, tab }) }; +async getEngineLogs(engine: string, tab: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_engine_logs", { engine, tab }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async memorySize() : Promise { -return await TAURI_INVOKE("plugin:tauri-specta|memory_size"); + return await TAURI_INVOKE("memory_size"); }, -async getPuzzle(file: string, minRating: number, maxRating: number) : Promise<__Result__<{ id: number; fen: string; moves: string; rating: number; rating_deviation: number; popularity: number; nb_plays: number }, string>> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|get_puzzle", { file, minRating, maxRating }) }; +async getPuzzle(file: string, minRating: number, maxRating: number) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_puzzle", { file, minRating, maxRating }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async setMenuVisisble(state: boolean) : Promise { -return await TAURI_INVOKE("plugin:tauri-specta|set_menu_visisble", { state }); +async searchOpeningName(query: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("search_opening_name", { query }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} }, -async isMenuVisisble() : Promise { -return await TAURI_INVOKE("plugin:tauri-specta|is_menu_visisble"); +async getOpeningFromFen(fen: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_opening_from_fen", { fen }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} }, -async getOpeningFromFen(fen: string) : Promise<__Result__> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|get_opening_from_fen", { fen }) }; +async getOpeningFromName(name: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_opening_from_name", { name }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async getOpeningFromName(name: string) : Promise<__Result__> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|get_opening_from_name", { name }) }; +async getPlayersGameInfo(file: string, id: number) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_players_game_info", { file, id }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async getPlayersGameInfo(file: string, id: number) : Promise<__Result__<{ won: number; lost: number; draw: number; data_per_month: ([string, MonthData])[]; white_openings: ([string, Results])[]; black_openings: ([string, Results])[] }, string>> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|get_players_game_info", { file, id }) }; +async getEngineConfig(path: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_engine_config", { path }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async getEngineConfig(path: string) : Promise<__Result__<{ name: string; options: UciOptionConfig[] }, string>> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|get_engine_config", { path }) }; +async fileExists(path: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("file_exists", { path }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async fileExists(path: string) : Promise<__Result__> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|file_exists", { path }) }; +async getFileMetadata(path: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_file_metadata", { path }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async getFileMetadata(path: string) : Promise<__Result__<{ last_modified: number }, string>> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|get_file_metadata", { path }) }; +async mergePlayers(file: string, player1: number, player2: number) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("merge_players", { file, player1, player2 }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async mergePlayers(file: string, player1: number, player2: number) : Promise<__Result__> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|merge_players", { file, player1, player2 }) }; +async convertPgn(file: string, dbPath: string, timestamp: number | null, title: string, description: string | null) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("convert_pgn", { file, dbPath, timestamp, title, description }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async convertPgn(file: string, dbPath: string, timestamp: number | null, title: string, description: string | null) : Promise<__Result__> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|convert_pgn", { file, dbPath, timestamp, title, description }) }; +async getPlayer(file: string, id: number) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_player", { file, id }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, -async getPlayer(file: string, id: number) : Promise<__Result__<{ id: number; name: string | null; elo: number | null } | null, string>> { -try { - return { status: "ok", data: await TAURI_INVOKE("plugin:tauri-specta|get_player", { file, id }) }; +async countPgnGames(file: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("count_pgn_games", { file }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } +}, +async readGames(file: string, start: number, end: number) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("read_games", { file, start, end }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; } +}, +async lexPgn(pgn: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("lex_pgn", { pgn }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async isBmi2Compatible() : Promise { + return await TAURI_INVOKE("is_bmi2_compatible"); +}, +async deleteGame(file: string, n: number) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("delete_game", { file, n }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; } +}, +async deleteDuplicatedGames(file: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("delete_duplicated_games", { file }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async deleteEmptyGames(file: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("delete_empty_games", { file }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async clearGames() : Promise { + await TAURI_INVOKE("clear_games"); +}, +async setFileAsExecutable(path: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("set_file_as_executable", { path }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async deleteIndexes(file: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("delete_indexes", { file }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async createIndexes(file: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("create_indexes", { file }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async editDbInfo(file: string, title: string | null, description: string | null) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("edit_db_info", { file, title, description }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async deleteDbGame(file: string, gameId: number) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("delete_db_game", { file, gameId }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async deleteDatabase(file: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("delete_database", { file }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async exportToPgn(file: string, destFile: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("export_to_pgn", { file, destFile }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async authenticate(username: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("authenticate", { username }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async writeGame(file: string, n: number, pgn: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("write_game", { file, n, pgn }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async downloadFideDb() : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("download_fide_db") }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async downloadFile(id: string, url: string, path: string, token: string | null, finalize: boolean | null, totalSize: number | null) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("download_file", { id, url, path, token, finalize, totalSize }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async getTournaments(file: string, query: TournamentQuery) : Promise, string>> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_tournaments", { file, query }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async getDbInfo(file: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_db_info", { file }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async getGames(file: string, query: GameQueryJs) : Promise, string>> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_games", { file, query }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async searchPosition(file: string, query: GameQueryJs, tabId: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("search_position", { file, query, tabId }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async getPlayers(file: string, query: PlayerQuery) : Promise, string>> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_players", { file, query }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async getPuzzleDbInfo(file: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("get_puzzle_db_info", { file }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +} +} + +/** user-defined events **/ + export const events = __makeEvents__<{ bestMovesPayload: BestMovesPayload, @@ -162,24 +361,50 @@ databaseProgress: DatabaseProgress, downloadProgress: DownloadProgress, reportProgress: ReportProgress }>({ -bestMovesPayload: "plugin:tauri-specta:best-moves-payload", -databaseProgress: "plugin:tauri-specta:database-progress", -downloadProgress: "plugin:tauri-specta:download-progress", -reportProgress: "plugin:tauri-specta:report-progress" +bestMovesPayload: "best-moves-payload", +databaseProgress: "database-progress", +downloadProgress: "download-progress", +reportProgress: "report-progress" }) +/** user-defined constants **/ + + + /** user-defined types **/ export type AnalysisOptions = { fen: string; moves: string[]; annotateNovelties: boolean; referenceDb: string | null; reversed: boolean } export type BestMoves = { nodes: number; depth: number; score: Score; uciMoves: string[]; sanMoves: string[]; multipv: number; nps: number } export type BestMovesPayload = { bestLines: BestMoves[]; engine: string; tab: string; fen: string; moves: string[]; progress: number } +export type DatabaseInfo = { title: string; description: string; player_count: number; event_count: number; game_count: number; storage_size: number; filename: string; indexed: boolean } export type DatabaseProgress = { id: string; progress: number } export type DownloadProgress = { progress: number; id: string; finished: boolean } +export type EngineConfig = { name: string; options: UciOptionConfig[] } +export type EngineLog = { type: "gui"; value: string } | { type: "engine"; value: string } export type EngineOption = { name: string; value: string } export type EngineOptions = { fen: string; moves: string[]; extraOptions: EngineOption[] } +export type Event = { id: number; name: string | null } +export type FidePlayer = { fideid: number; name: string; country: string; sex: string; title: string | null; w_title: string | null; o_title: string | null; foa_title: string | null; rating: number | null; games: number | null; k: number | null; rapid_rating: number | null; rapid_games: number | null; rapid_k: number | null; blitz_rating: number | null; blitz_games: number | null; blitz_k: number | null; birthday: number | null; flag: string | null } +export type FileMetadata = { last_modified: number } +export type GameQueryJs = { options?: QueryOptions | null; player1?: number | null; player2?: number | null; tournament_id?: number | null; start_date?: string | null; end_date?: string | null; range1?: [number, number] | null; range2?: [number, number] | null; sides?: Sides | null; outcome?: string | null; position?: PositionQueryJs | null } +export type GameSort = "id" | "date" | "whiteElo" | "blackElo" | "ply_count" export type GoMode = { t: "PlayersTime"; c: PlayersTime } | { t: "Depth"; c: number } | { t: "Time"; c: number } | { t: "Nodes"; c: number } | { t: "Infinite" } export type MonthData = { count: number; avg_elo: number } +export type MoveAnalysis = { best: BestMoves[]; novelty: boolean; is_sacrifice: boolean } +export type NormalizedGame = { id: number; fen: string; event: string; event_id: number; site: string; site_id: number; date?: string | null; time?: string | null; round?: string | null; white: string; white_id: number; white_elo?: number | null; black: string; black_id: number; black_elo?: number | null; result: Outcome; time_control?: string | null; eco?: string | null; ply_count?: number | null; moves: string } +export type OutOpening = { name: string; fen: string } +export type Outcome = "1-0" | "0-1" | "1/2-1/2" | "*" +export type Player = { id: number; name: string | null; elo: number | null } +export type PlayerGameInfo = { won: number; lost: number; draw: number; data_per_month: ([string, MonthData])[]; white_openings: ([string, Results])[]; black_openings: ([string, Results])[] } +export type PlayerQuery = { options: QueryOptions; name?: string | null; range?: [number, number] | null } +export type PlayerSort = "id" | "name" | "elo" export type PlayersTime = { white: number; black: number; winc: number; binc: number } +export type PositionQueryJs = { fen: string; type_: string } +export type PositionStats = { move: string; white: number; draw: number; black: number } +export type Puzzle = { id: number; fen: string; moves: string; rating: number; rating_deviation: number; popularity: number; nb_plays: number } +export type PuzzleDatabaseInfo = { title: string; description: string; puzzleCount: number; storageSize: number; path: string } +export type QueryOptions = { skipCount: boolean; page?: number | null; pageSize?: number | null; sort: SortT; direction: SortDirection } +export type QueryResponse = { data: T; count: number | null } export type ReportProgress = { progress: number; id: string; finished: boolean } export type Results = { won: number; lost: number; draw: number } export type Score = { value: ScoreValue; @@ -196,6 +421,11 @@ export type ScoreValue = * Mate coming up in this many moves. Negative value means the engine is getting mated. */ { type: "mate"; value: number } +export type Sides = "BlackWhite" | "WhiteBlack" | "Any" +export type SortDirection = "asc" | "desc" +export type Token = { type: "ParenOpen" } | { type: "ParenClose" } | { type: "Comment"; value: string } | { type: "San"; value: string } | { type: "Header"; value: { tag: string; value: string } } | { type: "Nag"; value: string } | { type: "Outcome"; value: string } +export type TournamentQuery = { options: QueryOptions; name: string | null } +export type TournamentSort = "id" | "name" /** * Represents a UCI option definition. */ @@ -271,59 +501,60 @@ default: string | null } } /** tauri-specta globals **/ - import { invoke as TAURI_INVOKE } from "@tauri-apps/api"; +import { + invoke as TAURI_INVOKE, + Channel as TAURI_CHANNEL, +} from "@tauri-apps/api/core"; import * as TAURI_API_EVENT from "@tauri-apps/api/event"; -import { type WebviewWindowHandle as __WebviewWindowHandle__ } from "@tauri-apps/api/window"; +import { type WebviewWindow as __WebviewWindow__ } from "@tauri-apps/api/webviewWindow"; type __EventObj__ = { - listen: ( - cb: TAURI_API_EVENT.EventCallback - ) => ReturnType>; - once: ( - cb: TAURI_API_EVENT.EventCallback - ) => ReturnType>; - emit: T extends null - ? (payload?: T) => ReturnType - : (payload: T) => ReturnType; + listen: ( + cb: TAURI_API_EVENT.EventCallback, + ) => ReturnType>; + once: ( + cb: TAURI_API_EVENT.EventCallback, + ) => ReturnType>; + emit: null extends T + ? (payload?: T) => ReturnType + : (payload: T) => ReturnType; }; -type __Result__ = - | { status: "ok"; data: T } - | { status: "error"; error: E }; +export type Result = + | { status: "ok"; data: T } + | { status: "error"; error: E }; function __makeEvents__>( - mappings: Record + mappings: Record, ) { - return new Proxy( - {} as unknown as { - [K in keyof T]: __EventObj__ & { - (handle: __WebviewWindowHandle__): __EventObj__; - }; - }, - { - get: (_, event) => { - const name = mappings[event as keyof T]; + return new Proxy( + {} as unknown as { + [K in keyof T]: __EventObj__ & { + (handle: __WebviewWindow__): __EventObj__; + }; + }, + { + get: (_, event) => { + const name = mappings[event as keyof T]; - return new Proxy((() => {}) as any, { - apply: (_, __, [window]: [__WebviewWindowHandle__]) => ({ - listen: (arg: any) => window.listen(name, arg), - once: (arg: any) => window.once(name, arg), - emit: (arg: any) => window.emit(name, arg), - }), - get: (_, command: keyof __EventObj__) => { - switch (command) { - case "listen": - return (arg: any) => TAURI_API_EVENT.listen(name, arg); - case "once": - return (arg: any) => TAURI_API_EVENT.once(name, arg); - case "emit": - return (arg: any) => TAURI_API_EVENT.emit(name, arg); - } - }, - }); - }, - } - ); + return new Proxy((() => {}) as any, { + apply: (_, __, [window]: [__WebviewWindow__]) => ({ + listen: (arg: any) => window.listen(name, arg), + once: (arg: any) => window.once(name, arg), + emit: (arg: any) => window.emit(name, arg), + }), + get: (_, command: keyof __EventObj__) => { + switch (command) { + case "listen": + return (arg: any) => TAURI_API_EVENT.listen(name, arg); + case "once": + return (arg: any) => TAURI_API_EVENT.once(name, arg); + case "emit": + return (arg: any) => TAURI_API_EVENT.emit(name, arg); + } + }, + }); + }, + }, + ); } - - \ No newline at end of file diff --git a/src/bindings/index.ts b/src/bindings/index.ts index 46858570..91fd6939 100644 --- a/src/bindings/index.ts +++ b/src/bindings/index.ts @@ -1,5 +1,7 @@ import type { BestMoves as BestMovesT, + DatabaseInfo as DatabaseInfoT, + GameQueryJs, Score as ScoreT, ScoreValue as ScoreValueT, } from "./generated"; @@ -10,3 +12,19 @@ export type Score = Omit & { value: ScoreValue }; export type BestMoves = Omit & { score: Score; }; + +export type DatabaseInfo = + | (DatabaseInfoT & { + type: "success"; + file: string; + downloadLink?: string; + }) + | { + type: "error"; + file: string; + filename: string; + error: string; + indexed: boolean; + }; + +export type GameQuery = GameQueryJs; diff --git a/src/components/About.tsx b/src/components/About.tsx index 703c8797..5d8608e5 100644 --- a/src/components/About.tsx +++ b/src/components/About.tsx @@ -1,6 +1,6 @@ import { Anchor, Modal, Text } from "@mantine/core"; import { getTauriVersion, getVersion } from "@tauri-apps/api/app"; -import { version as OSVersion, arch, type } from "@tauri-apps/api/os"; +import { version as OSVersion, arch, type } from "@tauri-apps/plugin-os"; import { useEffect, useState } from "react"; function AboutModal({ diff --git a/src/components/TopBar.tsx b/src/components/TopBar.tsx index a32dc264..85424f60 100644 --- a/src/components/TopBar.tsx +++ b/src/components/TopBar.tsx @@ -1,8 +1,9 @@ import { Box, Button, Center, Group, Image, Menu, Text } from "@mantine/core"; -import { appWindow } from "@tauri-apps/api/window"; +import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow"; import * as classes from "./TopBar.css"; import { useColorScheme } from "@mantine/hooks"; +const appWindow = getCurrentWebviewWindow(); function IconMinimize() { return ( diff --git a/src/components/boards/Board.tsx b/src/components/boards/Board.tsx index 16c825e2..d74e66a4 100644 --- a/src/components/boards/Board.tsx +++ b/src/components/boards/Board.tsx @@ -58,9 +58,9 @@ import { IconTarget, IconZoomCheck, } from "@tabler/icons-react"; -import { save } from "@tauri-apps/api/dialog"; -import { writeBinaryFile } from "@tauri-apps/api/fs"; import { documentDir } from "@tauri-apps/api/path"; +import { save } from "@tauri-apps/plugin-dialog"; +import { writeFile } from "@tauri-apps/plugin-fs"; import type { DrawShape } from "chessground/draw"; import { type NormalMove, @@ -216,7 +216,7 @@ function Board({ }); const arrayBuffer = await blob.arrayBuffer(); if (filePath == null) return; - await writeBinaryFile(filePath, arrayBuffer); + await writeFile(filePath, new Uint8Array(arrayBuffer)); }); }; diff --git a/src/components/boards/BoardAnalysis.tsx b/src/components/boards/BoardAnalysis.tsx index 777ca59d..86ffe673 100644 --- a/src/components/boards/BoardAnalysis.tsx +++ b/src/components/boards/BoardAnalysis.tsx @@ -8,7 +8,6 @@ import { } from "@/state/atoms"; import { keyMapAtom } from "@/state/keybinds"; import { getVariationLine } from "@/utils/chess"; -import { invoke } from "@/utils/invoke"; import { saveToFile } from "@/utils/tabs"; import { Paper, Portal, Stack, Tabs } from "@mantine/core"; import { useHotkeys, useToggle } from "@mantine/hooks"; @@ -20,6 +19,7 @@ import { IconZoomCheck, } from "@tabler/icons-react"; import { useLoaderData } from "@tanstack/react-router"; +import { writeTextFile } from "@tauri-apps/plugin-fs"; import { useAtom, useAtomValue } from "jotai"; import { Suspense, useCallback, useContext, useEffect, useRef } from "react"; import { useTranslation } from "react-i18next"; @@ -82,9 +82,8 @@ function BoardAnalysis() { return { ...prev }; }); reset(); - invoke("append_to_file", { - path: currentTab?.file?.path, - text: "\n\n", + writeTextFile(currentTab?.file?.path!, "\n\n", { + append: true, }); }, [setCurrentTab, reset, currentTab?.file?.path]); diff --git a/src/components/common/AccountCards.tsx b/src/components/common/AccountCards.tsx index 731a69ed..5f2bb066 100644 --- a/src/components/common/AccountCards.tsx +++ b/src/components/common/AccountCards.tsx @@ -1,6 +1,6 @@ +import type { DatabaseInfo } from "@/bindings"; import { sessionsAtom } from "@/state/atoms"; import { getChessComAccount, getStats } from "@/utils/chess.com/api"; -import type { DatabaseInfo } from "@/utils/db"; import { getLichessAccount } from "@/utils/lichess/api"; import type { Session } from "@/utils/session"; import { diff --git a/src/components/common/GameInfo.tsx b/src/components/common/GameInfo.tsx index c8afd314..9ce2f281 100644 --- a/src/components/common/GameInfo.tsx +++ b/src/components/common/GameInfo.tsx @@ -1,4 +1,4 @@ -import type { Outcome } from "@/utils/db"; +import type { Outcome } from "@/bindings"; import type { GameHeaders } from "@/utils/treeReducer"; import { Box, Group, Select, SimpleGrid, Text } from "@mantine/core"; import { DateInput } from "@mantine/dates"; diff --git a/src/components/common/LocalImage.tsx b/src/components/common/LocalImage.tsx index d55e3caa..02c4d7c6 100644 --- a/src/components/common/LocalImage.tsx +++ b/src/components/common/LocalImage.tsx @@ -1,5 +1,5 @@ import { Image, type ImageProps } from "@mantine/core"; -import { convertFileSrc } from "@tauri-apps/api/tauri"; +import { convertFileSrc } from "@tauri-apps/api/core"; import useSWRImmutable from "swr/immutable"; function LocalImage(props: ImageProps & { alt?: string }) { diff --git a/src/components/common/OpenFolderButton.tsx b/src/components/common/OpenFolderButton.tsx index 4e7da46a..6f570bd1 100644 --- a/src/components/common/OpenFolderButton.tsx +++ b/src/components/common/OpenFolderButton.tsx @@ -1,7 +1,7 @@ import { ActionIcon, Tooltip } from "@mantine/core"; import { IconFolder } from "@tabler/icons-react"; import { appDataDir, resolve } from "@tauri-apps/api/path"; -import { open } from "@tauri-apps/api/shell"; +import { open } from "@tauri-apps/plugin-shell"; import { useTranslation } from "react-i18next"; function OpenFolderButton({ diff --git a/src/components/databases/AddDatabase.tsx b/src/components/databases/AddDatabase.tsx index 3dbd1e01..22ce5161 100644 --- a/src/components/databases/AddDatabase.tsx +++ b/src/components/databases/AddDatabase.tsx @@ -1,11 +1,11 @@ -import { events, commands } from "@/bindings"; +import { events, type DatabaseInfo, commands } from "@/bindings"; import { - type DatabaseInfo, + type SuccessDatabaseInfo, getDatabases, useDefaultDatabases, } from "@/utils/db"; import { capitalize, formatBytes, formatNumber } from "@/utils/format"; -import { invoke, unwrap } from "@/utils/invoke"; +import { unwrap } from "@/utils/unwrap"; import { Alert, Box, @@ -24,8 +24,8 @@ import { } from "@mantine/core"; import { useForm } from "@mantine/form"; import { IconAlertCircle } from "@tabler/icons-react"; -import { open } from "@tauri-apps/api/dialog"; import { appDataDir, resolve } from "@tauri-apps/api/path"; +import { open } from "@tauri-apps/plugin-dialog"; import { type Dispatch, type SetStateAction, useState } from "react"; import { useTranslation } from "react-i18next"; import type { KeyedMutator } from "swr"; @@ -58,7 +58,7 @@ function AddDatabase({ setLoading(false); } - const form = useForm({ + const form = useForm>>({ initialValues: { title: "", description: "", @@ -70,7 +70,7 @@ function AddDatabase({ validate: { title: (value) => { if (!value) return t("Common.RequireName"); - if (databases.find((e) => e.title === value)) + if (databases.find((e) => e.type === "success" && e.title === value)) return t("Common.NameAlreadyUsed"); }, file: (value) => { @@ -104,7 +104,12 @@ function AddDatabase({ databaseId={i} key={i} setDatabases={setDatabases} - initInstalled={databases.some((e) => e.title === db.title)} + initInstalled={databases.some( + (e) => + e.type === "success" && + db.type === "success" && + e.title === db.title, + )} /> ))} {error && ( @@ -122,7 +127,7 @@ function AddDatabase({
{ - convertDB(values.file, values.title!, values.description); + convertDB(values.file!, values.title!, values.description); setOpened(false); })} > @@ -165,7 +170,7 @@ function AddDatabase({ } } }} - filename={form.values.filename} + filename={form.values.filename ?? null} {...form.getInputProps("path")} /> @@ -186,7 +191,7 @@ function DatabaseCard({ initInstalled, }: { setDatabases: KeyedMutator; - database: DatabaseInfo; + database: SuccessDatabaseInfo; databaseId: number; initInstalled: boolean; }) { @@ -197,11 +202,7 @@ function DatabaseCard({ async function downloadDatabase(id: number, url: string, name: string) { setInProgress(true); const path = await resolve(await appDataDir(), "db", `${name}.db3`); - await invoke("download_file", { - id: `db_${id}`, - url, - path, - }); + await commands.downloadFile(`db_${id}`, url, path, null, null, null); setDatabases(await getDatabases()); } diff --git a/src/components/databases/DatabasesPage.tsx b/src/components/databases/DatabasesPage.tsx index 28f3f244..8652f8ab 100644 --- a/src/components/databases/DatabasesPage.tsx +++ b/src/components/databases/DatabasesPage.tsx @@ -1,8 +1,9 @@ import { commands } from "@/bindings"; +import type { DatabaseInfo } from "@/bindings"; import { referenceDbAtom, selectedDatabaseAtom } from "@/state/atoms"; -import { type DatabaseInfo, getDatabases } from "@/utils/db"; +import { type SuccessDatabaseInfo, getDatabases } from "@/utils/db"; import { formatBytes, formatNumber } from "@/utils/format"; -import { invoke, unwrap } from "@/utils/invoke"; +import { unwrap } from "@/utils/unwrap"; import { Box, Button, @@ -25,7 +26,7 @@ import { import { useDebouncedValue, useToggle } from "@mantine/hooks"; import { IconArrowRight, IconDatabase, IconPlus } from "@tabler/icons-react"; import { Link, useNavigate } from "@tanstack/react-router"; -import { open as openDialog, save } from "@tauri-apps/api/dialog"; +import { open as openDialog, save } from "@tauri-apps/plugin-dialog"; import { useAtom } from "jotai"; import { useEffect, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -62,7 +63,7 @@ export default function DatabasesPage() { const [exportLoading, setExportLoading] = useState(false); function changeReferenceDatabase(file: string) { - invoke("clear_games"); + commands.clearGames(); if (file === referenceDatabase) { setReferenceDatabase(null); } else { @@ -79,12 +80,10 @@ export default function DatabasesPage() { opened={deleteModal} onClose={toggleDeleteModal} onConfirm={() => { - invoke("delete_database", { file: selectedDatabase?.file }).then( - () => { - mutate(); - setSelected(null); - }, - ); + commands.deleteDatabase(selectedDatabase?.file!).then(() => { + mutate(); + setSelected(null); + }); toggleDeleteModal(); }} /> @@ -129,11 +128,14 @@ export default function DatabasesPage() { key={item.filename} isSelected={selectedDatabase?.filename === item.filename} setSelected={setSelected} - error={item.error} + error={item.type === "error" ? item.error : ""} onDoubleClick={() => { + if (item.type === "error") return; navigate({ to: "/databases/$databaseId", - params: { databaseId: item.title || "" }, + params: { + databaseId: item.title, + }, }); setStorageSelected(item); }} @@ -142,13 +144,17 @@ export default function DatabasesPage() { - {item.error ?? item.title} + + {item.type === "success" ? item.title : item.error} + - {item.error ? item.file : item.description} + {item.type === "error" + ? item.file + : item.description} @@ -164,13 +170,17 @@ export default function DatabasesPage() { stats={[ { label: t("Databases.Card.Games"), - value: item.error ? "???" : formatNumber(item.game_count), + value: + item.type === "success" + ? formatNumber(item.game_count) + : "???", }, { label: t("Databases.Card.Storage"), - value: item.error - ? "???" - : formatBytes(item.storage_size ?? 0), + value: + item.type === "success" + ? formatBytes(item.storage_size ?? 0) + : "???", }, ]} /> @@ -185,7 +195,7 @@ export default function DatabasesPage() { ) : ( - {selectedDatabase.error ? ( + {selectedDatabase.type === "error" ? ( <> There was an error loading this database @@ -255,7 +265,7 @@ export default function DatabasesPage() {
- {!selectedDatabase.error && ( + {selectedDatabase.type === "success" && (