@reventlessdev/rescript-pulumi-aws 2.4.0-alpha.79 → 2.4.0-alpha.80
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,16 @@
|
|
|
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
|
+
# 2.4.0-alpha.80 (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
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **aws:** compile every resolver against AppSync before the deploy attaches one ([635bc26](https://github.com/ReventlessDev/reventless-core/commit/635bc265c63e19f1a69f31dfefe116b523b1c39b))
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
# 2.4.0-alpha.79 (2026-08-18)
|
|
7
17
|
|
|
8
18
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/rescript-pulumi-aws",
|
|
3
|
-
"version": "2.4.0-alpha.
|
|
3
|
+
"version": "2.4.0-alpha.80",
|
|
4
4
|
"description": "ReScript bindings for @pulumi/aws",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"@pulumi/aws": "~7.19.0",
|
|
23
23
|
"@pulumi/aws-native": "^1.62.0",
|
|
24
24
|
"sury": "11.0.0-alpha.4",
|
|
25
|
-
"@reventlessdev/rescript-
|
|
26
|
-
"@reventlessdev/rescript-
|
|
25
|
+
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.19",
|
|
26
|
+
"@reventlessdev/rescript-aws-sdk": "3.0.0-alpha.12"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"esbuild": "^0.25.12",
|
|
@@ -225,7 +225,13 @@ let ownerScopedResultResponse = (
|
|
|
225
225
|
| (None, None) => resultResponseCode
|
|
226
226
|
| _ =>
|
|
227
227
|
let ownerPart = switch ownerField {
|
|
228
|
-
|
|
228
|
+
// Takes the row it ignores: APPSYNC_JS type-checks the resolver, so a
|
|
229
|
+
// zero-parameter stub called as `_owns(row)` is TS2554 ("Expected 0
|
|
230
|
+
// arguments, but got 1") and AppSync rejects the whole resolver at create
|
|
231
|
+
// time with "The code contains one or more errors". Only a door that emits
|
|
232
|
+
// the call conditionally is safe with a bare `() => true`, and that is not a
|
|
233
|
+
// property worth relying on across three templates.
|
|
234
|
+
| None => "\n const _owns = (row) => true;"
|
|
229
235
|
| Some(field) =>
|
|
230
236
|
`
|
|
231
237
|
// ── owner scoping (generated) ──${ownerGuardPreamble(~ownerField=field, ~elevatedGroups)}`
|
|
@@ -254,7 +260,13 @@ let ownerScopedFirstResultResponse = (
|
|
|
254
260
|
| (None, None) => firstResultResponseCode
|
|
255
261
|
| _ =>
|
|
256
262
|
let ownerPart = switch ownerField {
|
|
257
|
-
|
|
263
|
+
// Takes the row it ignores: APPSYNC_JS type-checks the resolver, so a
|
|
264
|
+
// zero-parameter stub called as `_owns(row)` is TS2554 ("Expected 0
|
|
265
|
+
// arguments, but got 1") and AppSync rejects the whole resolver at create
|
|
266
|
+
// time with "The code contains one or more errors". Only a door that emits
|
|
267
|
+
// the call conditionally is safe with a bare `() => true`, and that is not a
|
|
268
|
+
// property worth relying on across three templates.
|
|
269
|
+
| None => "\n const _owns = (row) => true;"
|
|
258
270
|
| Some(field) =>
|
|
259
271
|
`
|
|
260
272
|
// ── owner scoping (generated) ──${ownerGuardPreamble(~ownerField=field, ~elevatedGroups)}`
|
|
@@ -288,22 +300,23 @@ ${resultResponseCode}
|
|
|
288
300
|
// Relay Node resolver — pipeline functions for node(id: ID!) query
|
|
289
301
|
// ---------------------------------------------------------------------------
|
|
290
302
|
|
|
291
|
-
/** Pipeline function (NONE datasource): decodes global ID and stashes typeName + localId.
|
|
303
|
+
/** Pipeline function (NONE datasource): decodes global ID and stashes typeName + localId.
|
|
304
|
+
|
|
305
|
+
Written without a `try`: APPSYNC_JS rejects try statements outright
|
|
306
|
+
(`@aws-appsync/no-try`), so a guarded version of this cannot be deployed at
|
|
307
|
+
all. Nothing is lost by dropping it — `util.base64Decode` does not throw on
|
|
308
|
+
malformed input, it returns the bytes it made of it, so the catch could never
|
|
309
|
+
run. An id that decodes to no `type:localId` pair therefore fails the one way
|
|
310
|
+
that is left: both halves stash as null, which is also what the guarded
|
|
311
|
+
version reported for a decode it could not parse. */
|
|
292
312
|
let nodeDecodeGlobalId =
|
|
293
313
|
`${importUtil}
|
|
294
314
|
export function request(ctx) {
|
|
295
|
-
const
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
ctx.stash.typeName = decoded.substring(0, colonIdx);
|
|
301
|
-
ctx.stash.localId = decoded.substring(colonIdx + 1);
|
|
302
|
-
}
|
|
303
|
-
} catch (e) {
|
|
304
|
-
ctx.stash.typeName = null;
|
|
305
|
-
ctx.stash.localId = null;
|
|
306
|
-
}
|
|
315
|
+
const decoded = util.base64Decode(ctx.args.id);
|
|
316
|
+
const colonIdx = decoded.indexOf(':');
|
|
317
|
+
const parsed = colonIdx > 0;
|
|
318
|
+
ctx.stash.typeName = parsed ? decoded.substring(0, colonIdx) : null;
|
|
319
|
+
ctx.stash.localId = parsed ? decoded.substring(colonIdx + 1) : null;
|
|
307
320
|
return { payload: null };
|
|
308
321
|
}
|
|
309
322
|
export function response(ctx) {
|
|
@@ -1335,7 +1348,13 @@ let refsByIds = (
|
|
|
1335
1348
|
~elevatedGroups: array<string>=[],
|
|
1336
1349
|
) => (tableName: string) => {
|
|
1337
1350
|
let ownerGuard = switch ownerField {
|
|
1338
|
-
|
|
1351
|
+
// Takes the row it ignores: APPSYNC_JS type-checks the resolver, so a
|
|
1352
|
+
// zero-parameter stub called as `_owns(row)` is TS2554 ("Expected 0
|
|
1353
|
+
// arguments, but got 1") and AppSync rejects the whole resolver at create
|
|
1354
|
+
// time with "The code contains one or more errors". Only a door that emits
|
|
1355
|
+
// the call conditionally is safe with a bare `() => true`, and that is not a
|
|
1356
|
+
// property worth relying on across three templates.
|
|
1357
|
+
| None => "\n const _owns = (row) => true;"
|
|
1339
1358
|
| Some(field) => ownerGuardPreamble(~ownerField=field, ~elevatedGroups)
|
|
1340
1359
|
}
|
|
1341
1360
|
// Retirement, in the vocabulary the row itself uses: a member test for the
|
|
@@ -113,7 +113,7 @@ function ownerScopedResultResponse(ownerField, elevatedGroups, retiredField, ret
|
|
|
113
113
|
return resultResponseCode;
|
|
114
114
|
}
|
|
115
115
|
let ownerPart = ownerField !== undefined ? `
|
|
116
|
-
// ── owner scoping (generated) ──` + ownerGuardPreamble(ownerField, elevatedGroups) : "\n const _owns = () => true;";
|
|
116
|
+
// ── owner scoping (generated) ──` + ownerGuardPreamble(ownerField, elevatedGroups) : "\n const _owns = (row) => true;";
|
|
117
117
|
let retiredPart = retiredGuardPreamble(retiredField, retiredValues, elevatedGroups, Stdlib_Option.isSome(ownerField));
|
|
118
118
|
return `
|
|
119
119
|
export function response(ctx) {
|
|
@@ -129,7 +129,7 @@ function ownerScopedFirstResultResponse(ownerField, elevatedGroups, retiredField
|
|
|
129
129
|
return firstResultResponseCode;
|
|
130
130
|
}
|
|
131
131
|
let ownerPart = ownerField !== undefined ? `
|
|
132
|
-
// ── owner scoping (generated) ──` + ownerGuardPreamble(ownerField, elevatedGroups) : "\n const _owns = () => true;";
|
|
132
|
+
// ── owner scoping (generated) ──` + ownerGuardPreamble(ownerField, elevatedGroups) : "\n const _owns = (row) => true;";
|
|
133
133
|
let retiredPart = retiredGuardPreamble(retiredField, retiredValues, elevatedGroups, Stdlib_Option.isSome(ownerField));
|
|
134
134
|
return `
|
|
135
135
|
export function response(ctx) {
|
|
@@ -148,18 +148,11 @@ export function request(ctx) { return {}; }
|
|
|
148
148
|
|
|
149
149
|
let nodeDecodeGlobalId = importUtil + `
|
|
150
150
|
export function request(ctx) {
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
ctx.stash.typeName = decoded.substring(0, colonIdx);
|
|
157
|
-
ctx.stash.localId = decoded.substring(colonIdx + 1);
|
|
158
|
-
}
|
|
159
|
-
} catch (e) {
|
|
160
|
-
ctx.stash.typeName = null;
|
|
161
|
-
ctx.stash.localId = null;
|
|
162
|
-
}
|
|
151
|
+
const decoded = util.base64Decode(ctx.args.id);
|
|
152
|
+
const colonIdx = decoded.indexOf(':');
|
|
153
|
+
const parsed = colonIdx > 0;
|
|
154
|
+
ctx.stash.typeName = parsed ? decoded.substring(0, colonIdx) : null;
|
|
155
|
+
ctx.stash.localId = parsed ? decoded.substring(colonIdx + 1) : null;
|
|
163
156
|
return { payload: null };
|
|
164
157
|
}
|
|
165
158
|
export function response(ctx) {
|
|
@@ -948,7 +941,7 @@ export function response(ctx) {
|
|
|
948
941
|
function refsByIds(labelField, retiredField, retiredValues, namedWhenRetired, ownerField, $staropt$star) {
|
|
949
942
|
return tableName => {
|
|
950
943
|
let elevatedGroups = $staropt$star !== undefined ? $staropt$star : [];
|
|
951
|
-
let ownerGuard = ownerField !== undefined ? ownerGuardPreamble(ownerField, elevatedGroups) : "\n const _owns = () => true;";
|
|
944
|
+
let ownerGuard = ownerField !== undefined ? ownerGuardPreamble(ownerField, elevatedGroups) : "\n const _owns = (row) => true;";
|
|
952
945
|
let retiredExpr;
|
|
953
946
|
if (retiredField !== undefined) {
|
|
954
947
|
if (retiredValues !== undefined) {
|