@reventlessdev/reventless-local 3.0.0-alpha.244 → 3.0.0-alpha.246
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 +22 -0
- package/package.json +11 -11
- package/src/LocalPlatformRegistry.res +54 -63
- package/src/LocalPlatformRegistry.res.mjs +24 -5
- package/src/LocalPlatformStart.res +84 -0
- package/src/LocalPlatformStart.res.mjs +99 -0
- package/src/Platform.res +33 -0
- package/src/Platform.res.mjs +18 -4
- package/src/ShellConfig.res +20 -2
- package/src/ShellConfig.res.mjs +9 -4
- package/src/UiSlots.res +191 -0
- package/src/UiSlots.res.mjs +91 -0
- package/src/adapter/Api/LocalEvents_Server.res +18 -0
- package/src/adapter/Api/LocalEvents_Server.res.mjs +11 -0
- package/src/adapter/EventHistory/EventHistoryResolvers_GraphQL.res +50 -3
- package/src/adapter/EventHistory/EventHistoryResolvers_GraphQL.res.mjs +62 -2
- package/src/adapter/LocalBus.res +30 -27
- package/src/adapter/LocalBus.res.mjs +14 -18
- package/src/adapter/LocalEventTap.res +139 -0
- package/src/adapter/LocalEventTap.res.mjs +177 -0
- package/tests/EventTapSocketFixtures.mjs +17 -0
- package/tests/LocalEventTapTest.res +154 -0
- package/tests/LocalEventTapTest.res.mjs +140 -0
- package/tests/LocalPlatformRegistryTest.res +61 -0
- package/tests/LocalPlatformRegistryTest.res.mjs +41 -1
- package/tests/LocalPlatformStartTest.res +176 -0
- package/tests/LocalPlatformStartTest.res.mjs +210 -0
- package/tests/ShellConfigTest.res +41 -0
- package/tests/ShellConfigTest.res.mjs +40 -17
- package/tests/UiSlotsTest.res +197 -0
- package/tests/UiSlotsTest.res.mjs +196 -0
- package/tests/adapter/EventHistoryResolverTest.res +46 -0
- package/tests/adapter/EventHistoryResolverTest.res.mjs +41 -0
- package/tests/adapter/EventTapTest.res +16 -6
- package/tests/adapter/EventTapTest.res.mjs +5 -1
- package/tests/components/aggregate/AggregateFixtures.res.mjs +1 -1
- package/tests/components/automationslice/AutomationSliceFixtures.res.mjs +2 -2
- package/tests/components/automationslice/AutomationSliceSelfDeadlockFixtures.res.mjs +3 -3
- package/tests/components/automationslice/MixedSourceAutomationSliceFixtures.res.mjs +1 -1
- package/tests/components/commandgenerator/CommandGeneratorFixtures.res.mjs +1 -1
- package/tests/components/commandtopic/CommandTopicFixtures.res.mjs +1 -1
- package/tests/components/commandtopic/CommandTopicStreamFixtures.res.mjs +1 -1
- package/tests/components/dcb/DcbCrossPartitionFixtures.res.mjs +1 -1
- package/tests/components/dcb/DcbFixtures.res.mjs +1 -1
- package/tests/components/extensionpoint/ExtensionPointFixtures.res.mjs +2 -2
- package/tests/components/inboundtranslationslice/InboundTranslationSliceFixtures.res.mjs +1 -1
- package/tests/components/outboundtranslationslice/OutboundTranslationSlicePlatformFixtures.res.mjs +1 -1
- package/tests/components/readmodel/DcbReadModelE2EFixtures.res.mjs +1 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Nodefs from "node:fs";
|
|
4
|
+
import * as Nodeos from "node:os";
|
|
5
|
+
import * as Nodepath from "node:path";
|
|
6
|
+
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
7
|
+
import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
|
|
8
|
+
import * as UiSlots$ReventlessLocal from "../src/UiSlots.res.mjs";
|
|
9
|
+
import * as TestRunner$ReventlessLocal from "../src/test/TestRunner.res.mjs";
|
|
10
|
+
|
|
11
|
+
TestRunner$ReventlessLocal.setup();
|
|
12
|
+
|
|
13
|
+
let declared = `export function register({ h, slots }) {
|
|
14
|
+
slots.row("gallery.tile", ({ row }) => h("span", null, row.name))
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
let edited = `export function register({ h, slots }) {
|
|
19
|
+
slots.row("gallery.tile", ({ row }) => h("strong", null, row.name))
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
function tmpdir(prefix) {
|
|
24
|
+
return Nodefs.mkdtempSync(Nodepath.join(Nodeos.tmpdir(), prefix));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function emptyDist() {
|
|
28
|
+
return tmpdir("reventless-uislots-dist-");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function declaredFile(contents) {
|
|
32
|
+
let path = Nodepath.join(tmpdir("reventless-uislots-src-"), "storefront-slots.js");
|
|
33
|
+
Nodefs.writeFileSync(path, contents, "utf8");
|
|
34
|
+
return path;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function servedPath(dir) {
|
|
38
|
+
return Nodepath.join(dir, "ui-slots.js");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function served(dir) {
|
|
42
|
+
return Nodefs.readFileSync(Nodepath.join(dir, "ui-slots.js"), "utf8");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function isServed(dir) {
|
|
46
|
+
return Nodefs.existsSync(Nodepath.join(dir, "ui-slots.js"));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function threw(f) {
|
|
50
|
+
try {
|
|
51
|
+
f();
|
|
52
|
+
return false;
|
|
53
|
+
} catch (exn) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
globalThis.describe("UiSlots.emit", () => {
|
|
59
|
+
globalThis.test("serves the declared module verbatim", () => {
|
|
60
|
+
let dir = tmpdir("reventless-uislots-dist-");
|
|
61
|
+
UiSlots$ReventlessLocal.emit(declaredFile(declared), dir);
|
|
62
|
+
globalThis.expect(Nodefs.readFileSync(Nodepath.join(dir, "ui-slots.js"), "utf8")).toEqual(declared);
|
|
63
|
+
});
|
|
64
|
+
globalThis.test("writes nothing when the platform declares no slots file", () => {
|
|
65
|
+
let dir = tmpdir("reventless-uislots-dist-");
|
|
66
|
+
UiSlots$ReventlessLocal.emit(undefined, dir);
|
|
67
|
+
globalThis.expect(Nodefs.existsSync(Nodepath.join(dir, "ui-slots.js"))).toBe(false);
|
|
68
|
+
});
|
|
69
|
+
globalThis.test("removes the served module once the declaration is withdrawn", () => {
|
|
70
|
+
let dir = tmpdir("reventless-uislots-dist-");
|
|
71
|
+
UiSlots$ReventlessLocal.emit(declaredFile(declared), dir);
|
|
72
|
+
UiSlots$ReventlessLocal.emit(undefined, dir);
|
|
73
|
+
globalThis.expect(Nodefs.existsSync(Nodepath.join(dir, "ui-slots.js"))).toBe(false);
|
|
74
|
+
});
|
|
75
|
+
globalThis.test("withdrawing twice is not an error", () => {
|
|
76
|
+
let dir = tmpdir("reventless-uislots-dist-");
|
|
77
|
+
UiSlots$ReventlessLocal.emit(undefined, dir);
|
|
78
|
+
globalThis.expect(threw(() => UiSlots$ReventlessLocal.emit(undefined, dir))).toBe(false);
|
|
79
|
+
});
|
|
80
|
+
globalThis.test("refuses a declaration naming a file that does not exist", () => {
|
|
81
|
+
let dir = tmpdir("reventless-uislots-dist-");
|
|
82
|
+
let missing = Nodepath.join(tmpdir("reventless-uislots-src-"), "absent.js");
|
|
83
|
+
globalThis.expect(threw(() => UiSlots$ReventlessLocal.emit(missing, dir))).toBe(true);
|
|
84
|
+
});
|
|
85
|
+
globalThis.test("leaves the last good module in place when the declaration is bad", () => {
|
|
86
|
+
let dir = tmpdir("reventless-uislots-dist-");
|
|
87
|
+
UiSlots$ReventlessLocal.emit(declaredFile(declared), dir);
|
|
88
|
+
let missing = Nodepath.join(tmpdir("reventless-uislots-src-"), "absent.js");
|
|
89
|
+
threw(() => UiSlots$ReventlessLocal.emit(missing, dir));
|
|
90
|
+
globalThis.expect(Nodefs.readFileSync(Nodepath.join(dir, "ui-slots.js"), "utf8")).toEqual(declared);
|
|
91
|
+
});
|
|
92
|
+
globalThis.test("serves a module it cannot vouch for rather than refusing it", () => {
|
|
93
|
+
let dir = tmpdir("reventless-uislots-dist-");
|
|
94
|
+
let broken = "export const register = (r) => {";
|
|
95
|
+
UiSlots$ReventlessLocal.emit(declaredFile(broken), dir);
|
|
96
|
+
globalThis.expect(Nodefs.readFileSync(Nodepath.join(dir, "ui-slots.js"), "utf8")).toEqual(broken);
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
function waitForReload(timeoutMsOpt, edit, uiSlotsFile, dir) {
|
|
101
|
+
let timeoutMs = timeoutMsOpt !== undefined ? timeoutMsOpt : 4000;
|
|
102
|
+
return new Promise((resolve, param) => {
|
|
103
|
+
let fired = {
|
|
104
|
+
contents: 0
|
|
105
|
+
};
|
|
106
|
+
let watcher = {
|
|
107
|
+
contents: undefined
|
|
108
|
+
};
|
|
109
|
+
let deadline = {
|
|
110
|
+
contents: undefined
|
|
111
|
+
};
|
|
112
|
+
let retry = {
|
|
113
|
+
contents: undefined
|
|
114
|
+
};
|
|
115
|
+
let finish = () => {
|
|
116
|
+
Stdlib_Option.forEach(watcher.contents, prim => {
|
|
117
|
+
prim.close();
|
|
118
|
+
});
|
|
119
|
+
Stdlib_Option.forEach(deadline.contents, prim => {
|
|
120
|
+
clearTimeout(prim);
|
|
121
|
+
});
|
|
122
|
+
Stdlib_Option.forEach(retry.contents, prim => {
|
|
123
|
+
clearTimeout(prim);
|
|
124
|
+
});
|
|
125
|
+
resolve(fired.contents);
|
|
126
|
+
};
|
|
127
|
+
let editUntilSeen = () => {
|
|
128
|
+
edit();
|
|
129
|
+
retry.contents = Primitive_option.some(setTimeout(editUntilSeen, 1000));
|
|
130
|
+
};
|
|
131
|
+
watcher.contents = UiSlots$ReventlessLocal.watch(uiSlotsFile, dir, () => {
|
|
132
|
+
fired.contents = fired.contents + 1 | 0;
|
|
133
|
+
finish();
|
|
134
|
+
});
|
|
135
|
+
deadline.contents = Primitive_option.some(setTimeout(finish, timeoutMs));
|
|
136
|
+
editUntilSeen();
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
globalThis.describe("UiSlots.watch", () => {
|
|
141
|
+
globalThis.test("watches nothing when the platform declares no slots file", () => {
|
|
142
|
+
globalThis.expect(UiSlots$ReventlessLocal.watch(undefined, undefined, () => {})).toEqual(undefined);
|
|
143
|
+
});
|
|
144
|
+
globalThis.test("declines to watch a path whose directory is gone, without throwing", () => {
|
|
145
|
+
let missing = Nodepath.join(tmpdir("reventless-uislots-gone-"), "nowhere", "slots.js");
|
|
146
|
+
globalThis.expect(UiSlots$ReventlessLocal.watch(missing, undefined, () => {})).toEqual(undefined);
|
|
147
|
+
});
|
|
148
|
+
globalThis.test("re-serves the module when it changes, and says so", async () => {
|
|
149
|
+
let dir = tmpdir("reventless-uislots-dist-");
|
|
150
|
+
let path = declaredFile(declared);
|
|
151
|
+
UiSlots$ReventlessLocal.emit(path, dir);
|
|
152
|
+
let fired = await waitForReload(undefined, () => {
|
|
153
|
+
Nodefs.writeFileSync(path, edited, "utf8");
|
|
154
|
+
}, path, dir);
|
|
155
|
+
globalThis.expect([
|
|
156
|
+
fired > 0,
|
|
157
|
+
Nodefs.readFileSync(Nodepath.join(dir, "ui-slots.js"), "utf8")
|
|
158
|
+
]).toEqual([
|
|
159
|
+
true,
|
|
160
|
+
edited
|
|
161
|
+
]);
|
|
162
|
+
});
|
|
163
|
+
globalThis.test("keeps serving the last good copy when the file is momentarily unreadable", async () => {
|
|
164
|
+
let dir = tmpdir("reventless-uislots-dist-");
|
|
165
|
+
let path = declaredFile(declared);
|
|
166
|
+
UiSlots$ReventlessLocal.emit(path, dir);
|
|
167
|
+
let fired = await waitForReload(1500, () => {
|
|
168
|
+
Nodefs.writeFileSync(path, edited, "utf8");
|
|
169
|
+
Nodefs.unlinkSync(path);
|
|
170
|
+
}, path, dir);
|
|
171
|
+
globalThis.expect([
|
|
172
|
+
fired,
|
|
173
|
+
Nodefs.readFileSync(Nodepath.join(dir, "ui-slots.js"), "utf8")
|
|
174
|
+
]).toEqual([
|
|
175
|
+
0,
|
|
176
|
+
declared
|
|
177
|
+
]);
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
let retryEvery = 1000;
|
|
182
|
+
|
|
183
|
+
export {
|
|
184
|
+
declared,
|
|
185
|
+
edited,
|
|
186
|
+
tmpdir,
|
|
187
|
+
emptyDist,
|
|
188
|
+
declaredFile,
|
|
189
|
+
servedPath,
|
|
190
|
+
served,
|
|
191
|
+
isServed,
|
|
192
|
+
threw,
|
|
193
|
+
retryEvery,
|
|
194
|
+
waitForReload,
|
|
195
|
+
}
|
|
196
|
+
/* Not a pure module */
|
|
@@ -206,3 +206,49 @@ describe("EventHistoryResolvers_GraphQL — pagination", () => {
|
|
|
206
206
|
expect(page->hasNextPageOf)->toBe(false)
|
|
207
207
|
})
|
|
208
208
|
})
|
|
209
|
+
|
|
210
|
+
// The clause the "supply filter.entityId" warning ends with. A caller that
|
|
211
|
+
// cannot be named is the case that matters: the warning has to survive it.
|
|
212
|
+
describe("EventHistoryResolvers_GraphQL — naming the caller", () => {
|
|
213
|
+
let ctxOf = (~operationName=?, ~userId=?, ()) => {
|
|
214
|
+
let d = Dict.make()
|
|
215
|
+
operationName->Option.forEach(name =>
|
|
216
|
+
d->Dict.set(
|
|
217
|
+
"params",
|
|
218
|
+
Dict.fromArray([("operationName", JSON.Encode.string(name))])->JSON.Encode.object,
|
|
219
|
+
)
|
|
220
|
+
)
|
|
221
|
+
userId->Option.forEach(id =>
|
|
222
|
+
d->Dict.set(
|
|
223
|
+
"identity",
|
|
224
|
+
Dict.fromArray([
|
|
225
|
+
("userId", JSON.Encode.string(id)),
|
|
226
|
+
("username", JSON.Encode.string(id)),
|
|
227
|
+
("groups", []->JSON.Encode.array),
|
|
228
|
+
])->JSON.Encode.object,
|
|
229
|
+
)
|
|
230
|
+
)
|
|
231
|
+
JSON.Encode.object(d)
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
testSync("name the operation, the user and the filter keys that did arrive", () =>
|
|
235
|
+
expect(
|
|
236
|
+
EH.describeCaller(
|
|
237
|
+
~ctx=ctxOf(~operationName="AuditTrail", ~userId="local-admin", ()),
|
|
238
|
+
~filter={eventTypes: ["OrderPlaced"], user: "alice"},
|
|
239
|
+
),
|
|
240
|
+
)->toBe(`operation "AuditTrail" as local-admin, with filter [eventTypes, user]`)
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
testSync("say so when the caller sent no filter at all", () =>
|
|
244
|
+
expect(
|
|
245
|
+
EH.describeCaller(~ctx=ctxOf(~operationName="AuditTrail", ~userId="local-admin", ()), ~filter={}),
|
|
246
|
+
)->toBe(`operation "AuditTrail" as local-admin, with no filter`)
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
testSync("still describe a context carrying neither operation nor identity", () =>
|
|
250
|
+
expect(EH.describeCaller(~ctx=ctxOf(), ~filter={}))->toBe(
|
|
251
|
+
"an unnamed operation as anonymous, with no filter",
|
|
252
|
+
)
|
|
253
|
+
)
|
|
254
|
+
})
|
|
@@ -271,6 +271,47 @@ globalThis.describe("EventHistoryResolvers_GraphQL — pagination", () => {
|
|
|
271
271
|
});
|
|
272
272
|
});
|
|
273
273
|
|
|
274
|
+
globalThis.describe("EventHistoryResolvers_GraphQL — naming the caller", () => {
|
|
275
|
+
let ctxOf = (operationName, userId, param) => {
|
|
276
|
+
let d = {};
|
|
277
|
+
Stdlib_Option.forEach(operationName, name => {
|
|
278
|
+
d["params"] = Object.fromEntries([[
|
|
279
|
+
"operationName",
|
|
280
|
+
name
|
|
281
|
+
]]);
|
|
282
|
+
});
|
|
283
|
+
Stdlib_Option.forEach(userId, id => {
|
|
284
|
+
d["identity"] = Object.fromEntries([
|
|
285
|
+
[
|
|
286
|
+
"userId",
|
|
287
|
+
id
|
|
288
|
+
],
|
|
289
|
+
[
|
|
290
|
+
"username",
|
|
291
|
+
id
|
|
292
|
+
],
|
|
293
|
+
[
|
|
294
|
+
"groups",
|
|
295
|
+
[]
|
|
296
|
+
]
|
|
297
|
+
]);
|
|
298
|
+
});
|
|
299
|
+
return d;
|
|
300
|
+
};
|
|
301
|
+
globalThis.test("name the operation, the user and the filter keys that did arrive", () => {
|
|
302
|
+
globalThis.expect(EventHistoryResolvers_GraphQL$ReventlessLocal.describeCaller(ctxOf("AuditTrail", "local-admin", undefined), {
|
|
303
|
+
eventTypes: ["OrderPlaced"],
|
|
304
|
+
user: "alice"
|
|
305
|
+
})).toBe(`operation "AuditTrail" as local-admin, with filter [eventTypes, user]`);
|
|
306
|
+
});
|
|
307
|
+
globalThis.test("say so when the caller sent no filter at all", () => {
|
|
308
|
+
globalThis.expect(EventHistoryResolvers_GraphQL$ReventlessLocal.describeCaller(ctxOf("AuditTrail", "local-admin", undefined), {})).toBe(`operation "AuditTrail" as local-admin, with no filter`);
|
|
309
|
+
});
|
|
310
|
+
globalThis.test("still describe a context carrying neither operation nor identity", () => {
|
|
311
|
+
globalThis.expect(EventHistoryResolvers_GraphQL$ReventlessLocal.describeCaller(ctxOf(undefined, undefined, undefined), {})).toBe("an unnamed operation as anonymous, with no filter");
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
|
|
274
315
|
let EH;
|
|
275
316
|
|
|
276
317
|
export {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// payload. Off by default so normal runs stay quiet.
|
|
1
|
+
// The tap's stdout sink, which is the opt-in half: REVENTLESS_EVENT_TAP puts one
|
|
2
|
+
// sentinel-prefixed JSON line per published event on stdout, and stays off by
|
|
3
|
+
// default so normal runs are quiet. The socket sink is default-on and covered by
|
|
4
|
+
// LocalEventTapTest.
|
|
6
5
|
|
|
7
6
|
open JestGlobals
|
|
8
7
|
|
|
@@ -84,8 +83,19 @@ describe("LocalBus event tap (Phase 9)", () => {
|
|
|
84
83
|
expect(obj->Dict.get("topic")->Option.flatMap(JSON.Decode.string))->toEqual(
|
|
85
84
|
Some("CatalogEventTopic"),
|
|
86
85
|
)
|
|
87
|
-
expect(obj->Dict.get("seq")->Option.flatMap(JSON.Decode.float))->toEqual(Some(1.0))
|
|
88
86
|
expect(obj->Dict.get("payload")->Option.isSome)->toBe(true)
|
|
87
|
+
|
|
88
|
+
// Consecutive, not absolute: `seq` is the event's ordinal in the store (it is
|
|
89
|
+
// seeded from the persisted count at startup and counts every publish, tapped
|
|
90
|
+
// or not), so a reader that connects late still sees the real event number.
|
|
91
|
+
// The counter is module-level, so an absolute assertion here would depend on
|
|
92
|
+
// what the rest of the file published first.
|
|
93
|
+
let seqOf = line => {
|
|
94
|
+
let j = line->String.slice(~start=sentinel->String.length, ~end=line->String.length)
|
|
95
|
+
j->JSON.parseOrThrow->JSON.Decode.object->Option.getOrThrow->Dict.get("seq")
|
|
96
|
+
->Option.flatMap(JSON.Decode.float)->Option.getOr(0.)
|
|
97
|
+
}
|
|
98
|
+
expect(seqOf(lines->Array.getUnsafe(1)) -. seqOf(first))->toEqual(1.)
|
|
89
99
|
})
|
|
90
100
|
|
|
91
101
|
testPromise("tap emits even when the topic has no subscribers", async () => {
|
|
@@ -73,8 +73,12 @@ globalThis.describe("LocalBus event tap (Phase 9)", () => {
|
|
|
73
73
|
let obj = Stdlib_Option.getOrThrow(Stdlib_JSON.Decode.object(json), undefined);
|
|
74
74
|
globalThis.expect(Stdlib_Option.flatMap(obj["event"], Stdlib_JSON.Decode.string)).toEqual("domainEvent");
|
|
75
75
|
globalThis.expect(Stdlib_Option.flatMap(obj["topic"], Stdlib_JSON.Decode.string)).toEqual("CatalogEventTopic");
|
|
76
|
-
globalThis.expect(Stdlib_Option.flatMap(obj["seq"], Stdlib_JSON.Decode.float)).toEqual(1.0);
|
|
77
76
|
globalThis.expect(Stdlib_Option.isSome(obj["payload"])).toBe(true);
|
|
77
|
+
let seqOf = line => {
|
|
78
|
+
let j = line.slice(sentinel.length, line.length);
|
|
79
|
+
return Stdlib_Option.getOr(Stdlib_Option.flatMap(Stdlib_Option.getOrThrow(Stdlib_JSON.Decode.object(JSON.parse(j)), undefined)["seq"], Stdlib_JSON.Decode.float), 0);
|
|
80
|
+
};
|
|
81
|
+
globalThis.expect(seqOf(lines[1]) - seqOf(first)).toEqual(1);
|
|
78
82
|
});
|
|
79
83
|
globalThis.test("tap emits even when the topic has no subscribers", async () => {
|
|
80
84
|
process.env["REVENTLESS_EVENT_TAP"] = "ndjson";
|
|
@@ -64,7 +64,7 @@ function commandAuthorization(param) {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
function commandTransition(param) {
|
|
67
|
-
return "
|
|
67
|
+
return "Undeclared";
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
let traits = [];
|
|
@@ -95,7 +95,7 @@ function commandAuthorization$1(param) {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
function commandTransition$1(param) {
|
|
98
|
-
return "
|
|
98
|
+
return "Undeclared";
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
let traits$1 = [];
|
|
@@ -42,7 +42,7 @@ function commandAuthorization(param) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
function commandTransition(param) {
|
|
45
|
-
return "
|
|
45
|
+
return "Undeclared";
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
let traits = [];
|
|
@@ -121,7 +121,7 @@ function commandAuthorization$1(param) {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
function commandTransition$1(param) {
|
|
124
|
-
return "
|
|
124
|
+
return "Undeclared";
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
let traits$1 = [];
|
|
@@ -230,7 +230,7 @@ function commandAuthorization$2(param) {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
function commandTransition$2(param) {
|
|
233
|
-
return "
|
|
233
|
+
return "Undeclared";
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
let traits$2 = [];
|
|
@@ -30,7 +30,7 @@ function commandAuthorization(param) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function commandTransition(param) {
|
|
33
|
-
return "
|
|
33
|
+
return "Undeclared";
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
let traits = [];
|
|
@@ -67,7 +67,7 @@ function commandAuthorization$1(param) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
function commandTransition$1(param) {
|
|
70
|
-
return "
|
|
70
|
+
return "Undeclared";
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
let traits$1 = [];
|