@reventlessdev/reventless-core 3.0.0-alpha.239 → 3.0.0-alpha.241
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 +35 -0
- package/package.json +11 -11
- package/src/Message.res +11 -11
- package/src/Message.res.mjs +15 -14
- package/src/Projection.res +2 -2
- package/src/Projection.res.mjs +5 -4
- package/src/adapter/Monitoring/Monitoring.res +24 -2
- package/src/adapter/Monitoring/Monitoring.res.mjs +3 -3
- package/src/admin/Platform_Admin.res +1 -16
- package/src/admin/Platform_Admin.res.mjs +2 -30
- package/src/admin/Platform_AdminApi.res.mjs +3 -3
- package/src/admin/Platform_Admin_Structure.res +58 -113
- package/src/admin/Platform_Admin_Structure.res.mjs +24 -139
- package/src/admin/UiFragmentRegistry/StateChangeSlice/UiFragmentRegistry.res.mjs +12 -12
- package/src/admin/UiFragmentRegistry/StateViewSlice/UiFragments.res.mjs +14 -14
- package/src/components/Aggregate/Aggregate_Callback.res +2 -2
- package/src/components/Aggregate/Aggregate_Callback.res.mjs +4 -4
- package/src/components/Api/ApiAllowedStatesHelpers.res.mjs +3 -3
- package/src/components/Api/ApiNoApiHelpers.res.mjs +5 -5
- package/src/components/Api/ApiTargetStateHelpers.res.mjs +3 -3
- package/src/components/Api/GraphQL_FragmentGenerator.res +18 -12
- package/src/components/Api/GraphQL_FragmentGenerator.res.mjs +7 -13
- package/src/components/Api/GraphQL_SchemaInspector.res +1 -1
- package/src/components/Api/GraphQL_SchemaInspector.res.mjs +1 -1
- package/src/components/Api/MCP_SchemaGenerator.res +1 -1
- package/src/components/Api/MCP_SchemaGenerator.res.mjs +1 -1
- package/src/components/Api/SchemaType.res +6 -10
- package/src/components/Api/SchemaType.res.mjs +4 -4
- package/src/components/Api/StorageRefFields.res +1 -1
- package/src/components/Api/StorageRefFields.res.mjs +1 -1
- package/src/components/Api/SuryToJsonSchema.res +11 -0
- package/src/components/Api/SuryToJsonSchema.res.mjs +2 -1
- package/src/components/AutomationSlice/AutomationSlice_Callback.res +3 -4
- package/src/components/AutomationSlice/AutomationSlice_Callback.res.mjs +22 -23
- package/src/components/CommandTopic/CommandTopic_Callback.res +1 -2
- package/src/components/CommandTopic/CommandTopic_Callback.res.mjs +3 -4
- package/src/components/CommandTopic/CommandTopic_Helpers.res +1 -1
- package/src/components/CommandTopic/CommandTopic_Helpers.res.mjs +3 -3
- package/src/components/Counter/Counter.res.mjs +2 -2
- package/src/components/Counter/Counter_Callback.res.mjs +4 -4
- package/src/components/Counter/Counter_Operations.res.mjs +4 -4
- package/src/components/Dcb/Dcb_Builder.res +1 -1
- package/src/components/Dcb/Dcb_Builder.res.mjs +8 -6
- package/src/components/DcbEventLog/DcbEventLog_Builder.res.mjs +4 -3
- package/src/components/EventCollector/EventCollector_Builder.res +1 -1
- package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res +1 -2
- package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res.mjs +11 -12
- package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Callback.res +3 -4
- package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Callback.res.mjs +24 -25
- package/src/components/SideEffectHandler/SideEffectHandler_Callback.res +1 -1
- package/src/components/SideEffectHandler/SideEffectHandler_Callback.res.mjs +3 -3
- package/src/components/StateChangeSlice/StateChangeSlice_Callback.res +2 -2
- package/src/components/StateChangeSlice/StateChangeSlice_Callback.res.mjs +4 -4
- package/src/components/StateViewSlice/StateViewSlice_Builder.res +1 -1
- package/src/components/StateViewSlice/StateViewSlice_Builder.res.mjs +3 -3
- package/src/plugin/api/PluginBaseFragment.res +12 -29
- package/src/plugin/api/PluginBaseFragment.res.mjs +3 -22
- package/src/plugin/component/Capability_Inference.res +118 -1
- package/src/plugin/component/Capability_Inference.res.mjs +128 -1
- package/src/plugin/component/Plugin_Builder.res +2 -2
- package/src/plugin/component/Plugin_Builder.res.mjs +2 -1
- package/src/plugin/component/Plugin_Helpers.res +11 -11
- package/src/plugin/component/Plugin_Helpers.res.mjs +11 -10
- package/src/plugin/component/Plugin_Structure.res +349 -274
- package/src/plugin/component/Plugin_Structure.res.mjs +212 -175
- package/src/plugin/component/Plugin_SubscriptionSchema.res +1 -1
- package/src/plugin/component/Plugin_SubscriptionSchema.res.mjs +1 -1
- package/src/plugin/component/SchemaWalker.res +11 -11
- package/src/plugin/component/SchemaWalker.res.mjs +8 -9
- package/src/plugin/connect/PluginExtensionPoint_Plugin.res.mjs +15 -15
- package/src/plugin/lifecycle/PluginBehavior.res.mjs +55 -55
- package/src/plugin/lifecycle/PluginSpec.res +22 -7
- package/src/plugin/lifecycle/PluginSpec.res.mjs +91 -36
- package/src/plugin/lifecycle/PluginsReadModelSpec.res +36 -9
- package/src/plugin/lifecycle/PluginsReadModelSpec.res.mjs +33 -22
- package/src/util/Interstack.res +3 -3
- package/src/util/LogFormat.res +1 -2
- package/src/util/LogFormat.res.mjs +2 -2
- package/tests/IdentityTest.res +6 -7
- package/tests/IdentityTest.res.mjs +7 -9
- package/tests/adapter/MonitoringTest.res +30 -3
- package/tests/adapter/MonitoringTest.res.mjs +31 -12
- package/tests/adapter/RuntimeExtensionHookReachTest.res +0 -1
- package/tests/adapter/RuntimeExtensionHookReachTest.res.mjs +5 -7
- package/tests/admin/Platform_Admin_StructureTest.res +254 -0
- package/tests/admin/Platform_Admin_StructureTest.res.mjs +219 -0
- package/tests/aggregate/AggregateCacheTest.res +0 -1
- package/tests/aggregate/AggregateCacheTest.res.mjs +13 -15
- package/tests/aggregate/AggregateConflictTest.res +0 -1
- package/tests/aggregate/AggregateConflictTest.res.mjs +7 -9
- package/tests/aggregate/AggregateFixtures.res +0 -1
- package/tests/aggregate/AggregateFixtures.res.mjs +19 -21
- package/tests/aggregate/AggregateSnapshotTest.res +1 -2
- package/tests/aggregate/AggregateSnapshotTest.res.mjs +15 -16
- package/tests/api/ApiNoApiTest.res.mjs +17 -9
- package/tests/api/GraphQL_FragmentGeneratorTest.res +62 -1
- package/tests/api/GraphQL_FragmentGeneratorTest.res.mjs +102 -58
- package/tests/api/PsInternalFieldsReadModel.res +21 -0
- package/tests/api/PsInternalFieldsReadModel.res.mjs +74 -0
- package/tests/api/StorageRefFieldsTest.res.mjs +13 -13
- package/tests/api/SuryToJsonSchemaTest.res +43 -0
- package/tests/api/SuryToJsonSchemaTest.res.mjs +352 -849
- package/tests/commandgenerator/CommandGeneratorFixtures.res +0 -1
- package/tests/commandgenerator/CommandGeneratorFixtures.res.mjs +19 -21
- package/tests/commandgenerator/OwnerStampingTest.res +0 -1
- package/tests/commandgenerator/OwnerStampingTest.res.mjs +9 -11
- package/tests/commandtopic/CommandTopicCallbackFixtures.res +0 -1
- package/tests/commandtopic/CommandTopicCallbackFixtures.res.mjs +7 -9
- package/tests/counter/CounterFixtures.res +0 -1
- package/tests/counter/CounterFixtures.res.mjs +1 -4
- package/tests/dcb/DcbDecodeTest.res.mjs +24 -24
- package/tests/dcb/DcbEventLogOperationsTest.res +2 -2
- package/tests/dcb/DcbEventLogOperationsTest.res.mjs +3 -3
- package/tests/dcb/DcbEventLogSchemaTest.res.mjs +7 -7
- package/tests/dcb/DcbFixtures.res +0 -1
- package/tests/dcb/DcbFixtures.res.mjs +87 -89
- package/tests/dcb/DcbTagTest.res.mjs +6 -6
- package/tests/dcb/DcbValidationTest.res.mjs +52 -52
- package/tests/eventlog/EventLogFixtures.res +0 -1
- package/tests/eventlog/EventLogFixtures.res.mjs +7 -9
- package/tests/eventmapper/EventMapperFixtures.res +0 -1
- package/tests/eventmapper/EventMapperFixtures.res.mjs +24 -26
- package/tests/eventtopic/EventTopicFixtures.res +0 -1
- package/tests/eventtopic/EventTopicFixtures.res.mjs +7 -9
- package/tests/extensionpoint/ExtensionPointFixtures.res +0 -1
- package/tests/extensionpoint/ExtensionPointFixtures.res.mjs +10 -12
- package/tests/extensionpoint/ExtensionPointOperationsTest.res +1 -2
- package/tests/extensionpoint/ExtensionPointOperationsTest.res.mjs +9 -10
- package/tests/logger/LogFormatTest.res +3 -2
- package/tests/logger/LogFormatTest.res.mjs +7 -9
- package/tests/message/MessageTest.res +2 -2
- package/tests/message/MessageTest.res.mjs +8 -7
- package/tests/message/MetaEnvelopeTest.res +5 -5
- package/tests/message/MetaEnvelopeTest.res.mjs +12 -11
- package/tests/plugin/ManifestVisibilityTest.res.mjs +7 -7
- package/tests/plugin/PluginDefinitionScalars.res +5 -3
- package/tests/plugin/PluginDefinitionScalars.res.mjs +2 -2
- package/tests/plugin/PluginLifecycleCorpusTest.res +4 -3
- package/tests/plugin/PluginLifecycleCorpusTest.res.mjs +3 -6
- package/tests/plugin/PluginSpecExperiment.res +0 -1
- package/tests/plugin/PluginSpecExperiment.res.mjs +12 -14
- package/tests/plugin/PluginStructureTest.res +188 -1
- package/tests/plugin/PluginStructureTest.res.mjs +293 -102
- package/tests/plugin/Plugin_EventQuerySchemaTest.res.mjs +3 -3
- package/tests/plugin/SchemaWalkerTest.res +0 -1
- package/tests/plugin/SchemaWalkerTest.res.mjs +17 -19
- package/tests/plugin/StateChangeSlice/PsAttachInvoice.res.mjs +5 -5
- package/tests/plugin/StateChangeSlice/PsChangePhoto.res.mjs +8 -8
- package/tests/plugin/StateChangeSlice/PsDispatchShipment.res.mjs +5 -5
- package/tests/plugin/StateChangeSlice/PsGatedCommands.res.mjs +9 -9
- package/tests/plugin/StateChangeSlice/PsPlaceOrder.res.mjs +5 -5
- package/tests/plugin/StateChangeSlice/PsReserveStock.res.mjs +8 -8
- package/tests/plugin/StateChangeSlice/PsShipOrder.res.mjs +15 -15
- package/tests/plugin/StateChangeSlice/PsTypoStore.res +31 -0
- package/tests/plugin/StateChangeSlice/PsTypoStore.res.mjs +62 -0
- package/tests/plugin/StateChangeSlice/PsUploadAvatar.res.mjs +8 -8
- package/tests/plugin/StateChangeSlice/PsUploadImages.res +40 -0
- package/tests/plugin/StateChangeSlice/PsUploadImages.res.mjs +66 -0
- package/tests/plugin/StateViewSlice/PsAnnotatedView.res.mjs +13 -12
- package/tests/plugin/StateViewSlice/PsAvailableProductsView.res.mjs +8 -8
- package/tests/plugin/StateViewSlice/PsCategoriesView.res.mjs +6 -6
- package/tests/plugin/StateViewSlice/PsCustomersView.res.mjs +10 -10
- package/tests/plugin/StateViewSlice/PsGatedView.res.mjs +6 -6
- package/tests/plugin/StateViewSlice/PsOrdersView.res.mjs +9 -9
- package/tests/plugin/StateViewSlice/PsShipmentsView.res.mjs +11 -10
- package/tests/plugin/pluginDefinitionRequiredScalars.txt +15 -0
- package/tests/querydb/QueryDbFixtures.res +0 -1
- package/tests/querydb/QueryDbFixtures.res.mjs +5 -7
- package/tests/sideeffecthandler/SideEffectHandlerFixtures.res +0 -1
- package/tests/sideeffecthandler/SideEffectHandlerFixtures.res.mjs +4 -6
- package/tests/util/CommandPublisherTest.res +0 -1
- package/tests/util/CommandPublisherTest.res.mjs +4 -6
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
// never seeds them into pluginStructuresStore — so the host shell's Auto UI
|
|
8
8
|
// has no metadata for the admin plugin and renders nothing for it.
|
|
9
9
|
//
|
|
10
|
-
// This module
|
|
11
|
-
//
|
|
12
|
-
//
|
|
10
|
+
// This module assembles the equivalent structure from `PluginSpec` /
|
|
11
|
+
// `PluginsReadModelSpec` directly, through the same module-level extractors
|
|
12
|
+
// `make` uses for every ordinary plugin. It cannot call `make` itself — the
|
|
13
|
+
// platform has no `module(Aggregate.T)` to hand it at structure-assembly time —
|
|
14
|
+
// but the extractors take schemas, which is all this needs.
|
|
13
15
|
|
|
14
16
|
open Reventless.Plugin
|
|
15
17
|
|
|
@@ -17,86 +19,31 @@ let pluginId = "Platform"
|
|
|
17
19
|
|
|
18
20
|
let pluginName = pluginId
|
|
19
21
|
|
|
20
|
-
let
|
|
21
|
-
schema->SuryToJsonSchema.deriveObjectSchema->JSON.stringify
|
|
22
|
+
let commandSchema = PluginSpec.commandSchema->S.castToUnknown
|
|
22
23
|
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
req
|
|
43
|
-
->Array.filterMap(JSON.Decode.string)
|
|
44
|
-
->Array.filter(name => !(excludeFields->Array.includes(name)))
|
|
45
|
-
->Array.map(JSON.Encode.string)
|
|
46
|
-
->JSON.Encode.array
|
|
47
|
-
obj->Dict.set("required", filtered)
|
|
48
|
-
}
|
|
49
|
-
obj->JSON.Encode.object->JSON.stringify
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Args schema for the synthetic Auto UI metadata. Activate/Deactivate are payload-less
|
|
55
|
-
// `PluginSpec.command` variants on the wire — the auto-resolver flow injects `id: ID!`.
|
|
56
|
-
// Keep a local schema here so Auto UI's command-form metadata stays accurate.
|
|
57
|
-
@schema
|
|
58
|
-
type idArgs = {id: @s.matches(Reventless.DcbTag.string) string}
|
|
59
|
-
|
|
60
|
-
// `aggregateIdField: Some("id")` pre-fills the form's `id` input from the
|
|
61
|
-
// selected list row. The auto-codegen path would emit this for any
|
|
62
|
-
// Instance-level command whose schema has a DCB-tagged id field; the
|
|
63
|
-
// hand-rolled definitions below have to mirror that.
|
|
64
|
-
|
|
65
|
-
// `allowedStates` mirrors the PluginBehavior accept/reject branches: Activate
|
|
66
|
-
// is meaningful only on Inactive plugins; Deactivate is meaningful on
|
|
67
|
-
// Connected or Disconnected ones. Strings here must match the variant
|
|
68
|
-
// constructor names that PluginsReadModelSpec.status serialises to.
|
|
69
|
-
let activateCommand: commandDef = {
|
|
70
|
-
name: "Activate",
|
|
71
|
-
schema: idArgsSchema->S.castToUnknown->encodeSchema,
|
|
72
|
-
level: Instance,
|
|
73
|
-
aggregateIdField: Some("id"),
|
|
74
|
-
mutationField: Api_Naming.adminField(~name="Plugin_Activate"),
|
|
75
|
-
references: [],
|
|
76
|
-
allowedStates: Some(["Inactive"]),
|
|
77
|
-
targetState: None,
|
|
78
|
-
apiExposed: Some(true),
|
|
79
|
-
requiredAccess: None,
|
|
80
|
-
ownerField: None,
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
let deactivateCommand: commandDef = {
|
|
84
|
-
name: "Deactivate",
|
|
85
|
-
schema: idArgsSchema->S.castToUnknown->encodeSchema,
|
|
86
|
-
level: Instance,
|
|
87
|
-
aggregateIdField: Some("id"),
|
|
88
|
-
mutationField: Api_Naming.adminField(~name="Plugin_Deactivate"),
|
|
89
|
-
references: [],
|
|
90
|
-
allowedStates: Some(["Connected", "Disconnected"]),
|
|
91
|
-
targetState: None,
|
|
92
|
-
apiExposed: Some(true),
|
|
93
|
-
requiredAccess: None,
|
|
94
|
-
ownerField: None,
|
|
95
|
-
}
|
|
24
|
+
// Every variant of `PluginSpec.command`, walked by the same `extractCommandDefs`
|
|
25
|
+
// an ordinary aggregate goes through. The hand-written alternative described the
|
|
26
|
+
// arguments with a local `{id}` schema while the generated SDL declared
|
|
27
|
+
// `Platform_Plugin_Activate(_0: String!, id: ID!)`, so AutoUI built a mutation
|
|
28
|
+
// missing a required argument and every admin row action was rejected before it
|
|
29
|
+
// reached the aggregate. Deriving from `commandSchema` — the same schema the SDL
|
|
30
|
+
// is generated from — cannot reproduce that class of fault.
|
|
31
|
+
//
|
|
32
|
+
// `mutationFieldFor` is composed the way `PluginBaseFragment` composes the field
|
|
33
|
+
// it generates, so the two cannot name it differently. The `@noApi` protocol
|
|
34
|
+
// variants come back too, carrying `apiExposed: false` and the empty
|
|
35
|
+
// `mutationField` sentinel: metadata about an edge, not a way to invoke it.
|
|
36
|
+
let pluginCommands: array<commandDef> = Plugin_Structure.extractCommandDefs(
|
|
37
|
+
~isAggregate=true,
|
|
38
|
+
~mutationFieldFor=variantName =>
|
|
39
|
+
Api_Naming.adminField(~name=PluginSpec.name ++ "_" ++ variantName),
|
|
40
|
+
~commandAuthorization=PluginSpec.commandAuthorization->Obj.magic,
|
|
41
|
+
commandSchema,
|
|
42
|
+
)
|
|
96
43
|
|
|
97
44
|
let pluginAggregate: writableDef = {
|
|
98
45
|
name: "Plugin",
|
|
99
|
-
commands:
|
|
46
|
+
commands: pluginCommands,
|
|
100
47
|
producedEventTypes: [],
|
|
101
48
|
consumedEventTypes: [],
|
|
102
49
|
linkedViews: ["Plugins"],
|
|
@@ -109,40 +56,13 @@ let pluginAggregate: writableDef = {
|
|
|
109
56
|
chapter: None,
|
|
110
57
|
}
|
|
111
58
|
|
|
112
|
-
let pluginReadModel: queryableDef =
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
linkedWriteSide: ["Plugin"],
|
|
120
|
-
labelField: "name",
|
|
121
|
-
searchableFields: ["name"],
|
|
122
|
-
// Hand-rolled rather than resolved, but the rung is the same one
|
|
123
|
-
// `labelFieldsFromStateSchema` would report for a field literally named `name`.
|
|
124
|
-
labelFieldSource: Some("convention"),
|
|
125
|
-
// The published wire name stays `status` — it is what the SDL declares and what
|
|
126
|
-
// stored rows carry. Only the key naming it moved.
|
|
127
|
-
lifecycleField: Some("status"),
|
|
128
|
-
visibility: None,
|
|
129
|
-
chapter: None,
|
|
130
|
-
// The admin fragment hand-declares its query names rather than deriving them from
|
|
131
|
-
// the read-model name, so the singular is taken from the same call
|
|
132
|
-
// `PluginBaseFragment.queryNames.singleFieldName` makes — not singularised here.
|
|
133
|
-
singleQueryField: Some(Api_Naming.adminField(~name="Plugin")),
|
|
134
|
-
// No key field to name: the row id is `name@version` (`Plugin.makeId`), and the
|
|
135
|
-
// state carries the two halves separately rather than the composed key. `None`
|
|
136
|
-
// is the honest answer — the same one the resolver ladder reaches for a state
|
|
137
|
-
// with no `*Id` field.
|
|
138
|
-
idField: None,
|
|
139
|
-
idFieldSource: None,
|
|
140
|
-
requiredAccess: None,
|
|
141
|
-
ownerField: None,
|
|
142
|
-
retiredField: None,
|
|
143
|
-
retiredValues: None,
|
|
144
|
-
namedWhenRetired: None,
|
|
145
|
-
}
|
|
59
|
+
let pluginReadModel: queryableDef = Plugin_Structure.queryableDefFromSpec(
|
|
60
|
+
~plugin=pluginId,
|
|
61
|
+
~name=PluginsReadModelSpec.name,
|
|
62
|
+
~stateSchema=PluginsReadModelSpec.stateSchema->S.castToUnknown,
|
|
63
|
+
~authorization=PluginsReadModelSpec.authorization,
|
|
64
|
+
~linkedWriteSide=["Plugin"],
|
|
65
|
+
)
|
|
146
66
|
|
|
147
67
|
let structure: pluginStructure = {
|
|
148
68
|
readModels: [pluginReadModel],
|
|
@@ -157,3 +77,28 @@ let structure: pluginStructure = {
|
|
|
157
77
|
requiredStores: None,
|
|
158
78
|
requiredStoreDeclarations: None,
|
|
159
79
|
}
|
|
80
|
+
|
|
81
|
+
/** The definition the platform's own EventCollector ships as its
|
|
82
|
+
`pluginDefinition.json` asset, and hands to `Platform_Admin_Callback`.
|
|
83
|
+
|
|
84
|
+
The admin IS the Plugin extension point, so it never travels the connect
|
|
85
|
+
handshake and every field here is a placeholder. The asset is still read back
|
|
86
|
+
on the same path as every other plugin's, so it is declared as a value and
|
|
87
|
+
encoded through `pluginDefinitionSchema` at both sites rather than written out
|
|
88
|
+
as JSON: the hand-written twin that used to live in the AWS builder predated
|
|
89
|
+
`dcbEventLog` and `kind` and silently stopped matching the schema, which only
|
|
90
|
+
surfaced once the read side decoded instead of casting. */
|
|
91
|
+
let internalPluginDefinition: pluginDefinition = {
|
|
92
|
+
id: pluginId ++ "@INTERNAL",
|
|
93
|
+
name: pluginId,
|
|
94
|
+
version: "INTERNAL",
|
|
95
|
+
extensionPoints: [],
|
|
96
|
+
extensions: [],
|
|
97
|
+
eventCollector: "NOT-SET",
|
|
98
|
+
extensionProtocols: [],
|
|
99
|
+
apiSchemaFragment: None,
|
|
100
|
+
apiTarget: None,
|
|
101
|
+
structure: None,
|
|
102
|
+
dcbEventLog: None,
|
|
103
|
+
kind: Domain,
|
|
104
|
+
}
|
|
@@ -1,107 +1,13 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as S from "sury/src/S.res.mjs";
|
|
4
|
-
import * as Stdlib_Dict from "@rescript/runtime/lib/es6/Stdlib_Dict.js";
|
|
5
|
-
import * as Stdlib_JSON from "@rescript/runtime/lib/es6/Stdlib_JSON.js";
|
|
6
|
-
import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
|
|
7
|
-
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
8
|
-
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
9
3
|
import * as Api_Naming$ReventlessCore from "../components/Api/Api_Naming.res.mjs";
|
|
10
4
|
import * as PluginSpec$ReventlessCore from "../plugin/lifecycle/PluginSpec.res.mjs";
|
|
11
5
|
import * as Plugin_Structure$ReventlessCore from "../plugin/component/Plugin_Structure.res.mjs";
|
|
12
|
-
import * as SuryToJsonSchema$ReventlessCore from "../components/Api/SuryToJsonSchema.res.mjs";
|
|
13
|
-
import * as PluginBaseFragment$ReventlessCore from "../plugin/api/PluginBaseFragment.res.mjs";
|
|
14
6
|
import * as PluginsReadModelSpec$ReventlessCore from "../plugin/lifecycle/PluginsReadModelSpec.res.mjs";
|
|
15
7
|
|
|
16
8
|
let pluginId = "Platform";
|
|
17
9
|
|
|
18
|
-
|
|
19
|
-
return JSON.stringify(SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function encodeSchemaExcluding(schema, excludeFields) {
|
|
23
|
-
let derived = SuryToJsonSchema$ReventlessCore.deriveObjectSchema(schema);
|
|
24
|
-
let obj = Stdlib_JSON.Decode.object(derived);
|
|
25
|
-
if (obj === undefined) {
|
|
26
|
-
return JSON.stringify(derived);
|
|
27
|
-
}
|
|
28
|
-
let props = Stdlib_Option.flatMap(obj["properties"], Stdlib_JSON.Decode.object);
|
|
29
|
-
if (props === undefined) {
|
|
30
|
-
return JSON.stringify(derived);
|
|
31
|
-
}
|
|
32
|
-
excludeFields.forEach(f => Stdlib_Dict.$$delete(props, f));
|
|
33
|
-
obj["properties"] = props;
|
|
34
|
-
let req = Stdlib_Option.flatMap(obj["required"], Stdlib_JSON.Decode.array);
|
|
35
|
-
if (req !== undefined) {
|
|
36
|
-
let filtered = Stdlib_Array.filterMap(req, Stdlib_JSON.Decode.string).filter(name => !excludeFields.includes(name)).map(prim => prim);
|
|
37
|
-
obj["required"] = filtered;
|
|
38
|
-
}
|
|
39
|
-
return JSON.stringify(obj);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
let idArgsSchema = S.schema(s => ({
|
|
43
|
-
id: s.m(DcbTag$Reventless.string)
|
|
44
|
-
}));
|
|
45
|
-
|
|
46
|
-
let activateCommand_schema = encodeSchema(idArgsSchema);
|
|
47
|
-
|
|
48
|
-
let activateCommand_aggregateIdField = "id";
|
|
49
|
-
|
|
50
|
-
let activateCommand_mutationField = Api_Naming$ReventlessCore.adminField("Plugin_Activate");
|
|
51
|
-
|
|
52
|
-
let activateCommand_references = [];
|
|
53
|
-
|
|
54
|
-
let activateCommand_allowedStates = ["Inactive"];
|
|
55
|
-
|
|
56
|
-
let activateCommand_apiExposed = true;
|
|
57
|
-
|
|
58
|
-
let activateCommand = {
|
|
59
|
-
name: "Activate",
|
|
60
|
-
schema: activateCommand_schema,
|
|
61
|
-
level: "Instance",
|
|
62
|
-
aggregateIdField: activateCommand_aggregateIdField,
|
|
63
|
-
mutationField: activateCommand_mutationField,
|
|
64
|
-
references: activateCommand_references,
|
|
65
|
-
allowedStates: activateCommand_allowedStates,
|
|
66
|
-
targetState: undefined,
|
|
67
|
-
apiExposed: activateCommand_apiExposed,
|
|
68
|
-
requiredAccess: undefined,
|
|
69
|
-
ownerField: undefined
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
let deactivateCommand_schema = encodeSchema(idArgsSchema);
|
|
73
|
-
|
|
74
|
-
let deactivateCommand_aggregateIdField = "id";
|
|
75
|
-
|
|
76
|
-
let deactivateCommand_mutationField = Api_Naming$ReventlessCore.adminField("Plugin_Deactivate");
|
|
77
|
-
|
|
78
|
-
let deactivateCommand_references = [];
|
|
79
|
-
|
|
80
|
-
let deactivateCommand_allowedStates = [
|
|
81
|
-
"Connected",
|
|
82
|
-
"Disconnected"
|
|
83
|
-
];
|
|
84
|
-
|
|
85
|
-
let deactivateCommand_apiExposed = true;
|
|
86
|
-
|
|
87
|
-
let deactivateCommand = {
|
|
88
|
-
name: "Deactivate",
|
|
89
|
-
schema: deactivateCommand_schema,
|
|
90
|
-
level: "Instance",
|
|
91
|
-
aggregateIdField: deactivateCommand_aggregateIdField,
|
|
92
|
-
mutationField: deactivateCommand_mutationField,
|
|
93
|
-
references: deactivateCommand_references,
|
|
94
|
-
allowedStates: deactivateCommand_allowedStates,
|
|
95
|
-
targetState: undefined,
|
|
96
|
-
apiExposed: deactivateCommand_apiExposed,
|
|
97
|
-
requiredAccess: undefined,
|
|
98
|
-
ownerField: undefined
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
let pluginAggregate_commands = [
|
|
102
|
-
activateCommand,
|
|
103
|
-
deactivateCommand
|
|
104
|
-
];
|
|
10
|
+
let pluginCommands = Plugin_Structure$ReventlessCore.extractCommandDefs(true, variantName => Api_Naming$ReventlessCore.adminField(PluginSpec$ReventlessCore.name + "_" + variantName), PluginSpec$ReventlessCore.commandAuthorization, PluginSpec$ReventlessCore.commandSchema);
|
|
105
11
|
|
|
106
12
|
let pluginAggregate_producedEventTypes = [];
|
|
107
13
|
|
|
@@ -115,7 +21,7 @@ let pluginAggregate_errors = Plugin_Structure$ReventlessCore.extractErrorDefs(Pl
|
|
|
115
21
|
|
|
116
22
|
let pluginAggregate = {
|
|
117
23
|
name: "Plugin",
|
|
118
|
-
commands:
|
|
24
|
+
commands: pluginCommands,
|
|
119
25
|
producedEventTypes: pluginAggregate_producedEventTypes,
|
|
120
26
|
consumedEventTypes: pluginAggregate_consumedEventTypes,
|
|
121
27
|
linkedViews: pluginAggregate_linkedViews,
|
|
@@ -125,43 +31,7 @@ let pluginAggregate = {
|
|
|
125
31
|
chapter: undefined
|
|
126
32
|
};
|
|
127
33
|
|
|
128
|
-
let
|
|
129
|
-
|
|
130
|
-
let pluginReadModel_schema = encodeSchemaExcluding(PluginsReadModelSpec$ReventlessCore.stateSchema, PluginBaseFragment$ReventlessCore.pluginUIOnlyExcludeFields);
|
|
131
|
-
|
|
132
|
-
let pluginReadModel_consumedEventTypes = [];
|
|
133
|
-
|
|
134
|
-
let pluginReadModel_linkedWriteSide = ["Plugin"];
|
|
135
|
-
|
|
136
|
-
let pluginReadModel_searchableFields = ["name"];
|
|
137
|
-
|
|
138
|
-
let pluginReadModel_labelFieldSource = "convention";
|
|
139
|
-
|
|
140
|
-
let pluginReadModel_lifecycleField = "status";
|
|
141
|
-
|
|
142
|
-
let pluginReadModel_singleQueryField = Api_Naming$ReventlessCore.adminField("Plugin");
|
|
143
|
-
|
|
144
|
-
let pluginReadModel = {
|
|
145
|
-
name: "Plugins",
|
|
146
|
-
queryField: pluginReadModel_queryField,
|
|
147
|
-
schema: pluginReadModel_schema,
|
|
148
|
-
consumedEventTypes: pluginReadModel_consumedEventTypes,
|
|
149
|
-
linkedWriteSide: pluginReadModel_linkedWriteSide,
|
|
150
|
-
labelField: "name",
|
|
151
|
-
searchableFields: pluginReadModel_searchableFields,
|
|
152
|
-
labelFieldSource: pluginReadModel_labelFieldSource,
|
|
153
|
-
lifecycleField: pluginReadModel_lifecycleField,
|
|
154
|
-
ownerField: undefined,
|
|
155
|
-
retiredField: undefined,
|
|
156
|
-
retiredValues: undefined,
|
|
157
|
-
namedWhenRetired: undefined,
|
|
158
|
-
visibility: undefined,
|
|
159
|
-
chapter: undefined,
|
|
160
|
-
singleQueryField: pluginReadModel_singleQueryField,
|
|
161
|
-
idField: undefined,
|
|
162
|
-
idFieldSource: undefined,
|
|
163
|
-
requiredAccess: undefined
|
|
164
|
-
};
|
|
34
|
+
let pluginReadModel = Plugin_Structure$ReventlessCore.queryableDefFromSpec(pluginId, PluginsReadModelSpec$ReventlessCore.name, PluginsReadModelSpec$ReventlessCore.stateSchema, PluginsReadModelSpec$ReventlessCore.authorization, undefined, undefined, ["Plugin"], undefined);
|
|
165
35
|
|
|
166
36
|
let structure_readModels = [pluginReadModel];
|
|
167
37
|
|
|
@@ -193,18 +63,33 @@ let structure = {
|
|
|
193
63
|
requiredStoreDeclarations: undefined
|
|
194
64
|
};
|
|
195
65
|
|
|
66
|
+
let internalPluginDefinition = {
|
|
67
|
+
id: pluginId + "@INTERNAL",
|
|
68
|
+
name: pluginId,
|
|
69
|
+
version: "INTERNAL",
|
|
70
|
+
extensionPoints: [],
|
|
71
|
+
extensions: [],
|
|
72
|
+
eventCollector: "NOT-SET",
|
|
73
|
+
extensionProtocols: [],
|
|
74
|
+
apiSchemaFragment: undefined,
|
|
75
|
+
apiTarget: undefined,
|
|
76
|
+
structure: undefined,
|
|
77
|
+
dcbEventLog: undefined,
|
|
78
|
+
kind: "Domain"
|
|
79
|
+
};
|
|
80
|
+
|
|
196
81
|
let pluginName = pluginId;
|
|
197
82
|
|
|
83
|
+
let commandSchema = PluginSpec$ReventlessCore.commandSchema;
|
|
84
|
+
|
|
198
85
|
export {
|
|
199
86
|
pluginId,
|
|
200
87
|
pluginName,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
idArgsSchema,
|
|
204
|
-
activateCommand,
|
|
205
|
-
deactivateCommand,
|
|
88
|
+
commandSchema,
|
|
89
|
+
pluginCommands,
|
|
206
90
|
pluginAggregate,
|
|
207
91
|
pluginReadModel,
|
|
208
92
|
structure,
|
|
93
|
+
internalPluginDefinition,
|
|
209
94
|
}
|
|
210
|
-
/*
|
|
95
|
+
/* pluginCommands Not a pure module */
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as Sury from "sury";
|
|
4
4
|
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
5
5
|
import * as Plugin$Reventless from "@reventlessdev/reventless-spec/src/components/Plugin.res.mjs";
|
|
6
6
|
import * as Api$ReventlessInfra from "@reventlessdev/reventless-infra/src/components/Api.res.mjs";
|
|
7
7
|
|
|
8
|
-
let commandSchema =
|
|
9
|
-
|
|
8
|
+
let commandSchema = Sury.union([
|
|
9
|
+
Sury.$schema(s => ({
|
|
10
10
|
TAG: "RegisterUiFragment",
|
|
11
11
|
pluginId: s.m(DcbTag$Reventless.string),
|
|
12
12
|
manifest: s.m(Plugin$Reventless.uiFragmentManifestSchema),
|
|
13
|
-
at: s.m(
|
|
13
|
+
at: s.m(Sury.string)
|
|
14
14
|
})),
|
|
15
|
-
|
|
15
|
+
Sury.$schema(s => ({
|
|
16
16
|
TAG: "DeregisterUiFragment",
|
|
17
17
|
pluginId: s.m(DcbTag$Reventless.string)
|
|
18
18
|
}))
|
|
19
19
|
]);
|
|
20
20
|
|
|
21
|
-
let errorSchema =
|
|
21
|
+
let errorSchema = Sury.literal("RegistryError");
|
|
22
22
|
|
|
23
|
-
let eventSchema =
|
|
24
|
-
|
|
23
|
+
let eventSchema = Sury.union([
|
|
24
|
+
Sury.$schema(s => ({
|
|
25
25
|
TAG: "UiFragmentRegistered",
|
|
26
26
|
pluginId: s.m(DcbTag$Reventless.string),
|
|
27
27
|
manifest: s.m(Plugin$Reventless.uiFragmentManifestSchema),
|
|
28
|
-
at: s.m(
|
|
28
|
+
at: s.m(Sury.string)
|
|
29
29
|
})),
|
|
30
|
-
|
|
30
|
+
Sury.$schema(s => ({
|
|
31
31
|
TAG: "UiFragmentUpdated",
|
|
32
32
|
pluginId: s.m(DcbTag$Reventless.string),
|
|
33
33
|
previousManifest: s.m(Plugin$Reventless.uiFragmentManifestSchema),
|
|
34
34
|
newManifest: s.m(Plugin$Reventless.uiFragmentManifestSchema),
|
|
35
|
-
at: s.m(
|
|
35
|
+
at: s.m(Sury.string)
|
|
36
36
|
})),
|
|
37
|
-
|
|
37
|
+
Sury.$schema(s => ({
|
|
38
38
|
TAG: "UiFragmentDeregistered",
|
|
39
39
|
pluginId: s.m(DcbTag$Reventless.string)
|
|
40
40
|
}))
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as Sury from "sury";
|
|
4
4
|
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
5
5
|
import * as Plugin$Reventless from "@reventlessdev/reventless-spec/src/components/Plugin.res.mjs";
|
|
6
6
|
import * as ReadModel$Reventless from "@reventlessdev/reventless-spec/src/components/ReadModel.res.mjs";
|
|
7
7
|
|
|
8
|
-
let stateSchema =
|
|
9
|
-
pluginId: s.m(
|
|
10
|
-
remoteEntryUrl: s.m(
|
|
11
|
-
panels: s.m(
|
|
12
|
-
pages: s.m(
|
|
13
|
-
registeredAt: s.m(
|
|
14
|
-
updatedAt: s.m(
|
|
8
|
+
let stateSchema = Sury.$schema(s => ({
|
|
9
|
+
pluginId: s.m(Sury.string),
|
|
10
|
+
remoteEntryUrl: s.m(Sury.string),
|
|
11
|
+
panels: s.m(Sury.array(Plugin$Reventless.panelManifestEntrySchema)),
|
|
12
|
+
pages: s.m(Sury.array(Plugin$Reventless.pageManifestEntrySchema)),
|
|
13
|
+
registeredAt: s.m(Sury.string),
|
|
14
|
+
updatedAt: s.m(Sury.string)
|
|
15
15
|
}));
|
|
16
16
|
|
|
17
|
-
let consumedEventSchema =
|
|
18
|
-
|
|
17
|
+
let consumedEventSchema = Sury.union([
|
|
18
|
+
Sury.$schema(s => ({
|
|
19
19
|
TAG: "UiFragmentRegistered",
|
|
20
20
|
pluginId: s.m(DcbTag$Reventless.string),
|
|
21
21
|
manifest: s.m(Plugin$Reventless.uiFragmentManifestSchema),
|
|
22
|
-
at: s.m(
|
|
22
|
+
at: s.m(Sury.string)
|
|
23
23
|
})),
|
|
24
|
-
|
|
24
|
+
Sury.$schema(s => ({
|
|
25
25
|
TAG: "UiFragmentUpdated",
|
|
26
26
|
pluginId: s.m(DcbTag$Reventless.string),
|
|
27
27
|
previousManifest: s.m(Plugin$Reventless.uiFragmentManifestSchema),
|
|
28
28
|
newManifest: s.m(Plugin$Reventless.uiFragmentManifestSchema),
|
|
29
|
-
at: s.m(
|
|
29
|
+
at: s.m(Sury.string)
|
|
30
30
|
})),
|
|
31
|
-
|
|
31
|
+
Sury.$schema(s => ({
|
|
32
32
|
TAG: "UiFragmentDeregistered",
|
|
33
33
|
pluginId: s.m(DcbTag$Reventless.string)
|
|
34
34
|
}))
|
|
@@ -153,7 +153,7 @@ module Make = (
|
|
|
153
153
|
let encodeState = (state: Behavior.state): option<JSON.t> =>
|
|
154
154
|
switch snapshotConfig {
|
|
155
155
|
| Some({stateSchema}) =>
|
|
156
|
-
switch state->
|
|
156
|
+
switch state->Reventless.Util_Sury.toJson(stateSchema) {
|
|
157
157
|
| json => Some(json)
|
|
158
158
|
| exception _ => None
|
|
159
159
|
}
|
|
@@ -163,7 +163,7 @@ module Make = (
|
|
|
163
163
|
let decodeState = (json: JSON.t): option<Behavior.state> =>
|
|
164
164
|
switch snapshotConfig {
|
|
165
165
|
| Some({stateSchema}) =>
|
|
166
|
-
switch json->
|
|
166
|
+
switch json->Reventless.Util_Sury.fromJson(stateSchema) {
|
|
167
167
|
| state => Some(state)
|
|
168
168
|
| exception _ => None
|
|
169
169
|
}
|
|
@@ -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 HashObject from "hash-object";
|
|
5
4
|
import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
|
|
6
5
|
import * as Stdlib_JsExn from "@rescript/runtime/lib/es6/Stdlib_JsExn.js";
|
|
@@ -11,6 +10,7 @@ import * as Stream from "effect/Stream";
|
|
|
11
10
|
import * as Stdlib_Promise from "@rescript/runtime/lib/es6/Stdlib_Promise.js";
|
|
12
11
|
import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
|
|
13
12
|
import * as Lru$ReventlessCore from "../../util/Lru.res.mjs";
|
|
13
|
+
import * as Util_Sury$Reventless from "@reventlessdev/reventless-spec/src/util/Util_Sury.res.mjs";
|
|
14
14
|
import * as Message$ReventlessCore from "../../Message.res.mjs";
|
|
15
15
|
import * as LogFormat$ReventlessCore from "../../util/LogFormat.res.mjs";
|
|
16
16
|
import * as EffectLogger$ReventlessCore from "../../util/EffectLogger.res.mjs";
|
|
@@ -87,7 +87,7 @@ function Make(Spec) {
|
|
|
87
87
|
}
|
|
88
88
|
let json;
|
|
89
89
|
try {
|
|
90
|
-
json =
|
|
90
|
+
json = Util_Sury$Reventless.toJson(state, snapshotConfig.stateSchema);
|
|
91
91
|
} catch (exn) {
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
@@ -99,7 +99,7 @@ function Make(Spec) {
|
|
|
99
99
|
}
|
|
100
100
|
let state;
|
|
101
101
|
try {
|
|
102
|
-
state =
|
|
102
|
+
state = Util_Sury$Reventless.fromJson(json, snapshotConfig.stateSchema);
|
|
103
103
|
} catch (exn) {
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
@@ -356,4 +356,4 @@ function Make(Spec) {
|
|
|
356
356
|
export {
|
|
357
357
|
Make,
|
|
358
358
|
}
|
|
359
|
-
/*
|
|
359
|
+
/* hash-object Not a pure module */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as Sury from "sury";
|
|
4
4
|
import * as Api$ReventlessInfra from "@reventlessdev/reventless-infra/src/components/Api.res.mjs";
|
|
5
5
|
|
|
6
6
|
function getAllowedStates(commandSchema, variantName) {
|
|
7
|
-
let entries =
|
|
7
|
+
let entries = Sury.$Metadata_get(commandSchema, Api$ReventlessInfra.allowedStatesId);
|
|
8
8
|
if (entries !== undefined) {
|
|
9
9
|
return entries[variantName];
|
|
10
10
|
}
|
|
@@ -13,4 +13,4 @@ function getAllowedStates(commandSchema, variantName) {
|
|
|
13
13
|
export {
|
|
14
14
|
getAllowedStates,
|
|
15
15
|
}
|
|
16
|
-
/*
|
|
16
|
+
/* sury Not a pure module */
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as Sury from "sury";
|
|
4
4
|
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
5
5
|
import * as Api$ReventlessInfra from "@reventlessdev/reventless-infra/src/components/Api.res.mjs";
|
|
6
6
|
|
|
7
7
|
function isNoApi(commandSchema) {
|
|
8
|
-
return Stdlib_Option.getOr(
|
|
8
|
+
return Stdlib_Option.getOr(Sury.$Metadata_get(commandSchema, Api$ReventlessInfra.noApiId), false);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
function getExcludedVariants(commandSchema) {
|
|
12
|
-
return
|
|
12
|
+
return Sury.$Metadata_get(commandSchema, Api$ReventlessInfra.noApiVariantsId);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function filterNoApiVariants(fieldNames, commandSchema) {
|
|
16
|
-
let excluded =
|
|
16
|
+
let excluded = Sury.$Metadata_get(commandSchema, Api$ReventlessInfra.noApiVariantsId);
|
|
17
17
|
if (excluded !== undefined) {
|
|
18
18
|
return fieldNames.filter(name => !excluded.has(name));
|
|
19
19
|
} else {
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
getExcludedVariants,
|
|
27
27
|
filterNoApiVariants,
|
|
28
28
|
}
|
|
29
|
-
/*
|
|
29
|
+
/* sury Not a pure module */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as Sury from "sury";
|
|
4
4
|
import * as Api$ReventlessInfra from "@reventlessdev/reventless-infra/src/components/Api.res.mjs";
|
|
5
5
|
|
|
6
6
|
function getTargetState(commandSchema, variantName) {
|
|
7
|
-
let entries =
|
|
7
|
+
let entries = Sury.$Metadata_get(commandSchema, Api$ReventlessInfra.targetStateId);
|
|
8
8
|
if (entries !== undefined) {
|
|
9
9
|
return entries[variantName];
|
|
10
10
|
}
|
|
@@ -13,4 +13,4 @@ function getTargetState(commandSchema, variantName) {
|
|
|
13
13
|
export {
|
|
14
14
|
getTargetState,
|
|
15
15
|
}
|
|
16
|
-
/*
|
|
16
|
+
/* sury Not a pure module */
|