@reventlessdev/reventless-infra 3.0.0-alpha.188 → 3.0.0-alpha.190
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,24 @@
|
|
|
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.190 (2026-10-10)
|
|
7
|
+
|
|
8
|
+
* feat!: a command's rule is looked up by its name, without a cast ([5f02c40](https://github.com/ReventlessDev/reventless-core/commit/5f02c4081d077bf4a6951d8c9b2b16553a8ca87b))
|
|
9
|
+
|
|
10
|
+
### BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
* a spec that writes `commandAuthorization` by hand writes
|
|
13
|
+
`authorizationOf = (name: string) => …` instead; the PPX refuses the old name.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 3.0.0-alpha.189 (2026-10-10)
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* an inbound translation is gated alike on every door, and encodes its commands by schema ([6ec3ce6](https://github.com/ReventlessDev/reventless-core/commit/6ec3ce672e53e2c162c64a90d103be691391be5e))
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
# 3.0.0-alpha.188 (2026-10-08)
|
|
7
25
|
|
|
8
26
|
**Note:** Version bump only for package @reventlessdev/reventless-infra
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-infra",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.190",
|
|
4
4
|
"description": "Infrastructure types for Reventless framework",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"sury-ppx": "11.0.0",
|
|
18
18
|
"uuid": "^13.0.0",
|
|
19
19
|
"@reventlessdev/rescript-effect": "0.1.0-alpha.34",
|
|
20
|
-
"@reventlessdev/reventless-spec": "3.0.0-alpha.160",
|
|
21
20
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.23",
|
|
22
|
-
"@reventlessdev/rescript-uuid": "2.0.0-alpha.1"
|
|
21
|
+
"@reventlessdev/rescript-uuid": "2.0.0-alpha.1",
|
|
22
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.162"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"rescript": "12.3.1",
|
package/src/components/Api.res
CHANGED
|
@@ -93,11 +93,11 @@ type mutationSchemaEntry = {
|
|
|
93
93
|
fieldNames: array<string>,
|
|
94
94
|
commandSchema: S.t<unknown>,
|
|
95
95
|
authorization?: Reventless.ReadModel.authorization,
|
|
96
|
-
/** Spec-level per-field authorization derived from `Spec.
|
|
96
|
+
/** Spec-level per-field authorization derived from `Spec.authorizationOf`,
|
|
97
97
|
keyed by mutation field name. Used by AWS to inject
|
|
98
98
|
`@aws_cognito_user_pools(cognito_groups: ...)` per field (Stage E2 in
|
|
99
99
|
`docs/plans/done/host-ui-login-core.md`). In-memory enforcement still happens
|
|
100
|
-
at the resolver layer via the same `
|
|
100
|
+
at the resolver layer via the same `authorizationOf` function. */
|
|
101
101
|
fieldPermissions?: dict<Reventless.Authorization.permission>,
|
|
102
102
|
/** Opt a mutation field into deploy-time IAM (SigV4) invocation in addition to
|
|
103
103
|
its Cognito authorization. When `true`, the AWS provider emits the
|
|
@@ -24,15 +24,17 @@ type acceptedResult = {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
A translation that was rejected -- by input parsing, by `translate`, by
|
|
28
|
-
encoding or by the publish itself.
|
|
27
|
+
A translation that was rejected -- by input parsing, by `translate`, by an
|
|
28
|
+
authorization check, by command encoding or by the publish itself.
|
|
29
29
|
|
|
30
30
|
- `requestId` -- the key the audit row is stored under
|
|
31
31
|
- `error` -- the rejection message
|
|
32
|
+
- `errorCode` -- `"Forbidden"` for a refused caller; absent for a failed translation
|
|
32
33
|
*/
|
|
33
34
|
type rejectedResult = {
|
|
34
35
|
requestId: string,
|
|
35
36
|
error: string,
|
|
37
|
+
errorCode?: string,
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
/**
|
|
@@ -45,10 +47,11 @@ type receiveResult = result<acceptedResult, rejectedResult>
|
|
|
45
47
|
/**
|
|
46
48
|
Runtime operations exposed by an `InboundTranslationSlice` component.
|
|
47
49
|
|
|
48
|
-
- `receive` -- accept external input, translate it, and publish
|
|
50
|
+
- `receive` -- accept external input, translate it, and publish its commands.
|
|
51
|
+
`caller` is who sent it; absent means the platform itself.
|
|
49
52
|
*/
|
|
50
53
|
type operations = {
|
|
51
|
-
receive: JSON.t => promise<receiveResult>,
|
|
54
|
+
receive: (JSON.t, ~caller: Reventless.Identity.t=?) => promise<receiveResult>,
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
/**
|
|
@@ -146,7 +146,7 @@ module NoDelegate = {
|
|
|
146
146
|
let commandSchema = S.unit
|
|
147
147
|
let moduleUrl: string = %raw(`import.meta.url`)
|
|
148
148
|
type role = Reventless.Role.name
|
|
149
|
-
let
|
|
149
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> => AllowAuthenticated
|
|
150
150
|
type lifecycleState = unit
|
|
151
151
|
let commandTransition = (_: command): Reventless.Transition.t<lifecycleState> => Unrestricted
|
|
152
152
|
let traits: array<Reventless.Trait.t> = []
|
|
@@ -30,7 +30,7 @@ let commandSchema = Sury.$unit;
|
|
|
30
30
|
|
|
31
31
|
let moduleUrl = import.meta.url;
|
|
32
32
|
|
|
33
|
-
function
|
|
33
|
+
function authorizationOf(param) {
|
|
34
34
|
return "AllowAuthenticated";
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -47,7 +47,7 @@ let NoDelegate = {
|
|
|
47
47
|
errorSchema: errorSchema,
|
|
48
48
|
commandSchema: commandSchema,
|
|
49
49
|
moduleUrl: moduleUrl,
|
|
50
|
-
|
|
50
|
+
authorizationOf: authorizationOf,
|
|
51
51
|
commandTransition: commandTransition,
|
|
52
52
|
traits: traits
|
|
53
53
|
};
|