@reventlessdev/reventless-aws 3.0.0-alpha.242 → 3.0.0-alpha.244
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 +15 -0
- package/package.json +6 -6
- package/src/adapter/Api/AppSync_SourceApiAssociation_Retrying.res +13 -3
- package/src/adapter/Api/AppSync_SourceApiAssociation_Retrying.res.mjs +5 -5
- package/src/components/SideEffectHandler_PerSideEffectHandler.res +24 -13
- package/src/components/SideEffectHandler_PerSideEffectHandler.res.mjs +6 -52
- package/src/components/SideEffectHandler_Single.res +4 -0
- package/src/components/SideEffectHandler_Single.res.mjs +2 -1
- package/src/components/Task_Builder_PerBucket.res.mjs +1 -3
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.244 (2026-07-30)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **aws:** point the per-side-effect arm at the compiled event-collector builder ([0aaef40](https://github.com/ReventlessDev/reventless-core/commit/0aaef403a844c36c8d13038e3695c182c5b27745))
|
|
11
|
+
* **core,aws:** provision the side-effect handler Lambda, which never existed ([d07311e](https://github.com/ReventlessDev/reventless-core/commit/d07311e0cfc368e9b3d51596e775a58b55a2fc0e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 3.0.0-alpha.243 (2026-07-29)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **aws:** call the AppSync operations that exist, not the resource's names ([777c8ff](https://github.com/ReventlessDev/reventless-core/commit/777c8ff7e3641b4e7d2228b332f62c14fe690a42))
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
# 3.0.0-alpha.242 (2026-07-29)
|
|
7
22
|
|
|
8
23
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-aws",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.244",
|
|
4
4
|
"description": "AWS adapters for Reventless",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"dependencies": {
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"uuid": "^13.0.0",
|
|
14
14
|
"@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.25",
|
|
15
15
|
"@reventlessdev/rescript-effect": "0.1.0-alpha.31",
|
|
16
|
+
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.17",
|
|
16
17
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.9",
|
|
17
18
|
"@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.61",
|
|
18
|
-
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.17",
|
|
19
19
|
"@reventlessdev/rescript-uuid": "1.1.0-alpha.17",
|
|
20
|
+
"@reventlessdev/reventless-core": "3.0.0-alpha.192",
|
|
21
|
+
"@reventlessdev/reventless-postgres": "3.0.0-alpha.56",
|
|
20
22
|
"@reventlessdev/reventless-interop": "3.0.0-alpha.29",
|
|
21
|
-
"@reventlessdev/reventless-
|
|
22
|
-
"@reventlessdev/reventless-
|
|
23
|
-
"@reventlessdev/reventless-postgres": "3.0.0-alpha.55",
|
|
24
|
-
"@reventlessdev/reventless-core": "3.0.0-alpha.191"
|
|
23
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.110",
|
|
24
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.85"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"rescript": "12.3.0",
|
|
@@ -63,11 +63,21 @@ type deleteCmd
|
|
|
63
63
|
|
|
64
64
|
// Shape of the dynamically-imported `@aws-sdk/client-appsync` module. Only the
|
|
65
65
|
// three association commands are needed here.
|
|
66
|
+
//
|
|
67
|
+
// The create/delete names follow the *API operation*, not the resource: AppSync
|
|
68
|
+
// has `AssociateSourceGraphqlApi` / `DisassociateSourceGraphqlApi`, and there is
|
|
69
|
+
// no `Create…`/`Delete…SourceApiAssociation` command. Those names are only the
|
|
70
|
+
// CloudFormation/Pulumi resource's, and naming the constructors after the
|
|
71
|
+
// resource made `create` throw `C is not a constructor` on every fresh stack —
|
|
72
|
+
// `new undefined(...)`, since a missing export is just undefined on the module
|
|
73
|
+
// namespace. `Get` exists under the resource-style name, which is why read and
|
|
74
|
+
// diff always worked and only creation was broken. The request payloads below
|
|
75
|
+
// already match the operations exactly.
|
|
66
76
|
type sdkModule = {
|
|
67
77
|
@as("AppSyncClient") clientCtor: unit => appSyncClient,
|
|
68
|
-
@as("
|
|
78
|
+
@as("AssociateSourceGraphqlApiCommand") createCtor: createInput => createCmd,
|
|
69
79
|
@as("GetSourceApiAssociationCommand") getCtor: idInput => getCmd,
|
|
70
|
-
@as("
|
|
80
|
+
@as("DisassociateSourceGraphqlApiCommand") deleteCtor: idInput => deleteCmd,
|
|
71
81
|
}
|
|
72
82
|
|
|
73
83
|
// Calls a constructor with `new` — the SDK exports plain classes.
|
|
@@ -277,7 +287,7 @@ let extractIds = (resp: createResult): (string, string) =>
|
|
|
277
287
|
| Some({associationArn: ?Some(arn), associationId: ?Some(aid)}) => (arn, aid)
|
|
278
288
|
| _ =>
|
|
279
289
|
JsError.throwWithMessage(
|
|
280
|
-
"
|
|
290
|
+
"AssociateSourceGraphqlApi returned no associationArn / associationId",
|
|
281
291
|
)
|
|
282
292
|
}
|
|
283
293
|
|
|
@@ -181,11 +181,11 @@ function identifiersFrom(id, props) {
|
|
|
181
181
|
function extractIds(resp) {
|
|
182
182
|
let match = resp.sourceApiAssociation;
|
|
183
183
|
if (match === undefined) {
|
|
184
|
-
return Stdlib_JsError.throwWithMessage("
|
|
184
|
+
return Stdlib_JsError.throwWithMessage("AssociateSourceGraphqlApi returned no associationArn / associationId");
|
|
185
185
|
}
|
|
186
186
|
let aid = match.associationId;
|
|
187
187
|
if (aid === undefined) {
|
|
188
|
-
return Stdlib_JsError.throwWithMessage("
|
|
188
|
+
return Stdlib_JsError.throwWithMessage("AssociateSourceGraphqlApi returned no associationArn / associationId");
|
|
189
189
|
}
|
|
190
190
|
let arn = match.associationArn;
|
|
191
191
|
if (arn !== undefined) {
|
|
@@ -194,14 +194,14 @@ function extractIds(resp) {
|
|
|
194
194
|
aid
|
|
195
195
|
];
|
|
196
196
|
} else {
|
|
197
|
-
return Stdlib_JsError.throwWithMessage("
|
|
197
|
+
return Stdlib_JsError.throwWithMessage("AssociateSourceGraphqlApi returned no associationArn / associationId");
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
async function create(inputs) {
|
|
202
202
|
let sdk = await getSdk();
|
|
203
203
|
let client = await getClient();
|
|
204
|
-
let match = await runWithRetry(undefined, undefined, undefined, undefined, () => client.send(newOf1(sdk.
|
|
204
|
+
let match = await runWithRetry(undefined, undefined, undefined, undefined, () => client.send(newOf1(sdk.AssociateSourceGraphqlApiCommand, {
|
|
205
205
|
mergedApiIdentifier: inputs.mergedApiIdentifier,
|
|
206
206
|
sourceApiIdentifier: inputs.sourceApiIdentifier,
|
|
207
207
|
sourceApiAssociationConfig: {
|
|
@@ -235,7 +235,7 @@ async function delete_(id, props) {
|
|
|
235
235
|
return log.warn("AppSync_SourceApiAssociation_Retrying", undefined, `delete: could not derive association identifiers from id "` + id + `"; treating as already gone`);
|
|
236
236
|
}
|
|
237
237
|
try {
|
|
238
|
-
return await runWithRetry(undefined, undefined, undefined, undefined, () => client.send(newOf1(sdk.
|
|
238
|
+
return await runWithRetry(undefined, undefined, undefined, undefined, () => client.send(newOf1(sdk.DisassociateSourceGraphqlApiCommand, ids)));
|
|
239
239
|
} catch (raw_exn) {
|
|
240
240
|
let exn = Primitive_exceptions.internalToException(raw_exn);
|
|
241
241
|
if (Stdlib_Option.mapOr(Stdlib_JsExn.fromException(exn), false, isAlreadyGoneError)) {
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
// The arm a side-effect-bearing Task reaches, via `Task_Builder_PerBucket`.
|
|
2
|
+
//
|
|
3
|
+
// It is `SideEffectHandler_Single` — the same shared "AllSideEffectHandlers" Lambda.
|
|
4
|
+
// Two earlier wirings both produced no Lambda at all:
|
|
5
|
+
//
|
|
6
|
+
// - `ReventlessCore.EventCollectorRuntime_Builder_PerEventCollector.Make(…)` builds
|
|
7
|
+
// through `RuntimeEnvironment.make` = `CallbackFunction` = a serialized closure,
|
|
8
|
+
// and the handler closes over Effect, which Pulumi's closure walker cannot
|
|
9
|
+
// serialize. Construction threw and the function went missing.
|
|
10
|
+
// - AWS's `EventCollectorRuntime_Builder_PerEventCollector` type-checks against the
|
|
11
|
+
// same `forEventCollector` signature but dispatches on a `readModelInfos`
|
|
12
|
+
// registry and bundles `ReadModelEntryPoint.mjs`. A side-effect handler is never
|
|
13
|
+
// in that registry, so it took the builder's `None` arm, logged
|
|
14
|
+
// "no bundled info registered", and created nothing — silently.
|
|
15
|
+
//
|
|
16
|
+
// Matching signatures are not matching behaviour. The registry a builder reads is
|
|
17
|
+
// the part that has to line up: side-effect handlers need `sideEffectInfos` and
|
|
18
|
+
// `SideEffectEntryPoint.mjs`, which is what `SideEffectHandler_Single` registers into.
|
|
19
|
+
//
|
|
20
|
+
// There is deliberately no per-handler Lambda behind this name. If per-handler
|
|
21
|
+
// memory/timeout tuning is wanted, add a real
|
|
22
|
+
// `SideEffectHandlerRuntime_Builder_PerSideEffectHandler` over the same registry and
|
|
23
|
+
// point this module at it.
|
|
24
|
+
include SideEffectHandler_Single.Make()
|
|
@@ -1,61 +1,15 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
4
|
-
import * as RuntimeEnvironment_Lambda$ReventlessAws from "../adapter/Runtime/RuntimeEnvironment_Lambda.res.mjs";
|
|
5
|
-
import * as SideEffectHandler_Builder$ReventlessCore from "@reventlessdev/reventless-core/src/components/SideEffectHandler/SideEffectHandler_Builder.res.mjs";
|
|
6
|
-
import * as EventCollectorChannel_DynamoDbStream$ReventlessAws from "../adapter/EventCollector/EventCollectorChannel_DynamoDbStream.res.mjs";
|
|
7
|
-
import * as EventCollectorRuntime_Builder_PerEventCollector$ReventlessCore from "@reventlessdev/reventless-core/src/adapter/Runtime/EventCollectorRuntime_Builder_PerEventCollector.res.mjs";
|
|
3
|
+
import * as SideEffectHandler_Single$ReventlessAws from "./SideEffectHandler_Single.res.mjs";
|
|
8
4
|
|
|
9
|
-
let
|
|
10
|
-
make: RuntimeEnvironment_Lambda$ReventlessAws.make,
|
|
11
|
-
groupBySource: RuntimeEnvironment_Lambda$ReventlessAws.groupBySource,
|
|
12
|
-
extractCorrelationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCorrelationId,
|
|
13
|
-
extractCausationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCausationId,
|
|
14
|
-
extractSentTimestamp: RuntimeEnvironment_Lambda$ReventlessAws.extractSentTimestamp,
|
|
15
|
-
extractRetryCount: RuntimeEnvironment_Lambda$ReventlessAws.extractRetryCount,
|
|
16
|
-
asEventHandler: prim => prim,
|
|
17
|
-
asEffectHandler: prim => prim
|
|
18
|
-
})({
|
|
19
|
-
make: EventCollectorChannel_DynamoDbStream$ReventlessAws.make,
|
|
20
|
-
connect: EventCollectorChannel_DynamoDbStream$ReventlessAws.connect
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
let include = SideEffectHandler_Builder$ReventlessCore.Make({
|
|
24
|
-
make: RuntimeEnvironment_Lambda$ReventlessAws.make,
|
|
25
|
-
groupBySource: RuntimeEnvironment_Lambda$ReventlessAws.groupBySource,
|
|
26
|
-
extractCorrelationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCorrelationId,
|
|
27
|
-
extractCausationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCausationId,
|
|
28
|
-
extractSentTimestamp: RuntimeEnvironment_Lambda$ReventlessAws.extractSentTimestamp,
|
|
29
|
-
extractRetryCount: RuntimeEnvironment_Lambda$ReventlessAws.extractRetryCount,
|
|
30
|
-
asEventHandler: prim => prim,
|
|
31
|
-
asEffectHandler: prim => prim
|
|
32
|
-
})({
|
|
33
|
-
make: EventCollectorChannel_DynamoDbStream$ReventlessAws.make,
|
|
34
|
-
connect: EventCollectorChannel_DynamoDbStream$ReventlessAws.connect
|
|
35
|
-
})(EventCollector_Builder$ReventlessCore.Make({
|
|
36
|
-
make: RuntimeEnvironment_Lambda$ReventlessAws.make,
|
|
37
|
-
groupBySource: RuntimeEnvironment_Lambda$ReventlessAws.groupBySource,
|
|
38
|
-
extractCorrelationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCorrelationId,
|
|
39
|
-
extractCausationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCausationId,
|
|
40
|
-
extractSentTimestamp: RuntimeEnvironment_Lambda$ReventlessAws.extractSentTimestamp,
|
|
41
|
-
extractRetryCount: RuntimeEnvironment_Lambda$ReventlessAws.extractRetryCount,
|
|
42
|
-
asEventHandler: prim => prim,
|
|
43
|
-
asEffectHandler: prim => prim
|
|
44
|
-
})({
|
|
45
|
-
make: EventCollectorChannel_DynamoDbStream$ReventlessAws.make,
|
|
46
|
-
connect: EventCollectorChannel_DynamoDbStream$ReventlessAws.connect
|
|
47
|
-
}))(EventCollectorRuntimeBuilder);
|
|
48
|
-
|
|
49
|
-
let EventCollectorChannel;
|
|
50
|
-
|
|
51
|
-
let RuntimeEnvironment;
|
|
5
|
+
let include = SideEffectHandler_Single$ReventlessAws.Make({});
|
|
52
6
|
|
|
53
7
|
let make = include.make;
|
|
54
8
|
|
|
9
|
+
let finish = include.finish;
|
|
10
|
+
|
|
55
11
|
export {
|
|
56
|
-
EventCollectorChannel,
|
|
57
|
-
RuntimeEnvironment,
|
|
58
|
-
EventCollectorRuntimeBuilder,
|
|
59
12
|
make,
|
|
13
|
+
finish,
|
|
60
14
|
}
|
|
61
|
-
/*
|
|
15
|
+
/* include Not a pure module */
|
|
@@ -47,9 +47,7 @@ function Make(Spec) {
|
|
|
47
47
|
connect: TaskBucket_S3$ReventlessAws.connect,
|
|
48
48
|
makeHandler: TaskBucket_S3$ReventlessAws.makeHandler,
|
|
49
49
|
make: TaskBucket_S3$ReventlessAws.make
|
|
50
|
-
})(
|
|
51
|
-
make: SideEffectHandler_PerSideEffectHandler$ReventlessAws.make
|
|
52
|
-
})(Defaults);
|
|
50
|
+
})(SideEffectHandler_PerSideEffectHandler$ReventlessAws)(Defaults);
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
let EventCollectorChannel;
|