@reventlessdev/reventless-local 3.0.0-alpha.199 → 3.0.0-alpha.200
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 +7 -0
- package/package.json +8 -8
- package/src/Platform.res +67 -49
- package/src/Platform.res.mjs +9 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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.200 (2026-08-04)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **admin:** serve the complete plugin structure to developer tooling ([e99cda0](https://github.com/ReventlessDev/reventless-core/commit/e99cda02a2f862b36bcfdb018a0fb34bb7426a2b))
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
# 3.0.0-alpha.199 (2026-08-04)
|
|
7
14
|
|
|
8
15
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-local",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.200",
|
|
4
4
|
"description": "Local platform for Reventless (in-memory or SQLite backend, for development and testing without AWS)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"bin": {
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"ws": "^8.18.0",
|
|
37
37
|
"@reventlessdev/rescript-effect": "0.1.0-alpha.32",
|
|
38
38
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.10",
|
|
39
|
-
"@reventlessdev/rescript-node": "2.0.0-alpha.1",
|
|
40
|
-
"@reventlessdev/rescript-graphql-yoga": "1.0.0-alpha.26",
|
|
41
39
|
"@reventlessdev/rescript-mcp-sdk": "1.0.0-alpha.21",
|
|
40
|
+
"@reventlessdev/rescript-node": "2.0.0-alpha.1",
|
|
42
41
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.18",
|
|
43
|
-
"@reventlessdev/
|
|
44
|
-
"@reventlessdev/reventless-
|
|
45
|
-
"@reventlessdev/reventless-
|
|
46
|
-
"@reventlessdev/reventless-
|
|
42
|
+
"@reventlessdev/rescript-graphql-yoga": "1.0.0-alpha.26",
|
|
43
|
+
"@reventlessdev/reventless-core": "3.0.0-alpha.212",
|
|
44
|
+
"@reventlessdev/reventless-graphql-server": "1.0.0-alpha.60",
|
|
45
|
+
"@reventlessdev/reventless-gwt": "1.0.0-alpha.159",
|
|
46
|
+
"@reventlessdev/reventless-postgres": "3.0.0-alpha.76",
|
|
47
47
|
"@reventlessdev/reventless-spec": "3.0.0-alpha.100",
|
|
48
|
-
"@reventlessdev/reventless-
|
|
48
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.126"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"rescript": "12.3.0",
|
package/src/Platform.res
CHANGED
|
@@ -1635,60 +1635,78 @@ module MakeWithConfig = (
|
|
|
1635
1635
|
// whose Plugin RM row is not Connected are hidden until reactivated. The built-in
|
|
1636
1636
|
// Platform_Admin entry has no Plugin RM row — include it unconditionally since
|
|
1637
1637
|
// it can't be deactivated.
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
)
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1638
|
+
// The plugins both structure queries answer over: one entry per plugin name,
|
|
1639
|
+
// Connected only, highest version. Shared so the two fields can never disagree
|
|
1640
|
+
// about which plugins exist — mirrors the single Lambda serving both fields on
|
|
1641
|
+
// the AWS side.
|
|
1642
|
+
let connectedLatestStructures = () => {
|
|
1643
|
+
let pluginStatusById = {
|
|
1644
|
+
let dict = Dict.make()
|
|
1645
|
+
switch Bus.getQueryDbScan(pluginQueryDbName) {
|
|
1646
|
+
| Some(scanAll) =>
|
|
1647
|
+
scanAll()->Array.forEach(json =>
|
|
1648
|
+
switch json->S.convertOrThrow(ReventlessCore.PluginsReadModelSpec.stateSchema) {
|
|
1649
|
+
| state =>
|
|
1650
|
+
let id = state.name ++ "@" ++ state.version
|
|
1651
|
+
dict->Dict.set(id, state.status)
|
|
1652
|
+
| exception _ => ()
|
|
1653
|
+
}
|
|
1654
|
+
)
|
|
1655
|
+
| None => ()
|
|
1656
1656
|
}
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1657
|
+
dict
|
|
1658
|
+
}
|
|
1659
|
+
let adminPluginId = ReventlessCore.Platform_Admin_Structure.pluginId
|
|
1660
|
+
// One entry per plugin name: among Connected versions keep the highest
|
|
1661
|
+
// version, enforcing the deploy-time one-version-per-plugin invariant.
|
|
1662
|
+
// Without this, a lingering Connected older version (rolling deploy or a
|
|
1663
|
+
// missed retire) surfaces a full duplicate set of AutoUI menu entries —
|
|
1664
|
+
// mirrors the dedup in Platform_ComponentDefinitions_Lambda.res.
|
|
1665
|
+
let latestByName = Dict.make()
|
|
1666
|
+
pluginStructuresStore.contents
|
|
1667
|
+
->Dict.toArray
|
|
1668
|
+
->Array.forEach(((pluginId, def)) => {
|
|
1669
|
+
let connected =
|
|
1670
|
+
pluginId === adminPluginId ||
|
|
1671
|
+
switch pluginStatusById->Dict.get(pluginId) {
|
|
1672
|
+
| Some(Connected) => true
|
|
1673
|
+
| _ => false
|
|
1674
|
+
}
|
|
1675
|
+
if connected {
|
|
1676
|
+
let name = ReventlessCore.Plugin.name(pluginId)
|
|
1677
|
+
let version = ReventlessCore.Plugin.version(pluginId)
|
|
1678
|
+
switch latestByName->Dict.get(name) {
|
|
1679
|
+
| Some((prevVersion, _)) =>
|
|
1680
|
+
if ReventlessCore.Plugin.compareVersions(version, prevVersion) > 0 {
|
|
1681
|
+
latestByName->Dict.set(name, (version, (pluginId, def)))
|
|
1682
1682
|
}
|
|
1683
|
+
| None => latestByName->Dict.set(name, (version, (pluginId, def)))
|
|
1683
1684
|
}
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1685
|
+
}
|
|
1686
|
+
})
|
|
1687
|
+
latestByName->Dict.valuesToArray->Array.map(((_, pair)) => pair)
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
queryResolvers->Dict.set(
|
|
1691
|
+
"Platform_ComponentDefinitions",
|
|
1692
|
+
async (_root, _args, _ctx): JSON.t =>
|
|
1693
|
+
connectedLatestStructures()
|
|
1694
|
+
->Array.map(((pluginId, def)) =>
|
|
1688
1695
|
ReventlessCore.Platform_ComponentDefinitionsApi.encodePluginStructureEntry(~pluginId, def)
|
|
1689
1696
|
)
|
|
1690
|
-
->JSON.Encode.array
|
|
1691
|
-
|
|
1697
|
+
->JSON.Encode.array,
|
|
1698
|
+
)
|
|
1699
|
+
|
|
1700
|
+
// Platform_PluginStructures resolver — the same plugins, encoded unfiltered for
|
|
1701
|
+
// developer tooling (Internal components kept, extension points carried).
|
|
1702
|
+
queryResolvers->Dict.set(
|
|
1703
|
+
"Platform_PluginStructures",
|
|
1704
|
+
async (_root, _args, _ctx): JSON.t =>
|
|
1705
|
+
connectedLatestStructures()
|
|
1706
|
+
->Array.map(((pluginId, def)) =>
|
|
1707
|
+
ReventlessCore.Platform_PluginStructuresApi.encodePluginStructureEntry(~pluginId, def)
|
|
1708
|
+
)
|
|
1709
|
+
->JSON.Encode.array,
|
|
1692
1710
|
)
|
|
1693
1711
|
|
|
1694
1712
|
// Platform_UIFragments resolver — reads the UiFragments StateViewSlice
|
package/src/Platform.res.mjs
CHANGED
|
@@ -80,6 +80,7 @@ import * as DcbEventLogStorage_Sqlite$ReventlessLocal from "./adapter/DcbEventLo
|
|
|
80
80
|
import * as LocalEventCollectorChannel$ReventlessLocal from "./adapter/EventCollector/LocalEventCollectorChannel.res.mjs";
|
|
81
81
|
import * as PluginRuntime_Builder_Micro$ReventlessCore from "@reventlessdev/reventless-core/src/adapter/Runtime/PluginRuntime_Builder_Micro.res.mjs";
|
|
82
82
|
import * as UiFragmentRegistry_Behavior$ReventlessCore from "@reventlessdev/reventless-core/src/admin/UiFragmentRegistry/StateChangeSlice/UiFragmentRegistry_Behavior.res.mjs";
|
|
83
|
+
import * as Platform_PluginStructuresApi$ReventlessCore from "@reventlessdev/reventless-core/src/admin/Platform_PluginStructuresApi.res.mjs";
|
|
83
84
|
import * as EventHistoryResolvers_GraphQL$ReventlessLocal from "./adapter/EventHistory/EventHistoryResolvers_GraphQL.res.mjs";
|
|
84
85
|
import * as InboundTranslationSlice_Builder$ReventlessLocal from "./components/InboundTranslationSlice_Builder.res.mjs";
|
|
85
86
|
import * as Platform_ComponentDefinitionsApi$ReventlessCore from "@reventlessdev/reventless-core/src/admin/Platform_ComponentDefinitionsApi.res.mjs";
|
|
@@ -1341,7 +1342,7 @@ function MakeWithConfig(Config) {
|
|
|
1341
1342
|
let scanAll = Bus.getQueryDbScan(PluginsReadModelSpec$ReventlessCore.name);
|
|
1342
1343
|
return connectionResponse(scanAll !== undefined ? scanAll() : []);
|
|
1343
1344
|
};
|
|
1344
|
-
|
|
1345
|
+
let connectedLatestStructures = () => {
|
|
1345
1346
|
let dict = {};
|
|
1346
1347
|
let scanAll = Bus.getQueryDbScan(PluginsReadModelSpec$ReventlessCore.name);
|
|
1347
1348
|
if (scanAll !== undefined) {
|
|
@@ -1386,11 +1387,10 @@ function MakeWithConfig(Config) {
|
|
|
1386
1387
|
return;
|
|
1387
1388
|
}
|
|
1388
1389
|
});
|
|
1389
|
-
return Object.values(latestByName).map(param =>
|
|
1390
|
-
let match = param[1];
|
|
1391
|
-
return Platform_ComponentDefinitionsApi$ReventlessCore.encodePluginStructureEntry(match[0], match[1]);
|
|
1392
|
-
});
|
|
1390
|
+
return Object.values(latestByName).map(param => param[1]);
|
|
1393
1391
|
};
|
|
1392
|
+
queryResolvers["Platform_ComponentDefinitions"] = async (_root, _args, _ctx) => connectedLatestStructures().map(param => Platform_ComponentDefinitionsApi$ReventlessCore.encodePluginStructureEntry(param[0], param[1]));
|
|
1393
|
+
queryResolvers["Platform_PluginStructures"] = async (_root, _args, _ctx) => connectedLatestStructures().map(param => Platform_PluginStructuresApi$ReventlessCore.encodePluginStructureEntry(param[0], param[1]));
|
|
1394
1394
|
queryResolvers["Platform_UIFragments"] = async (_root, _args, _ctx) => {
|
|
1395
1395
|
let scanAll = Bus.getQueryDbScan(UiFragments$ReventlessCore.name);
|
|
1396
1396
|
let items = scanAll !== undefined ? scanAll() : [];
|
|
@@ -3027,7 +3027,7 @@ function Make($star) {
|
|
|
3027
3027
|
let scanAll = Bus.getQueryDbScan(PluginsReadModelSpec$ReventlessCore.name);
|
|
3028
3028
|
return connectionResponse(scanAll !== undefined ? scanAll() : []);
|
|
3029
3029
|
};
|
|
3030
|
-
|
|
3030
|
+
let connectedLatestStructures = () => {
|
|
3031
3031
|
let dict = {};
|
|
3032
3032
|
let scanAll = Bus.getQueryDbScan(PluginsReadModelSpec$ReventlessCore.name);
|
|
3033
3033
|
if (scanAll !== undefined) {
|
|
@@ -3072,11 +3072,10 @@ function Make($star) {
|
|
|
3072
3072
|
return;
|
|
3073
3073
|
}
|
|
3074
3074
|
});
|
|
3075
|
-
return Object.values(latestByName).map(param =>
|
|
3076
|
-
let match = param[1];
|
|
3077
|
-
return Platform_ComponentDefinitionsApi$ReventlessCore.encodePluginStructureEntry(match[0], match[1]);
|
|
3078
|
-
});
|
|
3075
|
+
return Object.values(latestByName).map(param => param[1]);
|
|
3079
3076
|
};
|
|
3077
|
+
queryResolvers["Platform_ComponentDefinitions"] = async (_root, _args, _ctx) => connectedLatestStructures().map(param => Platform_ComponentDefinitionsApi$ReventlessCore.encodePluginStructureEntry(param[0], param[1]));
|
|
3078
|
+
queryResolvers["Platform_PluginStructures"] = async (_root, _args, _ctx) => connectedLatestStructures().map(param => Platform_PluginStructuresApi$ReventlessCore.encodePluginStructureEntry(param[0], param[1]));
|
|
3080
3079
|
queryResolvers["Platform_UIFragments"] = async (_root, _args, _ctx) => {
|
|
3081
3080
|
let scanAll = Bus.getQueryDbScan(UiFragments$ReventlessCore.name);
|
|
3082
3081
|
let items = scanAll !== undefined ? scanAll() : [];
|