pinSuffixfunctionfunction pinSuffix(os: string, arch: string): string | undefinedThe suffix of commons' pin variables for a platform (by the names proc.build gives); undefined where commons pins no download for it.
Commons' pins as the tools read them (commons 0005-typescript-practice FR-026, 0002-packaging FR-019): the KEY=value lines of pins.auto.env, the suffix of a platform's variables, and the download of a pin on a platform (its version, address, SHA-256, format and folder), all taken from the file and written nowhere else.
Spec: 0001-libraries FR-006
pinSuffixfunctionfunction pinSuffix(os: string, arch: string): string | undefinedThe suffix of commons' pin variables for a platform (by the names proc.build gives); undefined where commons pins no download for it.
readEnvFilefunctionfunction readEnvFile(text: string): ReadonlyMap<string, string>The KEY=value lines of an env file; comments and blank lines left out.
PinFormattypeno test imports ittype PinFormat = "zip" | "tar" | "file";The formats of what a pinned address gives.
PinDownloadtypeno test imports ittype PinDownload = {
readonly version: string;
readonly url: string;
readonly sha256: string;
readonly format: PinFormat;
/** The folder of the programs inside the unpacked artifact; empty for the root. */
readonly binPath: string;
};What a download of a pin on a platform needs.
PinProblemtypeno test imports ittype PinProblem =
| { readonly kind: "no-version"; readonly key: string }
| { readonly kind: "not-pinned"; readonly key: string; readonly suffix: string }
| { readonly kind: "bad-format"; readonly key: string; readonly suffix: string; readonly format: string };Why a pin has no download on a platform.
describePinProblemfunctionfunction describePinProblem(p: PinProblem): stringThe sentence a problem is told in.
pinDownloadfunctionfunction pinDownload(env: ReadonlyMap<string, string>, key: string, suffix: string): Result<PinDownload, PinProblem>The download of the pin key (BUN) for the platform suffix (X86_64) as pins.auto.env states it, or why it has none.