Fix lint issues

This commit is contained in:
Gregory Schier
2024-09-06 10:59:14 -07:00
parent c02aa4f2d0
commit 0c8953c471
6 changed files with 13 additions and 12 deletions

8
package-lock.json generated
View File

@@ -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"
}

View File

@@ -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",

View File

@@ -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": [

View File

@@ -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';

View File

@@ -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();
}}

View File

@@ -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;
},
});