@reventlessdev/reventless-aws 3.0.0-alpha.225 → 3.0.0-alpha.227
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,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.227 (2026-07-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @reventlessdev/reventless-aws
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 3.0.0-alpha.226 (2026-07-23)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **aws:** round-trip the DynamoDB Scan cursor in full-list connections ([0e21008](https://github.com/ReventlessDev/reventless-core/commit/0e2100860767a153a5c2f50a88fd6b501787c7f4))
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
# 3.0.0-alpha.225 (2026-07-22)
|
|
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.227",
|
|
4
4
|
"description": "AWS adapters for Reventless",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"dependencies": {
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
"@aws-sdk/client-cloudfront": "3.970.0",
|
|
9
9
|
"sury": "11.0.0-alpha.4",
|
|
10
10
|
"uuid": "^13.0.0",
|
|
11
|
-
"@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.24",
|
|
12
11
|
"@reventlessdev/rescript-effect": "0.1.0-alpha.30",
|
|
12
|
+
"@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.24",
|
|
13
13
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.9",
|
|
14
|
+
"@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.59",
|
|
14
15
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.17",
|
|
15
|
-
"@reventlessdev/
|
|
16
|
-
"@reventlessdev/reventless-core": "3.0.0-alpha.178",
|
|
17
|
-
"@reventlessdev/reventless-interop": "3.0.0-alpha.29",
|
|
16
|
+
"@reventlessdev/reventless-core": "3.0.0-alpha.180",
|
|
18
17
|
"@reventlessdev/reventless-infra": "3.0.0-alpha.104",
|
|
19
|
-
"@reventlessdev/reventless-
|
|
20
|
-
"@reventlessdev/rescript-
|
|
18
|
+
"@reventlessdev/reventless-interop": "3.0.0-alpha.29",
|
|
19
|
+
"@reventlessdev/rescript-uuid": "1.1.0-alpha.17",
|
|
20
|
+
"@reventlessdev/reventless-postgres": "3.0.0-alpha.44",
|
|
21
21
|
"@reventlessdev/reventless-spec": "3.0.0-alpha.80"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
@@ -38,3 +38,44 @@ describe("AppSync_Resolver_Retrying.Functions.listAllItemsConnection", () => {
|
|
|
38
38
|
expect(code->String.includes("attribute_exists"))->toBe(false)
|
|
39
39
|
})
|
|
40
40
|
})
|
|
41
|
+
|
|
42
|
+
// Tripwires for docs/plans/aws-scan-connection-cursor-roundtrip.md. The Scan
|
|
43
|
+
// resolver's cursor must round-trip DynamoDB's own continuation token, not a
|
|
44
|
+
// synthetic index — every list past page 1 was unreachable before this.
|
|
45
|
+
describe("listAllItemsConnection — Scan cursor round-trip (paging fixes 1–3)", () => {
|
|
46
|
+
let code = AppSync_Resolver_Retrying.Functions.listAllItemsConnection(~labelField="name")->codeOf
|
|
47
|
+
|
|
48
|
+
testSync("Fix 1: response encodes the real nextToken as the cursor", () => {
|
|
49
|
+
expect(code->String.includes("const next = ctx.result?.nextToken ?? null;"))->toBe(true)
|
|
50
|
+
expect(
|
|
51
|
+
code->String.includes("util.base64Encode(JSON.stringify({ token: next, index: i }))"),
|
|
52
|
+
)->toBe(true)
|
|
53
|
+
expect(code->String.includes("hasNextPage: !!next,"))->toBe(true)
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
testSync("Fix 1: request decodes `after` back to the DynamoDB token", () => {
|
|
57
|
+
expect(code->String.includes("JSON.parse(util.base64Decode(ctx.args.after))"))->toBe(true)
|
|
58
|
+
expect(code->String.includes("nextToken: after,"))->toBe(true)
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
testSync("Fix 1: the old synthetic-index cursor is gone", () => {
|
|
62
|
+
// The regression: `cursor: ctx.args.after ? ctx.args.after + '_' + i : '' + i`.
|
|
63
|
+
expect(code->String.includes("ctx.args.after + '_' + i"))->toBe(false)
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
testSync("Fix 2: backward paging (last/before) is rejected, not silently mishandled", () => {
|
|
67
|
+
expect(code->String.includes("ctx.args.before != null || ctx.args.last != null"))->toBe(true)
|
|
68
|
+
expect(code->String.includes("UnsupportedPagination"))->toBe(true)
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
testSync("Fix 3: an empty/short filtered page still yields a resumable boundary cursor", () => {
|
|
72
|
+
expect(
|
|
73
|
+
code->String.includes(
|
|
74
|
+
"const boundary = next ? util.base64Encode(JSON.stringify({ token: next, index: -1 })) : null;",
|
|
75
|
+
),
|
|
76
|
+
)->toBe(true)
|
|
77
|
+
expect(
|
|
78
|
+
code->String.includes("edges.length > 0 ? edges[edges.length - 1].cursor : boundary"),
|
|
79
|
+
)->toBe(true)
|
|
80
|
+
})
|
|
81
|
+
})
|
|
@@ -29,6 +29,30 @@ globalThis.describe("AppSync_Resolver_Retrying.Functions.listAllItemsConnection"
|
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
+
globalThis.describe("listAllItemsConnection — Scan cursor round-trip (paging fixes 1–3)", () => {
|
|
33
|
+
let code = AppSync_Resolver_Functions$PulumiAws.listAllItemsConnection("name", undefined, undefined, undefined, undefined);
|
|
34
|
+
globalThis.test("Fix 1: response encodes the real nextToken as the cursor", () => {
|
|
35
|
+
globalThis.expect(code.includes("const next = ctx.result?.nextToken ?? null;")).toBe(true);
|
|
36
|
+
globalThis.expect(code.includes("util.base64Encode(JSON.stringify({ token: next, index: i }))")).toBe(true);
|
|
37
|
+
globalThis.expect(code.includes("hasNextPage: !!next,")).toBe(true);
|
|
38
|
+
});
|
|
39
|
+
globalThis.test("Fix 1: request decodes `after` back to the DynamoDB token", () => {
|
|
40
|
+
globalThis.expect(code.includes("JSON.parse(util.base64Decode(ctx.args.after))")).toBe(true);
|
|
41
|
+
globalThis.expect(code.includes("nextToken: after,")).toBe(true);
|
|
42
|
+
});
|
|
43
|
+
globalThis.test("Fix 1: the old synthetic-index cursor is gone", () => {
|
|
44
|
+
globalThis.expect(code.includes("ctx.args.after + '_' + i")).toBe(false);
|
|
45
|
+
});
|
|
46
|
+
globalThis.test("Fix 2: backward paging (last/before) is rejected, not silently mishandled", () => {
|
|
47
|
+
globalThis.expect(code.includes("ctx.args.before != null || ctx.args.last != null")).toBe(true);
|
|
48
|
+
globalThis.expect(code.includes("UnsupportedPagination")).toBe(true);
|
|
49
|
+
});
|
|
50
|
+
globalThis.test("Fix 3: an empty/short filtered page still yields a resumable boundary cursor", () => {
|
|
51
|
+
globalThis.expect(code.includes("const boundary = next ? util.base64Encode(JSON.stringify({ token: next, index: -1 })) : null;")).toBe(true);
|
|
52
|
+
globalThis.expect(code.includes("edges.length > 0 ? edges[edges.length - 1].cursor : boundary")).toBe(true);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
32
56
|
export {
|
|
33
57
|
codeOf,
|
|
34
58
|
}
|