@reventlessdev/reventless-gwt 1.0.0-alpha.185 → 1.0.0-alpha.187

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/package.json +9 -9
  3. package/src/Automation_GWT.res +0 -1
  4. package/src/Automation_GWT.res.mjs +1 -3
  5. package/src/Behavior_GWT.res +0 -2
  6. package/src/Behavior_GWT.res.mjs +1 -4
  7. package/src/Delegate_GWT.res +0 -1
  8. package/src/Delegate_GWT.res.mjs +1 -7
  9. package/src/Flow_GWT.res +0 -1
  10. package/src/Flow_GWT.res.mjs +1 -4
  11. package/src/InboundTranslation_GWT.res +0 -1
  12. package/src/InboundTranslation_GWT.res.mjs +1 -3
  13. package/src/Mapping_GWT.res +0 -1
  14. package/src/Mapping_GWT.res.mjs +1 -3
  15. package/src/MultiSourceProjection_GWT.res +0 -1
  16. package/src/MultiSourceProjection_GWT.res.mjs +1 -3
  17. package/src/OutboundTranslation_GWT.res +0 -1
  18. package/src/OutboundTranslation_GWT.res.mjs +1 -3
  19. package/src/Projection_GWT.res +0 -1
  20. package/src/Projection_GWT.res.mjs +1 -3
  21. package/src/Query_GWT.res +4 -6
  22. package/src/Query_GWT.res.mjs +10 -12
  23. package/src/SideEffect_GWT.res +0 -1
  24. package/src/SideEffect_GWT.res.mjs +1 -3
  25. package/src/StateChange/ExternalAddCategorySlice.res.mjs +9 -9
  26. package/src/StateChange/WithFixtures.res.mjs +7 -7
  27. package/src/StateChange/WithManualOpen.res.mjs +7 -7
  28. package/tests/AutomationGwtTest.res.mjs +13 -13
  29. package/tests/DelegateGwtTest.res +0 -1
  30. package/tests/DelegateGwtTest.res.mjs +77 -79
  31. package/tests/FlowAggregateGwtTest.res +0 -1
  32. package/tests/FlowAggregateGwtTest.res.mjs +22 -24
  33. package/tests/FlowCrossPluginGwtTest.res +0 -1
  34. package/tests/FlowCrossPluginGwtTest.res.mjs +58 -60
  35. package/tests/FlowGwtTest.res +0 -1
  36. package/tests/FlowGwtTest.res.mjs +40 -40
  37. package/tests/InboundTranslationGwtTest.res.mjs +8 -8
  38. package/tests/MappingGwtTest.res +0 -1
  39. package/tests/MappingGwtTest.res.mjs +30 -32
  40. package/tests/OutboundTranslationGwtTest.res.mjs +8 -8
  41. package/tests/QueryGwtTest.res +0 -1
  42. package/tests/QueryGwtTest.res.mjs +14 -16
  43. package/tests/QueryResolverGwtTest.res +0 -1
  44. package/tests/QueryResolverGwtTest.res.mjs +10 -12
  45. package/tests/SideEffect/FakeOrderNotification.res.mjs +5 -5
  46. package/tests/SideEffect/MockEmail.res +1 -1
  47. package/tests/SideEffect/MockEmail.res.mjs +6 -5
  48. package/tests/StateChangeSliceGwtTest.res.mjs +15 -15
  49. package/tests/StateViewSliceGwtTest.res.mjs +14 -14
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
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.187 (2026-08-18)
7
+
8
+ * feat(sury)!: migrate to sury 11.0.0-rc.1 ([2cf8969](https://github.com/ReventlessDev/reventless-core/commit/2cf8969a222ce1b775563668a4126cb20611966c))
9
+
10
+ ### BREAKING CHANGES
11
+
12
+ * sury is a direct dependency of the published packages and
13
+ its schema and serialization surface changed; consumers must migrate to
14
+ sury 11.
15
+
16
+
17
+
18
+ # 1.0.0-alpha.186 (2026-08-18)
19
+
20
+ **Note:** Version bump only for package @reventlessdev/reventless-gwt
21
+
22
+
23
+
24
+
25
+
6
26
  # 1.0.0-alpha.185 (2026-08-16)
7
27
 
8
28
  **Note:** Version bump only for package @reventlessdev/reventless-gwt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-gwt",
3
- "version": "1.0.0-alpha.185",
3
+ "version": "1.0.0-alpha.187",
4
4
  "description": "Given-When-Then DSLs and test harness for Reventless slice testing",
5
5
  "license": "Apache-2.0",
6
6
  "jest": {
@@ -13,18 +13,18 @@
13
13
  ]
14
14
  },
15
15
  "dependencies": {
16
- "sury": "11.0.0-alpha.4",
17
- "@reventlessdev/rescript-jest": "1.0.0-alpha.10",
16
+ "sury": "11.0.0-rc.1",
18
17
  "@reventlessdev/rescript-effect": "0.1.0-alpha.32",
19
- "@reventlessdev/rescript-node": "2.0.0-alpha.7",
20
- "@reventlessdev/reventless-core": "3.0.0-alpha.238",
21
- "@reventlessdev/reventless-infra": "3.0.0-alpha.144",
22
- "@reventlessdev/reventless-spec": "3.0.0-alpha.116"
18
+ "@reventlessdev/rescript-jest": "1.0.0-alpha.10",
19
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.146",
20
+ "@reventlessdev/reventless-core": "3.0.0-alpha.240",
21
+ "@reventlessdev/rescript-node": "2.0.0-alpha.8",
22
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.118"
23
23
  },
24
24
  "devDependencies": {
25
25
  "rescript": "12.3.0",
26
- "sury-ppx": "11.0.0-alpha.2",
27
- "@reventlessdev/reventless-ppx": "1.0.0-alpha.68"
26
+ "sury-ppx": "11.0.0-rc.1",
27
+ "@reventlessdev/reventless-ppx": "1.0.0-alpha.71"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "rescript": "12.3.0"
@@ -62,7 +62,6 @@ module type T = {
62
62
  module Make = (Spec: SliceSpec): (T with module Spec = Spec) => {
63
63
  module Spec = Spec
64
64
 
65
- S.enableJson()
66
65
 
67
66
  let describe = JestBind.describe
68
67
  let test = (name, body) => JestBind.test(~slice=Spec.name, name, body)
@@ -1,6 +1,5 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
4
3
  import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
5
4
  import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
6
5
  import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
@@ -9,7 +8,6 @@ import * as JestBind$ReventlessGwt from "./JestBind.res.mjs";
9
8
  import * as Message$ReventlessCore from "@reventlessdev/reventless-core/src/Message.res.mjs";
10
9
 
11
10
  function Make(Spec) {
12
- S.enableJson();
13
11
  let test = (name, body) => JestBind$ReventlessGwt.test(Spec.name, name, body);
14
12
  let encTodos = arr => arr.map(param => [
15
13
  param[0],
@@ -157,4 +155,4 @@ function Make(Spec) {
157
155
  export {
158
156
  Make,
159
157
  }
160
- /* S Not a pure module */
158
+ /* Message-ReventlessCore Not a pure module */
@@ -241,7 +241,6 @@ module Make = (
241
241
  ): (T with module Spec = Spec) => {
242
242
  module Spec = Spec
243
243
 
244
- S.enableJson()
245
244
 
246
245
  let describe = JestBind.describe
247
246
  let todo = JestBind.todo
@@ -537,7 +536,6 @@ module MakeFromAggregate = (
537
536
  ): (AggregateT with module Spec = Spec) => {
538
537
  module Spec = Spec
539
538
 
540
- S.enableJson()
541
539
 
542
540
  let describe = JestBind.describe
543
541
  let test = (name, body) => JestBind.test(~slice=Spec.name, name, body)
@@ -1,6 +1,5 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
4
3
  import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
5
4
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
6
5
  import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
@@ -145,7 +144,6 @@ function AssertionCore(Spec) {
145
144
 
146
145
  function Make(Spec) {
147
146
  return Behavior => {
148
- S.enableJson();
149
147
  let test = (name, body) => JestBind$ReventlessGwt.test(Spec.name, name, body);
150
148
  let errors = {
151
149
  contents: []
@@ -394,7 +392,6 @@ function Make(Spec) {
394
392
 
395
393
  function MakeFromAggregate(Spec) {
396
394
  return Behavior => {
397
- S.enableJson();
398
395
  let test = (name, body) => JestBind$ReventlessGwt.test(Spec.name, name, body);
399
396
  let errors = {
400
397
  contents: []
@@ -520,4 +517,4 @@ export {
520
517
  Make,
521
518
  MakeFromAggregate,
522
519
  }
523
- /* S Not a pure module */
520
+ /* DcbTag-Reventless Not a pure module */
@@ -72,7 +72,6 @@ module type T = {
72
72
  module Make = (D: Delegate): (T with type inbound = D.inbound) => {
73
73
  type inbound = D.inbound
74
74
 
75
- S.enableJson()
76
75
 
77
76
  let describe = JestBind.describe
78
77
  let test = (name, ~timeout=?, body) =>
@@ -1,6 +1,5 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
4
3
  import * as Stdlib_JSON from "@rescript/runtime/lib/es6/Stdlib_JSON.js";
5
4
  import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
6
5
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
@@ -19,7 +18,6 @@ function encPublished(target, payload) {
19
18
  }
20
19
 
21
20
  function Make(D) {
22
- S.enableJson();
23
21
  let test = (name, timeout, body) => JestBind$ReventlessGwt.testPromise(D.name, name, timeout, body);
24
22
  let whenInput = ev => D.run(ev);
25
23
  let sortJson = arr => arr.toSorted((a, b) => Primitive_string.compare(JSON.stringify(a), JSON.stringify(b)));
@@ -84,7 +82,6 @@ function FromExtensionPoint(M) {
84
82
  return [];
85
83
  }
86
84
  };
87
- S.enableJson();
88
85
  let test = (name$1, timeout, body) => JestBind$ReventlessGwt.testPromise(name, name$1, timeout, body);
89
86
  let whenInput = run;
90
87
  let sortJson = arr => arr.toSorted((a, b) => Primitive_string.compare(JSON.stringify(a), JSON.stringify(b)));
@@ -132,7 +129,6 @@ function FromExtensionPoint(M) {
132
129
  return encDirective(action._1);
133
130
  }
134
131
  });
135
- S.enableJson();
136
132
  let test$1 = (name$2, timeout, body) => JestBind$ReventlessGwt.testPromise(name$1, name$2, timeout, body);
137
133
  let whenInput$1 = run$1;
138
134
  let sortJson$1 = arr => arr.toSorted((a, b) => Primitive_string.compare(JSON.stringify(a), JSON.stringify(b)));
@@ -230,7 +226,6 @@ function FromExtension(M) {
230
226
  return [encDirective(action._1)];
231
227
  }
232
228
  }))).flat();
233
- S.enableJson();
234
229
  let test = (name$1, timeout, body) => JestBind$ReventlessGwt.testPromise(name, name$1, timeout, body);
235
230
  let whenInput = run;
236
231
  let sortJson = arr => arr.toSorted((a, b) => Primitive_string.compare(JSON.stringify(a), JSON.stringify(b)));
@@ -289,7 +284,6 @@ function FromExtension(M) {
289
284
  return [];
290
285
  }
291
286
  };
292
- S.enableJson();
293
287
  let test$1 = (name$2, timeout, body) => JestBind$ReventlessGwt.testPromise(name$1, name$2, timeout, body);
294
288
  let whenInput$1 = run$1;
295
289
  let sortJson$1 = arr => arr.toSorted((a, b) => Primitive_string.compare(JSON.stringify(a), JSON.stringify(b)));
@@ -369,4 +363,4 @@ export {
369
363
  FromExtensionPoint,
370
364
  FromExtension,
371
365
  }
372
- /* S Not a pure module */
366
+ /* Message-ReventlessCore Not a pure module */
package/src/Flow_GWT.res CHANGED
@@ -81,7 +81,6 @@ type flowState = {
81
81
 
82
82
  type flow = promise<flowState>
83
83
 
84
- S.enableJson()
85
84
 
86
85
  let emptyState = {
87
86
  log: [],
@@ -1,6 +1,5 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
4
3
  import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
5
4
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
6
5
  import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
@@ -15,8 +14,6 @@ import * as StubRuntime$ReventlessGwt from "./StubRuntime.res.mjs";
15
14
  import * as DcbScopeInference$Reventless from "@reventlessdev/reventless-spec/src/components/DcbScopeInference.res.mjs";
16
15
  import * as Projection_GWT$ReventlessGwt from "./Projection_GWT.res.mjs";
17
16
 
18
- S.enableJson();
19
-
20
17
  let emptyState_log = [];
21
18
 
22
19
  let emptyState_lastEvents = [];
@@ -601,4 +598,4 @@ export {
601
598
  ExtensionPointStep,
602
599
  ExtensionStep,
603
600
  }
604
- /* Not a pure module */
601
+ /* start Not a pure module */
@@ -33,7 +33,6 @@ module type T = {
33
33
  module Make = (Spec: SliceSpec): (T with module Spec = Spec) => {
34
34
  module Spec = Spec
35
35
 
36
- S.enableJson()
37
36
 
38
37
  let describe = JestBind.describe
39
38
  let test = (name, body) => JestBind.test(~slice=Spec.name, name, body)
@@ -1,13 +1,11 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
4
3
  import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
5
4
  import * as Outcome$ReventlessGwt from "./Outcome.res.mjs";
6
5
  import * as JestBind$ReventlessGwt from "./JestBind.res.mjs";
7
6
  import * as Message$ReventlessCore from "@reventlessdev/reventless-core/src/Message.res.mjs";
8
7
 
9
8
  function Make(Spec) {
10
- S.enableJson();
11
9
  let test = (name, body) => JestBind$ReventlessGwt.test(Spec.name, name, body);
12
10
  let encPairs = pairs => pairs.map(param => {
13
11
  let d = {};
@@ -91,4 +89,4 @@ function Make(Spec) {
91
89
  export {
92
90
  Make,
93
91
  }
94
- /* S Not a pure module */
92
+ /* Message-ReventlessCore Not a pure module */
@@ -189,7 +189,6 @@ module Make = (M: Mapping): (T with module Source = M.Source and module Target =
189
189
  array<(string, array<Target.consumedEvent>)>,
190
190
  )
191
191
 
192
- S.enableJson()
193
192
 
194
193
  let describe = JestBind.describe
195
194
  let sliceName = `${Source.name}→${Target.name}`
@@ -1,6 +1,5 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
4
3
  import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
5
4
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
6
5
  import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
@@ -41,7 +40,6 @@ function FromStateChangeSlice(Spec) {
41
40
  function Make(M) {
42
41
  let Source = M.Source;
43
42
  let Target = M.Target;
44
- S.enableJson();
45
43
  let sliceName = Source.name + `→` + Target.name;
46
44
  let test = (name, timeout, body) => JestBind$ReventlessGwt.testPromise(sliceName, name, timeout, body);
47
45
  let queryEngine_scan = (param, param$1, param$2) => Promise.resolve([]);
@@ -319,4 +317,4 @@ export {
319
317
  FromStateChangeSlice,
320
318
  Make,
321
319
  }
322
- /* S Not a pure module */
320
+ /* Message-ReventlessCore Not a pure module */
@@ -32,7 +32,6 @@ let handleActions = Projection.handleActions // create alias to avoid shadowing
32
32
  module Make = (Projection: Reventless.Projection.Mapping): (
33
33
  T with type sourceEvent := Projection.sourceEvent and type targetState := Projection.targetState
34
34
  ) => {
35
- S.enableJson()
36
35
 
37
36
  let testId = ref(TestFixtures.id)
38
37
  let meta = ref(TestFixtures.meta)
@@ -1,6 +1,5 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
4
3
  import * as Stdlib_Dict from "@rescript/runtime/lib/es6/Stdlib_Dict.js";
5
4
  import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
6
5
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
@@ -14,7 +13,6 @@ import * as Projection$ReventlessCore from "@reventlessdev/reventless-core/src/P
14
13
  import * as TestFixtures$ReventlessGwt from "./TestFixtures.res.mjs";
15
14
 
16
15
  function Make(Projection) {
17
- S.enableJson();
18
16
  let testId = {
19
17
  contents: TestFixtures$ReventlessGwt.id
20
18
  };
@@ -351,4 +349,4 @@ export {
351
349
  handleActions,
352
350
  Make,
353
351
  }
354
- /* S Not a pure module */
352
+ /* effect/Stream Not a pure module */
@@ -81,7 +81,6 @@ module type T = {
81
81
  module Make = (Spec: SliceSpec): (T with module Spec = Spec) => {
82
82
  module Spec = Spec
83
83
 
84
- S.enableJson()
85
84
 
86
85
  let describe = JestBind.describe
87
86
  let test = (name, ~timeout=?, body) =>
@@ -1,13 +1,11 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
4
3
  import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
5
4
  import * as Outcome$ReventlessGwt from "./Outcome.res.mjs";
6
5
  import * as JestBind$ReventlessGwt from "./JestBind.res.mjs";
7
6
  import * as Message$ReventlessCore from "@reventlessdev/reventless-core/src/Message.res.mjs";
8
7
 
9
8
  function Make(Spec) {
10
- S.enableJson();
11
9
  let test = (name, timeout, body) => JestBind$ReventlessGwt.testPromise(Spec.name, name, timeout, body);
12
10
  let testSync = (name, body) => JestBind$ReventlessGwt.test(Spec.name, name, body);
13
11
  let encItems = arr => arr.map(param => [
@@ -186,4 +184,4 @@ function Make(Spec) {
186
184
  export {
187
185
  Make,
188
186
  }
189
- /* S Not a pure module */
187
+ /* Message-ReventlessCore Not a pure module */
@@ -67,7 +67,6 @@ module Make = (
67
67
  ): (T with module Spec = Spec) => {
68
68
  module Spec = Spec
69
69
 
70
- S.enableJson()
71
70
 
72
71
  let testId = ref(TestFixtures.id)
73
72
 
@@ -1,6 +1,5 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
4
3
  import * as Stdlib_Dict from "@rescript/runtime/lib/es6/Stdlib_Dict.js";
5
4
  import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
6
5
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
@@ -15,7 +14,6 @@ import * as TestFixtures$ReventlessGwt from "./TestFixtures.res.mjs";
15
14
 
16
15
  function Make(Spec) {
17
16
  return Projection => {
18
- S.enableJson();
19
17
  let testId = {
20
18
  contents: TestFixtures$ReventlessGwt.id
21
19
  };
@@ -334,4 +332,4 @@ export {
334
332
  handleActions,
335
333
  Make,
336
334
  }
337
- /* S Not a pure module */
335
+ /* effect/Stream Not a pure module */
package/src/Query_GWT.res CHANGED
@@ -87,7 +87,6 @@ module type T = {
87
87
  module Make = (Spec: QueryableSpec): (T with module Spec = Spec) => {
88
88
  module Spec = Spec
89
89
 
90
- S.enableJson()
91
90
 
92
91
  let describe = JestBind.describe
93
92
  let test = (name, body) => JestBind.test(~slice=Spec.name, name, body)
@@ -95,7 +94,7 @@ module Make = (Spec: QueryableSpec): (T with module Spec = Spec) => {
95
94
  type row = {id: string, subId: option<string>, state: Spec.state}
96
95
  type store = array<row>
97
96
 
98
- let encState = (s: Spec.state): JSON.t => s->S.reverseConvertToJsonOrThrow(Spec.stateSchema)
97
+ let encState = (s: Spec.state): JSON.t => s->Reventless.Util_Sury.toJson(Spec.stateSchema)
99
98
  let encStates = arr => arr->Array.map(encState)
100
99
 
101
100
  let givenStore = pairs =>
@@ -174,7 +173,7 @@ module Make = (Spec: QueryableSpec): (T with module Spec = Spec) => {
174
173
  let field = args.by
175
174
  let expected = args.value
176
175
  let matches = s->Array.filter(r => {
177
- let json = r.state->S.reverseConvertToJsonOrThrow(Spec.stateSchema)
176
+ let json = r.state->Reventless.Util_Sury.toJson(Spec.stateSchema)
178
177
  switch json->JSON.Decode.object->Option.flatMap(d => d->Dict.get(field)) {
179
178
  | Some(v) =>
180
179
  let actualStr = switch v {
@@ -268,7 +267,6 @@ module Make = (Spec: QueryableSpec): (T with module Spec = Spec) => {
268
267
  // field — so a test fails if the `@resolves` annotation is missing, exactly as
269
268
  // `whenQuery` validates a named index.
270
269
  module MakeResolver = (Primary: QueryableSpec, Target: QueryableSpec) => {
271
- S.enableJson()
272
270
 
273
271
  let describe = JestBind.describe
274
272
  let sliceName = `${Primary.name}→${Target.name}`
@@ -281,7 +279,7 @@ module MakeResolver = (Primary: QueryableSpec, Target: QueryableSpec) => {
281
279
 
282
280
  let givenStores = (primary, target): scenario => {primary, target}
283
281
 
284
- let encTarget = (s: Target.state): JSON.t => s->S.reverseConvertToJsonOrThrow(Target.stateSchema)
282
+ let encTarget = (s: Target.state): JSON.t => s->Reventless.Util_Sury.toJson(Target.stateSchema)
285
283
  let encTargets = arr => arr->Array.map(encTarget)
286
284
 
287
285
  let resolverFor = field =>
@@ -295,7 +293,7 @@ module MakeResolver = (Primary: QueryableSpec, Target: QueryableSpec) => {
295
293
  // Read a JSON field off the primary row's encoded state.
296
294
  let readField = (state: Primary.state, field): option<JSON.t> =>
297
295
  state
298
- ->S.reverseConvertToJsonOrThrow(Primary.stateSchema)
296
+ ->Reventless.Util_Sury.toJson(Primary.stateSchema)
299
297
  ->JSON.Decode.object
300
298
  ->Option.flatMap(d => d->Dict.get(field))
301
299
 
@@ -1,11 +1,11 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
4
3
  import * as Stdlib_JSON from "@rescript/runtime/lib/es6/Stdlib_JSON.js";
5
4
  import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
6
5
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
7
6
  import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
8
7
  import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
8
+ import * as Util_Sury$Reventless from "@reventlessdev/reventless-spec/src/util/Util_Sury.res.mjs";
9
9
  import * as Outcome$ReventlessGwt from "./Outcome.res.mjs";
10
10
  import * as JestBind$ReventlessGwt from "./JestBind.res.mjs";
11
11
 
@@ -28,9 +28,8 @@ function FromStateViewSlice(Spec) {
28
28
  }
29
29
 
30
30
  function Make(Spec) {
31
- S.enableJson();
32
31
  let test = (name, body) => JestBind$ReventlessGwt.test(Spec.name, name, body);
33
- let encState = s => S.reverseConvertToJsonOrThrow(s, Spec.stateSchema);
32
+ let encState = s => Util_Sury$Reventless.toJson(s, Spec.stateSchema);
34
33
  let givenStore = pairs => pairs.map(param => ({
35
34
  id: param[0],
36
35
  subId: undefined,
@@ -99,7 +98,7 @@ function Make(Spec) {
99
98
  let field = args.by;
100
99
  let expected = args.value;
101
100
  let matches = s.filter(r => {
102
- let json = S.reverseConvertToJsonOrThrow(r.state, Spec.stateSchema);
101
+ let json = Util_Sury$Reventless.toJson(r.state, Spec.stateSchema);
103
102
  let v = Stdlib_Option.flatMap(Stdlib_JSON.Decode.object(json), d => d[field]);
104
103
  if (v === undefined) {
105
104
  return false;
@@ -133,8 +132,8 @@ function Make(Spec) {
133
132
  if (Primitive_object.equal(actual, expected)) {
134
133
  return Outcome$ReventlessGwt.pass;
135
134
  }
136
- let actualJson = Stdlib_Option.mapOr(actual, [], s => [S.reverseConvertToJsonOrThrow(s, Spec.stateSchema)]);
137
- let expectedJson = Stdlib_Option.mapOr(expected, [], s => [S.reverseConvertToJsonOrThrow(s, Spec.stateSchema)]);
135
+ let actualJson = Stdlib_Option.mapOr(actual, [], s => [Util_Sury$Reventless.toJson(s, Spec.stateSchema)]);
136
+ let expectedJson = Stdlib_Option.mapOr(expected, [], s => [Util_Sury$Reventless.toJson(s, Spec.stateSchema)]);
138
137
  return Outcome$ReventlessGwt.fail({
139
138
  TAG: "QueryRowsMismatch",
140
139
  expected: expectedJson,
@@ -196,14 +195,13 @@ function Make(Spec) {
196
195
 
197
196
  function MakeResolver(Primary) {
198
197
  return Target => {
199
- S.enableJson();
200
198
  let sliceName = Primary.name + `→` + Target.name;
201
199
  let test = (name, body) => JestBind$ReventlessGwt.test(sliceName, name, body);
202
200
  let givenStores = (primary, target) => ({
203
201
  primary: primary,
204
202
  target: target
205
203
  });
206
- let encTarget = s => S.reverseConvertToJsonOrThrow(s, Target.stateSchema);
204
+ let encTarget = s => Util_Sury$Reventless.toJson(s, Target.stateSchema);
207
205
  let encTargets = arr => arr.map(encTarget);
208
206
  let resolverFor = field => Primary.config.idResolvers.find(r => r.source.idField === field);
209
207
  let resolverManyFor = field => Primary.config.idsResolvers.find(r => r.source.idsField === field);
@@ -212,7 +210,7 @@ function MakeResolver(Primary) {
212
210
  expected: [msg],
213
211
  actual: []
214
212
  });
215
- let readField = (state, field) => Stdlib_Option.flatMap(Stdlib_JSON.Decode.object(S.reverseConvertToJsonOrThrow(state, Primary.stateSchema)), d => d[field]);
213
+ let readField = (state, field) => Stdlib_Option.flatMap(Stdlib_JSON.Decode.object(Util_Sury$Reventless.toJson(state, Primary.stateSchema)), d => d[field]);
216
214
  let jsonToStr = v => {
217
215
  switch (typeof v) {
218
216
  case "string" :
@@ -317,8 +315,8 @@ function MakeResolver(Primary) {
317
315
  } else {
318
316
  return Outcome$ReventlessGwt.fail({
319
317
  TAG: "QueryRowsMismatch",
320
- expected: Stdlib_Option.mapOr(expected, [], s => [S.reverseConvertToJsonOrThrow(s, Target.stateSchema)]),
321
- actual: Stdlib_Option.mapOr(actual, [], s => [S.reverseConvertToJsonOrThrow(s, Target.stateSchema)])
318
+ expected: Stdlib_Option.mapOr(expected, [], s => [Util_Sury$Reventless.toJson(s, Target.stateSchema)]),
319
+ actual: Stdlib_Option.mapOr(actual, [], s => [Util_Sury$Reventless.toJson(s, Target.stateSchema)])
322
320
  });
323
321
  }
324
322
  };
@@ -364,4 +362,4 @@ export {
364
362
  Make,
365
363
  MakeResolver,
366
364
  }
367
- /* S Not a pure module */
365
+ /* Util_Sury-Reventless Not a pure module */
@@ -79,7 +79,6 @@ module type T = {
79
79
  module Make = (SE: Reventless.SideEffect.T): (T with module SE = SE) => {
80
80
  module SE = SE
81
81
 
82
- S.enableJson()
83
82
 
84
83
  let describe = JestBind.describe
85
84
  let test = (name, ~timeout=?, body) =>
@@ -1,6 +1,5 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
4
3
  import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
5
4
  import * as Outcome$ReventlessGwt from "./Outcome.res.mjs";
6
5
  import * as JestBind$ReventlessGwt from "./JestBind.res.mjs";
@@ -19,7 +18,6 @@ let stubQueryEngine = {
19
18
  };
20
19
 
21
20
  function Make(SE) {
22
- S.enableJson();
23
21
  let test = (name, timeout, body) => JestBind$ReventlessGwt.testPromise(SE.Source.name, name, timeout, body);
24
22
  let defaultId = SE.Source.Id.makeFromString("test-id-1");
25
23
  let defaultMeta_service = SE.Source.name;
@@ -110,4 +108,4 @@ export {
110
108
  stubQueryEngine,
111
109
  Make,
112
110
  }
113
- /* S Not a pure module */
111
+ /* No side effect */
@@ -1,25 +1,25 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
5
5
 
6
- let consumedEventSchema = S.union([
7
- S.literal("CategoryAdded"),
8
- S.literal("CategoryArchived")
6
+ let consumedEventSchema = Sury.union([
7
+ Sury.literal("CategoryAdded"),
8
+ Sury.literal("CategoryArchived")
9
9
  ]);
10
10
 
11
- let commandSchema = S.schema(s => ({
11
+ let commandSchema = Sury.$schema(s => ({
12
12
  TAG: "AddCategory",
13
13
  categoryId: s.m(DcbTag$Reventless.string),
14
- name: s.m(S.string)
14
+ name: s.m(Sury.string)
15
15
  }));
16
16
 
17
- let errorSchema = S.literal("CategoryAlreadyExists");
17
+ let errorSchema = Sury.literal("CategoryAlreadyExists");
18
18
 
19
- let eventSchema = S.schema(s => ({
19
+ let eventSchema = Sury.$schema(s => ({
20
20
  TAG: "CategoryAdded",
21
21
  categoryId: s.m(DcbTag$Reventless.string),
22
- name: s.m(S.string)
22
+ name: s.m(Sury.string)
23
23
  }));
24
24
 
25
25
  let name = "ExternalAddCategory";
@@ -1,22 +1,22 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
5
5
 
6
- let consumedEventSchema = S.literal("CategoryAdded");
6
+ let consumedEventSchema = Sury.literal("CategoryAdded");
7
7
 
8
- let commandSchema = S.schema(s => ({
8
+ let commandSchema = Sury.$schema(s => ({
9
9
  TAG: "AddCategory",
10
10
  categoryId: s.m(DcbTag$Reventless.string),
11
- name: s.m(S.string)
11
+ name: s.m(Sury.string)
12
12
  }));
13
13
 
14
- let errorSchema = S.literal("CategoryAlreadyExists");
14
+ let errorSchema = Sury.literal("CategoryAlreadyExists");
15
15
 
16
- let eventSchema = S.schema(s => ({
16
+ let eventSchema = Sury.$schema(s => ({
17
17
  TAG: "CategoryAdded",
18
18
  categoryId: s.m(DcbTag$Reventless.string),
19
- name: s.m(S.string)
19
+ name: s.m(Sury.string)
20
20
  }));
21
21
 
22
22
  let name = "WithFixtures";
@@ -1,22 +1,22 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as S from "sury/src/S.res.mjs";
3
+ import * as Sury from "sury";
4
4
  import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
5
5
 
6
- let consumedEventSchema = S.literal("CategoryAdded");
6
+ let consumedEventSchema = Sury.literal("CategoryAdded");
7
7
 
8
- let commandSchema = S.schema(s => ({
8
+ let commandSchema = Sury.$schema(s => ({
9
9
  TAG: "AddCategory",
10
10
  categoryId: s.m(DcbTag$Reventless.string),
11
- name: s.m(S.string)
11
+ name: s.m(Sury.string)
12
12
  }));
13
13
 
14
- let errorSchema = S.literal("CategoryAlreadyExists");
14
+ let errorSchema = Sury.literal("CategoryAlreadyExists");
15
15
 
16
- let eventSchema = S.schema(s => ({
16
+ let eventSchema = Sury.$schema(s => ({
17
17
  TAG: "CategoryAdded",
18
18
  categoryId: s.m(DcbTag$Reventless.string),
19
- name: s.m(S.string)
19
+ name: s.m(Sury.string)
20
20
  }));
21
21
 
22
22
  let name = "WithManualOpen";