Hostinterfaceinterface HostWhat a person's machine says of itself.
| Member | Type | What it is |
|---|---|---|
platform | Platform | |
env | Readonly<Record<string, string | undefined>> |
The workstation model of arcactl (commons data 0047-arcactl-init FR-001): where a person's files are, on Linux, macOS and Windows, for what arcactl init sets up: the files libpq and psql read (.pgpass, pg_service.conf, .psqlrc), the directories arcactl keeps its own settings, cache and state in, and the profile of each shell. It is a function of the platform and the environment, and touches no file, so that a test can say where a Windows user's files are on Linux. libpq's own variables win where it has them (PGPASSFILE, PGSERVICEFILE, PSQLRC).
Hostinterfaceinterface HostWhat a person's machine says of itself.
| Member | Type | What it is |
|---|---|---|
platform | Platform | |
env | Readonly<Record<string, string | undefined>> |
isPlatformconstno test imports itconst isPlatform: (s: string) => s is PlatformWhether a name is a platform.
Pathsinterfaceinterface PathsWhere a person's files are.
| Member | Type | What it is |
|---|---|---|
platform | Platform | |
home | string | |
config | string | The directory arcactl keeps its settings in, and where the psql file it owns is. |
cache | string | |
state | string | |
pgpass | string | |
pgServiceFile | string | |
psqlrc | string | The psqlrc that psql reads. |
arcaPsqlrc | string | The psql file arcactl owns, which the managed block of psqlrc includes. |
instances | string | The file of the instances arcactl knows. |
profiles | Readonly<Record<Shell, Profile>> |
pathsOffunctionfunction pathsOf(host: Host): Result<Paths, string>Where the files are.
| Parameter | What it is |
|---|---|
host | the platform and the environment |
Returns: the paths, or why they cannot be known (no home directory)
Profileinterfaceno test imports itinterface ProfileThe profile files of a shell: which are written, and whether all of them or the first that is there.
| Member | Type | What it is |
|---|---|---|
files | readonly string[] | |
policy | "all" | "first-existing" |
profileTargetsfunctionfunction profileTargets(profile: Profile, exists: (file: string) => boolean): readonly string[]The files of a profile that are to be written: all, or the first that exists (the first where none does).
Shelltypetype Shell = "bash" | "zsh" | "fish" | "pwsh" | "nu" | "sh";The shells a profile can be made for.
shellOffunctionfunction shellOf(name: string | undefined): Shell | undefinedThe shell a name says, where it is one: /usr/bin/zsh, pwsh.exe, powershell and nu included.
shellsconstconst shells: readonly Shell[]The shells that a workstation setup writes a start-up snippet for.