@reventlessdev/reventless-aws 3.0.0-alpha.196 → 3.0.0-alpha.197

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 3.0.0-alpha.197 (2026-07-11)
7
+
8
+ ### Features
9
+
10
+ * **infra:** add DeployBootstrap seam for generated deploy programs ([f0dc868](https://github.com/ReventlessDev/reventless-core/commit/f0dc8686396d21e7b39667eb0825b2e57fe4dabf))
11
+
12
+
6
13
  # 3.0.0-alpha.196 (2026-07-11)
7
14
 
8
15
  **Note:** Version bump only for package @reventlessdev/reventless-aws
package/README.md CHANGED
@@ -1,62 +1,89 @@
1
- [![npm version](https://img.shields.io/npm/v/@reventlessdev/reventless-aws.svg?label=version)](https://www.npmjs.com/package/@reventlessdev/reventless-aws)
2
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3
- [![Changelog](https://img.shields.io/badge/📋-Changelog-blue)](./CHANGELOG.md)
4
-
5
- # `reventless-aws`
6
-
7
- Reventless suplements to run Reventless applications on Amazon AWS.
8
- This package extends `reventless`.
9
-
10
- ## Usage
11
-
12
- - Add `reventless-aws` to your dependencies in `package.json`.
13
- - Add `reventless-aws` to your dependencies in `rescript.json`.
14
- - For general information see this monorepo's [readme](../../README.md)
15
-
16
- ## Introduction
17
-
18
- ### Reventless Component
19
-
20
- Reventless uses [Pulumi](https://www.pulumi.com/docs/intro/concepts/programming-model/#components) components to create reusable parts of software. A component bundles several (cloud) resources which act together to fulfill a specific task (e.v. `EventLog`) in our system.
21
- Components always consist of code run at deploytime **and** code run at runtime.
22
-
23
- [Reventless](../reventless/README.md) implements only general cloud-provider-agnostic components. These components need to be parameterized with cloud-provider-specific *adapters*.
24
-
25
- ### Adapter
26
-
27
- Adapter implement cloud-provider-specific functionallity. An adapter chooses the cloud-provider's resource(s) and provides specialized functions to be used for a specific component.
28
- E.g. adapter for the `EventLog` could choose to store it's data in a database-service or a filestorage-service and would provide functions which implement an eventlog's functionality (`replay` & `append`).
29
-
1
+ [![npm](https://img.shields.io/npm/v/@reventlessdev/reventless-aws.svg?label=npm)](https://www.npmjs.com/package/@reventlessdev/reventless-aws)
2
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
3
+ [![Docs](https://img.shields.io/badge/docs-reventless.dev-blue)](https://docs.reventless.dev)
4
+
5
+ # @reventlessdev/reventless-aws
6
+
7
+ > ⚠️ **Alpha.** APIs and on-disk formats can change without notice between releases.
8
+ > Pin exact versions and expect breaking changes.
9
+
10
+ The **AWS adapter** for [Reventless](https://docs.reventless.dev) — a
11
+ spec-driven, event-sourced CQRS framework written in [ReScript](https://rescript-lang.org).
12
+ This package binds the provider-agnostic components of
13
+ [`@reventlessdev/reventless-core`](https://www.npmjs.com/package/@reventlessdev/reventless-core)
14
+ to concrete AWS resources and provisions them with [Pulumi](https://www.pulumi.com/),
15
+ so the same domain code deploys to AWS unchanged. It covers both deploy-time
16
+ (infrastructure) and runtime (Lambda handlers).
17
+
18
+ ## What it provides
19
+
20
+ ReScript modules, consumed by adding the package to your `rescript.json` `dependencies`:
21
+
22
+ - **`Platform`** — the AWS platform functor (`Platform.Make()` / `Platform.MakeWithConfig({...})`).
23
+ Applying it wires up AWS builders once; your plugin functor then takes only the
24
+ application-defined `Spec`, `Behavior`, and `Mappings`.
25
+ - **Component builders** (`Aggregate_Builder`, `ReadModel_Builder`, `Plugin`,
26
+ the slice builders, `Task_Builder`, `Counter_Builder`, `Scheduler`, …) —
27
+ AWS-preconfigured versions of the core hierarchical components, including the
28
+ Single / PerAggregate / Micro runtime layouts.
29
+ - **Adapters** (`src/adapter/`) — the AWS implementation of each core adapter
30
+ interface, one per component (`EventLog`, `CommandTopic`, `EventTopic`,
31
+ `EventCollector`, `QueryDb`, `Counter`, `ScheduledPublisher`, `Task`, …).
32
+ - **`util/`** — AWS-resource helpers shared across adapters (DynamoDB, Lambda,
33
+ SQS/SNS FIFO, S3, IAM, AppSync, Cognito, VPC, CloudWatch).
34
+
35
+ The adapters map core components onto AWS services:
36
+
37
+ | Core component | AWS resource |
38
+ |---------------------------|-------------------------|
39
+ | EventLog / QueryDb | DynamoDB |
40
+ | CommandTopic / EventTopic | SQS (FIFO), SNS |
41
+ | Runtime handlers | Lambda |
42
+ | Task buckets | S3 |
43
+ | Domain API | AppSync (GraphQL) |
44
+
45
+ ## Where it fits
46
+
47
+ `reventless-aws` is a storage/cloud **adapter** for the Reventless framework.
48
+ [`reventless-core`](https://www.npmjs.com/package/@reventlessdev/reventless-core)
49
+ is provider-agnostic; you pair it with exactly one platform adapter at deploy time:
50
+
51
+ - [`@reventlessdev/reventless-aws`](https://www.npmjs.com/package/@reventlessdev/reventless-aws) — **this package** (DynamoDB, Lambda, SQS, SNS, S3)
52
+ - [`@reventlessdev/reventless-postgres`](https://www.npmjs.com/package/@reventlessdev/reventless-postgres) — Postgres event log + query DB
53
+ - [`@reventlessdev/reventless-local`](https://www.npmjs.com/package/@reventlessdev/reventless-local) — in-memory / SQLite platform for local dev and tests
54
+
55
+ It also depends on [`reventless-postgres`](https://www.npmjs.com/package/@reventlessdev/reventless-postgres)
56
+ so a deployment can back its event logs with managed Postgres (RDS/Aurora)
57
+ instead of DynamoDB, and on
58
+ [`reventless-infra`](https://www.npmjs.com/package/@reventlessdev/reventless-infra) /
59
+ [`reventless-spec`](https://www.npmjs.com/package/@reventlessdev/reventless-spec)
60
+ for the shared infrastructure and specification types.
61
+
62
+ You normally obtain `reventless-aws` by scaffolding an app rather than installing
63
+ it on its own.
64
+
65
+ ## Install
66
+
67
+ ```bash
68
+ pnpm add @reventlessdev/reventless-aws
69
+ ```
30
70
 
31
- ## Example
71
+ Then register it as a ReScript dependency in `rescript.json`:
32
72
 
73
+ ```json
74
+ {
75
+ "dependencies": ["@reventlessdev/reventless-aws"]
76
+ }
33
77
  ```
34
- // TODO: DEMONSTRATE API
35
- ```
36
-
37
- ## Contribution
38
78
 
39
- ### Changelog
79
+ Requires ReScript `^12.3.0` (peer dependency).
40
80
 
41
- Please remember to update the changelog for any modifications accordingly!
81
+ ## Links
42
82
 
83
+ - 📚 Documentation — [docs.reventless.dev](https://docs.reventless.dev)
84
+ - 📦 Repository — [ReventlessDev/reventless-core](https://github.com/ReventlessDev/reventless-core)
85
+ - 📋 [Changelog](./CHANGELOG.md)
43
86
 
44
- ### Folder Structure
87
+ ## License
45
88
 
46
- ```sh
47
- reventless-aws
48
- ├── src
49
- │ ├── adapter [adapter per Reventless Component]
50
- │ │ ├── AtomicCounter
51
- │ │ ├── CommandGenerator
52
- │ │ ├── CommandTopic
53
- │ │ ├── DataCleaner
54
- │ │ ├── EventCollector
55
- │ │ ├── EventLog
56
- │ │ ├── EventTopic
57
- │ │ ├── QueryDb
58
- │ │ └── ScheduledPublisher
59
- │ ├── components [components preconfigured with aws adapter]
60
- │ └── util [util functions by aws-resource, used by several adapters]
61
- └── __tests__ [tests for adapters & utils]
62
- ```
89
+ [Apache-2.0](https://opensource.org/licenses/Apache-2.0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-aws",
3
- "version": "3.0.0-alpha.196",
3
+ "version": "3.0.0-alpha.197",
4
4
  "description": "AWS adapters for Reventless",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
@@ -8,17 +8,17 @@
8
8
  "@aws-sdk/client-cloudfront": "3.970.0",
9
9
  "sury": "11.0.0-alpha.4",
10
10
  "uuid": "^13.0.0",
11
- "@reventlessdev/rescript-effect": "0.1.0-alpha.26",
12
- "@reventlessdev/rescript-jest": "1.0.0-alpha.6",
13
- "@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.49",
14
- "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.14",
15
- "@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.20",
16
- "@reventlessdev/rescript-uuid": "1.1.0-alpha.14",
17
- "@reventlessdev/reventless-core": "3.0.0-alpha.155",
18
- "@reventlessdev/reventless-infra": "3.0.0-alpha.96",
19
- "@reventlessdev/reventless-interop": "3.0.0-alpha.25",
20
- "@reventlessdev/reventless-postgres": "3.0.0-alpha.19",
21
- "@reventlessdev/reventless-spec": "3.0.0-alpha.74"
11
+ "@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.21",
12
+ "@reventlessdev/rescript-effect": "0.1.0-alpha.27",
13
+ "@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.50",
14
+ "@reventlessdev/rescript-jest": "1.0.0-alpha.7",
15
+ "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.15",
16
+ "@reventlessdev/rescript-uuid": "1.1.0-alpha.15",
17
+ "@reventlessdev/reventless-core": "3.0.0-alpha.156",
18
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.97",
19
+ "@reventlessdev/reventless-interop": "3.0.0-alpha.26",
20
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.75",
21
+ "@reventlessdev/reventless-postgres": "3.0.0-alpha.20"
22
22
  },
23
23
  "devDependencies": {
24
24
  "rescript": "^12.3.0",
@@ -48,6 +48,17 @@ let registerStateChangeSliceSpec = (~specPath: string, ~behaviorPath: string) =>
48
48
  let _ = registeredSliceModulePaths->Array.push({specPath, behaviorPath})
49
49
  }
50
50
 
51
+ /**
52
+ Redundant with the seams that populate `dcbConfigRef` automatically:
53
+ `pluginName` is set by `registerPluginName` (called from `Plugin_Builder.make`
54
+ when the plugin builds), the DCB table name by `registerDcbTableName`, and slice
55
+ module paths by `registerStateChangeSliceSpec` (from each slice's `moduleUrl`).
56
+ No deploy program needs to call this. Kept only so any out-of-tree caller still
57
+ compiles; slated for removal.
58
+ */
59
+ @deprecated(
60
+ "pluginName is auto-registered by Plugin_Builder.make; use registerDcbTableName / registerStateChangeSliceSpec for the other fields. This call is unnecessary and will be removed."
61
+ )
51
62
  let registerDcbConfig = (~pluginName, ~dcbTableName=?, ~stateChangeSliceModulePaths=[], ()) => {
52
63
  dcbConfigRef := {pluginName, dcbTableName, stateChangeSliceModulePaths}
53
64
  stateChangeSliceModulePaths->Array.length