Skip to content
Français

HostConfiguration

import type { HostConfiguration } from "@elie-laloum/outpost";
  • sourceRequired
    HostCredentialPath
    Host file to read, with an optional environment variable that relocates its directory.
  • pathRequired
    string
    Destination relative to the agent home, without . or .. segments.
  • sectionOptional
    string | undefined
    Top-level key that receives the selected entries in the destination; without it they are merged at the root.
  • optionalOptional
    boolean | undefined
    Skip the file when it does not exist on the host instead of failing.
  • loginRequired
    string
    Host command named in the error when a required file is missing.
  • selectRequired
    (content: string) => Readonly<Record<string, unknown>>
    Return the entries to merge from the file content; throw when the expected login is absent.
export interface HostConfiguration {
  readonly source: HostCredentialPath;
  readonly path: string;
  readonly section?: string;
  readonly optional?: boolean;
  readonly login: string;
  select(content: string): Readonly<Record<string, unknown>>;
}