@weaver-conf/config-runtime
v0.1.0
Published
Pure state machine for Weaver configuration resolution
Readme
@weaver-conf/config-runtime
Pure state machine for Weaver configuration resolution — manages layer entries, snapshots, and delta subscriptions.
Installation
pnpm add @weaver-conf/config-runtimeUsage
import { createStateContainer } from "@weaver-conf/config-runtime";
const container = createStateContainer({ entries: {}, revision: "0" });
container.applyDelta({ key: "theme.mode", value: "dark", revision: "1" });
console.log(container.snapshot().entries["theme.mode"]); // "dark"API
createStateContainer(initial)— Creates a reactive state container from an initial snapshotStateContainer— Interface for reading snapshots and applying deltasStateSnapshot— Point-in-time configuration stateConfigDelta— A single key-value change with revision metadataLayerEntry— A configuration entry with layer provenance
License
MIT
