diff --git a/lib/util/utils.ts b/lib/util/utils.ts index 987a72b..51b0ac2 100644 --- a/lib/util/utils.ts +++ b/lib/util/utils.ts @@ -23,6 +23,7 @@ import { Path, } from "../dependency/setupDependencyMounts" import { Host, MultiHost, SingleHost, StaticHost } from "../interfaces/Host" +import { NetworkInterfaceBuilder } from "../interfaces/NetworkInterfaceBuilder" export type Utils = { checkPortListening( @@ -42,6 +43,15 @@ export type Utils = { errorMessage?: string }, ): Promise + createInterface: (options: { + name: string + id: string + description: string + ui: boolean + username: null | string + path: string + search: Record + }) => NetworkInterfaceBuilder createOrUpdateVault: (opts: { key: string value: string | null | undefined @@ -114,6 +124,15 @@ export const utils = < await effects.vault.set({ key, value: newValue }) return newValue }, + createInterface: (options: { + name: string + id: string + description: string + ui: boolean + username: null | string + path: string + search: Record + }) => new NetworkInterfaceBuilder({ ...options, effects }), getSystemSmtp: () => new GetSystemSmtp(effects) as GetSystemSmtp & WrapperOverWrite,