From 27acf553397bfe850e3f49b8d092e9bcc90573e5 Mon Sep 17 00:00:00 2001 From: J H <2364004+Blu-J@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:09:35 -0700 Subject: [PATCH] feat: add effect for creating overlay --- lib/types.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/types.ts b/lib/types.ts index 0ae4d1e..f6df9ab 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -5,8 +5,6 @@ import { PortOptions } from "./interfaces/Host" import { UrlString } from "./util/getNetworkInterface" import { NetworkInterfaceType } from "./util/utils" -export type Signals = "SIGINT" | "SIGTERM" | "SIGKILL" | "SIGHUP" - export type ExportedAction = (options: { effects: Effects input?: Record @@ -130,7 +128,7 @@ export type DaemonReceipt = { } export type Daemon = { wait(): Promise - term(options?: { signal?: Signals; timeout?: number }): Promise + term(): Promise [DaemonProof]: never } @@ -150,7 +148,7 @@ export type CommandType = export type DaemonReturned = { wait(): Promise - term(options?: { signal?: Signals; timeout?: number }): Promise + term(): Promise } export type ActionMetadata = { @@ -224,10 +222,14 @@ export type ExposeUiPaths = Array<{ export type Effects = { executeAction(opts: { serviceId?: string - actionId: string input: Input }): Promise + /** The idea is that we can mount the imageId, and it returns us the location of the mount. */ + createOverlayImage(options: { imageId: string }): Promise + /** Sandbox mode lets us read but not write */ + is_sandboxed(): Promise + /** Removes all network bindings */ clearBindings(): Promise /** Creates a host connected to the specified port with the provided options */ @@ -397,8 +399,6 @@ export type Effects = { message?: string }): Promise - setMainStatus(o: { status: "running" | "stopped" }): Promise - /** Set the dependencies of what the service needs, usually ran during the set config as a best practice */ setDependencies(dependencies: Dependencies): Promise /** Exists could be useful during the runtime to know if some service exists, option dep */