@reventlessdev/reventless-aws 3.0.0-alpha.412 → 3.0.0-alpha.414

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,20 @@
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.414 (2026-10-30)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **core:** the envelope replay is reachable from the deployed aggregate handler ([4f42ed1](https://github.com/ReventlessDev/reventless-core/commit/4f42ed190482c9f3de90357a1f7509e943ed1a04))
11
+
12
+
13
+ # 3.0.0-alpha.413 (2026-10-30)
14
+
15
+ ### Features
16
+
17
+ * **automation:** a work item with personal data is stored like an event ([f9e173f](https://github.com/ReventlessDev/reventless-core/commit/f9e173fb6f1dc671900052f2c4b6590ee99b5bdf))
18
+
19
+
6
20
  # 3.0.0-alpha.412 (2026-10-30)
7
21
 
8
22
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-aws",
3
- "version": "3.0.0-alpha.412",
3
+ "version": "3.0.0-alpha.414",
4
4
  "description": "AWS adapters for Reventless",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
@@ -25,16 +25,16 @@
25
25
  "@reventlessdev/rescript-aws-sdk": "3.0.0-alpha.37",
26
26
  "@reventlessdev/rescript-effect": "1.0.0-alpha.1",
27
27
  "@reventlessdev/rescript-node": "2.0.0-alpha.24",
28
- "@reventlessdev/rescript-pulumi-aws": "3.0.0-alpha.37",
29
28
  "@reventlessdev/rescript-jest": "1.0.0-alpha.13",
29
+ "@reventlessdev/rescript-pulumi-aws": "3.0.0-alpha.37",
30
30
  "@reventlessdev/rescript-pulumi-pulumi": "3.0.0-alpha.0",
31
31
  "@reventlessdev/rescript-uuid": "2.0.0-alpha.1",
32
32
  "@reventlessdev/rescript-web": "1.0.0-alpha.8",
33
- "@reventlessdev/reventless-core": "3.0.0-alpha.321",
34
- "@reventlessdev/reventless-postgres": "3.0.0-alpha.185",
35
- "@reventlessdev/reventless-infra": "3.0.0-alpha.218",
36
- "@reventlessdev/reventless-spec": "3.0.0-alpha.189",
37
- "@reventlessdev/reventless-interop": "3.0.0-alpha.42"
33
+ "@reventlessdev/reventless-core": "3.0.0-alpha.323",
34
+ "@reventlessdev/reventless-interop": "3.0.0-alpha.42",
35
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.219",
36
+ "@reventlessdev/reventless-postgres": "3.0.0-alpha.187",
37
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.190"
38
38
  },
39
39
  "devDependencies": {
40
40
  "rescript": "12.3.1",
@@ -149,6 +149,12 @@ function buildAggregateParts(specModule, decisionModule, eventLogTableName, queu
149
149
  eventTopic: { publish: async () => {} },
150
150
  storage: rawStorageOps,
151
151
  });
152
+ // `eventLogOps` is the compiled MODULE standing in for the `EventLog.operations`
153
+ // RECORD, so each operation must have the same name as an export and as a field.
154
+ // A primed name breaks that: `replayStream'` is exported as `replayStream$p` but
155
+ // read as the field `"replayStream'"`, which is how the Plugin aggregate once
156
+ // died on every command with "replayStream' is not a function". Keep the
157
+ // operations prime-free, or build the record here field by field.
152
158
  const aggregateCallback = aggregateCallbackMake(patchedSpec)(decisionModule)({
153
159
  Spec: patchedSpec,
154
160
  EventLog: { Spec: patchedSpec },
@@ -502,7 +502,7 @@ let makeAutomationJsonEventsHandler = (
502
502
  Effect.promise(async () => {
503
503
  await loadTodoItems()
504
504
  await loadSchedules(schedules())
505
- callback.phase1(jsons, context)
505
+ await callback.phase1(jsons, context, ~capabilities=capabilities())
506
506
  await syncTodoItems()
507
507
  await followSchedules(schedules(), callback)
508
508
  await callback.phase2(publishJsons)
@@ -643,7 +643,11 @@ let makeAutomationRegisteredHandler = (
643
643
  async (~key, ~at) => {
644
644
  await loadTodoItems()
645
645
  await loadSchedules(schedules())
646
- callback.phase1([ReventlessCore.AutomationSlice_Callback.tickEvent(~key, ~at)], context)
646
+ await callback.phase1(
647
+ [ReventlessCore.AutomationSlice_Callback.tickEvent(~key, ~at)],
648
+ context,
649
+ ~capabilities=capabilities(),
650
+ )
647
651
  await syncTodoItems()
648
652
  // A once-only schedule's row goes when it fires.
649
653
  switch schedules() {
@@ -304,7 +304,7 @@ function makeAutomationJsonEventsHandler(context, callback, publishJsons, syncTo
304
304
  return stream => Effect.flatMap(Stream.runCollect(stream), jsons => Effect.promise(async () => {
305
305
  await loadTodoItems();
306
306
  await loadSchedules(schedules());
307
- callback.phase1(jsons, context);
307
+ await callback.phase1(jsons, context, capabilities());
308
308
  await syncTodoItems();
309
309
  await followSchedules(schedules(), callback);
310
310
  await callback.phase2(publishJsons);
@@ -382,7 +382,7 @@ function makeAutomationRegisteredHandler(entry, sliceName, callback, schedule) {
382
382
  tick: async (key, at) => {
383
383
  await loadTodoItems();
384
384
  await loadSchedules(schedules());
385
- callback.phase1([AutomationSlice_Callback$ReventlessCore.tickEvent(key, at)], context);
385
+ await callback.phase1([AutomationSlice_Callback$ReventlessCore.tickEvent(key, at)], context, capabilities());
386
386
  await syncTodoItems();
387
387
  let match = schedules();
388
388
  if (match !== undefined) {
@@ -36,6 +36,7 @@ module Make = (
36
36
  EventCollectorRuntimeBuilder,
37
37
  Api,
38
38
  DeployTimeSchedules,
39
+ OutboundTranslationSlice_Builder.DeployTimeCapabilities,
39
40
  )
40
41
 
41
42
  module Make = (
@@ -10,6 +10,7 @@ import * as QueryDbStorage_DynamoDb$ReventlessAws from "../adapter/QueryDb/Query
10
10
  import * as AutomationSlice_Builder$ReventlessCore from "@reventlessdev/reventless-core/src/components/AutomationSlice/AutomationSlice_Builder.res.mjs";
11
11
  import * as QueryDbResolvers_AppSync$ReventlessAws from "../adapter/QueryDb/QueryDbResolvers_AppSync.res.mjs";
12
12
  import * as RuntimeEnvironment_Lambda$ReventlessAws from "../adapter/Runtime/RuntimeEnvironment_Lambda.res.mjs";
13
+ import * as OutboundTranslationSlice_Builder$ReventlessAws from "./OutboundTranslationSlice_Builder.res.mjs";
13
14
  import * as EventCollectorChannel_DynamoDbStream$ReventlessAws from "../adapter/EventCollector/EventCollectorChannel_DynamoDbStream.res.mjs";
14
15
  import * as AutomationSliceRuntime_Builder_Single$ReventlessAws from "../adapter/Runtime/AutomationSliceRuntime_Builder_Single.res.mjs";
15
16
 
@@ -51,7 +52,7 @@ function Make(Api) {
51
52
  },
52
53
  forEventCollector: AutomationSliceRuntime_Builder_Single$ReventlessAws.forEventCollector,
53
54
  finish: AutomationSliceRuntime_Builder_Single$ReventlessAws.finish
54
- })(Api)(DeployTimeSchedules);
55
+ })(Api)(DeployTimeSchedules)(OutboundTranslationSlice_Builder$ReventlessAws.DeployTimeCapabilities);
55
56
  let Make$1 = Spec => (Automation => {
56
57
  let InnerMake = Inner.Make(Spec)(Automation);
57
58
  let sourceNames = InnerMake.sourceNames;
@@ -218,7 +218,7 @@ describe("AutomationSliceEntryPoint_Ops.makeAutomationJsonEventsHandler", () =>
218
218
  let receivedCtx = ref(None)
219
219
  let callback: AutomationSliceEntryPoint_Ops.automationCallback = {
220
220
  todoItems: Dict.make(),
221
- phase1: (jsons, ctx) => {
221
+ phase1: async (jsons, ctx, ~capabilities as _) => {
222
222
  receivedJsons := jsons
223
223
  receivedCtx := Some(ctx)
224
224
  steps->Array.push("phase1")
@@ -261,7 +261,7 @@ describe("AutomationSliceEntryPoint_Ops.makeAutomationJsonEventsHandler", () =>
261
261
  let daily = Reventless.Schedule.Calendar({calendar: Daily({hour: 6, minute: 0})})
262
262
  let callback: AutomationSliceEntryPoint_Ops.automationCallback = {
263
263
  todoItems: Dict.make(),
264
- phase1: (_jsons, _ctx) => steps->Array.push("phase1"),
264
+ phase1: async (_jsons, _ctx, ~capabilities as _) => steps->Array.push("phase1"),
265
265
  phase2: async _publish => steps->Array.push("phase2"),
266
266
  schedules: Dict.make(),
267
267
  takeScheduleChanges: () => [Put({key: "r1", time: daily})],
@@ -320,7 +320,7 @@ globalThis.describe("AutomationSliceEntryPoint_Ops.makeAutomationJsonEventsHandl
320
320
  contents: undefined
321
321
  };
322
322
  let callback_todoItems = {};
323
- let callback_phase1 = (jsons, ctx) => {
323
+ let callback_phase1 = async (jsons, ctx, param) => {
324
324
  receivedJsons.contents = jsons;
325
325
  receivedCtx.contents = ctx;
326
326
  steps.push("phase1");
@@ -382,7 +382,7 @@ globalThis.describe("AutomationSliceEntryPoint_Ops.makeAutomationJsonEventsHandl
382
382
  globalThis.test("stores a changed schedule's rows before telling the platform", async () => {
383
383
  let steps = [];
384
384
  let callback_todoItems = {};
385
- let callback_phase1 = (_jsons, _ctx) => {
385
+ let callback_phase1 = async (_jsons, _ctx, param) => {
386
386
  steps.push("phase1");
387
387
  };
388
388
  let callback_phase2 = async _publish => {