IF Commons GitHub

physical/dialect

Written to: 4 requirements: 4 proved, 0 partly, 0 failing, 0 with no test recorded. 0004-package-managers-dialect FR-003, 0004-package-managers-dialect FR-001, 0004-package-managers-dialect FR-002, 0004-package-managers-dialect FR-005

The dialect of a manager, made from its ManagerSpec and the commands of the ontology: its guarantees as data (for Archon and for Toolchain), the plan file it renders from an order and a plan, one step for each tool (the manager's own command, with its check where the status of a missing package is known), and the observation that gives Archon what is installed and at what version. Nothing is built from source and nothing is run by a shell.

import { managerDialect } from "./dialect.ts";
// managerDialect(spec, commands, { elevate: ["sudo", "-n"] }) is a Dialect for the port of Archon

Source: commons/package-managers/src/physical/dialect.ts

3 of 4 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

DialectOptionstypeno test imports it
type DialectOptions = {
  /** The program that raises the rights, put before a command of a manager that needs them (`["sudo", "-n"]`); none by default. */
  readonly elevate?: readonly string[];
  /** The folder the files of a render are written in, below the working folder; `.archon` by default. */
  readonly renderRoot?: string;
};

What a dialect is made with.

toolDialectOffunction
function toolDialectOf(spec: ManagerSpec): ToolDialect

The dialect as Toolchain reads it.

Imported by 7 tests of the run (7 passed, 0 failed): the library's results

managerDialectfunction
function managerDialect(spec: ManagerSpec, commands: CommandSource, o?: DialectOptions): Dialect

The dialect, as the port of Archon takes it.

Imported by 7 tests of the run (7 passed, 0 failed): the library's results

observeRequirementsfunction
function observeRequirements(spec: ManagerSpec, commands: CommandSource, requirements: readonly Requirement[], o?: { readonly run?: Run | undefined; }): Promise<ReadonlyMap<RequirementId, JsonValue>>

What Archon is given of what is installed: the desired state itself for a tool installed at the version it asks, a state that differs for one installed at another, nothing for one that is absent or cannot be asked.

Imported by 7 tests of the run (7 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.