@reventlessdev/reventless-core 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 +14 -0
- package/package.json +5 -5
- package/src/admin/Platform_Admin.res +1 -0
- package/src/admin/Platform_Admin.res.mjs +4 -2
- package/src/components/StateChangeSlice/StateChangeSlice_Callback.res +2 -7
- package/src/components/StateChangeSlice/StateChangeSlice_Callback.res.mjs +2 -6
- package/src/plugin/component/Plugin_Builder.res +6 -0
- package/src/plugin/component/Plugin_Builder.res.mjs +2 -1
- package/src/plugin/component/Plugin_BuiltHook.res +5 -2
- package/src/plugin/component/Plugin_SubscriptionSchema.res +2 -3
- package/src/plugin/component/Plugin_SubscriptionSchema.res.mjs +1 -1
- package/src/plugin/lifecycle/PluginsProjection.res +1 -0
- package/src/plugin/lifecycle/PluginsProjection.res.mjs +2 -0
- package/src/plugin/lifecycle/PluginsReadModelSpec.res +7 -0
- package/src/plugin/lifecycle/PluginsReadModelSpec.res.mjs +20 -1
- package/tests/dcb/DcbStateChangeSliceTest.res +6 -5
- package/tests/dcb/DcbStateChangeSliceTest.res.mjs +3 -9
- package/tests/logger/LogFormatTest.res +2 -1
- package/tests/logger/LogFormatTest.res.mjs +3 -2
- package/tests/message/MessageTest.res +1 -0
- package/tests/message/MessageTest.res.mjs +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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-07-08)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **reventless-core:** composite DCB slices can read back their own events ([4604a91](https://github.com/ReventlessDev/reventless-core/commit/4604a9159fb8bf59b2191ad69fee6613c7f75cd9))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# 3.0.0-alpha.146 (2026-07-08)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **reventless-core:** classify plugins by kind in the lifecycle read model ([64e3f22](https://github.com/ReventlessDev/reventless-core/commit/64e3f22b8114a771886b7c8ec023e95971413c0b))
|
|
18
|
+
|
|
19
|
+
|
|
6
20
|
# 3.0.0-alpha.145 (2026-07-08)
|
|
7
21
|
|
|
8
22
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-core",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.147",
|
|
4
4
|
"description": "Core package for Reventless framework",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
"@reventlessdev/rescript-effect": "0.1.0-alpha.25",
|
|
32
32
|
"@reventlessdev/rescript-hash-object": "1.2.0-alpha.10",
|
|
33
33
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.6",
|
|
34
|
-
"@reventlessdev/rescript-fast-csv": "1.2.0-alpha.11",
|
|
35
34
|
"@reventlessdev/rescript-node-streams": "1.1.0-alpha.10",
|
|
35
|
+
"@reventlessdev/rescript-fast-csv": "1.2.0-alpha.11",
|
|
36
36
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.14",
|
|
37
37
|
"@reventlessdev/rescript-ssh2": "1.1.0-alpha.11",
|
|
38
|
-
"@reventlessdev/reventless-infra": "3.0.0-alpha.
|
|
39
|
-
"@reventlessdev/reventless-spec": "3.0.0-alpha.68",
|
|
38
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.91",
|
|
40
39
|
"@reventlessdev/reventless-interop": "3.0.0-alpha.24",
|
|
41
|
-
"@reventlessdev/rescript-uuid": "1.1.0-alpha.14"
|
|
40
|
+
"@reventlessdev/rescript-uuid": "1.1.0-alpha.14",
|
|
41
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.69"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"rescript": "^12.3.0",
|
|
@@ -46,7 +46,8 @@ function Make(RuntimeEnvironment) {
|
|
|
46
46
|
apiTarget: undefined,
|
|
47
47
|
uiFragments: undefined,
|
|
48
48
|
structure: undefined,
|
|
49
|
-
dcbEventLog: undefined
|
|
49
|
+
dcbEventLog: undefined,
|
|
50
|
+
kind: "Domain"
|
|
50
51
|
};
|
|
51
52
|
let Callback = Admin_Callback$ReventlessCore.Make({
|
|
52
53
|
pluginDefinition: fakePluginDefinition,
|
|
@@ -187,7 +188,8 @@ function Make(RuntimeEnvironment) {
|
|
|
187
188
|
apiTarget: undefined,
|
|
188
189
|
uiFragments: undefined,
|
|
189
190
|
structure: undefined,
|
|
190
|
-
dcbEventLog: undefined
|
|
191
|
+
dcbEventLog: undefined,
|
|
192
|
+
kind: "Domain"
|
|
191
193
|
};
|
|
192
194
|
let Callback = Admin_Callback$ReventlessCore.Make({
|
|
193
195
|
pluginDefinition: fakePluginDefinition,
|
|
@@ -61,8 +61,7 @@ module Make = (
|
|
|
61
61
|
| Some(keys) => baseTags->Array.filter(t => keys->Array.includes(t.key))
|
|
62
62
|
| None => baseTags
|
|
63
63
|
}
|
|
64
|
-
let tags =
|
|
65
|
-
indexedTags->Array.concat([{Reventless.DcbTag.key: "originatorSlice", value: Spec.name}])
|
|
64
|
+
let tags = indexedTags
|
|
66
65
|
// Inherit service from the triggering command — the DcbEventLog publish path
|
|
67
66
|
// overrides service to `<name>DcbEventLog` for routing so EventCollector
|
|
68
67
|
// subscriptions still match.
|
|
@@ -83,12 +82,8 @@ module Make = (
|
|
|
83
82
|
// tag value(s) instead of logging no id.
|
|
84
83
|
let readEventId = (tags: array<Reventless.DcbTag.tag>): option<string> => {
|
|
85
84
|
let ownTagValues = () => {
|
|
86
|
-
// Skip the `originatorSlice` metadata tag that `encodeEvent` appends to
|
|
87
|
-
// every stored event — it's the producing slice's name, not an entity id.
|
|
88
85
|
let vals =
|
|
89
|
-
tags
|
|
90
|
-
->Array.filter((t: Reventless.DcbTag.tag) => t.key != "originatorSlice")
|
|
91
|
-
->Array.reduce([], (acc, t: Reventless.DcbTag.tag) =>
|
|
86
|
+
tags->Array.reduce([], (acc, t: Reventless.DcbTag.tag) =>
|
|
92
87
|
acc->Array.includes(t.value) ? acc : acc->Array.concat([t.value])
|
|
93
88
|
)
|
|
94
89
|
vals->Array.length == 0 ? None : Some(vals->Array.join(","))
|
|
@@ -29,7 +29,7 @@ function Make(Spec) {
|
|
|
29
29
|
]]);
|
|
30
30
|
let readEventId = tags => {
|
|
31
31
|
let ownTagValues = () => {
|
|
32
|
-
let vals = Stdlib_Array.reduce(tags
|
|
32
|
+
let vals = Stdlib_Array.reduce(tags, [], (acc, t) => {
|
|
33
33
|
if (acc.includes(t.value)) {
|
|
34
34
|
return acc;
|
|
35
35
|
} else {
|
|
@@ -188,15 +188,11 @@ function Make(Spec) {
|
|
|
188
188
|
let baseTags = DcbTag$Reventless.extractTagsExpanded(Spec.eventSchema, e);
|
|
189
189
|
let keys = tagKeysByEventType[eventType];
|
|
190
190
|
let indexedTags = keys !== undefined ? baseTags.filter(t => keys.includes(t.key)) : baseTags;
|
|
191
|
-
let tags = indexedTags.concat([{
|
|
192
|
-
key: "originatorSlice",
|
|
193
|
-
value: Spec.name
|
|
194
|
-
}]);
|
|
195
191
|
let meta = Message$ReventlessCore.deriveMeta(parentMeta, undefined);
|
|
196
192
|
return {
|
|
197
193
|
eventType: eventType,
|
|
198
194
|
data: match[1],
|
|
199
|
-
tags:
|
|
195
|
+
tags: indexedTags,
|
|
200
196
|
meta: meta
|
|
201
197
|
};
|
|
202
198
|
});
|
|
@@ -687,6 +687,12 @@ module Make = (
|
|
|
687
687
|
uiFragments,
|
|
688
688
|
structure: pluginStructure,
|
|
689
689
|
dcbEventLog: dcbEventLogDef,
|
|
690
|
+
// Business role from the deploy-time metadata registry (set via
|
|
691
|
+
// registerPluginMetadata). Unset → Domain. Rides the handshake to the
|
|
692
|
+
// plugin-lifecycle projection so the admin can segregate infrastructure.
|
|
693
|
+
kind: Plugin_Helpers.pluginMetadataRegistry.contents
|
|
694
|
+
->Option.flatMap(m => m.kind)
|
|
695
|
+
->Option.getOr(Plugin_Helpers.Domain),
|
|
690
696
|
})
|
|
691
697
|
|
|
692
698
|
// Bundled Plugin EventCollector reconstructs Extension_Operations at
|
|
@@ -462,7 +462,8 @@ function Make(Spec) {
|
|
|
462
462
|
apiTarget: capturedDeployTarget,
|
|
463
463
|
uiFragments: uiFragments,
|
|
464
464
|
structure: pluginStructure,
|
|
465
|
-
dcbEventLog: param[2]
|
|
465
|
+
dcbEventLog: param[2],
|
|
466
|
+
kind: Stdlib_Option.getOr(Stdlib_Option.flatMap(Plugin_Helpers$ReventlessCore.pluginMetadataRegistry.contents, m => m.kind), "Domain")
|
|
466
467
|
}));
|
|
467
468
|
let aggregateQueueUrls = {};
|
|
468
469
|
Object.entries(aggregateResources).forEach(param => {
|
|
@@ -12,8 +12,11 @@
|
|
|
12
12
|
// describe a plugin's role and origin.
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
|
|
15
|
-
/** Classifies the business role of a plugin. Absent defaults to Domain.
|
|
16
|
-
|
|
15
|
+
/** Classifies the business role of a plugin. Absent defaults to Domain.
|
|
16
|
+
Aliases the canonical `@schema` enum in `reventless-spec` (`Reventless.Plugin.pluginKind`)
|
|
17
|
+
so the deploy-time metadata registry and the serialized `pluginDefinition` share one
|
|
18
|
+
type — no mapping needed where metadata flows onto the definition. */
|
|
19
|
+
type pluginKind = Reventless.Plugin.pluginKind =
|
|
17
20
|
| Domain
|
|
18
21
|
| PlatformInfrastructure
|
|
19
22
|
| Commercial
|
|
@@ -61,8 +61,7 @@ let sourceCFields = (
|
|
|
61
61
|
// Pushed via AppSync Events API. Admin / observability only.
|
|
62
62
|
//
|
|
63
63
|
// Returns (subscriptionFields, supportingTypes) — the supporting type is the
|
|
64
|
-
// {DisplayName}EventLogEvent type that carries position, eventType, payload
|
|
65
|
-
// the optional originatorSlice tag injected by StateChangeSlice_Callback.
|
|
64
|
+
// {DisplayName}EventLogEvent type that carries position, eventType, and payload.
|
|
66
65
|
|
|
67
66
|
let sourceAFieldsAndTypes = (
|
|
68
67
|
~eventLogEntries: array<eventLogSchemaEntry>,
|
|
@@ -76,7 +75,7 @@ let sourceAFieldsAndTypes = (
|
|
|
76
75
|
seen->Set.add(n)
|
|
77
76
|
fields->Array.push(` on${n}EventLog_eventAppended: ${n}EventLogEvent`)
|
|
78
77
|
types->Array.push(
|
|
79
|
-
`type ${n}EventLogEvent {\n position: String!\n eventType: String!\n payload: AWSJSON!\n
|
|
78
|
+
`type ${n}EventLogEvent {\n position: String!\n eventType: String!\n payload: AWSJSON!\n}`,
|
|
80
79
|
)
|
|
81
80
|
}
|
|
82
81
|
})
|
|
@@ -41,7 +41,7 @@ function sourceAFieldsAndTypes(eventLogEntries) {
|
|
|
41
41
|
if (!seen.has(n)) {
|
|
42
42
|
seen.add(n);
|
|
43
43
|
fields.push(` on` + n + `EventLog_eventAppended: ` + n + `EventLogEvent`);
|
|
44
|
-
types.push(`type ` + n + `EventLogEvent {\n position: String!\n eventType: String!\n payload: AWSJSON!\n
|
|
44
|
+
types.push(`type ` + n + `EventLogEvent {\n position: String!\n eventType: String!\n payload: AWSJSON!\n}`);
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
@@ -58,6 +58,7 @@ let displayState = (
|
|
|
58
58
|
uiFragments: def.uiFragments,
|
|
59
59
|
structure: def.structure,
|
|
60
60
|
dcbEventLog: def.dcbEventLog,
|
|
61
|
+
kind: def.kind,
|
|
61
62
|
// The current version is never listed among the "other" connected versions.
|
|
62
63
|
otherConnectedVersions: otherConnectedVersions->Util.without(def.version),
|
|
63
64
|
}
|
|
@@ -74,6 +74,7 @@ function displayState(def, status, statusChange, otherConnectedVersions) {
|
|
|
74
74
|
let base_uiFragments = def.uiFragments;
|
|
75
75
|
let base_structure = def.structure;
|
|
76
76
|
let base_dcbEventLog = def.dcbEventLog;
|
|
77
|
+
let base_kind = def.kind;
|
|
77
78
|
let base_otherConnectedVersions = without(otherConnectedVersions, def.version);
|
|
78
79
|
let base = {
|
|
79
80
|
name: base_name,
|
|
@@ -89,6 +90,7 @@ function displayState(def, status, statusChange, otherConnectedVersions) {
|
|
|
89
90
|
uiFragments: base_uiFragments,
|
|
90
91
|
structure: base_structure,
|
|
91
92
|
dcbEventLog: base_dcbEventLog,
|
|
93
|
+
kind: base_kind,
|
|
92
94
|
otherConnectedVersions: base_otherConnectedVersions
|
|
93
95
|
};
|
|
94
96
|
let target = def.apiTarget;
|
|
@@ -37,6 +37,12 @@ type state = {
|
|
|
37
37
|
// from this plugin's DCB topic → peer EventCollectors (and vice-versa). None
|
|
38
38
|
// for pure-aggregate plugins or for plugins persisted before Phase 4.
|
|
39
39
|
dcbEventLog: @s.matches(Reventless.Plugin.dcbEventLogOptionSchema) option<Reventless.Plugin.dcbEventLogDefinition>,
|
|
40
|
+
// Business role of the plugin (from pluginDefinition.kind). Lets the admin Plugins
|
|
41
|
+
// view segregate PlatformInfrastructure / Commercial / Marketplace from Domain.
|
|
42
|
+
// @scan opts the field into server-side equality filtering so the connection gains
|
|
43
|
+
// a `kindEq` filter — the panel split (main list vs System/Infrastructure) pages
|
|
44
|
+
// correctly server-side rather than filtering a page client-side.
|
|
45
|
+
@scan kind: Reventless.Plugin.pluginKind,
|
|
40
46
|
// Other versions of this name that are currently **Connected** — excludes this
|
|
41
47
|
// row's own `version` (whose status is the `status` field above). Lets the
|
|
42
48
|
// projection recompute which version is current (highest Connected) during a
|
|
@@ -61,6 +67,7 @@ type queryResult = {
|
|
|
61
67
|
uiFragments: option<Reventless.Plugin.uiFragmentManifest>,
|
|
62
68
|
structure: option<Reventless.Plugin.pluginStructure>,
|
|
63
69
|
dcbEventLog: option<Reventless.Plugin.dcbEventLogDefinition>,
|
|
70
|
+
kind: Reventless.Plugin.pluginKind,
|
|
64
71
|
}
|
|
65
72
|
|
|
66
73
|
|
|
@@ -4,6 +4,7 @@ import * as S from "sury/src/S.res.mjs";
|
|
|
4
4
|
import * as Plugin$Reventless from "@reventlessdev/reventless-spec/src/components/Plugin.res.mjs";
|
|
5
5
|
import * as ReadModel$Reventless from "@reventlessdev/reventless-spec/src/components/ReadModel.res.mjs";
|
|
6
6
|
import * as Message$ReventlessCore from "../../Message.res.mjs";
|
|
7
|
+
import * as StateAnnotations$Reventless from "@reventlessdev/reventless-spec/src/components/StateAnnotations.res.mjs";
|
|
7
8
|
|
|
8
9
|
let statusSchema = S.union([
|
|
9
10
|
S.literal("Connected"),
|
|
@@ -27,11 +28,29 @@ let stateSchema = S.schema(s => ({
|
|
|
27
28
|
uiFragments: s.m(Plugin$Reventless.uiFragmentManifestOptionSchema),
|
|
28
29
|
structure: s.m(Plugin$Reventless.pluginStructureOptionSchema),
|
|
29
30
|
dcbEventLog: s.m(Plugin$Reventless.dcbEventLogOptionSchema),
|
|
31
|
+
kind: s.m(Plugin$Reventless.pluginKindSchema),
|
|
30
32
|
otherConnectedVersions: s.m(S.array(Plugin$Reventless.versionSchema))
|
|
31
33
|
}));
|
|
32
34
|
|
|
33
35
|
let config = ReadModel$Reventless.config(undefined, undefined, undefined);
|
|
34
36
|
|
|
37
|
+
let stateSchema$1 = S.Metadata.set(stateSchema, StateAnnotations$Reventless.stateAnnotationsId, {
|
|
38
|
+
ids: [],
|
|
39
|
+
compositeIds: [],
|
|
40
|
+
subIds: [],
|
|
41
|
+
compositeSubIds: [],
|
|
42
|
+
indexes: [],
|
|
43
|
+
hidden: [],
|
|
44
|
+
summary: [],
|
|
45
|
+
drillTargets: [],
|
|
46
|
+
drillTargetKeys: [],
|
|
47
|
+
collapsed: [],
|
|
48
|
+
scan: ["kind"],
|
|
49
|
+
scanSort: [],
|
|
50
|
+
status: undefined,
|
|
51
|
+
visibility: undefined
|
|
52
|
+
});
|
|
53
|
+
|
|
35
54
|
let name = "Plugins";
|
|
36
55
|
|
|
37
56
|
let Id;
|
|
@@ -48,9 +67,9 @@ export {
|
|
|
48
67
|
name,
|
|
49
68
|
Id,
|
|
50
69
|
statusSchema,
|
|
51
|
-
stateSchema,
|
|
52
70
|
config,
|
|
53
71
|
subIdConfig,
|
|
72
|
+
stateSchema$1 as stateSchema,
|
|
54
73
|
moduleUrl,
|
|
55
74
|
authorization,
|
|
56
75
|
visibility,
|
|
@@ -81,7 +81,7 @@ describe("StateChangeSlice_Callback:", () => {
|
|
|
81
81
|
))->toEqual(([Ok("ref-1")], 1, 1))
|
|
82
82
|
})
|
|
83
83
|
|
|
84
|
-
testPromise("stored event
|
|
84
|
+
testPromise("stored event carries only its entity tags (no framework provenance tag)", async () => {
|
|
85
85
|
let _ = await TestHandler.handleCommands(
|
|
86
86
|
testDcbEventLog,
|
|
87
87
|
Stream.fromIterable([
|
|
@@ -90,10 +90,11 @@ describe("StateChangeSlice_Callback:", () => {
|
|
|
90
90
|
)->Effect.runPromise
|
|
91
91
|
let storedEvent = mock.getEvents()->Array.getUnsafe(0)
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
// No `originatorSlice` (or any other) metadata tag is smuggled into the tag
|
|
94
|
+
// set — a stored event's tags are exactly its DCB entity tags, so the
|
|
95
|
+
// composite read/write keys stay aligned. See
|
|
96
|
+
// docs/analysis/dcb-event-provenance-and-metadata.md.
|
|
97
|
+
expect(storedEvent.tags)->toEqual([{Reventless.DcbTag.key: "itemId", value: "item-1"}])
|
|
97
98
|
})
|
|
98
99
|
})
|
|
99
100
|
|
|
@@ -201,23 +201,17 @@ globalThis.describe("StateChangeSlice_Callback:", () => {
|
|
|
201
201
|
1
|
|
202
202
|
]);
|
|
203
203
|
});
|
|
204
|
-
globalThis.test("stored event
|
|
204
|
+
globalThis.test("stored event carries only its entity tags (no framework provenance tag)", async () => {
|
|
205
205
|
await Effect.runPromise(TestHandler.handleCommands(undefined, undefined, testDcbEventLog, Stream.fromIterable([makeTopicItem("ref-1", {
|
|
206
206
|
TAG: "CreateItem",
|
|
207
207
|
itemId: "item-1",
|
|
208
208
|
name: "Test"
|
|
209
209
|
})])));
|
|
210
210
|
let storedEvent = mock.getEvents()[0];
|
|
211
|
-
globalThis.expect(storedEvent.tags).toEqual([
|
|
212
|
-
{
|
|
211
|
+
globalThis.expect(storedEvent.tags).toEqual([{
|
|
213
212
|
key: "itemId",
|
|
214
213
|
value: "item-1"
|
|
215
|
-
}
|
|
216
|
-
{
|
|
217
|
-
key: "originatorSlice",
|
|
218
|
-
value: "TestStateChangeSlice"
|
|
219
|
-
}
|
|
220
|
-
]);
|
|
214
|
+
}]);
|
|
221
215
|
});
|
|
222
216
|
});
|
|
223
217
|
globalThis.describe("handleCommands - decide returns Ok([])", () => {
|
|
@@ -76,6 +76,7 @@ describe("LogFormat", () => {
|
|
|
76
76
|
uiFragments: None,
|
|
77
77
|
structure: None,
|
|
78
78
|
dcbEventLog: None,
|
|
79
|
+
kind: Domain,
|
|
79
80
|
}),
|
|
80
81
|
]
|
|
81
82
|
let meta: Message.meta = {
|
|
@@ -97,7 +98,7 @@ describe("LogFormat", () => {
|
|
|
97
98
|
},
|
|
98
99
|
)
|
|
99
100
|
let expected1 = `1/2: \x1b[1mHeartbeat\x1b[0m(0): {"command":{"TAG":"Heartbeat","_0":"0.0.0"},"meta":${metaStr},"id":"0"}`
|
|
100
|
-
let expected2 = `2/2: \x1b[1mConnect\x1b[0m(1): {"command":{"TAG":"Connect","_0":{"id":"id","name":"testName","version":"testVersion","extensionPoints":[{"name":"testExtensionPoint","commandTopic":"testCommandTopic","eventTopic":"testEventTopic"}],"extensions":[{"name":"testExtension","extensionPointName":"testExtensionPoint","dcbSources":[]}],"eventCollector":"testEventCollector","extensionProtocols":[],"apiSchemaFragment":null,"apiTarget":null,"uiFragments":null,"structure":null,"dcbEventLog":null}},"meta":${metaStr},"id":"1"}`
|
|
101
|
+
let expected2 = `2/2: \x1b[1mConnect\x1b[0m(1): {"command":{"TAG":"Connect","_0":{"id":"id","name":"testName","version":"testVersion","extensionPoints":[{"name":"testExtensionPoint","commandTopic":"testCommandTopic","eventTopic":"testEventTopic"}],"extensions":[{"name":"testExtension","extensionPointName":"testExtensionPoint","dcbSources":[]}],"eventCollector":"testEventCollector","extensionProtocols":[],"apiSchemaFragment":null,"apiTarget":null,"uiFragments":null,"structure":null,"dcbEventLog":null,"kind":"Domain"}},"meta":${metaStr},"id":"1"}`
|
|
101
102
|
expect(commandJsonsToLogMessages(arr))->toEqual([expected1, expected2])
|
|
102
103
|
},
|
|
103
104
|
)
|
|
@@ -76,7 +76,8 @@ globalThis.describe("LogFormat", () => {
|
|
|
76
76
|
apiTarget: undefined,
|
|
77
77
|
uiFragments: undefined,
|
|
78
78
|
structure: undefined,
|
|
79
|
-
dcbEventLog: undefined
|
|
79
|
+
dcbEventLog: undefined,
|
|
80
|
+
kind: "Domain"
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
];
|
|
@@ -95,7 +96,7 @@ globalThis.describe("LogFormat", () => {
|
|
|
95
96
|
commandJson: Message$ReventlessCore.encode(command, PluginSpec$ReventlessCore.commandSchema)
|
|
96
97
|
}));
|
|
97
98
|
let expected1 = `1/2: \x1b[1mHeartbeat\x1b[0m(0): {"command":{"TAG":"Heartbeat","_0":"0.0.0"},"meta":` + metaStr + `,"id":"0"}`;
|
|
98
|
-
let expected2 = `2/2: \x1b[1mConnect\x1b[0m(1): {"command":{"TAG":"Connect","_0":{"id":"id","name":"testName","version":"testVersion","extensionPoints":[{"name":"testExtensionPoint","commandTopic":"testCommandTopic","eventTopic":"testEventTopic"}],"extensions":[{"name":"testExtension","extensionPointName":"testExtensionPoint","dcbSources":[]}],"eventCollector":"testEventCollector","extensionProtocols":[],"apiSchemaFragment":null,"apiTarget":null,"uiFragments":null,"structure":null,"dcbEventLog":null}},"meta":` + metaStr + `,"id":"1"}`;
|
|
99
|
+
let expected2 = `2/2: \x1b[1mConnect\x1b[0m(1): {"command":{"TAG":"Connect","_0":{"id":"id","name":"testName","version":"testVersion","extensionPoints":[{"name":"testExtensionPoint","commandTopic":"testCommandTopic","eventTopic":"testEventTopic"}],"extensions":[{"name":"testExtension","extensionPointName":"testExtensionPoint","dcbSources":[]}],"eventCollector":"testEventCollector","extensionProtocols":[],"apiSchemaFragment":null,"apiTarget":null,"uiFragments":null,"structure":null,"dcbEventLog":null,"kind":"Domain"}},"meta":` + metaStr + `,"id":"1"}`;
|
|
99
100
|
globalThis.expect(LogFormat$ReventlessCore.commandJsonsToLogMessages(arr)).toEqual([
|
|
100
101
|
expected1,
|
|
101
102
|
expected2
|
|
@@ -43,7 +43,8 @@ globalThis.describe("Message should", () => {
|
|
|
43
43
|
apiTarget: undefined,
|
|
44
44
|
uiFragments: undefined,
|
|
45
45
|
structure: undefined,
|
|
46
|
-
dcbEventLog: undefined
|
|
46
|
+
dcbEventLog: undefined,
|
|
47
|
+
kind: "Domain"
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
let variantJson = Message$ReventlessCore.encode(variant, PluginSpec$ReventlessCore.commandSchema);
|