@reventlessdev/reventless-aws 3.0.0-alpha.200 → 3.0.0-alpha.201
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.201 (2026-07-13)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **api:** dual-auth arg-less IAM fields — extractLeadingName dropped the trailing colon ([ea34da2](https://github.com/ReventlessDev/reventless-core/commit/ea34da229164db63988ad035138c17ba9134ac55))
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
# 3.0.0-alpha.200 (2026-07-12)
|
|
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.
|
|
3
|
+
"version": "3.0.0-alpha.201",
|
|
4
4
|
"description": "AWS adapters for Reventless",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"dependencies": {
|
|
@@ -8,17 +8,17 @@
|
|
|
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.21",
|
|
12
11
|
"@reventlessdev/rescript-effect": "0.1.0-alpha.27",
|
|
13
|
-
"@reventlessdev/rescript-
|
|
14
|
-
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.15",
|
|
12
|
+
"@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.21",
|
|
15
13
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.7",
|
|
14
|
+
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.15",
|
|
15
|
+
"@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.50",
|
|
16
16
|
"@reventlessdev/rescript-uuid": "1.1.0-alpha.15",
|
|
17
|
-
"@reventlessdev/reventless-core": "3.0.0-alpha.
|
|
17
|
+
"@reventlessdev/reventless-core": "3.0.0-alpha.160",
|
|
18
18
|
"@reventlessdev/reventless-infra": "3.0.0-alpha.98",
|
|
19
19
|
"@reventlessdev/reventless-interop": "3.0.0-alpha.26",
|
|
20
20
|
"@reventlessdev/reventless-spec": "3.0.0-alpha.76",
|
|
21
|
-
"@reventlessdev/reventless-postgres": "3.0.0-alpha.
|
|
21
|
+
"@reventlessdev/reventless-postgres": "3.0.0-alpha.24"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"rescript": "^12.3.0",
|
|
@@ -94,6 +94,38 @@ describe("AppSync_Adapter.stitchWithAwsDirectives", () => {
|
|
|
94
94
|
})
|
|
95
95
|
})
|
|
96
96
|
|
|
97
|
+
describe("AppSync_SdlDecorate.injectAwsAuthAll", () => {
|
|
98
|
+
// Regression: an ARG-LESS field named in iamFieldNames must still get @aws_iam.
|
|
99
|
+
// extractLeadingName used to return `Platform_ApiFragments:` (trailing colon) for
|
|
100
|
+
// arg-less fields, so isIam missed it and the field stayed Cognito-only — which
|
|
101
|
+
// 401'd the deploy waiter's SigV4 poll of Platform_ApiFragments on real AWS.
|
|
102
|
+
testSync("dual-auths an arg-less query field named in iamFieldNames", () => {
|
|
103
|
+
let base = ReventlessCore.GraphQL_Stitcher.encode({
|
|
104
|
+
types: [],
|
|
105
|
+
mutations: [` Platform_RegisterApiFragment(input: In): CommandResult`],
|
|
106
|
+
queries: [` Platform_ApiFragments: [Entry!]!`, ` Other_Query: Int`],
|
|
107
|
+
subscriptions: [],
|
|
108
|
+
subscriptionSources: [],
|
|
109
|
+
})
|
|
110
|
+
let decorated = AppSync_SdlDecorate.injectAwsAuthAll(
|
|
111
|
+
base,
|
|
112
|
+
~group="Admin",
|
|
113
|
+
~iamFieldNames=["Platform_RegisterApiFragment", "Platform_ApiFragments"],
|
|
114
|
+
)
|
|
115
|
+
let parts = ReventlessCore.GraphQL_Stitcher.decode(decorated)
|
|
116
|
+
let queryField = name =>
|
|
117
|
+
parts.queries->Array.find(q => q->String.includes(name))->Option.getOrThrow
|
|
118
|
+
// The arg-less IAM query gets dual-auth.
|
|
119
|
+
expect(queryField("Platform_ApiFragments"))->toContain("@aws_iam")
|
|
120
|
+
// The arg-full IAM mutation still does too.
|
|
121
|
+
expect(parts.mutations->Array.getUnsafe(0))->toContain("@aws_iam")
|
|
122
|
+
// A query NOT in iamFieldNames stays Cognito-only.
|
|
123
|
+
let other = queryField("Other_Query")
|
|
124
|
+
expect(other)->toContain(`@aws_auth(cognito_groups: ["Admin"])`)
|
|
125
|
+
expect(other->String.includes("@aws_iam"))->toBe(false)
|
|
126
|
+
})
|
|
127
|
+
})
|
|
128
|
+
|
|
97
129
|
describe("AppSync_SdlDecorate.planAwsPushes", () => {
|
|
98
130
|
// Neutral admin base: a system-callable mutation + a shared traversal type.
|
|
99
131
|
let rawAdminBase = ReventlessCore.GraphQL_Stitcher.encode({
|
|
@@ -89,6 +89,32 @@ globalThis.describe("AppSync_Adapter.stitchWithAwsDirectives", () => {
|
|
|
89
89
|
});
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
+
globalThis.describe("AppSync_SdlDecorate.injectAwsAuthAll", () => {
|
|
93
|
+
globalThis.test("dual-auths an arg-less query field named in iamFieldNames", () => {
|
|
94
|
+
let base = GraphQL_Stitcher$ReventlessCore.encode({
|
|
95
|
+
types: [],
|
|
96
|
+
mutations: [` Platform_RegisterApiFragment(input: In): CommandResult`],
|
|
97
|
+
queries: [
|
|
98
|
+
` Platform_ApiFragments: [Entry!]!`,
|
|
99
|
+
` Other_Query: Int`
|
|
100
|
+
],
|
|
101
|
+
subscriptions: [],
|
|
102
|
+
subscriptionSources: []
|
|
103
|
+
});
|
|
104
|
+
let decorated = AppSync_SdlDecorate$ReventlessAws.injectAwsAuthAll(base, "Admin", [
|
|
105
|
+
"Platform_RegisterApiFragment",
|
|
106
|
+
"Platform_ApiFragments"
|
|
107
|
+
]);
|
|
108
|
+
let parts = GraphQL_Stitcher$ReventlessCore.decode(decorated);
|
|
109
|
+
let queryField = name => Stdlib_Option.getOrThrow(parts.queries.find(q => q.includes(name)), undefined);
|
|
110
|
+
globalThis.expect(queryField("Platform_ApiFragments")).toContain("@aws_iam");
|
|
111
|
+
globalThis.expect(parts.mutations[0]).toContain("@aws_iam");
|
|
112
|
+
let other = queryField("Other_Query");
|
|
113
|
+
globalThis.expect(other).toContain(`@aws_auth(cognito_groups: ["Admin"])`);
|
|
114
|
+
globalThis.expect(other.includes("@aws_iam")).toBe(false);
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
|
|
92
118
|
globalThis.describe("AppSync_SdlDecorate.planAwsPushes", () => {
|
|
93
119
|
let rawAdminBase = GraphQL_Stitcher$ReventlessCore.encode({
|
|
94
120
|
types: [`type CommandAccepted {\n id: ID!\n}`],
|