@reventlessdev/reventless-gwt 1.0.0-alpha.250 → 1.0.0-alpha.251
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 +13 -0
- package/package.json +5 -5
- package/src/Decision_GWT.res +4 -2
- package/src/Decision_GWT.res.mjs +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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
|
+
# 1.0.0-alpha.251 (2026-10-21)
|
|
7
|
+
|
|
8
|
+
* feat!: a rejected command says whether the model, the access check or the platform said no ([6a8a6b0](https://github.com/ReventlessDev/reventless-core/commit/6a8a6b0f2f31e766ae26a944c23b0904e51a5865))
|
|
9
|
+
|
|
10
|
+
### BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
* a type error variant with one of those names fails to
|
|
13
|
+
compile; rename it for what the model means, such as AlreadyBooked. On
|
|
14
|
+
AWS, rebuild every plugin against this release before a client selects
|
|
15
|
+
cause: a plugin built earlier answers it with a non-null error.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
# 1.0.0-alpha.250 (2026-10-21)
|
|
7
20
|
|
|
8
21
|
* feat!: a state view's row key is module Id ([08c9726](https://github.com/ReventlessDev/reventless-core/commit/08c972659a3d689a39fd5e2f2026597155e92210))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-gwt",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.251",
|
|
4
4
|
"description": "Given-When-Then DSLs and test harness for Reventless slice testing",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"sury": "11.0.0",
|
|
17
|
+
"@reventlessdev/rescript-jest": "1.0.0-alpha.13",
|
|
17
18
|
"@reventlessdev/rescript-effect": "1.0.0-alpha.1",
|
|
18
19
|
"@reventlessdev/rescript-node": "2.0.0-alpha.23",
|
|
19
|
-
"@reventlessdev/reventless-
|
|
20
|
-
"@reventlessdev/reventless-
|
|
21
|
-
"@reventlessdev/
|
|
22
|
-
"@reventlessdev/reventless-core": "3.0.0-alpha.302"
|
|
20
|
+
"@reventlessdev/reventless-core": "3.0.0-alpha.303",
|
|
21
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.200",
|
|
22
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.172"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"rescript": "12.3.1",
|
package/src/Decision_GWT.res
CHANGED
|
@@ -152,7 +152,7 @@ module Acting = (Spec: ActingSpec) => {
|
|
|
152
152
|
} else {
|
|
153
153
|
refusal :=
|
|
154
154
|
Some({
|
|
155
|
-
errorCode:
|
|
155
|
+
errorCode: Reventless.CommandOutcome.code(Forbidden),
|
|
156
156
|
errorDetail: `${Spec.name}.${commandName(
|
|
157
157
|
command,
|
|
158
158
|
)}: the caller holds no role this command's rule admits`,
|
|
@@ -211,7 +211,9 @@ module Acting = (Spec: ActingSpec) => {
|
|
|
211
211
|
Outcome.fail(
|
|
212
212
|
ErrorMismatch({
|
|
213
213
|
expected: JSON.Encode.object(
|
|
214
|
-
Dict.fromArray([
|
|
214
|
+
Dict.fromArray([
|
|
215
|
+
("errorCode", JSON.Encode.string(Reventless.CommandOutcome.code(Forbidden))),
|
|
216
|
+
]),
|
|
215
217
|
),
|
|
216
218
|
actual: decided,
|
|
217
219
|
actualEvents: encEvents(events),
|
package/src/Decision_GWT.res.mjs
CHANGED
|
@@ -14,6 +14,7 @@ import * as OwnerScope$Reventless from "@reventlessdev/reventless-spec/src/types
|
|
|
14
14
|
import * as JestBind$ReventlessGwt from "./JestBind.res.mjs";
|
|
15
15
|
import * as Message$ReventlessCore from "@reventlessdev/reventless-core/src/Message.res.mjs";
|
|
16
16
|
import * as Authorization$Reventless from "@reventlessdev/reventless-spec/src/types/Authorization.res.mjs";
|
|
17
|
+
import * as CommandOutcome$Reventless from "@reventlessdev/reventless-spec/src/components/CommandOutcome.res.mjs";
|
|
17
18
|
import * as DcbScopeInference$Reventless from "@reventlessdev/reventless-spec/src/components/DcbScopeInference.res.mjs";
|
|
18
19
|
import * as ScenarioRecorder$ReventlessGwt from "./ScenarioRecorder.res.mjs";
|
|
19
20
|
import * as CommandTopic_Helpers$ReventlessCore from "@reventlessdev/reventless-core/src/components/CommandTopic/CommandTopic_Helpers.res.mjs";
|
|
@@ -111,7 +112,7 @@ function Acting(Spec) {
|
|
|
111
112
|
return false;
|
|
112
113
|
} else {
|
|
113
114
|
refusal.contents = {
|
|
114
|
-
errorCode: "Forbidden",
|
|
115
|
+
errorCode: CommandOutcome$Reventless.code("Forbidden"),
|
|
115
116
|
errorDetail: Spec.name + `.` + Message$ReventlessCore.variantNameOfJson(Message$ReventlessCore.encode(command, Spec.commandSchema)) + `: the caller holds no role this command's rule admits`
|
|
116
117
|
};
|
|
117
118
|
return true;
|
|
@@ -165,7 +166,7 @@ function Acting(Spec) {
|
|
|
165
166
|
TAG: "ErrorMismatch",
|
|
166
167
|
expected: Object.fromEntries([[
|
|
167
168
|
"errorCode",
|
|
168
|
-
"Forbidden"
|
|
169
|
+
CommandOutcome$Reventless.code("Forbidden")
|
|
169
170
|
]]),
|
|
170
171
|
actual: decided,
|
|
171
172
|
actualEvents: encEvents(events)
|
|
@@ -399,7 +400,7 @@ function Make(Spec) {
|
|
|
399
400
|
return false;
|
|
400
401
|
} else {
|
|
401
402
|
refusal.contents = {
|
|
402
|
-
errorCode: "Forbidden",
|
|
403
|
+
errorCode: CommandOutcome$Reventless.code("Forbidden"),
|
|
403
404
|
errorDetail: name + `.` + Message$ReventlessCore.variantNameOfJson(Message$ReventlessCore.encode(command, commandSchema)) + `: the caller holds no role this command's rule admits`
|
|
404
405
|
};
|
|
405
406
|
return true;
|
|
@@ -559,7 +560,7 @@ function Make(Spec) {
|
|
|
559
560
|
TAG: "ErrorMismatch",
|
|
560
561
|
expected: Object.fromEntries([[
|
|
561
562
|
"errorCode",
|
|
562
|
-
"Forbidden"
|
|
563
|
+
CommandOutcome$Reventless.code("Forbidden")
|
|
563
564
|
]]),
|
|
564
565
|
actual: decided,
|
|
565
566
|
actualEvents: encEvents(events)
|
|
@@ -788,7 +789,7 @@ function MakeFromAggregate(Spec) {
|
|
|
788
789
|
return false;
|
|
789
790
|
} else {
|
|
790
791
|
refusal.contents = {
|
|
791
|
-
errorCode: "Forbidden",
|
|
792
|
+
errorCode: CommandOutcome$Reventless.code("Forbidden"),
|
|
792
793
|
errorDetail: name + `.` + Message$ReventlessCore.variantNameOfJson(Message$ReventlessCore.encode(command, commandSchema)) + `: the caller holds no role this command's rule admits`
|
|
793
794
|
};
|
|
794
795
|
return true;
|
|
@@ -921,7 +922,7 @@ function MakeFromAggregate(Spec) {
|
|
|
921
922
|
TAG: "ErrorMismatch",
|
|
922
923
|
expected: Object.fromEntries([[
|
|
923
924
|
"errorCode",
|
|
924
|
-
"Forbidden"
|
|
925
|
+
CommandOutcome$Reventless.code("Forbidden")
|
|
925
926
|
]]),
|
|
926
927
|
actual: decided,
|
|
927
928
|
actualEvents: encEvents(events)
|