IF Commons GitHub

config

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-dns-command FR-001

What a fleet gives the plugin for DNS: the options of its own, and for a zone the records it wants and the provider that holds them. The plugin holds no provider and no token.

import type { DnsPluginConfig } from "./config.ts";
// a fleet writes { version, subject } and gives it to dnsPlugin

Source: commons/archon-dns/src/config.ts

1 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.

FleetOptiontypeno test imports it
type FleetOption = ValueOption<string, "none" | "required" | "default", never>;

An option of the fleet's own, as the terminal takes one.

DnsSubjecttypeno test imports it
type DnsSubject = {
  /** The records the fleet wants in the zone. */
  readonly wanted: readonly DnsRecord[];
  /** The provider of the zone. */
  readonly provider: DnsProvider;
};

What is known of one zone.

Refusaltypeno test imports it
type Refusal = { readonly message: string; readonly code: string; readonly exit: "usage" | "findings" | "environment" };

Why a zone is not for the plugin to change, in the fleet's own words and code.

DnsPluginConfigtype
type DnsPluginConfig = { /** The version of the plugin as published. */ readonly version: string; /** The program … (550 characters)
type DnsPluginConfig = {
  /** The version of the plugin as published. */
  readonly version: string;
  /** The program the plugin extends: `archon` by default. */
  readonly program?: string;
  /** The options of the fleet's own (where the tenant is, where the token is), by name. */
  readonly options?: Readonly<Record<string, FleetOption>>;
  /** The records and the provider of a zone, given the options the person gave. */
  readonly subject: (zone: string, options: Readonly<Record<string, string>>) => Promise<Result<DnsSubject, Refusal>>;
};

What the plugin is made with.

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

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