@reventlessdev/reventless-aws 3.0.0-alpha.167 → 3.0.0-alpha.169

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,22 @@
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.169 (2026-07-02)
7
+
8
+ **Note:** Version bump only for package @reventlessdev/reventless-aws
9
+
10
+
11
+
12
+
13
+
14
+ # 3.0.0-alpha.168 (2026-06-29)
15
+
16
+ **Note:** Version bump only for package @reventlessdev/reventless-aws
17
+
18
+
19
+
20
+
21
+
6
22
  # 3.0.0-alpha.167 (2026-06-27)
7
23
 
8
24
  **Note:** Version bump only for package @reventlessdev/reventless-aws
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-aws",
3
- "version": "3.0.0-alpha.167",
3
+ "version": "3.0.0-alpha.169",
4
4
  "description": "AWS adapters for Reventless",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
@@ -9,15 +9,15 @@
9
9
  "sury": "11.0.0-alpha.4",
10
10
  "uuid": "^13.0.0",
11
11
  "@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.20",
12
- "@reventlessdev/rescript-jest": "1.0.0-alpha.3",
12
+ "@reventlessdev/rescript-effect": "0.1.0-alpha.24",
13
+ "@reventlessdev/rescript-jest": "1.0.0-alpha.5",
13
14
  "@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.44",
14
- "@reventlessdev/rescript-effect": "0.1.0-alpha.23",
15
15
  "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.14",
16
16
  "@reventlessdev/rescript-uuid": "1.1.0-alpha.13",
17
- "@reventlessdev/reventless-core": "3.0.0-alpha.134",
18
- "@reventlessdev/reventless-spec": "3.0.0-alpha.61",
19
- "@reventlessdev/reventless-infra": "3.0.0-alpha.81",
20
- "@reventlessdev/reventless-interop": "3.0.0-alpha.21"
17
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.83",
18
+ "@reventlessdev/reventless-core": "3.0.0-alpha.136",
19
+ "@reventlessdev/reventless-interop": "3.0.0-alpha.22",
20
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.63"
21
21
  },
22
22
  "devDependencies": {
23
23
  "rescript": "^12.3.0",
@@ -40,7 +40,9 @@ let appendWithCondition = (tableName, jsons) => {
40
40
  if count > 100 {
41
41
  Effect.succeed(
42
42
  Error(
43
- `EventLog.append: max 100 events per command, got ${count->Int.toString}`,
43
+ ReventlessCore.EventLog.StorageFailure(
44
+ `EventLog.append: max 100 events per command, got ${count->Int.toString}`,
45
+ ),
44
46
  ),
45
47
  )
46
48
  } else if count == 1 {
@@ -58,10 +60,13 @@ let append = table =>
58
60
  appendWithCondition(table.name, jsons)
59
61
  ->Effect.catchAll(err =>
60
62
  switch err {
61
- | DynamoDb_Error.StaleState(_) => Effect.succeed(Error("conflict"))
63
+ | DynamoDb_Error.StaleState(_) =>
64
+ Effect.succeed(Error(ReventlessCore.EventLog.Conflict))
62
65
  | _ =>
63
66
  let msg = DynamoDb_Error.message(err)
64
- Effect.succeed(Error(`DynamoDB conditional append failed: ${msg}`))
67
+ Effect.succeed(
68
+ Error(ReventlessCore.EventLog.StorageFailure(`DynamoDB conditional append failed: ${msg}`)),
69
+ )
65
70
  }
66
71
  )
67
72
  ->Effect.runPromise
@@ -51,7 +51,10 @@ function appendWithCondition(tableName, jsons) {
51
51
  if (count > 100) {
52
52
  return Effect$1.succeed({
53
53
  TAG: "Error",
54
- _0: `EventLog.append: max 100 events per command, got ` + count.toString()
54
+ _0: {
55
+ TAG: "StorageFailure",
56
+ _0: `EventLog.append: max 100 events per command, got ` + count.toString()
57
+ }
55
58
  });
56
59
  } else if (count === 1) {
57
60
  return Effect$1.map(Effect.tryPromise(DynamoDb_Error$ReventlessAws.classify, () => putItemConditional(tableName, jsons[0])), param => ({
@@ -69,7 +72,7 @@ function append(table) {
69
72
  case "StaleState" :
70
73
  return Effect$1.succeed({
71
74
  TAG: "Error",
72
- _0: "conflict"
75
+ _0: "Conflict"
73
76
  });
74
77
  case "Transient" :
75
78
  case "Permanent" :
@@ -78,7 +81,10 @@ function append(table) {
78
81
  let msg = DynamoDb_Error$ReventlessAws.message(err);
79
82
  return Effect$1.succeed({
80
83
  TAG: "Error",
81
- _0: `DynamoDB conditional append failed: ` + msg
84
+ _0: {
85
+ TAG: "StorageFailure",
86
+ _0: `DynamoDB conditional append failed: ` + msg
87
+ }
82
88
  });
83
89
  }));
84
90
  }
@@ -49,6 +49,7 @@ module Make = (
49
49
  }
50
50
 
51
51
  let sourceNames = Inner.sourceNames
52
+ let consumedEventNames = Inner.consumedEventNames
52
53
  let outputs = Inner.outputs
53
54
  let operations = Inner.operations
54
55
  let finish = () => EventCollectorRuntimeBuilder.finish()
@@ -41,6 +41,7 @@ function Make(Spec) {
41
41
  return {
42
42
  Spec: Inner.Spec,
43
43
  sourceNames: Inner.sourceNames,
44
+ consumedEventNames: Inner.consumedEventNames,
44
45
  make: make,
45
46
  outputs: Inner.outputs,
46
47
  operations: Inner.operations,
@@ -54,6 +54,7 @@ module Make = (
54
54
  }
55
55
 
56
56
  let sourceNames = Inner.sourceNames
57
+ let consumedEventNames = Inner.consumedEventNames
57
58
  let outputs = Inner.outputs
58
59
  let operations = Inner.operations
59
60
  let finish = () => EventCollectorRuntimeBuilder.finish()
@@ -41,6 +41,7 @@ function Make(Spec) {
41
41
  return {
42
42
  Spec: Inner.Spec,
43
43
  sourceNames: Inner.sourceNames,
44
+ consumedEventNames: Inner.consumedEventNames,
44
45
  make: make,
45
46
  outputs: Inner.outputs,
46
47
  operations: Inner.operations,
@@ -47,6 +47,7 @@ module Make = (
47
47
  }
48
48
 
49
49
  let sourceNames = Inner.sourceNames
50
+ let consumedEventNames = Inner.consumedEventNames
50
51
  let outputs = Inner.outputs
51
52
  let operations = Inner.operations
52
53
  let finish = () => EventCollectorRuntimeBuilder.finish()
@@ -43,6 +43,7 @@ function Make(Spec) {
43
43
  return {
44
44
  Spec: Inner.Spec,
45
45
  sourceNames: Inner.sourceNames,
46
+ consumedEventNames: Inner.consumedEventNames,
46
47
  make: make,
47
48
  outputs: Inner.outputs,
48
49
  operations: Inner.operations,
@@ -46,6 +46,7 @@ module Make = (
46
46
  }
47
47
 
48
48
  let sourceNames = Inner.sourceNames
49
+ let consumedEventNames = Inner.consumedEventNames
49
50
  let outputs = Inner.outputs
50
51
  let operations = Inner.operations
51
52
  let finish = () => EventCollectorRuntimeBuilder.finish()
@@ -43,6 +43,7 @@ function Make(Spec) {
43
43
  return {
44
44
  Spec: Inner.Spec,
45
45
  sourceNames: Inner.sourceNames,
46
+ consumedEventNames: Inner.consumedEventNames,
46
47
  make: make,
47
48
  outputs: Inner.outputs,
48
49
  operations: Inner.operations,
@@ -54,6 +54,7 @@ module Make = (
54
54
  }
55
55
 
56
56
  let sourceNames = Inner.sourceNames
57
+ let consumedEventNames = Inner.consumedEventNames
57
58
  let outputs = Inner.outputs
58
59
  let operations = Inner.operations
59
60
  let finish = () => EventCollectorRuntimeBuilder.finish()
@@ -43,6 +43,7 @@ function Make(Spec) {
43
43
  return {
44
44
  Spec: Inner.Spec,
45
45
  sourceNames: Inner.sourceNames,
46
+ consumedEventNames: Inner.consumedEventNames,
46
47
  make: make,
47
48
  outputs: Inner.outputs,
48
49
  operations: Inner.operations,
@@ -17,9 +17,10 @@ describe("Runtime.append", () => {
17
17
  let jsons = Array.fromInitializer(~length=101, mkJson)
18
18
  let result = await Runtime.append(table)(0, "test-id", jsons)
19
19
  switch result {
20
- | Error(msg) =>
20
+ | Error(ReventlessCore.EventLog.StorageFailure(msg)) =>
21
21
  expect(msg->String.includes("max 100 events per command"))->toBe(true)
22
22
  expect(msg->String.includes("101"))->toBe(true)
23
+ | Error(Conflict) => expect("expected StorageFailure, got Conflict")->toBe("")
23
24
  | Ok(_) => expect("expected Error, got Ok")->toBe("")
24
25
  }
25
26
  })
@@ -27,8 +27,13 @@ globalThis.describe("Runtime.append", () => {
27
27
  return;
28
28
  }
29
29
  let msg = result._0;
30
- globalThis.expect(msg.includes("max 100 events per command")).toBe(true);
31
- globalThis.expect(msg.includes("101")).toBe(true);
30
+ if (typeof msg !== "object") {
31
+ globalThis.expect("expected StorageFailure, got Conflict").toBe("");
32
+ return;
33
+ }
34
+ let msg$1 = msg._0;
35
+ globalThis.expect(msg$1.includes("max 100 events per command")).toBe(true);
36
+ globalThis.expect(msg$1.includes("101")).toBe(true);
32
37
  });
33
38
  });
34
39