command-registry:registry

command-registry:registry@0.0.0

registryCommand

FieldTypeRequiredDefaultDescription
namestringYesThe name the registry lists the command under, written the same as the name in the command's own config, which is the one the command is invoked by. It is the name extends is read against
pathpathYesThe package that implements the command and holds its config, as a /-separated path from the root packages are imported from: my_app/src/registry/build
extendsbooleanNofalseRun the framework command of this name first, then this one, rather than replacing it. The base command's result is handed to this command's extend hook, so an application adds to what the framework already does instead of reimplementing it. An application command whose name matches a framework command replaces it when this is absent.
audienceenum one of public, internalNoWho the command is released to, public or internal. Absent, it is the audience of the registry that lists it, so a public application's commands are public unless marked and an internal application marks nothing. Only narrowing is sayable: a command stated public under an internal registry or application is refused, by name. There is deliberately no default, so an unstated audience is never read as a declared one.

registryDefinition

FieldTypeRequiredDefaultDescription
namestringYesThe registry's name. Where the registry is a group, it is the word typed on the command line before its commands
pathpathNoThe directory holding the registry's document, relative to the directory of the registry or application declaration that names it; an entry naming a registry document has to state one. At the top of a registry document, it moves the directory its nested registries are resolved from
filenamestringNo"registry.yml"The registry document's file name within path (default: registry.yml)
descriptionstringNoWhat the registry holds, for a reader of the document. Nothing prints it: a group's listing prints help
helpstringNoThe group's help, printed beside its name in a listing of the application's commands and carried into the application's index. Read only where the registry is a group
asGroupbooleanNotrue makes the registry a group: its commands are invoked as <app> <name> <command>. Absent or false, its commands are invoked where its parent's are, with no name added -- except that a registry whose entry in an application's declaration nests others is a group, and so is each registry under it
audienceenum one of public, internalNoWho the commands under this registry are released to, public or internal. Absent, it is the audience of the registry holding this one, and at the top the application's, which its manifest module states. A registry may say it where a parent names it or at the top of its own document; saying both differently is refused. Stated public under an internal parent, it is refused, by name.
sourcePathpathNoThe registry document this entry resolves to, set as an application's registries are loaded and written in no document
commandslist[registryCommand]No[]The commands this registry declares. Empty rather than absent where it declares none: a registry with no commands of its own is an ordinary shape -- a grouping node whose children are registries -- and nothing here distinguishes the two, so every consumer was coalescing the null away.
registrieslist[registryDefinition]No[]The registries nested below this one. Empty rather than absent for the same reason commands is: a leaf registry declares none, and no consumer asks whether the field was written.