Bundle and manifest
Building a distributable bundle and the command manifest crtr reads from it.
Exports of @north-light/crouter-plugin, read from the TypeScript compiler at build time. Types re-exported from @north-light/crouter-api are documented with that package.
buildBundle
function declared in bundle.ts
Builds the install archive: bundle.json, commands.json, and one
memory/<name>.md per declared memory doc, as an uncompressed tar. Runs
the real manifest validator first — a manifest crtr sys doctor would
reject never reaches the tar — and throws ManifestInvalidError from
buildCommandManifest when it fails. The fetch handler calls this same
function, so there is one build path, not two.
(plugin: PluginDefinition, options: BuildBundleOptions) => Promise<BuildBundleResult>BuildBundleMemoryMember
interface declared in bundle.ts
One file in the archive.
Prop
Type
BuildBundleOptions
interface declared in bundle.ts
Where the handler is served, which decides the route paths written into the manifest.
Prop
Type
BuildBundleResult
interface declared in bundle.ts
The archive and the documents that went into it.
Prop
Type
buildCommandManifest
function declared in manifest.ts
Generates and validates the command manifest crtr installs: one POST route per leaf,
derived from the command tree. Throws ManifestInvalidError when validation finds issues.
(plugin: PluginDefinition, options: { mountPath: string; baseUrl?: string; }) => HttpPluginCommandManifestManifestInvalidError
class declared in manifest.ts
Thrown when the generated manifest fails the validator crtr itself applies at install.
Prop
Type