@reventlessdev/reventless-core 3.0.0-alpha.154 β†’ 3.0.0-alpha.156

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,21 @@
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.156 (2026-07-11)
7
+
8
+ **Note:** Version bump only for package @reventlessdev/reventless-core
9
+
10
+
11
+
12
+
13
+
14
+ # 3.0.0-alpha.155 (2026-07-11)
15
+
16
+ ### Bug Fixes
17
+
18
+ * **build:** mark tests as dev-only sources so dependents don't compile them ([28b3b1c](https://github.com/ReventlessDev/reventless-core/commit/28b3b1ccfeaafc1d7050a86ce2362f32e4299187))
19
+
20
+
6
21
  # 3.0.0-alpha.154 (2026-07-11)
7
22
 
8
23
  ### Bug Fixes
package/README.md CHANGED
@@ -1,173 +1,72 @@
1
- [![npm version](https://img.shields.io/npm/v/@reventlessdev/reventless.svg?label=version)](https://www.npmjs.com/package/@reventlessdev/reventless)
2
- [![GitHub package version](https://img.shields.io/github/v/release/ReventlessDev/reventless-core?label=release)](https://github.com/ReventlessDev/reventless-core/releases)
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
- [![Changelog](https://img.shields.io/badge/πŸ“‹-Changelog-blue)](./CHANGELOG.md)
1
+ [![npm](https://img.shields.io/npm/v/@reventlessdev/reventless-core.svg?label=npm)](https://www.npmjs.com/package/@reventlessdev/reventless-core)
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)
5
4
 
6
- # Reventless
5
+ # @reventlessdev/reventless-core
7
6
 
8
- Reventless is a toolkit for event-sourced CQRS applications on serverless infrastructure written in ReasonML.
7
+ > ⚠️ **Alpha.** APIs and on-disk formats can change without notice between releases.
8
+ > Pin exact versions and expect breaking changes.
9
9
 
10
- It's based on the following technologies:
10
+ The **provider-agnostic core** of [Reventless](https://docs.reventless.dev) β€” a
11
+ spec-driven, event-sourced CQRS framework written in [ReScript](https://rescript-lang.org).
12
+ This package is the runtime you model your domain against: the type-safe building blocks
13
+ for commands, events, projections, and the behaviors that evolve state β€” with **no** cloud
14
+ or storage dependency. The provider-specific adapters live in separate packages
15
+ (see [Where it fits](#where-it-fits)).
11
16
 
12
- * [Serverless](https://serverless.com)
13
- * [ReasonML](https://reasonml.github.io/) using [Bucklescript](https://bucklescript.github.io/)
14
- * Event-Sourced
15
- * CQRS
17
+ ## What it provides
16
18
 
17
- ## Getting started developing Reventless
18
- ### 1. Install Node 12.x (LTS)
19
- We use `fnm` to manage the locally installed node-version.
20
- The currently used/tested node version is stated in the `.node-version` file.
19
+ ReScript modules, consumed by adding the package to your `rescript.json` `dependencies`:
21
20
 
22
- #### [fnm](https://github.com/Schniz/fnm)
23
- > Fast and simple Node.js version manager, built in native ReasonML
21
+ - **`Message`** β€” command / event message contracts and their service interface.
22
+ - **`Behavior`** β€” the write-side behavior spec: event-sourced state transitions
23
+ (`evolve(state, event) => state`).
24
+ - **`Projection`** / **`ProjectionMapper`** β€” read models projected from event streams.
25
+ - **`Mapper`** / **`Mapper1toN`** / **`MapperNto1`** β€” cross-component event translation
26
+ (encode/decode between a source and a target contract).
27
+ - **`ComponentType`** β€” the hierarchical component-kind vocabulary.
28
+ - **`PluginRuntimeOperations`** β€” the provider-agnostic interface a runtime adapter implements.
29
+ - **`RequestContext`** β€” per-invocation context threaded through the effect pipeline.
30
+ - **`Env`** β€” environment access.
24
31
 
25
- *Note: Currently this tool has no windows-support and is unlikely to be added in the near future.*
32
+ Domain code written against these modules is provider-agnostic: the same components run
33
+ unchanged on any adapter.
26
34
 
27
- Go to your reventless-directory and execute [`fnm use`](https://github.com/Schniz/fnm#fnm-use-version) in a shell to just set you node version to the one stated in `.node-version`. (maybe you want to set your default node version by calling [`fnm default <version>`](https://github.com/Schniz/fnm#fnm-default-version))
35
+ ## Where it fits
28
36
 
29
- ### 2. Install BuckleScript (which comes bundled with reason)
30
- Currently used and supported version is bs-platform 5.2.1.
37
+ `reventless-core` is one package in the Reventless framework. It builds on
38
+ [`@reventlessdev/reventless-spec`](https://www.npmjs.com/package/@reventlessdev/reventless-spec)
39
+ (type specifications) and is paired at runtime with a storage/cloud adapter:
31
40
 
32
- [Reason Docs](https://reasonml.github.io/docs/en/installation)
33
- [Unofficial Community Docs](https://reasonml.org/docs/manual/latest/installation)
41
+ - [`@reventlessdev/reventless-aws`](https://www.npmjs.com/package/@reventlessdev/reventless-aws) β€” AWS (DynamoDB, Lambda, SQS, SNS, S3)
42
+ - [`@reventlessdev/reventless-postgres`](https://www.npmjs.com/package/@reventlessdev/reventless-postgres) β€” Postgres event log + query DB
43
+ - [`@reventlessdev/reventless-local`](https://www.npmjs.com/package/@reventlessdev/reventless-local) β€” in-memory / SQLite platform for local dev and tests
34
44
 
35
- The docs suggest to globally install `bs-platform` (by running `npm install -g bs-platform`), but to avoid version-conflicts it's better to just locally install `bs-platform` when needed or run `npx`. Run the following command to install `bs-platform` locally without adding it to `package.json`:
36
- ```
37
- npm install bs-platform@5.2.1 --no-save
38
- ```
39
-
40
- ### 3. Install Dependencies
41
- ```
42
- npm install
43
- ```
44
-
45
- ### 3. Build Project
46
- ```
47
- npm run build
48
- ```
49
-
50
- Or in development, to run a watcher:
51
- ```
52
- npm run start
53
- ```
45
+ You normally obtain `reventless-core` transitively by scaffolding an app rather than
46
+ installing it on its own.
54
47
 
55
- If you use Visual Studio Code, use the [reason-vscode](https://marketplace.visualstudio.com/items?itemName=jaredly.reason-vscode) plugin, which auto-builds the project on save by default.
56
- Otherwise, see https://reasonml.github.io/docs/en/editor-plugins.
48
+ ## Install
57
49
 
58
- *Note: Don't run the watcher and use the editor-plugin at the same time, since they may conflict with each other.*
59
-
60
- ### 4. Test Project
61
- Run Test-Suite once:
62
- ```
63
- npm run test
64
- ```
65
-
66
- Run Test-Suite continously on file changes:
67
- ```
68
- npm run dev
50
+ ```bash
51
+ pnpm add @reventlessdev/reventless-core
69
52
  ```
70
53
 
71
- The Bucklescript bindings for [Jest](https://jestjs.io/) are used as dev-dependency: [bs-jest](https://github.com/glennsl/bs-jest)
72
-
54
+ Then register it as a ReScript dependency in `rescript.json`:
73
55
 
74
-
75
- #### Test Example
76
- This tests the function f in the file/module Try:
77
- ```
78
- // __tests__/try_test.re
79
- open Jest
80
-
81
- describe("Try should return...", () => {
82
- open Expect
83
- test("the same text given a count of 0", () => {
84
- expect(Try.f("test", 0)) |> toBe("test")
85
- })
86
-
87
- test("the text doubled given a count of 1", () => {
88
- expect(Try.f("test", 1)) |> toBe("testtest")
89
- })
90
- })
91
- ```
92
- File Try:
93
- ```
94
- // src/Try.re
95
- let rec f = (text: string, count: int) => {
96
- if(count <= 0) text
97
- else f(text ++ text, count - 1)
56
+ ```json
57
+ {
58
+ "dependencies": ["@reventlessdev/reventless-core"]
98
59
  }
99
60
  ```
100
61
 
101
- ### 5. Deployment
102
- **TODO: This should be moved to a separate chapter on how to use Reventless in a project.**
103
-
104
- Before running `npm run deploy`, make sure to update the `.env` file. (Copy your Pulumi Access Token from your profile preferences into the `.env` file.)
105
- You also need to set the environment variable like `export AWS_SDK_LOAD_CONFIG=1` and hava a file at `~/.aws/config`:
106
- ```
107
- [default]
108
- region = eu-west-1
109
- output = json
110
- ```
111
-
112
- This command will run 3 Shell-Scripts:
113
- * `./scripts/pre-deploy.sh`: Move everything in `./node_modules/bs-platform` to a tmp-directory, but the JS-lib
114
- * `./scripts/pulumi-up.sh`: Read `PULUMI_ACCESS_TOKEN` and `PULUMI_STACK` from the `.env` file and run `pulumi up` to actually deploy (This script will be only executed, if `pre-deploy` exited successfully.)
115
- * `./scripts/post-deploy.sh`: Move `bs-platform` back into place from tmp-directory.
116
-
117
-
118
- **NOTE**: The `./scripts/pulumi-up.sh` exports the environment variable `PULUMI_ACCESS_TOKEN` to make it to the Pulumi CLI available. Export another value and set a `#` before the apropriate line inside`.env` to use another token.
119
-
120
-
121
- ## Setup environment for local development of actual project and framework side by side -- DEPRECATED
122
-
123
-
124
- **🚨 We encountered some deployment issues, when using npm link. Therefore we discourage using this technic for the time being❗**
125
-
126
- ### Setup the new project
127
- * add a new "deploy key" in [gitlab](https://github.com/atos-austria/reason/reventless/settings/repository/deploy_token/create#js-deploy-tokens)
128
- * add "private repository" with the new deploy-token to the new project: `"reventless": "git+https://USER-TOKEN:PASSWORD-TOKEN@github.com/atos-austria/reason/reventless.git"`
129
- * run `npm install` for the new project
130
-
131
- ### Setup the framework project to use the local version in the new version
132
- * clone the framework repo into a local directory
133
- * run `npm link` inside the framework's directory
134
- * run `npm link reventless` inside the new project's directory
135
-
136
- ## Go back to using the actual framwork-repo as dependency
137
- ### Unlink
138
- [Medium Post](https://medium.com/@alexishevia/the-magic-behind-npm-link-d94dcb3a81af)
139
-
140
- * run `npm unlink --no-save reventless` in the new project's directory
141
- * run `npm unlink` in the framework's directory
142
-
143
- ### Alternative
144
- [Medium Post](https://medium.com/dailyjs/how-to-use-npm-link-7375b6219557)
145
-
146
- * run `npm uninstall --no-save reventless && npm install` inside the new project's directory
147
- * OPTIONAL: to delete the global symlink of the framework run `npm uninstall` inside the framework's directory
148
-
149
- ## Ressources
150
- * [Project Wiki](https://github.com/atos-austria/reason/reventless/wikis/home)
151
-
152
- # Coding Guidelines
153
-
154
- * `<Component>.Make.createComponent` (binding to `Component.js` constructor): Pass any additional parameters (besides `componentType`, `name`, `opts`) directly to the `construct` function (using partial application), like this: `createComponent(~componentType, ~name, ~construct=construct(~param1, ~param2), ~opts)`
155
-
156
- # Code-Smells
157
-
158
- ## ReasonML
159
-
160
- * `...->ignore`
161
-
162
- ## Pulumi
62
+ Requires ReScript `^12.3.0` (peer dependency).
163
63
 
164
- * `...->Pulumi.Output.apply(_, ...)`
165
- * `...->Pulumi.Output.all->Pulumi.Output.apply(...)`
166
- * type `option(Pulumi.Output.t('a))`: Rescript's js option encoding and Pulumi's Output lifting mechanics interact badly! - Therefore, such a type is not possible to use!
64
+ ## Links
167
65
 
168
- # Common issues
66
+ - πŸ“š Documentation β€” [docs.reventless.dev](https://docs.reventless.dev)
67
+ - πŸ“¦ Repository β€” [ReventlessDev/reventless-core](https://github.com/ReventlessDev/reventless-core)
68
+ - πŸ“‹ [Changelog](./CHANGELOG.md)
169
69
 
170
- ## `error: Duplicate resource URN 'urn:pulumi:dev::wm-raw::aws:sqs/queue:Queue::FIFODeadLetterQueue'; try giving it a unique name` during deployment
70
+ ## License
171
71
 
172
- This error usually occurs due to multiple different versions of `@reventless/reventless` or `@reventless/reventless-aws` being present in the dependencies (npm). To verify, call `npm ls @reventless/reventless` / `npm ls @reventless/reventless-aws` and verify there is only a single version present.
173
- To fix this use desired ranges in the dependencies definition (package.json) of the project and check upstream version ranges as well. (You can also use `npm why <packageName>` to see where a specific version is coming from.)
72
+ [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-core",
3
- "version": "3.0.0-alpha.154",
3
+ "version": "3.0.0-alpha.156",
4
4
  "description": "Core package for Reventless framework",
5
5
  "license": "Apache-2.0",
6
6
  "jest": {
@@ -28,22 +28,22 @@
28
28
  "dependencies": {
29
29
  "sury": "11.0.0-alpha.4",
30
30
  "uuid": "^13.0.0",
31
- "@reventlessdev/rescript-effect": "0.1.0-alpha.25",
32
- "@reventlessdev/rescript-hash-object": "1.2.0-alpha.10",
33
- "@reventlessdev/rescript-jest": "1.0.0-alpha.6",
34
- "@reventlessdev/rescript-node-streams": "1.1.0-alpha.10",
35
- "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.14",
36
- "@reventlessdev/rescript-fast-csv": "1.2.0-alpha.11",
37
- "@reventlessdev/rescript-ssh2": "1.1.0-alpha.11",
38
- "@reventlessdev/rescript-uuid": "1.1.0-alpha.14",
39
- "@reventlessdev/reventless-interop": "3.0.0-alpha.24",
40
- "@reventlessdev/reventless-infra": "3.0.0-alpha.95",
41
- "@reventlessdev/reventless-spec": "3.0.0-alpha.73"
31
+ "@reventlessdev/rescript-effect": "0.1.0-alpha.27",
32
+ "@reventlessdev/rescript-fast-csv": "1.2.0-alpha.12",
33
+ "@reventlessdev/rescript-hash-object": "1.2.0-alpha.11",
34
+ "@reventlessdev/rescript-node-streams": "1.1.0-alpha.11",
35
+ "@reventlessdev/rescript-jest": "1.0.0-alpha.7",
36
+ "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.15",
37
+ "@reventlessdev/rescript-ssh2": "1.1.0-alpha.12",
38
+ "@reventlessdev/rescript-uuid": "1.1.0-alpha.15",
39
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.97",
40
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.75",
41
+ "@reventlessdev/reventless-interop": "3.0.0-alpha.26"
42
42
  },
43
43
  "devDependencies": {
44
44
  "rescript": "^12.3.0",
45
45
  "sury-ppx": "11.0.0-alpha.2",
46
- "@reventlessdev/reventless-ppx": "1.0.0-alpha.52"
46
+ "@reventlessdev/reventless-ppx": "1.0.0-alpha.53"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "rescript": "^12.3.0"
package/rescript.json CHANGED
@@ -19,7 +19,8 @@
19
19
  },
20
20
  {
21
21
  "dir": "tests",
22
- "subdirs": true
22
+ "subdirs": true,
23
+ "type": "dev"
23
24
  }
24
25
  ],
25
26
  "dependencies": [