IF Commons GitHub

analysis

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-tool-command FR-002, 0002-tool-command FR-003

The analysis of a selection of tools: which tools, resolved to which dialects (or why not), what is installed, the order and the plan Archon makes, and for each dialect its render and its plan of steps. It writes nothing and runs nothing but what the dialects observe with; writeRendered is the one place files are written, and ensure the one place steps are run.

import { selectNames } from "./analysis.ts";
// selectNames(config, { phase: "core", names: [] }) is the tools of that phase, or the names given

Source: commons/archon-tool/src/analysis.ts

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

parsePhasefunctionno test imports it
function parsePhase(text: string): Result<Phase, string>

A phase from its word, or why it is not one.

selectNamesfunctionno test imports it
function selectNames(config: ToolPluginConfig, sel: { readonly phase?: Phase | undefined; readonly names: readonly string[]; }): Result<readonly string[], string>

The names of the tools a selection asks for: the names given, each of which must be in the catalog; otherwise every tool of the phase, or every tool where there is no phase.

describeProblemsfunctionno test imports it
function describeProblems(problems: readonly ResolveProblem[]): readonly string[]

A reason a tool cannot be resolved, as sentences: one for the tool, then one for each dialect that was not chosen.

Sharetypeno test imports it
type Share = { readonly runtime: ToolRuntime; readonly rendered: Rendered; readonly exec: ExecutionPlan | undefined };

One dialect's share of an analysis: what it renders, the steps it needs, and the plan of steps Headless runs.

Analysistypeno test imports it
type Analysis = {
  readonly resolution: Resolution;
  readonly requirements: readonly Requirement[];
  readonly observed: ReadonlyMap<RequirementId, JsonValue>;
  readonly order: Order;
  readonly plan: Plan;
  readonly shares: readonly Share[];
};

What an analysis found.

analysefunctionno test imports it
function analyse(config: ToolPluginConfig, names: readonly string[]): Promise<Result<Analysis, readonly string[]>>

The analysis of the named tools, or every reason it cannot be made.

writeRenderedfunctionno test imports it
function writeRendered(folder: string, rendered: Rendered): Promise<readonly string[]>

Writes what a dialect rendered below <folder>/.archon/<digest>/, where its steps read it, and says the paths.

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