Skip to main content

Module registry

Module registry 

Source
Expand description

Mapping a tenant-qualified registry string to the hub’s public, unauthenticated read URLs (#893, #917).

A registry dependency names its source as host/tenant[/store]:

[dependencies]
lex-nt = { registry = "vcs.lexlang.org/lex-official/lex-nt", version = "^1.2" }

The public package surface the hub serves is GET https://<host>/v1/public/<tenant>/<name>/… (a named store is selected with ?store=<store>), and it needs no credentials for a public package. The resolver (lex pkg lock/install) reads that surface, so it must turn the registry string into those URLs rather than hitting the authenticated, tenant-from-key /v1/pkg/<name>/… routes (which return 401 to an anonymous resolver).

A bare-host registry ("vcs.lexlang.org", no tenant) can’t address the public surface — there’s no tenant to scope to — so public returns None and the caller falls back to the legacy {registry}/v1/pkg/… form (which only ever worked for a single-tenant host anyway).

Structs§

PublicRegistry
A registry resolved to its public read surface.

Functions§

public
Parse a host/tenant[/store] registry (scheme optional, trailing slash tolerated) into its public read surface. Returns None for a bare-host registry with no tenant segment — the caller then uses the legacy {registry}/v1/pkg/… form.