diff --git a/package-lock.json b/package-lock.json index 3b3bdd1d..e6fc9667 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "@tauri-apps/plugin-log": "^2.0.0-rc.1", "@tauri-apps/plugin-os": "^2.0.0-rc.1", "@tauri-apps/plugin-shell": "^2.0.0-rc.1", - "@yaakapp/api": "^0.1.16", + "@yaakapp/api": "^0.1.17", "buffer": "^6.0.3", "classnames": "^2.3.2", "cm6-graphql": "^0.0.9", @@ -2986,9 +2986,9 @@ "integrity": "sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ==" }, "node_modules/@yaakapp/api": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.1.16.tgz", - "integrity": "sha512-rWXXb0iUiUk6jtLhZFcbdMRIf6dYXY9wyIvFG9rVpyMxB0LWjim8VpvwF4IK4Y/paxvZ9bjvnaD5PAB4pH6prg==", + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.1.17.tgz", + "integrity": "sha512-VE9A0FDZwczZkTAbMOYjQOKzbW1KmaItq/mPSuTgU87Lf570JUepcHVtL7QFLV1U/R5q+n7I6xQg9Q2mDj/OWQ==", "dependencies": { "@types/node": "^22.0.0" } diff --git a/package.json b/package.json index 15ddb2db..d57c922b 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@tauri-apps/plugin-log": "^2.0.0-rc.1", "@tauri-apps/plugin-os": "^2.0.0-rc.1", "@tauri-apps/plugin-shell": "^2.0.0-rc.1", - "@yaakapp/api": "^0.1.16", + "@yaakapp/api": "^0.1.17", "buffer": "^6.0.3", "classnames": "^2.3.2", "cm6-graphql": "^0.0.9", diff --git a/plugin-runtime-types/package.json b/plugin-runtime-types/package.json index 5a045d8e..0efef8e9 100644 --- a/plugin-runtime-types/package.json +++ b/plugin-runtime-types/package.json @@ -1,6 +1,6 @@ { "name": "@yaakapp/api", - "version": "0.1.16", + "version": "0.1.17", "main": "lib/index.js", "typings": "./lib/index.d.ts", "files": [ diff --git a/plugin-runtime-types/src/index.ts b/plugin-runtime-types/src/index.ts index 9772e09f..66739769 100644 --- a/plugin-runtime-types/src/index.ts +++ b/plugin-runtime-types/src/index.ts @@ -43,6 +43,8 @@ export * from './gen/InternalEvent'; export * from './gen/InternalEventPayload'; export * from './gen/KeyValue'; export * from './gen/Model'; +export * from './gen/PluginBootRequest'; +export * from './gen/PluginBootResponse'; export * from './gen/RenderHttpRequestRequest'; export * from './gen/RenderHttpRequestResponse'; export * from './gen/RenderPurpose'; diff --git a/src-web/components/GrpcProtoSelection.tsx b/src-web/components/GrpcProtoSelection.tsx index 6bdbf1c8..6c8c7dfa 100644 --- a/src-web/components/GrpcProtoSelection.tsx +++ b/src-web/components/GrpcProtoSelection.tsx @@ -45,10 +45,9 @@ export function GrpcProtoSelection({ requestId }: Props) { multiple: true, filters: [{ name: 'Proto Files', extensions: ['proto'] }], }); - if (selected == null) { - return; - } - const newFiles = selected.map((f) => f.path).filter((p) => !protoFiles.includes(p)); + if (selected == null) return; + + const newFiles = selected.filter((p) => !protoFiles.includes(p)); await protoFilesKv.set([...protoFiles, ...newFiles]); await grpc.reflect.refetch(); }} diff --git a/src-web/hooks/usePluginInfo.ts b/src-web/hooks/usePluginInfo.ts index 081e592b..6a109f50 100644 --- a/src-web/hooks/usePluginInfo.ts +++ b/src-web/hooks/usePluginInfo.ts @@ -1,12 +1,12 @@ import { useQuery } from '@tanstack/react-query'; -import type { BootResponse } from '@yaakapp/api'; +import type { PluginBootResponse } from '@yaakapp/api'; import { invokeCmd } from '../lib/tauri'; export function usePluginInfo(id: string) { return useQuery({ queryKey: ['plugin_info', id], queryFn: async () => { - const info = (await invokeCmd('cmd_plugin_info', { id })) as BootResponse; + const info = (await invokeCmd('cmd_plugin_info', { id })) as PluginBootResponse; return info; }, });