diff --git a/types.ts b/types.ts index 0e9613d..9e2ce81 100644 --- a/types.ts +++ b/types.ts @@ -3,6 +3,8 @@ import { ConfigSpec } from "./types/config-types.ts"; // deno-lint-ignore no-namespace export namespace ExpectedExports { + version: + 2; /** Set configuration is called after we have modified and saved the configuration in the embassy ui. Use this to make a file for the docker to read from for configuration. */ export type setConfig = ( effects: Effects, @@ -79,8 +81,8 @@ export type Effects = { metadata(input: { volumeId: string; path: string }): Promise; /** Create a directory. Usable when not sandboxed */ createDir(input: { volumeId: string; path: string }): Promise; - /** Create a directory. Usable when not sandboxed */ - createDir(input: { volumeId: string; path: string }): Promise; + + readDir(input: { volumeId: string; path: string }): Promise; /** Remove a directory. Usable when not sandboxed */ removeDir(input: { volumeId: string; path: string }): Promise; removeFile(input: { volumeId: string; path: string }): Promise; @@ -103,6 +105,9 @@ export type Effects = { term(): Promise; }; + chown(input: { volumeId: string; path: string; uid: string }): Promise; + chmod(input: { volumeId: string; path: string; mode: string }): Promise; + sleep(timeMs: number): Promise; /** Log at the trace level */ @@ -120,6 +125,12 @@ export type Effects = { is_sandboxed(): boolean; exists(input: { volumeId: string; path: string }): Promise; + bindLocal( + options: { internalPort: number; name: string; externalPort: number }, + ): Promise; + bindTor( + options: { internalPort: number; name: string; externalPort: number }, + ): Promise; fetch( url: string,