@reventlessdev/reventless-aws 3.0.0-alpha.307 → 3.0.0-alpha.308

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.308 (2026-08-18)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **aws:** make the unowned stub callable on the doors that call it ([931aa39](https://github.com/ReventlessDev/reventless-core/commit/931aa3968ae0e29befab7183125ed2453d4765cb))
11
+
12
+
6
13
  # 3.0.0-alpha.307 (2026-08-18)
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.307",
3
+ "version": "3.0.0-alpha.308",
4
4
  "description": "AWS adapters for Reventless",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
@@ -13,17 +13,17 @@
13
13
  "sury": "11.0.0-alpha.4",
14
14
  "uuid": "^13.0.0",
15
15
  "@reventlessdev/rescript-aws-sdk": "3.0.0-alpha.12",
16
+ "@reventlessdev/rescript-node": "2.0.0-alpha.8",
16
17
  "@reventlessdev/rescript-effect": "0.1.0-alpha.32",
18
+ "@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.80",
17
19
  "@reventlessdev/rescript-jest": "1.0.0-alpha.10",
18
- "@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.79",
19
- "@reventlessdev/rescript-node": "2.0.0-alpha.8",
20
20
  "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.19",
21
21
  "@reventlessdev/rescript-uuid": "2.0.0-alpha.0",
22
22
  "@reventlessdev/reventless-core": "3.0.0-alpha.239",
23
- "@reventlessdev/reventless-interop": "3.0.0-alpha.31",
24
- "@reventlessdev/reventless-postgres": "3.0.0-alpha.103",
25
23
  "@reventlessdev/reventless-infra": "3.0.0-alpha.145",
26
- "@reventlessdev/reventless-spec": "3.0.0-alpha.117"
24
+ "@reventlessdev/reventless-interop": "3.0.0-alpha.31",
25
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.117",
26
+ "@reventlessdev/reventless-postgres": "3.0.0-alpha.103"
27
27
  },
28
28
  "devDependencies": {
29
29
  "rescript": "12.3.0",
@@ -270,3 +270,41 @@ describe("the by-index door's backward paging", () => {
270
270
  ->Expect.toEqual((true, true))
271
271
  })
272
272
  })
273
+
274
+ // APPSYNC_JS is type-checked, so the emitted source has to type-check as well as
275
+ // read correctly. The stub a door emits when a view declares no `@owner` is
276
+ // still *called* with the row on the doors that narrow retirement, and a
277
+ // zero-parameter `() => true` makes that call TS2554 — which AppSync reports at
278
+ // create time as "The code contains one or more errors", failing the deploy on
279
+ // a resolver whose text looks perfectly reasonable.
280
+ describe("the unowned stub is callable where the door calls it", () => {
281
+ // Retirement without an owner is the combination that emits the stub and then
282
+ // calls it: with neither rule the guard is not emitted at all, and with an
283
+ // owner the real one-parameter test replaces it.
284
+ testSync("declares a parameter on the single-entity door", () => {
285
+ let code =
286
+ F.ownerScopedResultResponse(
287
+ ~ownerField=None,
288
+ ~elevatedGroups=elevated,
289
+ ~retiredField="lifecycle",
290
+ ~retiredValues=["Archived"],
291
+ )
292
+ expect((
293
+ code->String.includes("const _owns = (row) => true;"),
294
+ code->String.includes("const _owns = () => true;"),
295
+ ))->Expect.toEqual((true, false))
296
+ })
297
+
298
+ testSync("declares a parameter on the reference door", () => {
299
+ let code = F.refsByIds(
300
+ ~labelField="name",
301
+ ~retiredField=None,
302
+ ~retiredValues=None,
303
+ ~namedWhenRetired=false,
304
+ )("Products")
305
+ expect((
306
+ code->String.includes("const _owns = (row) => true;"),
307
+ code->String.includes("_owns(row)"),
308
+ ))->Expect.toEqual((true, true))
309
+ })
310
+ })
@@ -183,6 +183,29 @@ globalThis.describe("the by-index door's backward paging", () => {
183
183
  });
184
184
  });
185
185
 
186
+ globalThis.describe("the unowned stub is callable where the door calls it", () => {
187
+ globalThis.test("declares a parameter on the single-entity door", () => {
188
+ let code = AppSync_Resolver_Functions$PulumiAws.ownerScopedResultResponse(undefined, elevated, "lifecycle", ["Archived"]);
189
+ globalThis.expect([
190
+ code.includes("const _owns = (row) => true;"),
191
+ code.includes("const _owns = () => true;")
192
+ ]).toEqual([
193
+ true,
194
+ false
195
+ ]);
196
+ });
197
+ globalThis.test("declares a parameter on the reference door", () => {
198
+ let code = AppSync_Resolver_Functions$PulumiAws.refsByIds("name", undefined, undefined, false, undefined, undefined)("Products");
199
+ globalThis.expect([
200
+ code.includes("const _owns = (row) => true;"),
201
+ code.includes("_owns(row)")
202
+ ]).toEqual([
203
+ true,
204
+ true
205
+ ]);
206
+ });
207
+ });
208
+
186
209
  let F;
187
210
 
188
211
  export {