IF Commons GitHub

governance/model

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-estate-endpoints-model FR-001

What a reader gives: assets and links of the estate, as the importers of infrastructure as code give them (Imported, ImportedLink of estate-iac), with the format that was read and what could not be read. Every asset carries provenance as format:file#where, and is discovered: reading a description of an endpoint adopts nothing.

import { provenance } from "./model.ts";
provenance("openapi", "api.yaml", "servers[0]"); // "openapi:api.yaml#servers[0]"

Source: commons/estate-endpoints/src/governance/model.ts

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

governance.FORMATSconstno test imports it
const FORMATS: readonly ["openapi", "graphql", "android", "ios", "dns-zone", "certificate", "listening-ports"]

The formats read.

governance.Formattypeno test imports it
type Format = (typeof FORMATS)[number];

A format read.

governance.Foundtypeno test imports it
type Found = { readonly format: Format; readonly source: string; readonly assets: readonly Imported[]; readonly links: readonly ImportedLink[]; readonly problems: readonly string[] };

What a reader gives for one file or one text.

governance.provenancefunctionno test imports it
function provenance(format: "android" | "certificate" | "dns-zone" | "graphql" | "ios" | "listening-ports" | "openapi", source: string, where: string): string

Where an asset was read from, as format:file#where.

governance.partsfunctionno test imports it
function parts(url: string): { readonly scheme: string; readonly host: string; readonly port?: number | undefined; readonly path?: string | undefined; } | undefined

The host, port and path of a URL, with the scheme: nothing where it is not an absolute URL of a scheme the estate has.

FORMATSconst
const FORMATS: readonly ["openapi", "graphql", "android", "ios", "dns-zone", "certificate", "listening-ports"]

The formats read.

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

Formattypeno test imports it
type Format = (typeof FORMATS)[number];

A format read.

Foundtype
type Found = { readonly format: Format; readonly source: string; readonly assets: readonly Imported[]; readonly links: readonly ImportedLink[]; readonly problems: readonly string[] };

What a reader gives for one file or one text.

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

provenancefunction
function provenance(format: "android" | "certificate" | "dns-zone" | "graphql" | "ios" | "listening-ports" | "openapi", source: string, where: string): string

Where an asset was read from, as format:file#where.

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

partsfunction
function parts(url: string): { readonly scheme: string; readonly host: string; readonly port?: number | undefined; readonly path?: string | undefined; } | undefined

The host, port and path of a URL, with the scheme: nothing where it is not an absolute URL of a scheme the estate has.

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

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