Decouple core Yaak logic from Tauri (#354)

This commit is contained in:
Gregory Schier
2026-01-08 20:44:25 -08:00
committed by GitHub
parent 3bcc0b8356
commit ef80216ca1
465 changed files with 3052 additions and 6234 deletions

View File

@@ -33,7 +33,7 @@ export function useIntrospectGraphQL(
const upsertIntrospection = useCallback(
async (content: string | null) => {
const v = await invoke<GraphQlIntrospection>(
'plugin:yaak-models|upsert_graphql_introspection',
'models_upsert_graphql_introspection',
{
requestId: baseRequest.id,
workspaceId: baseRequest.workspaceId,
@@ -122,7 +122,7 @@ function useIntrospectionResult(request: HttpRequest) {
return useQuery({
queryKey: ['introspection', request.id],
queryFn: async () =>
invoke<GraphQlIntrospection | null>('plugin:yaak-models|get_graphql_introspection', {
invoke<GraphQlIntrospection | null>('models_get_graphql_introspection', {
requestId: request.id,
}),
});

View File

@@ -67,7 +67,7 @@ export function useGrpcEvents(connectionId: string | null) {
return;
}
invoke<GrpcEvent[]>('plugin:yaak-models|grpc_events', { connectionId }).then((events) => {
invoke<GrpcEvent[]>('models_grpc_events', { connectionId }).then((events) => {
replaceModelsInStore('grpc_event', events);
});
}, [connectionId]);

View File

@@ -54,7 +54,7 @@ export function useWebsocketEvents(connectionId: string | null) {
return;
}
invoke<WebsocketEvent[]>('plugin:yaak-models|websocket_events', { connectionId }).then(
invoke<WebsocketEvent[]>('models_websocket_events', { connectionId }).then(
(events) => replaceModelsInStore('websocket_event', events),
);
}, [connectionId]);

View File

@@ -2,5 +2,5 @@ import { invoke } from '@tauri-apps/api/core';
import type { Settings } from '@yaakapp-internal/models';
export function getSettings(): Promise<Settings> {
return invoke<Settings>('plugin:yaak-models|get_settings');
return invoke<Settings>('models_get_settings');
}