The configuration of the anyfs program, written as code (commons anyfs-cli 0003-anyfs-cli-logicalFR-001, FR-002): the file anyfs.config.ts exports defineConfig({ ... }), whose mounts name places (fleet is ssh://alpha.example.org/srv/fleet), whose defaults bound a transfer, and whose kinds are the openers of stores that other libraries bring (anyfs-git, anyfs-sql, a bucket): so that a new backend is a line of the configuration and no change to the program. parseConfig checks the whole of it and returns every problem it finds at once, never the first only.
Whom a store that merges takes changes from, and how it signs, as a mount says it: the mode, the file or variable (env:NAME) that holds the roster of keys, the replicas it takes from where the mode names them, and the files or variables of the keys it signs with (never the keys themselves).
typeDefaults= {
/** At most this many actions at once. */readonlyconcurrency:number;
readonlyverify:VerifyMode;
/** Files larger than this many bytes are left as they are, in a transfer; none means no limit. */readonlymaxObjectBytes:number|undefined;
};
What a transfer is bounded by where the command line says nothing.
typeOpenerContext= {
readonlyenv: (name:string) =>string|undefined;
/** The folder the program keeps its state in (the bases of two-way syncs, the ledgers of mirrors). */readonlystateDir:string;
};
typePlaceOpener= {
readonlykind:PlaceKind;
/** Opens the store at the root of the place. The place of a store of a folder or a host is its root: the path inside it is the command line's. */readonlyopen: (place:Place, context:OpenerContext) =>Promise<Result<AnyStore, string>>;
};
The opener of the stores of one kind of place: brought by the library of the kind and listed in the kinds of the configuration.