API reference
Every value and type exported by @north-light/crouter-plugin, read from the TypeScript compiler.
Every export of @north-light/crouter-plugin, read from the TypeScript compiler at build time and grouped by what it is used for. Types re-exported from @north-light/crouter-api are documented with that package.
Defining a plugin
The builders that declare a plugin and its command tree, and the shapes they produce.
definePlugin, defineBranch, defineLeaf, defineStreamingLeaf, PluginDefinition, BranchNode, LeafNode, LeafContext, MemoryDoc, kebab, PluginDefinitionError
Parameters
Declaring the flags, positionals and stdin input a leaf accepts.
param, AnyParam, Input, Encoding, FlagStringParam, FlagIntParam, FlagBoolParam, FlagEnumParam, FlagPathParam, PositionalParam, StdinParam
Output fields
Declaring the fields a leaf returns, and the object type they add up to.
Serving
Hosting a plugin behind an HTTP endpoint.
Bundle and manifest
Building a distributable bundle and the command manifest crtr reads from it.
buildBundle, BuildBundleOptions, BuildBundleResult, BuildBundleMemoryMember, buildCommandManifest, ManifestInvalidError
Errors
Failing a leaf with an exit code, a message and optional remediation.