@weaver-conf/weaver-server
v0.1.0
Published
Central configuration server for Weaver
Readme
@weaver-conf/weaver-server
Central configuration server for Weaver — layer resolution, auth, audit, schema registry, and storage orchestration.
Installation
pnpm add @weaver-conf/weaver-serverUsage
import { bootstrap } from "@weaver-conf/weaver-server";
const server = await bootstrap({
layers: ["core", "app", "tenant", "user"],
storage: { type: "filesystem", basePath: "./config" },
auth: { jwtSecret: process.env.JWT_SECRET },
});API
Bootstrap
bootstrap(options)— Initializes the server with storage, auth, and layer configurationcreateProviders(options)— Creates storage provider instances from configuration
Core Services
WeaverConfigService— Central service for reads, writes, and resolutionSchemaRegistry— Namespace schema registration and validationScopeManager— Scope provisioning and hierarchy managementSessionManager— Override session lifecycle (create, expire, audit)PromotionEngine— Promotes values between layers with approval workflowsRollbackService— Reverts configuration to previous revisions
Auth
createAuthMiddleware(options)— JWT-based request authenticationcreateJwtValidator(options)— Token validation and identity extraction
Audit
createAuditService(options)— Pluggable audit logging with multiple sinkscreateFileSystemAuditLog()— File-based audit sinkcreateMongoAuditSink(options)— MongoDB audit sinkcreateStdoutAuditSink()— Console audit sink for development
License
MIT
