@reventlessdev/reventless-infra 3.0.0-alpha.189 → 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,17 @@
|
|
|
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
|
+
|
|
6
17
|
# 3.0.0-alpha.189 (2026-10-10)
|
|
7
18
|
|
|
8
19
|
### Bug Fixes
|
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": {
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"sury": "11.0.0",
|
|
17
17
|
"sury-ppx": "11.0.0",
|
|
18
18
|
"uuid": "^13.0.0",
|
|
19
|
-
"@reventlessdev/rescript-uuid": "2.0.0-alpha.1",
|
|
20
|
-
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.23",
|
|
21
19
|
"@reventlessdev/rescript-effect": "0.1.0-alpha.34",
|
|
22
|
-
"@reventlessdev/
|
|
20
|
+
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.23",
|
|
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
|
|
@@ -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
|
};
|