@reventlessdev/reventless-aws 3.0.0-alpha.203 → 3.0.0-alpha.205
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 +14 -0
- package/package.json +6 -6
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync.res +10 -1
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync.res.mjs +3 -1
- package/src/components/Api/AppSync_SdlDecorate.res +14 -5
- package/src/components/Api/AppSync_SdlDecorate.res.mjs +2 -1
- package/tests/AppSync_SdlDecorateTest.res +18 -0
- package/tests/AppSync_SdlDecorateTest.res.mjs +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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.205 (2026-07-13)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **admin:** type-level [@aws](https://github.com/aws)_iam on Platform_ApiFragmentEntry for the SigV4 waiter (deploy [#7](https://github.com/ReventlessDev/reventless-core/issues/7)) ([927a93b](https://github.com/ReventlessDev/reventless-core/commit/927a93b550f9f3f56dca93810cafa9575663a0e9))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# 3.0.0-alpha.204 (2026-07-13)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **admin:** skip over-long Source-C subscriptions on the ApiFragmentRegistry aggregate (deploy [#6](https://github.com/ReventlessDev/reventless-core/issues/6)) ([0977120](https://github.com/ReventlessDev/reventless-core/commit/0977120d5c6cb2331d9384747d136fe99855690e))
|
|
18
|
+
|
|
19
|
+
|
|
6
20
|
# 3.0.0-alpha.203 (2026-07-13)
|
|
7
21
|
|
|
8
22
|
### 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.205",
|
|
4
4
|
"description": "AWS adapters for Reventless",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"dependencies": {
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
"sury": "11.0.0-alpha.4",
|
|
10
10
|
"uuid": "^13.0.0",
|
|
11
11
|
"@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.21",
|
|
12
|
-
"@reventlessdev/rescript-
|
|
12
|
+
"@reventlessdev/rescript-effect": "0.1.0-alpha.27",
|
|
13
13
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.7",
|
|
14
|
+
"@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.50",
|
|
14
15
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.15",
|
|
15
|
-
"@reventlessdev/rescript-effect": "0.1.0-alpha.27",
|
|
16
|
-
"@reventlessdev/reventless-core": "3.0.0-alpha.162",
|
|
17
16
|
"@reventlessdev/rescript-uuid": "1.1.0-alpha.15",
|
|
18
|
-
"@reventlessdev/reventless-interop": "3.0.0-alpha.26",
|
|
19
17
|
"@reventlessdev/reventless-infra": "3.0.0-alpha.98",
|
|
20
|
-
"@reventlessdev/reventless-
|
|
18
|
+
"@reventlessdev/reventless-core": "3.0.0-alpha.163",
|
|
19
|
+
"@reventlessdev/reventless-postgres": "3.0.0-alpha.27",
|
|
20
|
+
"@reventlessdev/reventless-interop": "3.0.0-alpha.26",
|
|
21
21
|
"@reventlessdev/reventless-spec": "3.0.0-alpha.76"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
@@ -150,9 +150,18 @@ let make: ReventlessCore.CommandGenerator_Adapter.resolversMaker<api, Util.Lambd
|
|
|
150
150
|
// fragment's subscription-source metadata) handles
|
|
151
151
|
// delivery. AWS requires a dataSourceName even on UNIT subscription resolvers,
|
|
152
152
|
// so we reuse the mutation's data source (its code never executes for subs).
|
|
153
|
+
//
|
|
154
|
+
// Skip fields whose `on<field>` subscription name exceeds AppSync's 50-char cap — the
|
|
155
|
+
// pushed SDL drops those Source-C subscription fields (Plugin_SubscriptionSchema.sourceCFields
|
|
156
|
+
// applies the SAME gate), so creating their resolvers would fail CreateResolver NotFound
|
|
157
|
+
// (e.g. the admin-aggregate `Platform_ApiFragmentRegistry_DeregisterApiFragment` → 52 chars).
|
|
158
|
+
let subscribableFields =
|
|
159
|
+
fields->Array.filter(field =>
|
|
160
|
+
`on${field}`->String.length <= ReventlessCore.Api_Naming.appSyncSubscriptionMaxLen
|
|
161
|
+
)
|
|
153
162
|
CommandSubscriptionResolvers_AppSync.make(
|
|
154
163
|
~api,
|
|
155
|
-
~mutationFields=
|
|
164
|
+
~mutationFields=subscribableFields,
|
|
156
165
|
~dataSourceName=dataSource.name->Pulumi.Output.asInput,
|
|
157
166
|
~opts,
|
|
158
167
|
)
|
|
@@ -11,6 +11,7 @@ import * as Lambda$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/Lambda
|
|
|
11
11
|
import * as AWS$ReventlessAws from "../AWS.res.mjs";
|
|
12
12
|
import * as Adapter$ReventlessCore from "@reventlessdev/reventless-core/src/adapter/Adapter.res.mjs";
|
|
13
13
|
import * as PolicyDocument$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/IAM/PolicyDocument.res.mjs";
|
|
14
|
+
import * as Api_Naming$ReventlessCore from "@reventlessdev/reventless-core/src/components/Api/Api_Naming.res.mjs";
|
|
14
15
|
import * as Util_AppSync$ReventlessAws from "../../util/Util_AppSync.res.mjs";
|
|
15
16
|
import * as Util_Pulumi$ReventlessCore from "@reventlessdev/reventless-core/src/util/Util_Pulumi.res.mjs";
|
|
16
17
|
import * as Util_Adapter$ReventlessCore from "@reventlessdev/reventless-core/src/util/Util_Adapter.res.mjs";
|
|
@@ -78,7 +79,8 @@ function make(name, api, fields, param, runtime, resources, opts) {
|
|
|
78
79
|
let commandName = Stdlib_String.capitalize(Stdlib_Option.getOr(parts[parts.length - 1 | 0], field));
|
|
79
80
|
return AppSync_Resolver_Retrying$ReventlessAws.makeUnitJsResolver(Stdlib_String.capitalize(field), api, dataSource.name, "Mutation", field, AppSync_Resolver_Functions$PulumiAws.invokeCommandGenerator(commandName), opts$1);
|
|
80
81
|
});
|
|
81
|
-
|
|
82
|
+
let subscribableFields = fields.filter(field => (`on` + field).length <= Api_Naming$ReventlessCore.appSyncSubscriptionMaxLen);
|
|
83
|
+
CommandSubscriptionResolvers_AppSync$ReventlessAws.make(api, subscribableFields, dataSource.name, opts$1);
|
|
82
84
|
let resources$1 = resolvers.map(Util_AppSync$ReventlessAws.toResourceNative);
|
|
83
85
|
return {
|
|
84
86
|
resources: resources$1
|
|
@@ -119,11 +119,20 @@ let injectAwsAuthAll = (
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
// Shared traversal types every callable surface reaches — `PageInfo` (relay
|
|
122
|
-
// connections, injected by the stitcher)
|
|
123
|
-
//
|
|
124
|
-
// the
|
|
125
|
-
//
|
|
126
|
-
|
|
122
|
+
// connections, injected by the stitcher), the `CommandResult` members (mutation
|
|
123
|
+
// returns, deduped across fragments by the stitcher), and `Platform_ApiFragmentEntry`
|
|
124
|
+
// (the return type of the IAM-callable `Platform_ApiFragments` status query the deploy
|
|
125
|
+
// waiter polls via SigV4 — without the type-level `@aws_iam` the SigV4 caller reaches the
|
|
126
|
+
// query field but is "Not Authorized to access <field> on type Platform_ApiFragmentEntry").
|
|
127
|
+
// Stamped once on the ASSEMBLED SDL: per-fragment stamping would race the stitcher's
|
|
128
|
+
// first-wins dedupe against unstamped sibling copies.
|
|
129
|
+
let sharedIamTypeNames = [
|
|
130
|
+
"PageInfo",
|
|
131
|
+
"CommandAccepted",
|
|
132
|
+
"CommandRejected",
|
|
133
|
+
"CommandPending",
|
|
134
|
+
"Platform_ApiFragmentEntry",
|
|
135
|
+
]
|
|
127
136
|
|
|
128
137
|
let stampSharedIamTypes = (sdl: string): string =>
|
|
129
138
|
sharedIamTypeNames->Array.reduce(sdl, (acc, name) =>
|
|
@@ -187,3 +187,21 @@ describe("AppSync_SdlDecorate.planAwsPushes", () => {
|
|
|
187
187
|
expect(plan.sdl)->toContain("Catalog_AddProduct")
|
|
188
188
|
})
|
|
189
189
|
})
|
|
190
|
+
|
|
191
|
+
describe("AppSync_SdlDecorate.stampSharedIamTypes", () => {
|
|
192
|
+
// Regression: the deploy waiter polls the IAM-callable Platform_ApiFragments query via
|
|
193
|
+
// SigV4; its return type Platform_ApiFragmentEntry must carry the type-level @aws_iam or
|
|
194
|
+
// the SigV4 caller reaches the query field but gets "Not Authorized to access <field> on
|
|
195
|
+
// type Platform_ApiFragmentEntry" (deploy validation #7).
|
|
196
|
+
testSync("stamps Platform_ApiFragmentEntry with dual-auth", () => {
|
|
197
|
+
let sdl = AppSync_SdlDecorate.stampSharedIamTypes(
|
|
198
|
+
"type Platform_ApiFragmentEntry {\n pluginId: String!\n pushStatus: String!\n}",
|
|
199
|
+
)
|
|
200
|
+
expect(sdl)->toContain("type Platform_ApiFragmentEntry @aws_cognito_user_pools @aws_iam {")
|
|
201
|
+
})
|
|
202
|
+
|
|
203
|
+
testSync("still stamps the CommandResult members", () => {
|
|
204
|
+
let sdl = AppSync_SdlDecorate.stampSharedIamTypes("type CommandAccepted {\n id: ID!\n}")
|
|
205
|
+
expect(sdl)->toContain("type CommandAccepted @aws_cognito_user_pools @aws_iam {")
|
|
206
|
+
})
|
|
207
|
+
})
|
|
@@ -166,6 +166,17 @@ globalThis.describe("AppSync_SdlDecorate.planAwsPushes", () => {
|
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
168
|
|
|
169
|
+
globalThis.describe("AppSync_SdlDecorate.stampSharedIamTypes", () => {
|
|
170
|
+
globalThis.test("stamps Platform_ApiFragmentEntry with dual-auth", () => {
|
|
171
|
+
let sdl = AppSync_SdlDecorate$ReventlessAws.stampSharedIamTypes("type Platform_ApiFragmentEntry {\n pluginId: String!\n pushStatus: String!\n}");
|
|
172
|
+
globalThis.expect(sdl).toContain("type Platform_ApiFragmentEntry @aws_cognito_user_pools @aws_iam {");
|
|
173
|
+
});
|
|
174
|
+
globalThis.test("still stamps the CommandResult members", () => {
|
|
175
|
+
let sdl = AppSync_SdlDecorate$ReventlessAws.stampSharedIamTypes("type CommandAccepted {\n id: ID!\n}");
|
|
176
|
+
globalThis.expect(sdl).toContain("type CommandAccepted @aws_cognito_user_pools @aws_iam {");
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
|
|
169
180
|
export {
|
|
170
181
|
sources,
|
|
171
182
|
stitchedSdl,
|