@reventlessdev/reventless-infra 3.0.0-alpha.100
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 +853 -0
- package/LICENSE +202 -0
- package/README.md +92 -0
- package/package.json +46 -0
- package/rescript.json +34 -0
- package/src/adapter/Adapter.res +88 -0
- package/src/adapter/Adapter.res.mjs +29 -0
- package/src/components/Aggregate.res +73 -0
- package/src/components/Aggregate.res.mjs +2 -0
- package/src/components/Api.res +120 -0
- package/src/components/Api.res.mjs +31 -0
- package/src/components/Api_Adapter.res +29 -0
- package/src/components/Api_Adapter.res.mjs +2 -0
- package/src/components/AutomationSlice.res +48 -0
- package/src/components/AutomationSlice.res.mjs +2 -0
- package/src/components/CommandGenerator.res +8 -0
- package/src/components/CommandGenerator.res.mjs +2 -0
- package/src/components/CommandTopic.res +70 -0
- package/src/components/CommandTopic.res.mjs +2 -0
- package/src/components/Component.js +56 -0
- package/src/components/Component.mjs +10 -0
- package/src/components/Component.res +90 -0
- package/src/components/Component.res.mjs +57 -0
- package/src/components/Component.resi +21 -0
- package/src/components/Counter.res +81 -0
- package/src/components/Counter.res.mjs +2 -0
- package/src/components/DcbEventLog.res +130 -0
- package/src/components/DcbEventLog.res.mjs +2 -0
- package/src/components/DeployBootstrap.res +83 -0
- package/src/components/DeployBootstrap.res.mjs +69 -0
- package/src/components/EventCollector.res +19 -0
- package/src/components/EventCollector.res.mjs +2 -0
- package/src/components/EventLog.res +24 -0
- package/src/components/EventLog.res.mjs +2 -0
- package/src/components/EventMapper.res +37 -0
- package/src/components/EventMapper.res.mjs +2 -0
- package/src/components/EventTopic.res +51 -0
- package/src/components/EventTopic.res.mjs +2 -0
- package/src/components/Extension.res +64 -0
- package/src/components/Extension.res.mjs +2 -0
- package/src/components/ExtensionPoint.res +62 -0
- package/src/components/ExtensionPoint.res.mjs +2 -0
- package/src/components/Heartbeat.res +7 -0
- package/src/components/Heartbeat.res.mjs +2 -0
- package/src/components/InboundTranslationSlice.res +41 -0
- package/src/components/InboundTranslationSlice.res.mjs +2 -0
- package/src/components/OutboundTranslationSlice.res +44 -0
- package/src/components/OutboundTranslationSlice.res.mjs +2 -0
- package/src/components/Plugin.res +93 -0
- package/src/components/Plugin.res.mjs +2 -0
- package/src/components/QueryDb.res +48 -0
- package/src/components/QueryDb.res.mjs +33 -0
- package/src/components/ReadModel.res +56 -0
- package/src/components/ReadModel.res.mjs +2 -0
- package/src/components/Scheduler.res +32 -0
- package/src/components/Scheduler.res.mjs +2 -0
- package/src/components/StateChangeSlice.res +45 -0
- package/src/components/StateChangeSlice.res.mjs +2 -0
- package/src/components/StateViewSlice.res +38 -0
- package/src/components/StateViewSlice.res.mjs +2 -0
- package/src/components/Task.res +89 -0
- package/src/components/Task.res.mjs +2 -0
- package/src/types/ExtensionMapping.res +448 -0
- package/src/types/ExtensionMapping.res.mjs +252 -0
- package/src/types/ExtensionPointMapping.res +303 -0
- package/src/types/ExtensionPointMapping.res.mjs +116 -0
- package/src/types/Message.res +3 -0
- package/src/types/Message.res.mjs +2 -0
- package/src/types/NoEventMappings.res +25 -0
- package/src/types/NoEventMappings.res.mjs +17 -0
- package/src/types/Platform.res +269 -0
- package/src/types/Platform.res.mjs +2 -0
- package/src/types/PluginExtensionPointSpec.res +55 -0
- package/src/types/PluginExtensionPointSpec.res.mjs +209 -0
- package/src/types/ResourceNaming.res +12 -0
- package/src/types/ResourceNaming.res.mjs +2 -0
- package/tests/DeployBootstrapTest.res +72 -0
- package/tests/DeployBootstrapTest.res.mjs +100 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as DeployBootstrap$ReventlessInfra from "../src/components/DeployBootstrap.res.mjs";
|
|
4
|
+
|
|
5
|
+
globalThis.describe("DeployBootstrap", () => {
|
|
6
|
+
globalThis.describe("run with no registrations", () => {
|
|
7
|
+
globalThis.test("is a no-op that does not throw", () => {
|
|
8
|
+
DeployBootstrap$ReventlessInfra.reset();
|
|
9
|
+
DeployBootstrap$ReventlessInfra.run("PreDeploy");
|
|
10
|
+
DeployBootstrap$ReventlessInfra.run("PostDeploy");
|
|
11
|
+
globalThis.expect(true).toBe(true);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
globalThis.describe("registration order within a phase", () => {
|
|
15
|
+
globalThis.test("runs contributions in the order they were registered", () => {
|
|
16
|
+
DeployBootstrap$ReventlessInfra.reset();
|
|
17
|
+
let calls = [];
|
|
18
|
+
DeployBootstrap$ReventlessInfra.register(undefined, () => {
|
|
19
|
+
calls.push("a");
|
|
20
|
+
});
|
|
21
|
+
DeployBootstrap$ReventlessInfra.register(undefined, () => {
|
|
22
|
+
calls.push("b");
|
|
23
|
+
});
|
|
24
|
+
DeployBootstrap$ReventlessInfra.register(undefined, () => {
|
|
25
|
+
calls.push("c");
|
|
26
|
+
});
|
|
27
|
+
DeployBootstrap$ReventlessInfra.run("PreDeploy");
|
|
28
|
+
globalThis.expect(calls).toEqual([
|
|
29
|
+
"a",
|
|
30
|
+
"b",
|
|
31
|
+
"c"
|
|
32
|
+
]);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
globalThis.describe("phase isolation", () => {
|
|
36
|
+
globalThis.test("run(PreDeploy) fires only PreDeploy contributions", () => {
|
|
37
|
+
DeployBootstrap$ReventlessInfra.reset();
|
|
38
|
+
let calls = [];
|
|
39
|
+
DeployBootstrap$ReventlessInfra.register("PreDeploy", () => {
|
|
40
|
+
calls.push("pre");
|
|
41
|
+
});
|
|
42
|
+
DeployBootstrap$ReventlessInfra.register("PostDeploy", () => {
|
|
43
|
+
calls.push("post");
|
|
44
|
+
});
|
|
45
|
+
DeployBootstrap$ReventlessInfra.run("PreDeploy");
|
|
46
|
+
globalThis.expect(calls).toEqual(["pre"]);
|
|
47
|
+
DeployBootstrap$ReventlessInfra.run("PostDeploy");
|
|
48
|
+
globalThis.expect(calls).toEqual([
|
|
49
|
+
"pre",
|
|
50
|
+
"post"
|
|
51
|
+
]);
|
|
52
|
+
});
|
|
53
|
+
globalThis.test("defaults to PreDeploy when no phase is given", () => {
|
|
54
|
+
DeployBootstrap$ReventlessInfra.reset();
|
|
55
|
+
let calls = [];
|
|
56
|
+
DeployBootstrap$ReventlessInfra.register(undefined, () => {
|
|
57
|
+
calls.push("default");
|
|
58
|
+
});
|
|
59
|
+
DeployBootstrap$ReventlessInfra.run("PostDeploy");
|
|
60
|
+
globalThis.expect(calls).toEqual([]);
|
|
61
|
+
DeployBootstrap$ReventlessInfra.run("PreDeploy");
|
|
62
|
+
globalThis.expect(calls).toEqual(["default"]);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
globalThis.describe("idempotent run per phase", () => {
|
|
66
|
+
globalThis.test("running an already-run phase does nothing", () => {
|
|
67
|
+
DeployBootstrap$ReventlessInfra.reset();
|
|
68
|
+
let count = {
|
|
69
|
+
contents: 0
|
|
70
|
+
};
|
|
71
|
+
DeployBootstrap$ReventlessInfra.register(undefined, () => {
|
|
72
|
+
count.contents = count.contents + 1 | 0;
|
|
73
|
+
});
|
|
74
|
+
DeployBootstrap$ReventlessInfra.run("PreDeploy");
|
|
75
|
+
DeployBootstrap$ReventlessInfra.run("PreDeploy");
|
|
76
|
+
DeployBootstrap$ReventlessInfra.run("PreDeploy");
|
|
77
|
+
globalThis.expect(count.contents).toBe(1);
|
|
78
|
+
});
|
|
79
|
+
globalThis.test("a contribution registered after run does not fire", () => {
|
|
80
|
+
DeployBootstrap$ReventlessInfra.reset();
|
|
81
|
+
let calls = [];
|
|
82
|
+
DeployBootstrap$ReventlessInfra.register(undefined, () => {
|
|
83
|
+
calls.push("before");
|
|
84
|
+
});
|
|
85
|
+
DeployBootstrap$ReventlessInfra.run("PreDeploy");
|
|
86
|
+
DeployBootstrap$ReventlessInfra.register(undefined, () => {
|
|
87
|
+
calls.push("after");
|
|
88
|
+
});
|
|
89
|
+
DeployBootstrap$ReventlessInfra.run("PreDeploy");
|
|
90
|
+
globalThis.expect(calls).toEqual(["before"]);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
let DB;
|
|
96
|
+
|
|
97
|
+
export {
|
|
98
|
+
DB,
|
|
99
|
+
}
|
|
100
|
+
/* Not a pure module */
|