@reventlessdev/reventless-spec 3.0.0-alpha.125 → 3.0.0-alpha.126
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 +8 -0
- package/package.json +1 -1
- package/src/components/Aggregate.res +5 -4
- package/src/components/InboundTranslationSlice.res +2 -2
- package/src/components/Plugin.res +2 -2
- package/src/components/StateAnnotations.res +2 -2
- package/src/components/StateChangeSlice.res +2 -2
- package/src/types/Transition.res +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.126 (2026-09-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @reventlessdev/reventless-spec
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# 3.0.0-alpha.125 (2026-09-01)
|
|
7
15
|
|
|
8
16
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -70,10 +70,11 @@ module type Spec = {
|
|
|
70
70
|
type lifecycleState
|
|
71
71
|
|
|
72
72
|
/** The lifecycle edge each command owns, read while the plugin structure is
|
|
73
|
-
assembled. Auto-injected as `_ => Unrestricted` by `@@reventless.spec`,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
assembled. Auto-injected as `_ => Unrestricted` by `@@reventless.spec`, so
|
|
74
|
+
a component whose commands guard nothing needs no line; a host that writes
|
|
75
|
+
the switch by hand gets an exhaustive one over typed states. Refused rather
|
|
76
|
+
than injected when the command type splices, since a spliced command must
|
|
77
|
+
be answered for. See `Transition`. */
|
|
77
78
|
let commandTransition: command => Transition.t<lifecycleState>
|
|
78
79
|
|
|
79
80
|
/** The domain traits grafted into this component, as values the trait packages
|
|
@@ -72,8 +72,8 @@ module type Spec = {
|
|
|
72
72
|
|
|
73
73
|
/** The lifecycle edge each command owns, read while the plugin structure is
|
|
74
74
|
assembled. Auto-injected as `_ => Unrestricted` by `@@reventless.spec`,
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
so a component whose commands guard nothing needs no line; a host that
|
|
76
|
+
writes the switch by hand gets an exhaustive one over typed states.
|
|
77
77
|
See `Transition`. */
|
|
78
78
|
let commandTransition: command => Transition.t<lifecycleState>
|
|
79
79
|
}
|
|
@@ -137,10 +137,10 @@ type commandDef = {
|
|
|
137
137
|
aggregateIdField: @s.matches(stringOptionSchema) option<string>,
|
|
138
138
|
mutationField: string,
|
|
139
139
|
references: array<fieldReference>,
|
|
140
|
-
/** The
|
|
140
|
+
/** The declared *from* set — lifecycle states this command is meaningful in.
|
|
141
141
|
`None` means always available; `Some([])` means never show. */
|
|
142
142
|
allowedStates: @s.matches(stringArrayOptionSchema) option<array<string>>,
|
|
143
|
-
/** The
|
|
143
|
+
/** The declared *to* state this command's handler writes. `None` with a
|
|
144
144
|
from-set present means the command does not move the row. */
|
|
145
145
|
targetState: @s.matches(stringOptionSchema) option<string>,
|
|
146
146
|
/** Whether the variant is exposed in the generated API (non-`@noApi`). */
|
|
@@ -54,7 +54,7 @@ otherwise see the same negative marker on every record they can read.
|
|
|
54
54
|
two-valued enum.
|
|
55
55
|
- `Some(v)` — the **state** form. The row is retired when the field equals `v`,
|
|
56
56
|
and the field is the record's `@lifecycle` field. One field then carries the
|
|
57
|
-
fact once instead of twice, and
|
|
57
|
+
fact once instead of twice, and `Moves([Deactivated], Active)` on the
|
|
58
58
|
way-back command is enough to make a generated menu offer it there and nowhere
|
|
59
59
|
else —
|
|
60
60
|
because retirement is finally expressible in the vocabulary that stance is
|
|
@@ -158,7 +158,7 @@ type stateAnnotationSpec = {
|
|
|
158
158
|
metric: array<(string, metricSpec)>,
|
|
159
159
|
/**
|
|
160
160
|
Field annotated `@lifecycle` on the state record (PPX-emitted) — the enum a
|
|
161
|
-
command's
|
|
161
|
+
command's declared edge is written in terms of, a board draws its columns
|
|
162
162
|
from and a state diagram renders. `Some(name)` when one such annotation
|
|
163
163
|
exists; the PPX errors on duplicate `@lifecycle` annotations within the same
|
|
164
164
|
record. Codegen consumes this to populate `queryableDef.lifecycleField`, and
|
|
@@ -94,8 +94,8 @@ module type Spec = {
|
|
|
94
94
|
|
|
95
95
|
/** The lifecycle edge each command owns, read while the plugin structure is
|
|
96
96
|
assembled. Auto-injected as `_ => Unrestricted` by `@@reventless.spec`,
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
so a component whose commands guard nothing needs no line; a host that
|
|
98
|
+
writes the switch by hand gets an exhaustive one over typed states.
|
|
99
99
|
See `Transition`. */
|
|
100
100
|
let commandTransition: command => Transition.t<lifecycleState>
|
|
101
101
|
|
package/src/types/Transition.res
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
// The lifecycle edge a command owns, declared as a value rather than as an
|
|
2
2
|
// attribute on the constructor.
|
|
3
3
|
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
// component's enum, so a misspelling survives to the plugin structure.
|
|
4
|
+
// The attribute this replaces could not say it for a command a host did NOT
|
|
5
|
+
// declare: a variant spread splices members, while the attribute lowered to a
|
|
6
|
+
// dict on the parent union, so a spliced command arrived carrying no edge at
|
|
7
|
+
// all. Nor could it be checked — the PPX extracts leaf identifiers as strings,
|
|
8
|
+
// and the states belong to another component's enum, so a misspelling survived
|
|
9
|
+
// to the plugin structure.
|
|
11
10
|
//
|
|
12
11
|
// A `command => t<'state>` switch answers both. It is exhaustive, so a spliced
|
|
13
12
|
// constructor is a compile error until the host says what it does; and `'state`
|