feat: Tauri v2 release workflow and frontend API migration
Some checks failed
CI / Rust Format (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Test Server (push) Has been cancelled
CI / Frontend Check (push) Has been cancelled
CI / Tauri Client Check (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Build Tauri (Linux) (push) Has been cancelled

- Update release workflow with matrix strategy for Linux/macOS/Windows
- Upgrade @tauri-apps/api from v1 to v2 in frontend
- Change all tauri/tauri imports to tauri/core (Tauri v2)
- Sync tauri.conf.json across project root and src-tauri
This commit is contained in:
root
2026-04-29 13:49:25 +02:00
parent cacd2b04a7
commit 476afaf329
5 changed files with 26 additions and 82 deletions

View File

@@ -12,7 +12,7 @@
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3",
"@tauri-apps/api": "^1",
"@tauri-apps/api": "^2.10.1",
"svelte": "^4",
"svelte-check": "^3",
"svelte-preprocess": "^5.1.4",
@@ -878,16 +878,11 @@
}
},
"node_modules/@tauri-apps/api": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.6.0.tgz",
"integrity": "sha512-rqI++FWClU5I2UBp4HXFvl+sBWkdigBkxnpJDQUWttNyG7IZP4FwQGhTNL5EOw0vI8i6eSAJ5frLqO7n7jbJdg==",
"version": "2.10.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.10.1.tgz",
"integrity": "sha512-hKL/jWf293UDSUN09rR69hrToyIXBb8CjGaWC7gfinvnQrBVvnLr08FeFi38gxtugAVyVcTa5/FD/Xnkb1siBw==",
"dev": true,
"license": "Apache-2.0 OR MIT",
"engines": {
"node": ">= 14.6.0",
"npm": ">= 6.6.0",
"yarn": ">= 1.19.1"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/tauri"

View File

@@ -11,7 +11,7 @@
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3",
"@tauri-apps/api": "^1",
"@tauri-apps/api": "^2.10.1",
"svelte": "^4",
"svelte-check": "^3",
"svelte-preprocess": "^5.1.4",

View File

@@ -34,7 +34,7 @@
if (isTauri()) {
try {
const { invoke } = await import('@tauri-apps/api/tauri');
const { invoke } = await import('@tauri-apps/api/core');
const user: string | null = await invoke('get_current_user');
if (user) {
loggedIn = true;

View File

@@ -106,7 +106,7 @@ function clearToken() {
}
async function tauriInvoke(cmd: string, args: Record<string, unknown>): Promise<any> {
const { invoke } = await import('@tauri-apps/api/tauri');
const { invoke } = await import('@tauri-apps/api/core');
return invoke(cmd, args);
}
@@ -483,7 +483,7 @@ export async function uploadFile(roomId: string, file: File): Promise<UploadResu
formData.append('file', file);
if (isTauri()) {
const { invoke } = await import('@tauri-apps/api/tauri');
const { invoke } = await import('@tauri-apps/api/core');
const arrayBuffer = await file.arrayBuffer();
const bytes = Array.from(new Uint8Array(arrayBuffer));
return invoke('upload_file', { roomId, fileName: file.name, mimeType: file.type, bytes });
@@ -533,7 +533,7 @@ export async function uploadAvatar(file: File): Promise<UserProfile> {
formData.append('file', file);
if (isTauri()) {
const { invoke } = await import('@tauri-apps/api/tauri');
const { invoke } = await import('@tauri-apps/api/core');
const arrayBuffer = await file.arrayBuffer();
const bytes = Array.from(new Uint8Array(arrayBuffer));
return invoke('upload_avatar', { fileName: file.name, mimeType: file.type, bytes });
@@ -571,7 +571,7 @@ export async function setRoomAvatar(roomId: string, file: File): Promise<boolean
formData.append('file', file);
if (isTauri()) {
const { invoke } = await import('@tauri-apps/api/tauri');
const { invoke } = await import('@tauri-apps/api/core');
const arrayBuffer = await file.arrayBuffer();
const bytes = Array.from(new Uint8Array(arrayBuffer));
return invoke('set_room_avatar', { roomId, fileName: file.name, mimeType: file.type, bytes });