Interface: NubbinConfig
Defined in: config.types.ts:65
What a nubbin.config.ts default-exports: what every command needs from a consumer, and
nothing about their framework. Build it with defineConfig so the fields are checked as the
file is written.
catalog, registry, store and document are required, and the config file is checked
for their presence when it loads — a missing one names the file and the field rather than
surfacing as a property access inside a command. Presence is all that is checked there:
whether a registry is a registry is compile's question, answered when a route compiles.
save is optional, and the commands that write a document back refuse by name without it.
Example
import { defineConfig } from "@nubbin/cli";
import { createFsArtifactStore } from "@nubbin/store-fs";
import { catalog } from "./src/nubbin/catalog";
import { registry } from "./src/nubbin/registry";
import { draftFor } from "./src/nubbin/drafts";
export default defineConfig({
catalog,
registry,
store: createFsArtifactStore(".nubbin"),
document: async (route) => (await draftFor(route)) ?? null,
});
Properties
catalog
catalog:
Catalog
Defined in: config.types.ts:71
The serializable half of registration, keyed by block name: the schema each node's props are
judged by, and the ui.fields hints deciding which fields freeze into the artifact and which
become holes. compile reads it; a block a document names and the catalog omits is a fault.
document
document:
DocumentLoader
Defined in: config.types.ts:89
Where documents come from. Called once per route, by every command that names one.
registry
registry:
Registry
Defined in: config.types.ts:79
The compile-side registry — blocks with their schemas, never the render-side one. It supplies
the slot constraints the structural pass judges against and the version stamped into an
artifact's blockVersions, and check compares it against every live route. A render-side
registry maps a name to a component loader and carries no schema or version, so it cannot
stand in here.
save?
optionalsave?:DocumentWriter
Defined in: config.types.ts:90
store
store:
ArtifactStore
Defined in: config.types.ts:87
Where artifacts are written and pointers move. publish writes through it before pointing a
route, check reads every pointer and artifact from it, and history and rollback --to
need its optional history. --origin moves the pointer through the running application
instead, so the store still has to be reachable from the terminal — the artifact is written
from here either way.