physical.ConfigProblemtypeno test imports ittype ConfigProblem = { readonly code: "E-CONFIG-MISSING" | "E-CONFIG-LOAD" | "E-CONFIG-INVALID"; readonly message: string };Why a configuration could not be had.
How the host finds and loads a repository's configuration (commons repoctl 0009-repoctl-config FR-002): --config FILE, else the first repoctl.config.ts from the working folder up to the root of the Git checkout; the file is imported (it runs on Bun and on Node 26 as it is), its default export, or its export config, is read by parseConfig, and every way it can fail is a typed problem with its code. The repository's root is the folder of the file.
import { findConfigFile } from "@intellectual-frontiers/repoctl/physical";
findConfigFile("/nowhere/at/all", undefined); // undefinedphysical.ConfigProblemtypeno test imports ittype ConfigProblem = { readonly code: "E-CONFIG-MISSING" | "E-CONFIG-LOAD" | "E-CONFIG-INVALID"; readonly message: string };Why a configuration could not be had.
physical.findConfigFilefunctionno test imports itfunction findConfigFile(from: string, explicit: string | undefined): string | undefinedThe configuration's file: the one --config names, else the first repoctl.config.ts from a folder up to the root of the checkout (the first folder that holds .git, which is searched too).
physical.loadConfigFilefunctionno test imports itfunction loadConfigFile(file: string): Promise<Result<{ readonly root: string; readonly config: Config; }, ConfigProblem>>Loads a configuration file: its root (the folder it is in) and the configuration, or the problem.
physical.bareConfigfunctionno test imports itfunction bareConfig(): ConfigThe configuration of no repository: no generator, no check, no optional verb. What a host holds where the file is missing, so that help and doctor still run.
physical.describedConfigfunctionno test imports itfunction describedConfig(): ConfigThe configuration of an imagined repository that has every optional verb, which is what a documentation lens describes: the program is described with all of its verbs.
loadConfigFilefunctionfunction loadConfigFile(file: string): Promise<Result<{ readonly root: string; readonly config: Config; }, ConfigProblem>>Loads a configuration file: its root (the folder it is in) and the configuration, or the problem.
findConfigFilefunctionno test imports itfunction findConfigFile(from: string, explicit: string | undefined): string | undefinedThe configuration's file: the one --config names, else the first repoctl.config.ts from a folder up to the root of the checkout (the first folder that holds .git, which is searched too).
ConfigProblemtypeno test imports ittype ConfigProblem = { readonly code: "E-CONFIG-MISSING" | "E-CONFIG-LOAD" | "E-CONFIG-INVALID"; readonly message: string };Why a configuration could not be had.
bareConfigfunctionno test imports itfunction bareConfig(): ConfigThe configuration of no repository: no generator, no check, no optional verb. What a host holds where the file is missing, so that help and doctor still run.
describedConfigfunctionno test imports itfunction describedConfig(): ConfigThe configuration of an imagined repository that has every optional verb, which is what a documentation lens describes: the program is described with all of its verbs.