governance.ARCHITECTURESconstno test imports itconst ARCHITECTURES: readonly ["x86_64", "aarch64"]The architectures of a machine, as uname -m names them for the ones in use.
What kind of machine a Linux machine is: its family (the way its packages are managed), its distribution, its release and its architecture. The family is the fact the rest depends on: a dialect carries a package by the program of the family, and an observation reads it by the program of the family.
import { familyOf } from "./platform.ts";
familyOf("rocky", "rhel centos fedora"); // "rhel"governance.ARCHITECTURESconstno test imports itconst ARCHITECTURES: readonly ["x86_64", "aarch64"]The architectures of a machine, as uname -m names them for the ones in use.
governance.FAMILIESconstno test imports itconst FAMILIES: readonly ["debian", "rhel", "suse", "arch"]The families of Linux that Archon tells apart, by how packages are managed: debian (dpkg and apt), rhel (rpm and dnf), suse (rpm and zypper), arch (pacman).
governance.FAMILY_OF_IDconstno test imports itconst FAMILY_OF_ID: Readonly<Record<string, "arch" | "debian" | "rhel" | "suse">>The families by the ID of a distribution. The ones a distribution derives from are found by ID_LIKE where the ID is not here.
governance.familyOffunctionno test imports itfunction familyOf(id: string, idLike?: string): "arch" | "debian" | "rhel" | "suse" | undefinedThe family of a distribution from the ID and the ID_LIKE of its os-release, or nothing where neither is one Archon knows (it is then said, never guessed).
governance.Architecturetypeno test imports ittype Architecture = (typeof ARCHITECTURES)[number];An architecture.
governance.Declaredtypeno test imports ittype Declared = { readonly family: Family; readonly distro: string; readonly release: string; readonly arch: Architecture };What the model declares of a machine: the same, with the architecture always said. Whether it is a server or a workstation is the kind of its asset, said once there.
governance.Familytypeno test imports ittype Family = (typeof FAMILIES)[number];A family.
governance.Observedtypeno test imports ittype Observed = { readonly family: Family; readonly distro: string; readonly release: string; readonly arch?: Architecture };What is read of a machine: its family, the ID and VERSION_ID of /etc/os-release, and the architecture where it was asked.
ARCHITECTURESconstno test imports itconst ARCHITECTURES: readonly ["x86_64", "aarch64"]The architectures of a machine, as uname -m names them for the ones in use.
FAMILIESconstno test imports itconst FAMILIES: readonly ["debian", "rhel", "suse", "arch"]The families of Linux that Archon tells apart, by how packages are managed: debian (dpkg and apt), rhel (rpm and dnf), suse (rpm and zypper), arch (pacman).
FAMILY_OF_IDconstno test imports itconst FAMILY_OF_ID: Readonly<Record<string, "arch" | "debian" | "rhel" | "suse">>The families by the ID of a distribution. The ones a distribution derives from are found by ID_LIKE where the ID is not here.
familyOffunctionfunction familyOf(id: string, idLike?: string): "arch" | "debian" | "rhel" | "suse" | undefinedThe family of a distribution from the ID and the ID_LIKE of its os-release, or nothing where neither is one Archon knows (it is then said, never guessed).
Architecturetypeno test imports ittype Architecture = (typeof ARCHITECTURES)[number];An architecture.
Declaredtypeno test imports ittype Declared = { readonly family: Family; readonly distro: string; readonly release: string; readonly arch: Architecture };What the model declares of a machine: the same, with the architecture always said. Whether it is a server or a workstation is the kind of its asset, said once there.
Familytypeno test imports ittype Family = (typeof FAMILIES)[number];A family.
Observedtypeno test imports ittype Observed = { readonly family: Family; readonly distro: string; readonly release: string; readonly arch?: Architecture };What is read of a machine: its family, the ID and VERSION_ID of /etc/os-release, and the architecture where it was asked.