@reventlessdev/reventless-aws 3.0.0-alpha.242 → 3.0.0-alpha.243

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.243 (2026-07-29)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **aws:** call the AppSync operations that exist, not the resource's names ([777c8ff](https://github.com/ReventlessDev/reventless-core/commit/777c8ff7e3641b4e7d2228b332f62c14fe690a42))
11
+
12
+
6
13
  # 3.0.0-alpha.242 (2026-07-29)
7
14
 
8
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-aws",
3
- "version": "3.0.0-alpha.242",
3
+ "version": "3.0.0-alpha.243",
4
4
  "description": "AWS adapters for Reventless",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
@@ -14,14 +14,14 @@
14
14
  "@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.25",
15
15
  "@reventlessdev/rescript-effect": "0.1.0-alpha.31",
16
16
  "@reventlessdev/rescript-jest": "1.0.0-alpha.9",
17
- "@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.61",
18
17
  "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.17",
18
+ "@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.61",
19
19
  "@reventlessdev/rescript-uuid": "1.1.0-alpha.17",
20
- "@reventlessdev/reventless-interop": "3.0.0-alpha.29",
21
- "@reventlessdev/reventless-spec": "3.0.0-alpha.84",
20
+ "@reventlessdev/reventless-core": "3.0.0-alpha.191",
22
21
  "@reventlessdev/reventless-infra": "3.0.0-alpha.109",
22
+ "@reventlessdev/reventless-interop": "3.0.0-alpha.29",
23
23
  "@reventlessdev/reventless-postgres": "3.0.0-alpha.55",
24
- "@reventlessdev/reventless-core": "3.0.0-alpha.191"
24
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.84"
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("CreateSourceApiAssociationCommand") createCtor: createInput => createCmd,
78
+ @as("AssociateSourceGraphqlApiCommand") createCtor: createInput => createCmd,
69
79
  @as("GetSourceApiAssociationCommand") getCtor: idInput => getCmd,
70
- @as("DeleteSourceApiAssociationCommand") deleteCtor: idInput => deleteCmd,
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
- "CreateSourceApiAssociation returned no associationArn / associationId",
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("CreateSourceApiAssociation returned no associationArn / associationId");
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("CreateSourceApiAssociation returned no associationArn / associationId");
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("CreateSourceApiAssociation returned no associationArn / associationId");
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.CreateSourceApiAssociationCommand, {
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.DeleteSourceApiAssociationCommand, ids)));
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)) {