@reventlessdev/reventless-infra
v3.0.0-alpha.97
Published
Infrastructure types for Reventless framework
Downloads
5,208
Readme
@reventlessdev/reventless-infra
⚠️ Alpha. APIs and on-disk formats can change without notice between releases. Pin exact versions and expect breaking changes.
The infrastructure type layer of Reventless — a
spec-driven, event-sourced CQRS framework written in ReScript.
This package defines the deploy-time infrastructure types and abstract Platform interface
that are shared across storage/cloud adapters, so plugin-assembly code can be written once
against provider-agnostic types and satisfied by any concrete adapter. It uses
Pulumi types for deploy-time resource references. Modules are
exposed under the ReventlessInfra namespace.
What it provides
ReScript modules, consumed by adding the package to your rescript.json dependencies.
Platform interface & adapters (types/, adapter/)
Platform— the abstract factory interface for platform-agnostic component assembly. Plugin code takes aPlatform.Tas a functor argument; a concrete adapter (e.g.reventless-aws) supplies the implementation at the composition root.Adapter— deploy-time infrastructure primitives:resource(fields wrapped inPulumi.Output.t),resolvedResource(runtime values), andresourceInfodescribing a resource's structural role (storage keys, stream source, API resolver).ResourceNaming— provider-agnostic operations for validating and deriving URN-safe resource names.ExtensionMapping/ExtensionPointMapping— the action types that route commands and events between an extension and the extension point it wraps.Message,PluginExtensionPointSpec,NoEventMappings— supporting types for message identity and plugin/extension wiring.
Component types (components/)
Deploy-time outputs (infrastructure references) and runtime operations for each Reventless
component kind — Component (the typed wrapper around a Pulumi ComponentResource),
Plugin, Aggregate, ReadModel, EventLog / DcbEventLog,
CommandTopic / EventTopic, CommandGenerator, EventCollector,
EventMapper, QueryDb, Api, Task, ExtensionPoint / Extension,
Scheduler, Heartbeat, and the DCB slices.
Where it fits
reventless-infra sits between the specification layer and the concrete adapters:
reventless-spec (specifications)
↓
reventless-infra (shared infrastructure types) ← this package
↓
reventless-aws / reventless-postgres / reventless-local (storage & deployment adapters)- It builds on
@reventlessdev/reventless-specfor the domain contracts. - Adapters such as
@reventlessdev/reventless-awsprovide the concretePlatform.Timplementation these types describe.
You normally obtain reventless-infra transitively by scaffolding an app rather than
installing it on its own.
Install
pnpm add @reventlessdev/reventless-infraThen register it as a ReScript dependency in rescript.json:
{
"dependencies": ["@reventlessdev/reventless-infra"]
}Requires ReScript ^12.3.0 (peer dependency).
Links
- 📚 Documentation — docs.reventless.dev
- 📦 Repository — ReventlessDev/reventless-core
- 📋 Changelog
