@reventlessdev/reventless-infra 3.0.0-alpha.145 → 3.0.0-alpha.147
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 +23 -0
- package/package.json +4 -4
- package/src/components/Api.res.mjs +9 -9
- package/src/components/QueryDb.res.mjs +14 -14
- package/src/types/ExtensionMapping.res.mjs +14 -6
- package/src/types/PluginExtensionPointSpec.res +4 -2
- package/src/types/PluginExtensionPointSpec.res.mjs +39 -39
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,29 @@
|
|
|
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.147 (2026-08-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @reventlessdev/reventless-infra
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 3.0.0-alpha.146 (2026-08-18)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **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)
|
|
19
|
+
* feat(sury)!: migrate to sury 11.0.0-rc.1 ([2cf8969](https://github.com/ReventlessDev/reventless-core/commit/2cf8969a222ce1b775563668a4126cb20611966c))
|
|
20
|
+
|
|
21
|
+
### BREAKING CHANGES
|
|
22
|
+
|
|
23
|
+
* sury is a direct dependency of the published packages and
|
|
24
|
+
its schema and serialization surface changed; consumers must migrate to
|
|
25
|
+
sury 11.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
6
29
|
# 3.0.0-alpha.145 (2026-08-18)
|
|
7
30
|
|
|
8
31
|
**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.
|
|
3
|
+
"version": "3.0.0-alpha.147",
|
|
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-
|
|
17
|
-
"sury-ppx": "11.0.0-
|
|
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.
|
|
21
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.119",
|
|
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
|
|
3
|
+
import * as Sury from "sury";
|
|
4
4
|
|
|
5
|
-
let noApiId =
|
|
5
|
+
let noApiId = Sury.$Metadata_Id_make("api", "noApi");
|
|
6
6
|
|
|
7
|
-
let noApiVariantsId =
|
|
7
|
+
let noApiVariantsId = Sury.$Metadata_Id_make("api", "noApiVariants");
|
|
8
8
|
|
|
9
|
-
let allowedStatesId =
|
|
9
|
+
let allowedStatesId = Sury.$Metadata_Id_make("api", "allowedStates");
|
|
10
10
|
|
|
11
|
-
let targetStateId =
|
|
11
|
+
let targetStateId = Sury.$Metadata_Id_make("api", "targetState");
|
|
12
12
|
|
|
13
13
|
function markNoApi(schema) {
|
|
14
|
-
return
|
|
14
|
+
return Sury.$Metadata_set(schema, noApiId, true);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function markNoApiVariants(schema, variants) {
|
|
18
|
-
return
|
|
18
|
+
return Sury.$Metadata_set(schema, noApiVariantsId, new Set(variants));
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function markAllowedStates(schema, entries) {
|
|
22
|
-
return
|
|
22
|
+
return Sury.$Metadata_set(schema, allowedStatesId, Object.fromEntries(entries));
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
function markTargetState(schema, entries) {
|
|
26
|
-
return
|
|
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
|
|
3
|
+
import * as Sury from "sury";
|
|
4
4
|
|
|
5
|
-
let storageErrorSchema =
|
|
6
|
-
|
|
5
|
+
let storageErrorSchema = Sury.union([
|
|
6
|
+
Sury.$schema(s => ({
|
|
7
7
|
TAG: "NotSavedToStorage",
|
|
8
|
-
_0: s.m(
|
|
8
|
+
_0: s.m(Sury.string)
|
|
9
9
|
})),
|
|
10
|
-
|
|
10
|
+
Sury.$schema(s => ({
|
|
11
11
|
TAG: "NotLoadedFromStorage",
|
|
12
|
-
_0: s.m(
|
|
12
|
+
_0: s.m(Sury.string)
|
|
13
13
|
})),
|
|
14
|
-
|
|
14
|
+
Sury.$schema(s => ({
|
|
15
15
|
TAG: "NotCountedOnStorage",
|
|
16
|
-
_0: s.m(
|
|
16
|
+
_0: s.m(Sury.string)
|
|
17
17
|
})),
|
|
18
|
-
|
|
18
|
+
Sury.$schema(s => ({
|
|
19
19
|
TAG: "NotDeletedFromStorage",
|
|
20
|
-
_0: s.m(
|
|
20
|
+
_0: s.m(Sury.string)
|
|
21
21
|
})),
|
|
22
|
-
|
|
22
|
+
Sury.$schema(s => ({
|
|
23
23
|
TAG: "BatchNotFullyWrittenToStorage",
|
|
24
|
-
_0: s.m(
|
|
24
|
+
_0: s.m(Sury.string)
|
|
25
25
|
})),
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
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:
|
|
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:
|
|
31
|
-
errorSchema:
|
|
32
|
-
commandSchema:
|
|
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
|
-
/*
|
|
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
|
|
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
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 =
|
|
13
|
-
|
|
14
|
+
let commandSchema = Sury.union([
|
|
15
|
+
Sury.$schema(s => ({
|
|
14
16
|
TAG: "Heartbeat",
|
|
15
|
-
_0: s.m(
|
|
17
|
+
_0: s.m(timeoutSchema)
|
|
16
18
|
})),
|
|
17
|
-
|
|
19
|
+
Sury.$schema(s => ({
|
|
18
20
|
TAG: "ConnectPlugin",
|
|
19
21
|
_0: s.m(Plugin$Reventless.pluginDefinitionSchema)
|
|
20
22
|
})),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
Sury.literal("DisconnectPlugin"),
|
|
24
|
+
Sury.$schema(s => ({
|
|
23
25
|
TAG: "ForwardCommand",
|
|
24
26
|
_0: s.m(forwardCommandSchema)
|
|
25
27
|
})),
|
|
26
|
-
|
|
28
|
+
Sury.$schema(s => ({
|
|
27
29
|
TAG: "RegisterUiFragment",
|
|
28
30
|
_0: s.m(Plugin$Reventless.uiFragmentManifestSchema)
|
|
29
31
|
})),
|
|
30
|
-
|
|
32
|
+
Sury.$schema(s => ({
|
|
31
33
|
TAG: "RedetectPlugin",
|
|
32
|
-
_0: s.m(
|
|
34
|
+
_0: s.m(timeoutSchema)
|
|
33
35
|
}))
|
|
34
36
|
]);
|
|
35
37
|
|
|
36
|
-
let eventSchema =
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
44
|
+
Sury.$schema(s => ({
|
|
43
45
|
TAG: "PluginConnected",
|
|
44
46
|
_0: s.m(Plugin$Reventless.pluginDefinitionSchema)
|
|
45
47
|
})),
|
|
46
|
-
|
|
48
|
+
Sury.$schema(s => ({
|
|
47
49
|
TAG: "PluginReconnected",
|
|
48
50
|
_0: s.m(Plugin$Reventless.pluginDefinitionSchema)
|
|
49
51
|
})),
|
|
50
|
-
|
|
52
|
+
Sury.$schema(s => ({
|
|
51
53
|
TAG: "PluginDisconnected",
|
|
52
54
|
_0: s.m(Plugin$Reventless.pluginDefinitionSchema)
|
|
53
55
|
})),
|
|
54
|
-
|
|
56
|
+
Sury.$schema(s => ({
|
|
55
57
|
TAG: "PluginDeactivated",
|
|
56
58
|
_0: s.m(Plugin$Reventless.pluginDefinitionSchema)
|
|
57
59
|
})),
|
|
58
|
-
|
|
60
|
+
Sury.$schema(s => ({
|
|
59
61
|
TAG: "PluginActivated",
|
|
60
62
|
_0: s.m(Plugin$Reventless.pluginDefinitionSchema)
|
|
61
63
|
})),
|
|
62
|
-
|
|
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 =
|
|
69
|
-
|
|
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
|
-
|
|
75
|
+
Sury.$schema(s => ({
|
|
83
76
|
TAG: "DoDisconnectPlugin",
|
|
84
77
|
_0: s.m(Plugin$Reventless.pluginDefinitionSchema)
|
|
85
78
|
})),
|
|
86
|
-
|
|
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
|
-
/*
|
|
218
|
+
/* timeoutSchema Not a pure module */
|