Skip to main content

Module commands

Module commands 

Source
Expand description

The reference static registry and bynk add (packaging slice 4a, #2274, decisions H and I).

A static registry is a directory any static host can serve:

<dir>/config.json             protocol, id, auth, the key chain
<dir>/<org>/<package>         one signed JSON line per version (append-only)
<dir>/dl/sha256/<hex>         each version's archive, named by tree checksum

bynk registry init writes config.json and a signing key (never inside the directory); bynk registry add packs a package, signs its line and appends it; bynk registry yank flips a line’s yanked, which the signature doesn’t cover, so nothing is re-signed and nothing is deleted. bynk registry withdraw (#2330) is the takedown: it yanks a line, records why in its unsigned withdrawn, and deletes its archive.

Enums§

ArchiveOutcome
#2330 (D): what bynk registry withdraw did to the archive.

Functions§

add
bynk registry add: pack the package at package_dir, sign its line with the key in key_file, and append it to the registry at dir. Returns org/package version.
add_dependency
bynk add: add package (org/package, optionally @range) to the manifest at project, choosing the highest version its registry offers. Returns the line written.
default_key_path
The default key path for registry id: ./<id>.key.
delegate
bynk registry delegate (#2316): a new key that may sign index lines, delegated by the chain key in key_file. Returns the new key.
init
bynk registry init: a new static registry at dir with id id, its signing key written to key_out. Returns the key = "…" line consumers pin.
resign
bynk registry resign (#2316): re-sign every index line with the key in key_file (the newest chain key, or a valid delegate). Returns the number of lines re-signed. Only sig changes.
revoke
bynk registry revoke (#2316): revoke the delegate target, signed by the chain key in key_file. Refuses, unless force, when a line would be left with no valid signer. Returns how many lines it signed.
rotate
bynk registry rotate (#2316): append a chain link — a new key, signed by the current (newest) chain key in key_file. Returns the new key.
withdraw
#2330 (D): bynk registry withdraw — the takedown of package version on the registry at dir. Sets yanked and withdrawn (reason) on its line, re-signing nothing, then deletes its archive unless another line names the same tree. Final: a withdrawn version is refused here (unless an interrupted withdrawal left its archive behind, which is then deleted), by add, by the publish API and by an un-yank.
yank
bynk registry yank: set (or, with undo, clear) yanked on one line.