From 5b7a0e17ec26a1122c9d0bcceff7c0417e10e40b Mon Sep 17 00:00:00 2001 From: Blu-J Date: Thu, 8 Jun 2023 10:23:49 -0600 Subject: [PATCH] chore: Remove effects There are effects that we don't need now that we are going node first. --- lib/types.ts | 68 +++++++++++++--------------------------------------- 1 file changed, 16 insertions(+), 52 deletions(-) diff --git a/lib/types.ts b/lib/types.ts index 4b20a93..a074b9f 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -219,20 +219,6 @@ export type ExposeUiPaths = Array<{ }> /** Used to reach out from the pure js runtime */ export type Effects = { - runCommand( - command: ValidIfNoStupidEscape | [string, ...string[]], - options?: { - timeoutMillis?: number - env?: Record - }, - ): Promise - runDaemon( - command: ValidIfNoStupidEscape | [string, ...string[]], - options?: { - env?: Record - }, - ): DaemonReturned - executeAction(opts: { serviceId?: string input: Input @@ -265,44 +251,22 @@ export type Effects = { callback: () => void }): Promise<[HostName, ...HostName[]]> - /** Similar to the fetch api via the mdn, this is simplified but the point is - * to get something from some website, and return the response. - */ - fetch( - url: string, - options?: { - method?: "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "PATCH" - headers?: Record - body?: string - }, - ): Promise<{ - method: string - ok: boolean - status: number - headers: Record - body?: string | null - /// Returns the body as a string - text(): Promise - /// Returns the body as a json - json(): Promise - }> - - /** - * Run rsync between two volumes. This is used to backup data between volumes. - * This is a long running process, and a structure that we can either wait for, or get the progress of. - */ - runRsync(options: { - srcVolume: string - dstVolume: string - srcPath: string - dstPath: string - // rsync options: https://linux.die.net/man/1/rsync - options: BackupOptions - }): { - id: () => Promise - wait: () => Promise - progress: () => Promise - } + // /** + // * Run rsync between two volumes. This is used to backup data between volumes. + // * This is a long running process, and a structure that we can either wait for, or get the progress of. + // */ + // runRsync(options: { + // srcVolume: string + // dstVolume: string + // srcPath: string + // dstPath: string + // // rsync options: https://linux.die.net/man/1/rsync + // options: BackupOptions + // }): { + // id: () => Promise + // wait: () => Promise + // progress: () => Promise + // } store: { /** Get a value in a json like data, can be observed and subscribed */