Add a typed platform package to decouple the frontend from Tauri (#539)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Gregory Schier
2026-08-14 12:44:01 -07:00
committed by GitHub
co-authored by Claude Opus 5
parent 0068be9ffc
commit 2383f06e71
107 changed files with 954 additions and 505 deletions
+5 -5
View File
@@ -1,8 +1,8 @@
import { invoke } from "@tauri-apps/api/core";
import { platform } from "@yaakapp-internal/platform";
import { WebsocketConnection } from "@yaakapp-internal/models";
export function deleteWebsocketConnections(requestId: string) {
return invoke("cmd_ws_delete_connections", {
return platform.rpc("cmd_ws_delete_connections", {
requestId,
});
}
@@ -16,7 +16,7 @@ export function connectWebsocket({
environmentId: string | null;
cookieJarId: string | null;
}) {
return invoke("cmd_ws_connect", {
return platform.rpc("cmd_ws_connect", {
requestId,
environmentId,
cookieJarId,
@@ -24,7 +24,7 @@ export function connectWebsocket({
}
export function closeWebsocket({ connectionId }: { connectionId: string }) {
return invoke("cmd_ws_close", {
return platform.rpc("cmd_ws_close", {
connectionId,
});
}
@@ -36,7 +36,7 @@ export function sendWebsocket({
connectionId: string;
environmentId: string | null;
}) {
return invoke("cmd_ws_send", {
return platform.rpc("cmd_ws_send", {
connectionId,
environmentId,
});