English
core/charts/repos.ts
Generated from the exports of core/charts/repos.ts · npm run docs:gen
The repositories a machine reads charts from (alta.repos/0.1, docs/standards/alta-index-0.1.md §7): their names, addresses and keys, kept in ~/.config/alta/repos.json by alta repo add and alta repo remove. Pure.
Standards that cite this file: alta.index/0.1: the chart repository index
Exports
REPOS_SCHEMA const
ts
const REPOS_SCHEMA = "alta.repos/0.1"RESERVED_REPO_NAMES const
Names a remote repository may not take: the local folders alta repo list already shows.
ts
const RESERVED_REPO_NAMES = ["modules", "agents", "engine", "local", "world-charts"]RepoEntry interface
ts
interface RepoEntry { name: string; url: string; added: string; key?: { alg: "ed25519"; public: string }; unsigned?: true }Repos interface
ts
interface Repos { schema: typeof REPOS_SCHEMA; repos: RepoEntry[] }emptyRepos const
ts
const emptyRepos = (): Repos => …repoNameProblem function
Why a repository name cannot be used (undefined = it can).
ts
function repoNameProblem(name: unknown): string | undefinedcheckRepoUrl function
Why an index address cannot be used (undefined = it can): https, no credentials; http only for 127.0.0.1 in tests.
ts
function checkRepoUrl(url: unknown, rules: UrlRules = {}): string | undefinedcheckRepos function
Problems of a repos file (empty = valid).
ts
function checkRepos(x: unknown, rules: UrlRules = {}): string[]withRepo function
The repos with one added (refused when the name is taken).
ts
function withRepo(repos: Repos, entry: RepoEntry): Repos | stringwithoutRepo function
The repos without one.
ts
function withoutRepo(repos: Repos, name: string): Repos | string