logical.readsfunctionno test imports itfunction reads(later: Generator, earlier: Generator): booleanWhether later comes after earlier: it declares it in after, or it reads something that earlier writes.
The order of the generators (commons repoctl 0003-repoctl-sync FR-001): a generator comes after every generator it declares in after and every generator that writes something it reads, which the globs of the table say, and where the facts do not order two of them the table's own order stands. A table in which generators wait for one another is refused with the ones that do. Pure: the same table gives the same order.
import { GENERATORS } from "@intellectual-frontiers/repoctl/governance";
import { orderGenerators } from "./order.ts";
const r = orderGenerators(GENERATORS);
r.kind === "ok" && r.value[0]?.id; // "libraries"logical.readsfunctionno test imports itfunction reads(later: Generator, earlier: Generator): booleanWhether later comes after earlier: it declares it in after, or it reads something that earlier writes.
logical.orderGeneratorsfunctionno test imports itfunction orderGenerators(table: readonly Generator[]): Result<readonly Generator[], readonly StepId[]>The generators in the order they are run, or the ids of those that wait for one another.
logical.generatorOffunctionno test imports itfunction generatorOf(table: readonly Generator[], path: string): Generator | undefinedThe generator that writes a path (from the repository's root, with /), the first of the table where two globs match it; none where no generator writes it.
logical.fixOffunctionno test imports itfunction fixOf(g: Generator): stringThe command that fixes a stale generator, as a person types it.
readsfunctionfunction reads(later: Generator, earlier: Generator): booleanWhether later comes after earlier: it declares it in after, or it reads something that earlier writes.
orderGeneratorsfunctionfunction orderGenerators(table: readonly Generator[]): Result<readonly Generator[], readonly StepId[]>The generators in the order they are run, or the ids of those that wait for one another.
generatorOffunctionfunction generatorOf(table: readonly Generator[], path: string): Generator | undefinedThe generator that writes a path (from the repository's root, with /), the first of the table where two globs match it; none where no generator writes it.
fixOffunctionno test imports itfunction fixOf(g: Generator): stringThe command that fixes a stale generator, as a person types it.