@xemahq/backend-slot-registry
v0.1.3
Published
Kernel-leaf in-process server-side mirror of the FE HostExtensionSlots — the union catalog of every Contribution, indexed by ContributionKind. Phase 1A ships in-process per service (one BackendSlotRegistry instance per NestJS process); promotion to a stan
Readme
@xemahq/backend-slot-registry
In-process registry of backend contribution slots.
Overview
A small, in-process registry that indexes a service's contribution slots by kind. It gives a backend the same catalog of contributions the host exposes on the front end, behind one typed API: register a slot, look one up, or list all of them. There is no network or database layer — it lives entirely within the process that creates it.
When to use it
- Use it inside a backend service that needs to register and resolve contribution slots by kind at runtime.
- Reach for it when you want a typed, in-memory catalog rather than a persisted store — one registry instance per process.
Installation
pnpm add @xemahq/backend-slot-registryUsage
import { createBackendSlotRegistry } from '@xemahq/backend-slot-registry';
const registry = createBackendSlotRegistry();
// Register slots keyed by contribution kind, then resolve or enumerate them:
const all = registry.listAll();License
Apache-2.0 © Xema — xema.dev
