IF Commons GitHub

logical/parse

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-linux-services-profiles FR-001, 0002-linux-services-profiles FR-002

The parsing of a profile: every reason it is refused, and a value only where there is none. A field that looks like a secret is refused.

import { parsePostgres } from "./parse.ts";
parsePostgres({ machine: "olympia", version: 18, port: 5432, listen: ["localhost"] }).kind; // "ok"

Source: commons/linux-services/src/logical/parse.ts

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

logical.parseCertificatefunctionno test imports it
function parseCertificate(input: unknown): Result<CertificateProfile, readonly string[]>

A certificate profile from what was written.

logical.parseMailRelayfunctionno test imports it
function parseMailRelay(input: unknown): Result<MailRelayProfile, readonly string[]>

A mail relay profile from what was written.

logical.parseMcpAccessfunctionno test imports it
function parseMcpAccess(input: unknown): Result<McpAccessProfile, readonly string[]>

A tool-server access profile from what was written: the account, the program and each key as one public key line (a private key or anything else is refused).

logical.parsePostgresfunctionno test imports it
function parsePostgres(input: unknown): Result<PostgresProfile, readonly string[]>

A PostgreSQL profile from what was written.

parseCertificatefunction
function parseCertificate(input: unknown): Result<CertificateProfile, readonly string[]>

A certificate profile from what was written.

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

parseMailRelayfunction
function parseMailRelay(input: unknown): Result<MailRelayProfile, readonly string[]>

A mail relay profile from what was written.

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

parseMcpAccessfunction
function parseMcpAccess(input: unknown): Result<McpAccessProfile, readonly string[]>

A tool-server access profile from what was written: the account, the program and each key as one public key line (a private key or anything else is refused).

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

parsePostgresfunction
function parsePostgres(input: unknown): Result<PostgresProfile, readonly string[]>

A PostgreSQL profile from what was written.

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

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