Skip to content

Commit

Permalink
chore: update types
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelass committed Jun 7, 2024
1 parent f251fd1 commit 5d9f33d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 100 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"@types/lodash": "^4.17.4",
"@types/node": "^20.14.2",
"@types/node-7z": "^2.1.8",
"@types/react": "^18.3.3",
"@types/react": "^18.3.1",
"@types/react-custom-scrollbars": "^4.0.13",
"@types/react-dom": "^18.3.0",
"@types/react-file-icon": "^1.0.4",
Expand Down
87 changes: 0 additions & 87 deletions src/client/organisms/sidebar-button/index.tsx

This file was deleted.

5 changes: 3 additions & 2 deletions src/electron/helpers/services/comfyui.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import fsp from "node:fs/promises";

import axios from "axios";
import { execa, type ExecaChildProcess } from "execa";
import type { ResultPromise } from "execa";
import { execa } from "execa";
import WebSocket from "ws";
import { stringify } from "yaml";

Expand Down Expand Up @@ -48,7 +49,7 @@ export enum ComfyUIStatus {
*/
export class ComfyUI {
public static instance: ComfyUI | null = null;
private process: ExecaChildProcess<string> | undefined;
private process: ResultPromise<NonNullable<unknown>> | undefined;
private url: string;
private host: string;
private port: number;
Expand Down
4 changes: 2 additions & 2 deletions src/electron/helpers/services/vector-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { EmbeddingsInterface } from "@langchain/core/embeddings";
import type { Schemas as QdrantSchemas } from "@qdrant/js-client-rest";
import { QdrantClient } from "@qdrant/js-client-rest";
import axios from "axios";
import type { ExecaChildProcess } from "execa";
import type { ResultPromise } from "execa";
import { execa } from "execa";
import { v4 } from "uuid";

Expand All @@ -21,7 +21,7 @@ export interface ServiceReadyConfig {
export class VectorStore {
private static instance: VectorStore | null = null;
private client: QdrantClient | null = null;
private process: ExecaChildProcess<string> | undefined;
private process: ResultPromise<NonNullable<unknown>> | undefined;
private embeddings: EmbeddingsInterface;
private host: string;
private port: number;
Expand Down
6 changes: 4 additions & 2 deletions src/electron/helpers/utils/__tests__/git.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from "node:fs";

import type { ExecaChildProcess } from "execa";
import type { ResultPromise } from "execa";
import { execa } from "execa";

jest.mock("execa");
Expand Down Expand Up @@ -196,7 +196,9 @@ describe("clone", () => {
}),
},
};
mockedExeca.mockReturnValueOnce(mockChildProcess as unknown as ExecaChildProcess<Buffer>);
mockedExeca.mockReturnValueOnce(
mockChildProcess as unknown as ResultPromise<NonNullable<unknown>>
);

const onProgressMock = jest.fn();

Expand Down
4 changes: 2 additions & 2 deletions src/electron/helpers/utils/git.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from "node:fs";
import path from "node:path";

import type { ExecaChildProcess } from "execa";
import type { ResultPromise } from "execa";
import { execa } from "execa";

import { createDirectory } from "@/electron/utils/fs";
Expand Down Expand Up @@ -39,7 +39,7 @@ export async function clone(repository: string, destination: string, options?: G

createDirectory(destinationPath);

let process_: ExecaChildProcess | null = null;
let process_: ResultPromise<NonNullable<unknown>> | null = null;

function cancel() {
if (process_) {
Expand Down

0 comments on commit 5d9f33d

Please sign in to comment.