@reventlessdev/reventless-infra 3.0.0-alpha.145 → 3.0.0-alpha.146

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,21 @@
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.146 (2026-08-18)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **core:** order union constructors so every one decodes ([39c17ad](https://github.com/ReventlessDev/reventless-core/commit/39c17ad8cedd6f120e92d81b4a05b8c733b4617d)), closes [DZakh/sury#392](https://github.com/DZakh/sury/issues/392)
11
+ * feat(sury)!: migrate to sury 11.0.0-rc.1 ([2cf8969](https://github.com/ReventlessDev/reventless-core/commit/2cf8969a222ce1b775563668a4126cb20611966c))
12
+
13
+ ### BREAKING CHANGES
14
+
15
+ * sury is a direct dependency of the published packages and
16
+ its schema and serialization surface changed; consumers must migrate to
17
+ sury 11.
18
+
19
+
20
+
6
21
  # 3.0.0-alpha.145 (2026-08-18)
7
22
 
8
23
  **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.145",
3
+ "version": "3.0.0-alpha.146",
4
4
  "description": "Infrastructure types for Reventless framework",
5
5
  "license": "Apache-2.0",
6
6
  "jest": {
@@ -13,12 +13,12 @@
13
13
  ]
14
14
  },
15
15
  "dependencies": {
16
- "sury": "11.0.0-alpha.4",
17
- "sury-ppx": "11.0.0-alpha.2",
16
+ "sury": "11.0.0-rc.1",
17
+ "sury-ppx": "11.0.0-rc.1",
18
18
  "uuid": "^13.0.0",
19
19
  "@reventlessdev/rescript-effect": "0.1.0-alpha.32",
20
20
  "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.19",
21
- "@reventlessdev/reventless-spec": "3.0.0-alpha.117",
21
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.118",
22
22
  "@reventlessdev/rescript-uuid": "2.0.0-alpha.0"
23
23
  },
24
24
  "devDependencies": {
@@ -1,29 +1,29 @@
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
 
5
- let noApiId = S.Metadata.Id.make("api", "noApi");
5
+ let noApiId = Sury.$Metadata_Id_make("api", "noApi");
6
6
 
7
- let noApiVariantsId = S.Metadata.Id.make("api", "noApiVariants");
7
+ let noApiVariantsId = Sury.$Metadata_Id_make("api", "noApiVariants");
8
8
 
9
- let allowedStatesId = S.Metadata.Id.make("api", "allowedStates");
9
+ let allowedStatesId = Sury.$Metadata_Id_make("api", "allowedStates");
10
10
 
11
- let targetStateId = S.Metadata.Id.make("api", "targetState");
11
+ let targetStateId = Sury.$Metadata_Id_make("api", "targetState");
12
12
 
13
13
  function markNoApi(schema) {
14
- return S.Metadata.set(schema, noApiId, true);
14
+ return Sury.$Metadata_set(schema, noApiId, true);
15
15
  }
16
16
 
17
17
  function markNoApiVariants(schema, variants) {
18
- return S.Metadata.set(schema, noApiVariantsId, new Set(variants));
18
+ return Sury.$Metadata_set(schema, noApiVariantsId, new Set(variants));
19
19
  }
20
20
 
21
21
  function markAllowedStates(schema, entries) {
22
- return S.Metadata.set(schema, allowedStatesId, Object.fromEntries(entries));
22
+ return Sury.$Metadata_set(schema, allowedStatesId, Object.fromEntries(entries));
23
23
  }
24
24
 
25
25
  function markTargetState(schema, entries) {
26
- return S.Metadata.set(schema, targetStateId, Object.fromEntries(entries));
26
+ return Sury.$Metadata_set(schema, targetStateId, Object.fromEntries(entries));
27
27
  }
28
28
 
29
29
  export {
@@ -1,30 +1,30 @@
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
 
5
- let storageErrorSchema = S.union([
6
- S.schema(s => ({
5
+ let storageErrorSchema = Sury.union([
6
+ Sury.$schema(s => ({
7
7
  TAG: "NotSavedToStorage",
8
- _0: s.m(S.string)
8
+ _0: s.m(Sury.string)
9
9
  })),
10
- S.schema(s => ({
10
+ Sury.$schema(s => ({
11
11
  TAG: "NotLoadedFromStorage",
12
- _0: s.m(S.string)
12
+ _0: s.m(Sury.string)
13
13
  })),
14
- S.schema(s => ({
14
+ Sury.$schema(s => ({
15
15
  TAG: "NotCountedOnStorage",
16
- _0: s.m(S.string)
16
+ _0: s.m(Sury.string)
17
17
  })),
18
- S.schema(s => ({
18
+ Sury.$schema(s => ({
19
19
  TAG: "NotDeletedFromStorage",
20
- _0: s.m(S.string)
20
+ _0: s.m(Sury.string)
21
21
  })),
22
- S.schema(s => ({
22
+ Sury.$schema(s => ({
23
23
  TAG: "BatchNotFullyWrittenToStorage",
24
- _0: s.m(S.string)
24
+ _0: s.m(Sury.string)
25
25
  })),
26
- S.literal("StaleState"),
27
- S.literal("MissingSubIdConfig")
26
+ Sury.literal("StaleState"),
27
+ Sury.literal("MissingSubIdConfig")
28
28
  ]);
29
29
 
30
30
  export {
@@ -1,6 +1,6 @@
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 Uuid from "uuid";
5
5
  import * as Stdlib_JSON from "@rescript/runtime/lib/es6/Stdlib_JSON.js";
6
6
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
@@ -11,13 +11,21 @@ import * as Message$Reventless from "@reventlessdev/reventless-spec/src/types/Me
11
11
  import * as AnsiStyle$Reventless from "@reventlessdev/reventless-spec/src/AnsiStyle.res.mjs";
12
12
  import * as PluginExtensionPointSpec$ReventlessInfra from "./PluginExtensionPointSpec.res.mjs";
13
13
 
14
+ let schema = Sury.string;
15
+
14
16
  let cmp = Primitive_string.compare;
15
17
 
16
18
  let Id = {
17
- schema: S.string,
19
+ schema: schema,
18
20
  cmp: cmp
19
21
  };
20
22
 
23
+ let eventSchema = Sury.$unit;
24
+
25
+ let errorSchema = Sury.$unit;
26
+
27
+ let commandSchema = Sury.$unit;
28
+
21
29
  let moduleUrl = import.meta.url;
22
30
 
23
31
  function commandAuthorization() {
@@ -27,9 +35,9 @@ function commandAuthorization() {
27
35
  let NoDelegate = {
28
36
  name: "NoDelegate",
29
37
  Id: Id,
30
- eventSchema: S.unit,
31
- errorSchema: S.unit,
32
- commandSchema: S.unit,
38
+ eventSchema: eventSchema,
39
+ errorSchema: errorSchema,
40
+ commandSchema: commandSchema,
33
41
  moduleUrl: moduleUrl,
34
42
  commandAuthorization: commandAuthorization
35
43
  };
@@ -249,4 +257,4 @@ export {
249
257
  NoDelegate,
250
258
  Make,
251
259
  }
252
- /* moduleUrl Not a pure module */
260
+ /* schema Not a pure module */
@@ -44,12 +44,14 @@ type event =
44
44
  | PluginActivated(pluginDefinition)
45
45
  | PluginRetired(pluginDefinition)
46
46
 
47
+ // Order is load-bearing: sury strands constructors declared after a run of two or
48
+ // more same-shaped ones, so union-carrying payloads must lead (DZakh/sury#392).
47
49
  @schema
48
50
  type directive =
49
- | CreateDisconnectSchedule(string, timeout)
50
- | DeleteDisconnectSchedule(string)
51
51
  | DoConnectPlugin(pluginDefinition)
52
52
  | DoDisconnectPlugin(pluginDefinition)
53
53
  | ForwardCommand(forwardCommand)
54
+ | CreateDisconnectSchedule(string, timeout)
55
+ | DeleteDisconnectSchedule(string)
54
56
 
55
57
  let moduleUrl: string = %raw(`import.meta.url`)
@@ -1,91 +1,93 @@
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 Plugin$Reventless from "@reventlessdev/reventless-spec/src/components/Plugin.res.mjs";
5
5
 
6
- let forwardCommandSchema = S.schema(s => ({
7
- extensionPointName: s.m(S.string),
8
- id: s.m(S.string),
9
- command: s.m(S.string)
6
+ let timeoutSchema = Sury.int;
7
+
8
+ let forwardCommandSchema = Sury.$schema(s => ({
9
+ extensionPointName: s.m(Sury.string),
10
+ id: s.m(Sury.string),
11
+ command: s.m(Sury.string)
10
12
  }));
11
13
 
12
- let commandSchema = S.union([
13
- S.schema(s => ({
14
+ let commandSchema = Sury.union([
15
+ Sury.$schema(s => ({
14
16
  TAG: "Heartbeat",
15
- _0: s.m(S.int)
17
+ _0: s.m(timeoutSchema)
16
18
  })),
17
- S.schema(s => ({
19
+ Sury.$schema(s => ({
18
20
  TAG: "ConnectPlugin",
19
21
  _0: s.m(Plugin$Reventless.pluginDefinitionSchema)
20
22
  })),
21
- S.literal("DisconnectPlugin"),
22
- S.schema(s => ({
23
+ Sury.literal("DisconnectPlugin"),
24
+ Sury.$schema(s => ({
23
25
  TAG: "ForwardCommand",
24
26
  _0: s.m(forwardCommandSchema)
25
27
  })),
26
- S.schema(s => ({
28
+ Sury.$schema(s => ({
27
29
  TAG: "RegisterUiFragment",
28
30
  _0: s.m(Plugin$Reventless.uiFragmentManifestSchema)
29
31
  })),
30
- S.schema(s => ({
32
+ Sury.$schema(s => ({
31
33
  TAG: "RedetectPlugin",
32
- _0: s.m(S.int)
34
+ _0: s.m(timeoutSchema)
33
35
  }))
34
36
  ]);
35
37
 
36
- let eventSchema = S.union([
37
- S.literal("UnknownPluginDetected"),
38
- S.schema(s => ({
38
+ let eventSchema = Sury.union([
39
+ Sury.literal("UnknownPluginDetected"),
40
+ Sury.$schema(s => ({
39
41
  TAG: "IncompatiblePlugin",
40
42
  _0: s.m(Plugin$Reventless.pluginDefinitionSchema)
41
43
  })),
42
- S.schema(s => ({
44
+ Sury.$schema(s => ({
43
45
  TAG: "PluginConnected",
44
46
  _0: s.m(Plugin$Reventless.pluginDefinitionSchema)
45
47
  })),
46
- S.schema(s => ({
48
+ Sury.$schema(s => ({
47
49
  TAG: "PluginReconnected",
48
50
  _0: s.m(Plugin$Reventless.pluginDefinitionSchema)
49
51
  })),
50
- S.schema(s => ({
52
+ Sury.$schema(s => ({
51
53
  TAG: "PluginDisconnected",
52
54
  _0: s.m(Plugin$Reventless.pluginDefinitionSchema)
53
55
  })),
54
- S.schema(s => ({
56
+ Sury.$schema(s => ({
55
57
  TAG: "PluginDeactivated",
56
58
  _0: s.m(Plugin$Reventless.pluginDefinitionSchema)
57
59
  })),
58
- S.schema(s => ({
60
+ Sury.$schema(s => ({
59
61
  TAG: "PluginActivated",
60
62
  _0: s.m(Plugin$Reventless.pluginDefinitionSchema)
61
63
  })),
62
- S.schema(s => ({
64
+ Sury.$schema(s => ({
63
65
  TAG: "PluginRetired",
64
66
  _0: s.m(Plugin$Reventless.pluginDefinitionSchema)
65
67
  }))
66
68
  ]);
67
69
 
68
- let directiveSchema = S.union([
69
- S.schema(s => ({
70
- TAG: "CreateDisconnectSchedule",
71
- _0: s.m(S.string),
72
- _1: s.m(S.int)
73
- })),
74
- S.schema(s => ({
75
- TAG: "DeleteDisconnectSchedule",
76
- _0: s.m(S.string)
77
- })),
78
- S.schema(s => ({
70
+ let directiveSchema = Sury.union([
71
+ Sury.$schema(s => ({
79
72
  TAG: "DoConnectPlugin",
80
73
  _0: s.m(Plugin$Reventless.pluginDefinitionSchema)
81
74
  })),
82
- S.schema(s => ({
75
+ Sury.$schema(s => ({
83
76
  TAG: "DoDisconnectPlugin",
84
77
  _0: s.m(Plugin$Reventless.pluginDefinitionSchema)
85
78
  })),
86
- S.schema(s => ({
79
+ Sury.$schema(s => ({
87
80
  TAG: "ForwardCommand",
88
81
  _0: s.m(forwardCommandSchema)
82
+ })),
83
+ Sury.$schema(s => ({
84
+ TAG: "CreateDisconnectSchedule",
85
+ _0: s.m(Sury.string),
86
+ _1: s.m(timeoutSchema)
87
+ })),
88
+ Sury.$schema(s => ({
89
+ TAG: "DeleteDisconnectSchedule",
90
+ _0: s.m(Sury.string)
89
91
  }))
90
92
  ]);
91
93
 
@@ -167,8 +169,6 @@ let pluginStructureOffloadSchema = Plugin$Reventless.pluginStructureOffloadSchem
167
169
 
168
170
  let pluginDefinitionSchema = Plugin$Reventless.pluginDefinitionSchema;
169
171
 
170
- let timeoutSchema = S.int;
171
-
172
172
  export {
173
173
  name,
174
174
  nameSchema,
@@ -215,4 +215,4 @@ export {
215
215
  directiveSchema,
216
216
  moduleUrl,
217
217
  }
218
- /* forwardCommandSchema Not a pure module */
218
+ /* timeoutSchema Not a pure module */