@reventlessdev/reventless-local 3.0.0-alpha.113

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.
Files changed (334) hide show
  1. package/CHANGELOG.md +1197 -0
  2. package/LICENSE +202 -0
  3. package/__mocks__/emptyModule.js +2 -0
  4. package/__mocks__/nodeSqlite.mjs +6 -0
  5. package/package.json +67 -0
  6. package/rescript.json +39 -0
  7. package/src/Platform.res +2162 -0
  8. package/src/Platform.res.mjs +3389 -0
  9. package/src/adapter/Api/LocalGraphQL_Adapter.res +29 -0
  10. package/src/adapter/Api/LocalGraphQL_Adapter.res.mjs +26 -0
  11. package/src/adapter/Api/LocalGraphQL_SubscriptionResolvers.res +146 -0
  12. package/src/adapter/Api/LocalGraphQL_SubscriptionResolvers.res.mjs +88 -0
  13. package/src/adapter/Auth/Auth_GraphqlContext.res +83 -0
  14. package/src/adapter/Auth/Auth_GraphqlContext.res.mjs +76 -0
  15. package/src/adapter/Auth/LocalAuth.res +239 -0
  16. package/src/adapter/Auth/LocalAuth.res.mjs +247 -0
  17. package/src/adapter/Auth/UserStore.res +134 -0
  18. package/src/adapter/Auth/UserStore.res.mjs +146 -0
  19. package/src/adapter/Backend.res +46 -0
  20. package/src/adapter/Backend.res.mjs +66 -0
  21. package/src/adapter/BackendState.res +34 -0
  22. package/src/adapter/BackendState.res.mjs +42 -0
  23. package/src/adapter/Cloner/LocalClonerRunner.res +13 -0
  24. package/src/adapter/Cloner/LocalClonerRunner.res.mjs +12 -0
  25. package/src/adapter/CommandGenerator/CommandGeneratorResolvers_GraphQL.res +329 -0
  26. package/src/adapter/CommandGenerator/CommandGeneratorResolvers_GraphQL.res.mjs +301 -0
  27. package/src/adapter/CommandGenerator/InboundTranslationResolvers_GraphQL.res +76 -0
  28. package/src/adapter/CommandGenerator/InboundTranslationResolvers_GraphQL.res.mjs +57 -0
  29. package/src/adapter/CommandGenerator/LocalCommandGeneratorResolvers.res +19 -0
  30. package/src/adapter/CommandGenerator/LocalCommandGeneratorResolvers.res.mjs +19 -0
  31. package/src/adapter/CommandTopic/LocalCommandTopicChannel.res +104 -0
  32. package/src/adapter/CommandTopic/LocalCommandTopicChannel.res.mjs +82 -0
  33. package/src/adapter/CommandTopic/LocalCommandTopicRemoteChannel.res +32 -0
  34. package/src/adapter/CommandTopic/LocalCommandTopicRemoteChannel.res.mjs +38 -0
  35. package/src/adapter/Counter/LocalCounterHandler.res +42 -0
  36. package/src/adapter/Counter/LocalCounterHandler.res.mjs +45 -0
  37. package/src/adapter/DcbEventLog/DcbEventLogStorage_InMemory.res +131 -0
  38. package/src/adapter/DcbEventLog/DcbEventLogStorage_InMemory.res.mjs +140 -0
  39. package/src/adapter/DcbEventLog/DcbEventLogStorage_Sqlite.res +334 -0
  40. package/src/adapter/DcbEventLog/DcbEventLogStorage_Sqlite.res.mjs +299 -0
  41. package/src/adapter/DomainGraphQL_Server.res +565 -0
  42. package/src/adapter/DomainGraphQL_Server.res.mjs +576 -0
  43. package/src/adapter/DomainMCP_Server.res +369 -0
  44. package/src/adapter/DomainMCP_Server.res.mjs +358 -0
  45. package/src/adapter/EventCollector/LocalEventCollectorChannel.res +87 -0
  46. package/src/adapter/EventCollector/LocalEventCollectorChannel.res.mjs +45 -0
  47. package/src/adapter/EventLog/EventLogStorage_InMemory.res +105 -0
  48. package/src/adapter/EventLog/EventLogStorage_InMemory.res.mjs +117 -0
  49. package/src/adapter/EventLog/EventLogStorage_Sqlite.res +145 -0
  50. package/src/adapter/EventLog/EventLogStorage_Sqlite.res.mjs +155 -0
  51. package/src/adapter/EventTopic/LocalEventTopicPublisher.res +36 -0
  52. package/src/adapter/EventTopic/LocalEventTopicPublisher.res.mjs +31 -0
  53. package/src/adapter/GraphQL_Server.res +6 -0
  54. package/src/adapter/GraphQL_Server.res.mjs +154 -0
  55. package/src/adapter/GraphQL_ServerInstance.res +310 -0
  56. package/src/adapter/GraphQL_ServerInstance.res.mjs +257 -0
  57. package/src/adapter/Heartbeat/LocalHeartbeatRunner.res +57 -0
  58. package/src/adapter/Heartbeat/LocalHeartbeatRunner.res.mjs +34 -0
  59. package/src/adapter/LocalBus.res +498 -0
  60. package/src/adapter/LocalBus.res.mjs +1011 -0
  61. package/src/adapter/LocalPluginSpec.res +16 -0
  62. package/src/adapter/LocalPluginSpec.res.mjs +33 -0
  63. package/src/adapter/LocalSideEffectHandler.res +44 -0
  64. package/src/adapter/LocalSideEffectHandler.res.mjs +34 -0
  65. package/src/adapter/MCP_Server.res +4 -0
  66. package/src/adapter/MCP_Server.res.mjs +67 -0
  67. package/src/adapter/MCP_ServerInstance.res +362 -0
  68. package/src/adapter/MCP_ServerInstance.res.mjs +313 -0
  69. package/src/adapter/PlatformGraphQL_Server.res +75 -0
  70. package/src/adapter/PlatformGraphQL_Server.res.mjs +84 -0
  71. package/src/adapter/PlatformMCP_Server.res +23 -0
  72. package/src/adapter/PlatformMCP_Server.res.mjs +46 -0
  73. package/src/adapter/QueryDb/QueryDbResolvers_GraphQL.res +793 -0
  74. package/src/adapter/QueryDb/QueryDbResolvers_GraphQL.res.mjs +569 -0
  75. package/src/adapter/QueryDb/QueryDbStorage_InMemory.res +242 -0
  76. package/src/adapter/QueryDb/QueryDbStorage_InMemory.res.mjs +241 -0
  77. package/src/adapter/QueryDb/QueryDbStorage_Sqlite.res +339 -0
  78. package/src/adapter/QueryDb/QueryDbStorage_Sqlite.res.mjs +318 -0
  79. package/src/adapter/QueryDb/SortKey_Filter.res +48 -0
  80. package/src/adapter/QueryDb/SortKey_Filter.res.mjs +46 -0
  81. package/src/adapter/QueryEngine/LocalQueryEngine.res +57 -0
  82. package/src/adapter/QueryEngine/LocalQueryEngine.res.mjs +56 -0
  83. package/src/adapter/Runtime/LocalAggregateRuntime_Builder.res +91 -0
  84. package/src/adapter/Runtime/LocalAggregateRuntime_Builder.res.mjs +50 -0
  85. package/src/adapter/Runtime/LocalEventCollectorRuntime_Builder.res +47 -0
  86. package/src/adapter/Runtime/LocalEventCollectorRuntime_Builder.res.mjs +37 -0
  87. package/src/adapter/Runtime/LocalPluginRuntime_Builder.res +11 -0
  88. package/src/adapter/Runtime/LocalPluginRuntime_Builder.res.mjs +30 -0
  89. package/src/adapter/Runtime/LocalRuntimeEnvironment.res +54 -0
  90. package/src/adapter/Runtime/LocalRuntimeEnvironment.res.mjs +40 -0
  91. package/src/adapter/Scheduler/LocalScheduledPublisher.res +102 -0
  92. package/src/adapter/Scheduler/LocalScheduledPublisher.res.mjs +84 -0
  93. package/src/adapter/SqliteDriver.res +52 -0
  94. package/src/adapter/SqliteDriver.res.mjs +76 -0
  95. package/src/adapter/SqliteDriver.resi +31 -0
  96. package/src/adapter/Task/LocalTaskBucket.res +75 -0
  97. package/src/adapter/Task/LocalTaskBucket.res.mjs +48 -0
  98. package/src/adapter/Task/TaskBucket_Sqlite.res +47 -0
  99. package/src/adapter/Task/TaskBucket_Sqlite.res.mjs +40 -0
  100. package/src/components/Aggregate_Builder.res +55 -0
  101. package/src/components/Aggregate_Builder.res.mjs +140 -0
  102. package/src/components/AutomationSlice_Builder.res +41 -0
  103. package/src/components/AutomationSlice_Builder.res.mjs +57 -0
  104. package/src/components/Counter_Builder.res +14 -0
  105. package/src/components/Counter_Builder.res.mjs +32 -0
  106. package/src/components/DcbEventLog_Builder.res +18 -0
  107. package/src/components/DcbEventLog_Builder.res.mjs +24 -0
  108. package/src/components/ExtensionPoint_Builder.res +25 -0
  109. package/src/components/ExtensionPoint_Builder.res.mjs +44 -0
  110. package/src/components/InboundTranslationSlice_Builder.res +34 -0
  111. package/src/components/InboundTranslationSlice_Builder.res.mjs +45 -0
  112. package/src/components/OutboundTranslationSlice_Builder.res +43 -0
  113. package/src/components/OutboundTranslationSlice_Builder.res.mjs +59 -0
  114. package/src/components/Plugin_Builder.res +37 -0
  115. package/src/components/Plugin_Builder.res.mjs +67 -0
  116. package/src/components/ReadModel_Builder.res +47 -0
  117. package/src/components/ReadModel_Builder.res.mjs +54 -0
  118. package/src/components/StateChangeSlice_Builder.res +19 -0
  119. package/src/components/StateChangeSlice_Builder.res.mjs +21 -0
  120. package/src/components/StateViewSlice_Builder.res +42 -0
  121. package/src/components/StateViewSlice_Builder.res.mjs +58 -0
  122. package/src/components/Task_Builder.res +28 -0
  123. package/src/components/Task_Builder.res.mjs +41 -0
  124. package/src/reexport/CommandTopic.res +3 -0
  125. package/src/reexport/CommandTopic.res.mjs +55 -0
  126. package/src/test/Mocks/MockDcbEventLogStorage.res +136 -0
  127. package/src/test/Mocks/MockDcbEventLogStorage.res.mjs +146 -0
  128. package/src/test/Mocks/MockEventLogStorage.res +57 -0
  129. package/src/test/Mocks/MockEventLogStorage.res.mjs +65 -0
  130. package/src/test/Mocks/MockPublisher.res +29 -0
  131. package/src/test/Mocks/MockPublisher.res.mjs +28 -0
  132. package/src/test/Mocks/MockQueryDbStorage.res +104 -0
  133. package/src/test/Mocks/MockQueryDbStorage.res.mjs +136 -0
  134. package/src/test/TestRunner.res +96 -0
  135. package/src/test/TestRunner.res.mjs +71 -0
  136. package/tests/SplitApiFixtures.res +84 -0
  137. package/tests/SplitApiFixtures.res.mjs +88 -0
  138. package/tests/SplitApiTest.res +102 -0
  139. package/tests/SplitApiTest.res.mjs +82 -0
  140. package/tests/TestFixtures.res +54 -0
  141. package/tests/TestFixtures.res.mjs +65 -0
  142. package/tests/adapter/BackendParityTest.res +94 -0
  143. package/tests/adapter/BackendParityTest.res.mjs +96 -0
  144. package/tests/adapter/CollectNEventsTest.res +82 -0
  145. package/tests/adapter/CollectNEventsTest.res.mjs +83 -0
  146. package/tests/adapter/CommandAuthorizationTest.res +200 -0
  147. package/tests/adapter/CommandAuthorizationTest.res.mjs +190 -0
  148. package/tests/adapter/CommandTopicChannelTest.res +174 -0
  149. package/tests/adapter/CommandTopicChannelTest.res.mjs +170 -0
  150. package/tests/adapter/CounterHandlerTest.res +113 -0
  151. package/tests/adapter/CounterHandlerTest.res.mjs +96 -0
  152. package/tests/adapter/DcbEventLogStorageSqliteTest.res +157 -0
  153. package/tests/adapter/DcbEventLogStorageSqliteTest.res.mjs +165 -0
  154. package/tests/adapter/DcbEventLogStorageTest.res +187 -0
  155. package/tests/adapter/DcbEventLogStorageTest.res.mjs +195 -0
  156. package/tests/adapter/EventCollectorChannelTest.res +166 -0
  157. package/tests/adapter/EventCollectorChannelTest.res.mjs +178 -0
  158. package/tests/adapter/EventLogStorageSqliteTest.res +105 -0
  159. package/tests/adapter/EventLogStorageSqliteTest.res.mjs +116 -0
  160. package/tests/adapter/EventTapTest.res +102 -0
  161. package/tests/adapter/EventTapTest.res.mjs +94 -0
  162. package/tests/adapter/EventTopicPublisherTest.res +76 -0
  163. package/tests/adapter/EventTopicPublisherTest.res.mjs +86 -0
  164. package/tests/adapter/GraphQL_SchemaInspectorTest.res +763 -0
  165. package/tests/adapter/GraphQL_SchemaInspectorTest.res.mjs +578 -0
  166. package/tests/adapter/GraphQL_SubscriptionResolversTest.res +161 -0
  167. package/tests/adapter/GraphQL_SubscriptionResolversTest.res.mjs +134 -0
  168. package/tests/adapter/HeartbeatRunnerTest.res +136 -0
  169. package/tests/adapter/HeartbeatRunnerTest.res.mjs +96 -0
  170. package/tests/adapter/LocalAuthHttpTest.res +224 -0
  171. package/tests/adapter/LocalAuthHttpTest.res.mjs +237 -0
  172. package/tests/adapter/LocalAuthLoginTest.res +180 -0
  173. package/tests/adapter/LocalAuthLoginTest.res.mjs +207 -0
  174. package/tests/adapter/LocalAuthTest.res +106 -0
  175. package/tests/adapter/LocalAuthTest.res.mjs +145 -0
  176. package/tests/adapter/LocalAuthUserStoreTest.res +172 -0
  177. package/tests/adapter/LocalAuthUserStoreTest.res.mjs +208 -0
  178. package/tests/adapter/LocalBusBoundedTest.res +157 -0
  179. package/tests/adapter/LocalBusBoundedTest.res.mjs +168 -0
  180. package/tests/adapter/LocalBusPubSubTest.res +81 -0
  181. package/tests/adapter/LocalBusPubSubTest.res.mjs +81 -0
  182. package/tests/adapter/QueryDbGsiTtlTest.res +268 -0
  183. package/tests/adapter/QueryDbGsiTtlTest.res.mjs +209 -0
  184. package/tests/adapter/QueryDbListResolverTest.res +361 -0
  185. package/tests/adapter/QueryDbListResolverTest.res.mjs +426 -0
  186. package/tests/adapter/QueryDbStorageSqliteTest.res +159 -0
  187. package/tests/adapter/QueryDbStorageSqliteTest.res.mjs +126 -0
  188. package/tests/adapter/QueryDbStorageTest.res +171 -0
  189. package/tests/adapter/QueryDbStorageTest.res.mjs +170 -0
  190. package/tests/adapter/QueryEngineTest.res +152 -0
  191. package/tests/adapter/QueryEngineTest.res.mjs +148 -0
  192. package/tests/adapter/ScheduledPublisherTest.res +199 -0
  193. package/tests/adapter/ScheduledPublisherTest.res.mjs +203 -0
  194. package/tests/adapter/SortKey_FilterTest.res +103 -0
  195. package/tests/adapter/SortKey_FilterTest.res.mjs +135 -0
  196. package/tests/adapter/SqliteDriverTest.res +86 -0
  197. package/tests/adapter/SqliteDriverTest.res.mjs +101 -0
  198. package/tests/adapter/TaskBucketSqliteTest.res +44 -0
  199. package/tests/adapter/TaskBucketSqliteTest.res.mjs +40 -0
  200. package/tests/adapter/TaskBucketTest.res +106 -0
  201. package/tests/adapter/TaskBucketTest.res.mjs +118 -0
  202. package/tests/components/aggregate/AggregateFixtures.res +78 -0
  203. package/tests/components/aggregate/AggregateFixtures.res.mjs +109 -0
  204. package/tests/components/aggregate/AggregateTest.res +129 -0
  205. package/tests/components/aggregate/AggregateTest.res.mjs +129 -0
  206. package/tests/components/automationslice/AutomationSliceCallbackTest.res +212 -0
  207. package/tests/components/automationslice/AutomationSliceCallbackTest.res.mjs +233 -0
  208. package/tests/components/automationslice/AutomationSliceFixtures.res +189 -0
  209. package/tests/components/automationslice/AutomationSliceFixtures.res.mjs +276 -0
  210. package/tests/components/automationslice/AutomationSliceSelfDeadlockFixtures.res +289 -0
  211. package/tests/components/automationslice/AutomationSliceSelfDeadlockFixtures.res.mjs +453 -0
  212. package/tests/components/automationslice/AutomationSliceSelfDeadlockTest.res +47 -0
  213. package/tests/components/automationslice/AutomationSliceSelfDeadlockTest.res.mjs +31 -0
  214. package/tests/components/automationslice/MixedSourceAutomationSliceFixtures.res +213 -0
  215. package/tests/components/automationslice/MixedSourceAutomationSliceFixtures.res.mjs +268 -0
  216. package/tests/components/automationslice/MixedSourceAutomationSliceTest.res +118 -0
  217. package/tests/components/automationslice/MixedSourceAutomationSliceTest.res.mjs +99 -0
  218. package/tests/components/commandgenerator/CommandGeneratorFixtures.res +73 -0
  219. package/tests/components/commandgenerator/CommandGeneratorFixtures.res.mjs +109 -0
  220. package/tests/components/commandgenerator/CommandGeneratorTest.res +43 -0
  221. package/tests/components/commandgenerator/CommandGeneratorTest.res.mjs +46 -0
  222. package/tests/components/commandtopic/CommandTopicFixtures.res +37 -0
  223. package/tests/components/commandtopic/CommandTopicFixtures.res.mjs +68 -0
  224. package/tests/components/commandtopic/CommandTopicStreamFixtures.res +43 -0
  225. package/tests/components/commandtopic/CommandTopicStreamFixtures.res.mjs +91 -0
  226. package/tests/components/commandtopic/CommandTopicStreamTest.res +30 -0
  227. package/tests/components/commandtopic/CommandTopicStreamTest.res.mjs +35 -0
  228. package/tests/components/commandtopic/CommandTopicTest.res +55 -0
  229. package/tests/components/commandtopic/CommandTopicTest.res.mjs +62 -0
  230. package/tests/components/counter/CounterFixtures.res +42 -0
  231. package/tests/components/counter/CounterFixtures.res.mjs +34 -0
  232. package/tests/components/counter/CounterTest.res +46 -0
  233. package/tests/components/counter/CounterTest.res.mjs +61 -0
  234. package/tests/components/dcb/DcbCrossPartitionFixtures.res +170 -0
  235. package/tests/components/dcb/DcbCrossPartitionFixtures.res.mjs +276 -0
  236. package/tests/components/dcb/DcbCrossPartitionReadTest.res +68 -0
  237. package/tests/components/dcb/DcbCrossPartitionReadTest.res.mjs +78 -0
  238. package/tests/components/dcb/DcbEventLogAppendStreamTest.res +72 -0
  239. package/tests/components/dcb/DcbEventLogAppendStreamTest.res.mjs +82 -0
  240. package/tests/components/dcb/DcbEventLogStreamTest.res +103 -0
  241. package/tests/components/dcb/DcbEventLogStreamTest.res.mjs +91 -0
  242. package/tests/components/dcb/DcbFixtures.res +145 -0
  243. package/tests/components/dcb/DcbFixtures.res.mjs +221 -0
  244. package/tests/components/dcb/DcbTest.res +55 -0
  245. package/tests/components/dcb/DcbTest.res.mjs +55 -0
  246. package/tests/components/eventcollector/EventCollectorFixtures.res +42 -0
  247. package/tests/components/eventcollector/EventCollectorFixtures.res.mjs +49 -0
  248. package/tests/components/eventcollector/EventCollectorTest.res +37 -0
  249. package/tests/components/eventcollector/EventCollectorTest.res.mjs +36 -0
  250. package/tests/components/eventlog/EventLogAppendStreamTest.res +93 -0
  251. package/tests/components/eventlog/EventLogAppendStreamTest.res.mjs +113 -0
  252. package/tests/components/eventlog/EventLogConflictTest.res +86 -0
  253. package/tests/components/eventlog/EventLogConflictTest.res.mjs +81 -0
  254. package/tests/components/eventlog/EventLogFixtures.res +52 -0
  255. package/tests/components/eventlog/EventLogFixtures.res.mjs +80 -0
  256. package/tests/components/eventlog/EventLogStreamTest.res +98 -0
  257. package/tests/components/eventlog/EventLogStreamTest.res.mjs +142 -0
  258. package/tests/components/eventlog/EventLogTest.res +53 -0
  259. package/tests/components/eventlog/EventLogTest.res.mjs +74 -0
  260. package/tests/components/eventtopic/EventTopicFixtures.res +47 -0
  261. package/tests/components/eventtopic/EventTopicFixtures.res.mjs +77 -0
  262. package/tests/components/eventtopic/EventTopicStreamFixtures.res +27 -0
  263. package/tests/components/eventtopic/EventTopicStreamFixtures.res.mjs +62 -0
  264. package/tests/components/eventtopic/EventTopicStreamTest.res +35 -0
  265. package/tests/components/eventtopic/EventTopicStreamTest.res.mjs +44 -0
  266. package/tests/components/eventtopic/EventTopicTest.res +35 -0
  267. package/tests/components/eventtopic/EventTopicTest.res.mjs +43 -0
  268. package/tests/components/extensionpoint/ExtensionPointFixtures.res +145 -0
  269. package/tests/components/extensionpoint/ExtensionPointFixtures.res.mjs +188 -0
  270. package/tests/components/extensionpoint/ExtensionPointTest.res +62 -0
  271. package/tests/components/extensionpoint/ExtensionPointTest.res.mjs +55 -0
  272. package/tests/components/heartbeat/HeartbeatFixtures.res +48 -0
  273. package/tests/components/heartbeat/HeartbeatFixtures.res.mjs +46 -0
  274. package/tests/components/heartbeat/HeartbeatTest.res +67 -0
  275. package/tests/components/heartbeat/HeartbeatTest.res.mjs +65 -0
  276. package/tests/components/inboundtranslationslice/InboundTranslationSliceCallbackTest.res +241 -0
  277. package/tests/components/inboundtranslationslice/InboundTranslationSliceCallbackTest.res.mjs +239 -0
  278. package/tests/components/inboundtranslationslice/InboundTranslationSliceFixtures.res +36 -0
  279. package/tests/components/inboundtranslationslice/InboundTranslationSliceFixtures.res.mjs +73 -0
  280. package/tests/components/outboundtranslationslice/OutboundTranslationSliceCallbackTest.res +191 -0
  281. package/tests/components/outboundtranslationslice/OutboundTranslationSliceCallbackTest.res.mjs +297 -0
  282. package/tests/components/outboundtranslationslice/OutboundTranslationSliceFixtures.res +78 -0
  283. package/tests/components/outboundtranslationslice/OutboundTranslationSliceFixtures.res.mjs +137 -0
  284. package/tests/components/querydb/QueryDbFixtures.res +39 -0
  285. package/tests/components/querydb/QueryDbFixtures.res.mjs +73 -0
  286. package/tests/components/querydb/QueryDbSubIdFixtures.res +44 -0
  287. package/tests/components/querydb/QueryDbSubIdFixtures.res.mjs +80 -0
  288. package/tests/components/querydb/QueryDbSubIdTest.res +104 -0
  289. package/tests/components/querydb/QueryDbSubIdTest.res.mjs +104 -0
  290. package/tests/components/querydb/QueryDbTest.res +81 -0
  291. package/tests/components/querydb/QueryDbTest.res.mjs +126 -0
  292. package/tests/components/readmodel/DcbReadModelE2EFixtures.res +215 -0
  293. package/tests/components/readmodel/DcbReadModelE2EFixtures.res.mjs +308 -0
  294. package/tests/components/readmodel/DcbReadModelE2ETest.res +45 -0
  295. package/tests/components/readmodel/DcbReadModelE2ETest.res.mjs +37 -0
  296. package/tests/components/readmodel/DcbReadModelTypoFailFastTest.res +88 -0
  297. package/tests/components/readmodel/DcbReadModelTypoFailFastTest.res.mjs +152 -0
  298. package/tests/components/readmodel/MixedSourceReadModelFixtures.res +181 -0
  299. package/tests/components/readmodel/MixedSourceReadModelFixtures.res.mjs +277 -0
  300. package/tests/components/readmodel/MixedSourceReadModelTest.res +61 -0
  301. package/tests/components/readmodel/MixedSourceReadModelTest.res.mjs +68 -0
  302. package/tests/components/readmodel/ReadModelFixtures.res +138 -0
  303. package/tests/components/readmodel/ReadModelFixtures.res.mjs +169 -0
  304. package/tests/components/readmodel/ReadModelTest.res +46 -0
  305. package/tests/components/readmodel/ReadModelTest.res.mjs +36 -0
  306. package/tests/components/scheduler/SchedulerFixtures.res +59 -0
  307. package/tests/components/scheduler/SchedulerFixtures.res.mjs +63 -0
  308. package/tests/components/scheduler/SchedulerTest.res +76 -0
  309. package/tests/components/scheduler/SchedulerTest.res.mjs +86 -0
  310. package/tests/components/sideeffecthandler/SideEffectHandlerFixtures.res +133 -0
  311. package/tests/components/sideeffecthandler/SideEffectHandlerFixtures.res.mjs +149 -0
  312. package/tests/components/sideeffecthandler/SideEffectHandlerTest.res +39 -0
  313. package/tests/components/sideeffecthandler/SideEffectHandlerTest.res.mjs +28 -0
  314. package/tests/components/stateviewslice/StateViewSliceFixtures.res +117 -0
  315. package/tests/components/stateviewslice/StateViewSliceFixtures.res.mjs +188 -0
  316. package/tests/components/stateviewslice/StateViewSliceSubIdFixtures.res +117 -0
  317. package/tests/components/stateviewslice/StateViewSliceSubIdFixtures.res.mjs +183 -0
  318. package/tests/components/stateviewslice/StateViewSliceSubIdTest.res +78 -0
  319. package/tests/components/stateviewslice/StateViewSliceSubIdTest.res.mjs +107 -0
  320. package/tests/components/stateviewslice/StateViewSliceTest.res +59 -0
  321. package/tests/components/stateviewslice/StateViewSliceTest.res.mjs +72 -0
  322. package/tests/components/task/TaskFixtures.res +87 -0
  323. package/tests/components/task/TaskFixtures.res.mjs +82 -0
  324. package/tests/components/task/TaskTest.res +98 -0
  325. package/tests/components/task/TaskTest.res.mjs +46 -0
  326. package/tests/plugin/PluginBehavior_GWT.res +146 -0
  327. package/tests/plugin/PluginBehavior_GWT.res.mjs +281 -0
  328. package/tests/plugin/Plugin_Fixtures.res +61 -0
  329. package/tests/plugin/Plugin_Fixtures.res.mjs +105 -0
  330. package/tests/plugin/PluginsProjection_GWT.res +95 -0
  331. package/tests/plugin/PluginsProjection_GWT.res.mjs +120 -0
  332. package/tests/plugin/UIFragmentRegistryProjection_GWT.res +72 -0
  333. package/tests/plugin/UIFragmentRegistryProjection_GWT.res.mjs +117 -0
  334. package/tests/setup/sqliteGlobal.cjs +12 -0
@@ -0,0 +1,84 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Stdlib_Dict from "@rescript/runtime/lib/es6/Stdlib_Dict.js";
4
+ import * as Pulumi from "@pulumi/pulumi";
5
+ import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
6
+ import * as Adapter$ReventlessInfra from "@reventlessdev/reventless-infra/src/adapter/Adapter.res.mjs";
7
+
8
+ function Make(Bus) {
9
+ let activeTimers = {
10
+ contents: {}
11
+ };
12
+ let rateToMs = rate => {
13
+ switch (rate.TAG) {
14
+ case "Single" :
15
+ return 0;
16
+ case "Minutes" :
17
+ return (rate._0 * 60 | 0) * 1000 | 0;
18
+ case "Hours" :
19
+ return ((rate._0 * 60 | 0) * 60 | 0) * 1000 | 0;
20
+ case "Days" :
21
+ return (((rate._0 * 24 | 0) * 60 | 0) * 60 | 0) * 1000 | 0;
22
+ default:
23
+ return 86400000;
24
+ }
25
+ };
26
+ let isSingleShot = rate => rate.TAG === "Single";
27
+ let scheduleMeta = {
28
+ service: "Scheduler",
29
+ time: "",
30
+ ip: "",
31
+ user: "Scheduler",
32
+ msgId: "",
33
+ correlationId: ""
34
+ };
35
+ let make = (param, param$1) => {
36
+ let createSchedule = async (channelResources, schedule) => {
37
+ let topicName = channelResources.length !== 0 ? channelResources[0].name : "";
38
+ let payloadJson;
39
+ try {
40
+ payloadJson = JSON.parse(schedule.payload);
41
+ } catch (exn) {
42
+ payloadJson = schedule.payload;
43
+ }
44
+ let fire = () => {
45
+ Bus.publishEvent(topicName, "Scheduler", scheduleMeta, payloadJson);
46
+ };
47
+ let handle = isSingleShot(schedule.rate) ? setTimeout(fire, 0) : setInterval(fire, rateToMs(schedule.rate));
48
+ activeTimers.contents[schedule.name] = handle;
49
+ };
50
+ let deleteSchedule = async (param, name) => {
51
+ let handle = activeTimers.contents[name];
52
+ if (handle !== undefined) {
53
+ clearTimeout(Primitive_option.valFromOption(handle));
54
+ return Stdlib_Dict.$$delete(activeTimers.contents, name);
55
+ }
56
+ };
57
+ return {
58
+ resource: Adapter$ReventlessInfra.make(Pulumi.output(""), Pulumi.output(""), Pulumi.output(""), Pulumi.output("memory:InMemory"), undefined, undefined, undefined, undefined, undefined, undefined),
59
+ operations: Pulumi.output({
60
+ createSchedule: createSchedule,
61
+ deleteSchedule: deleteSchedule
62
+ })
63
+ };
64
+ };
65
+ let reset = () => {
66
+ Object.values(activeTimers.contents).forEach(prim => {
67
+ clearTimeout(prim);
68
+ });
69
+ activeTimers.contents = {};
70
+ };
71
+ return {
72
+ activeTimers: activeTimers,
73
+ rateToMs: rateToMs,
74
+ isSingleShot: isSingleShot,
75
+ scheduleMeta: scheduleMeta,
76
+ make: make,
77
+ reset: reset
78
+ };
79
+ }
80
+
81
+ export {
82
+ Make,
83
+ }
84
+ /* @pulumi/pulumi Not a pure module */
@@ -0,0 +1,52 @@
1
+ // Wraps node:sqlite (Node ≥ 22.5). Synchronous API on purpose: it preserves
2
+ // the same-tick settling guarantees the in-memory adapters rely on.
3
+
4
+ type t
5
+ type statement
6
+
7
+ @module("node:sqlite") @new
8
+ external openDatabaseSync: string => t = "DatabaseSync"
9
+
10
+ @module("node:path") external dirname: string => string = "dirname"
11
+ type mkdirOpts = {recursive: bool}
12
+ @module("node:fs") external mkdirSync: (string, mkdirOpts) => unit = "mkdirSync"
13
+
14
+ @send external _close: t => unit = "close"
15
+ @send external _exec: (t, string) => unit = "exec"
16
+ @send external _prepare: (t, string) => statement = "prepare"
17
+
18
+ // node:sqlite accepts ...positional bound values. Use Function.prototype.apply
19
+ // via a small inline helper so the array is splatted without ReScript's
20
+ // `@send` syntax accidentally treating `run.apply` as a single property name.
21
+ let _runApply: (statement, array<JSON.t>) => unit = %raw(`function(s, a) { return s.run.apply(s, a); }`)
22
+ let _getApply: (statement, array<JSON.t>) => Nullable.t<dict<JSON.t>> = %raw(`function(s, a) { return s.get.apply(s, a); }`)
23
+ let _allApply: (statement, array<JSON.t>) => array<dict<JSON.t>> = %raw(`function(s, a) { return s.all.apply(s, a); }`)
24
+ let _iterateApply: (statement, array<JSON.t>) => Iterator.t<dict<JSON.t>> = %raw(`function(s, a) { return s.iterate.apply(s, a); }`)
25
+
26
+ let openDb = (~path) => {
27
+ if path !== ":memory:" {
28
+ mkdirSync(dirname(path), {recursive: true})
29
+ }
30
+ openDatabaseSync(path)
31
+ }
32
+ let close = db => _close(db)
33
+ let exec = (db, sql) => _exec(db, sql)
34
+ let prepare = (db, sql) => _prepare(db, sql)
35
+
36
+ let run = (stmt, args) => _runApply(stmt, args)
37
+ let get = (stmt, args) => _getApply(stmt, args)->Nullable.toOption
38
+ let all = (stmt, args) => _allApply(stmt, args)
39
+ let iterate = (stmt, args) => _iterateApply(stmt, args)
40
+
41
+ let transaction = (db, fn) => {
42
+ exec(db, "BEGIN")
43
+ try {
44
+ let result = fn()
45
+ exec(db, "COMMIT")
46
+ result
47
+ } catch {
48
+ | exn =>
49
+ exec(db, "ROLLBACK")
50
+ throw(exn)
51
+ }
52
+ }
@@ -0,0 +1,76 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Nodefs from "node:fs";
4
+ import * as Nodepath from "node:path";
5
+ import * as Nodesqlite from "node:sqlite";
6
+ import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
7
+
8
+ let _runApply = (function(s, a) { return s.run.apply(s, a); });
9
+
10
+ let _getApply = (function(s, a) { return s.get.apply(s, a); });
11
+
12
+ let _allApply = (function(s, a) { return s.all.apply(s, a); });
13
+
14
+ let _iterateApply = (function(s, a) { return s.iterate.apply(s, a); });
15
+
16
+ function openDb(path) {
17
+ if (path !== ":memory:") {
18
+ Nodefs.mkdirSync(Nodepath.dirname(path), {
19
+ recursive: true
20
+ });
21
+ }
22
+ return new Nodesqlite.DatabaseSync(path);
23
+ }
24
+
25
+ function close(db) {
26
+ db.close();
27
+ }
28
+
29
+ function exec(db, sql) {
30
+ db.exec(sql);
31
+ }
32
+
33
+ function prepare(db, sql) {
34
+ return db.prepare(sql);
35
+ }
36
+
37
+ function run(stmt, args) {
38
+ _runApply(stmt, args);
39
+ }
40
+
41
+ function get(stmt, args) {
42
+ return Primitive_option.fromNullable(_getApply(stmt, args));
43
+ }
44
+
45
+ function all(stmt, args) {
46
+ return _allApply(stmt, args);
47
+ }
48
+
49
+ function iterate(stmt, args) {
50
+ return _iterateApply(stmt, args);
51
+ }
52
+
53
+ function transaction(db, fn) {
54
+ db.exec("BEGIN");
55
+ try {
56
+ let result = fn();
57
+ db.exec("COMMIT");
58
+ return result;
59
+ } catch (exn) {
60
+ db.exec("ROLLBACK");
61
+ throw exn;
62
+ }
63
+ }
64
+
65
+ export {
66
+ openDb,
67
+ close,
68
+ exec,
69
+ prepare,
70
+ run,
71
+ get,
72
+ all,
73
+ iterate,
74
+ transaction,
75
+ }
76
+ /* node:fs Not a pure module */
@@ -0,0 +1,31 @@
1
+ // Sealed wrapper around an embedded SQLite driver.
2
+ //
3
+ // Currently uses Node's built-in node:sqlite (Node ≥ 22.5). The interface is
4
+ // kept tight enough that other drivers (better-sqlite3, bun:sqlite) can be
5
+ // dropped in later without callers changing.
6
+
7
+ type t
8
+ type statement
9
+
10
+ let openDb: (~path: string) => t
11
+ let close: t => unit
12
+
13
+ // Execute one or more statements without parameter binding (DDL, PRAGMA, BEGIN/COMMIT).
14
+ let exec: (t, string) => unit
15
+
16
+ let prepare: (t, string) => statement
17
+
18
+ // Bind positional parameters and run a non-SELECT statement.
19
+ let run: (statement, array<JSON.t>) => unit
20
+
21
+ // Bind and return the first row, or None.
22
+ let get: (statement, array<JSON.t>) => option<dict<JSON.t>>
23
+
24
+ // Bind and return all rows.
25
+ let all: (statement, array<JSON.t>) => array<dict<JSON.t>>
26
+
27
+ // Bind and return rows lazily as a JS iterator. Caller is responsible for draining.
28
+ let iterate: (statement, array<JSON.t>) => Iterator.t<dict<JSON.t>>
29
+
30
+ // Run a function inside BEGIN/COMMIT. Rolls back on any thrown exception.
31
+ let transaction: (t, unit => 'a) => 'a
@@ -0,0 +1,75 @@
1
+ // In-memory task bucket.
2
+ // No S3 buckets created; makeHandler calls the callback with extracted event fields.
3
+
4
+ open ReventlessCore
5
+
6
+ type runtimeParts = LocalRuntimeEnvironment.parts
7
+ type callbackEvent = JSON.t
8
+ type context = unit
9
+ type bucketParts = unit
10
+
11
+ let connect: Task_Adapter.connect<bucketParts, runtimeParts> = (
12
+ ~name as _,
13
+ ~bucket as _,
14
+ ~bucketMode as _,
15
+ ~commandTopics as _,
16
+ ~runtime as _,
17
+ ~opts as _,
18
+ ) => ()
19
+
20
+ let makeHandler = (callback: Task.bucketCallback): Runtime.eventHandler<
21
+ callbackEvent,
22
+ context,
23
+ array<Task.taskAction>,
24
+ > => {
25
+ async (json, _ctx) => {
26
+ let eventName = switch json {
27
+ | JSON.Object(d) =>
28
+ d
29
+ ->Dict.get("eventName")
30
+ ->Option.flatMap(j =>
31
+ switch j {
32
+ | JSON.String(s) => Some(s)
33
+ | _ => None
34
+ }
35
+ )
36
+ ->Option.getOr("ObjectCreated")
37
+ | _ => "ObjectCreated"
38
+ }
39
+ let key = switch json {
40
+ | JSON.Object(d) =>
41
+ d
42
+ ->Dict.get("key")
43
+ ->Option.flatMap(j =>
44
+ switch j {
45
+ | JSON.String(s) => Some(s)
46
+ | _ => None
47
+ }
48
+ )
49
+ ->Option.getOr("")
50
+ | _ => ""
51
+ }
52
+ await callback(~eventName, ~key)
53
+ }
54
+ }
55
+
56
+ let make: Task_Adapter.bucketMaker<bucketParts> = (~name, ~opts as _) => {
57
+ // When SQLite is the active backend, eagerly provision the task_object
58
+ // table so put/get helpers can be used outside the bucketMaker contract.
59
+ switch BackendState.getDb() {
60
+ | Some(db) => TaskBucket_Sqlite.ensureSchema(db)
61
+ | None => ()
62
+ }
63
+ // Return a single dummy resource so Task_Builder can access Array.getUnsafe(0).id.
64
+ {
65
+ resources: [
66
+ ReventlessInfra.Adapter.make(
67
+ ~name=name->Pulumi.Output.make,
68
+ ~id=name->Pulumi.Output.make,
69
+ ~urn=("urn:" ++ name)->Pulumi.Output.make,
70
+ ~service="memory:InMemory"->Pulumi.Output.make,
71
+ ),
72
+ ],
73
+ parts: (),
74
+ }
75
+ }
@@ -0,0 +1,48 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
4
+ import * as Pulumi from "@pulumi/pulumi";
5
+ import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
6
+ import * as Adapter$ReventlessInfra from "@reventlessdev/reventless-infra/src/adapter/Adapter.res.mjs";
7
+ import * as BackendState$ReventlessLocal from "../BackendState.res.mjs";
8
+ import * as TaskBucket_Sqlite$ReventlessLocal from "./TaskBucket_Sqlite.res.mjs";
9
+
10
+ function connect(param, param$1, param$2, param$3, param$4, param$5) {
11
+
12
+ }
13
+
14
+ function makeHandler(callback) {
15
+ return async (json, _ctx) => {
16
+ let eventName;
17
+ eventName = typeof json === "object" && json !== null && !Array.isArray(json) ? Stdlib_Option.getOr(Stdlib_Option.flatMap(json["eventName"], j => {
18
+ if (typeof j === "string") {
19
+ return j;
20
+ }
21
+ }), "ObjectCreated") : "ObjectCreated";
22
+ let key;
23
+ key = typeof json === "object" && json !== null && !Array.isArray(json) ? Stdlib_Option.getOr(Stdlib_Option.flatMap(json["key"], j => {
24
+ if (typeof j === "string") {
25
+ return j;
26
+ }
27
+ }), "") : "";
28
+ return await callback(eventName, key);
29
+ };
30
+ }
31
+
32
+ function make(name, param) {
33
+ let db = BackendState$ReventlessLocal.getDb();
34
+ if (db !== undefined) {
35
+ TaskBucket_Sqlite$ReventlessLocal.ensureSchema(Primitive_option.valFromOption(db));
36
+ }
37
+ return {
38
+ resources: [Adapter$ReventlessInfra.make(Pulumi.output(name), Pulumi.output(name), Pulumi.output("urn:" + name), Pulumi.output("memory:InMemory"), undefined, undefined, undefined, undefined, undefined, undefined)],
39
+ parts: undefined
40
+ };
41
+ }
42
+
43
+ export {
44
+ connect,
45
+ makeHandler,
46
+ make,
47
+ }
48
+ /* @pulumi/pulumi Not a pure module */
@@ -0,0 +1,47 @@
1
+ // SQLite-backed task bucket.
2
+ //
3
+ // The in-memory Task_Builder treats the bucket as opaque: it only needs a
4
+ // resource to identify the bucket. There is no read/write contract on the
5
+ // bucketMaker today, so the SQLite variant just provisions a table for
6
+ // future task-replay tooling and exposes plain put/get helpers that
7
+ // callers can use directly.
8
+ //
9
+ // Schema:
10
+ // CREATE TABLE task_object (
11
+ // bucket TEXT NOT NULL,
12
+ // key TEXT NOT NULL,
13
+ // body BLOB NOT NULL,
14
+ // PRIMARY KEY (bucket, key)
15
+ // )
16
+
17
+ let ensureSchema = (db: SqliteDriver.t) =>
18
+ db->SqliteDriver.exec(
19
+ "CREATE TABLE IF NOT EXISTS task_object (bucket TEXT NOT NULL, key TEXT NOT NULL, body BLOB NOT NULL, PRIMARY KEY (bucket, key))",
20
+ )
21
+
22
+ let put = (~db: SqliteDriver.t, ~bucket: string, ~key: string, ~body: string): unit => {
23
+ ensureSchema(db)
24
+ let stmt = db->SqliteDriver.prepare(
25
+ "INSERT INTO task_object(bucket, key, body) VALUES(?, ?, ?) ON CONFLICT(bucket, key) DO UPDATE SET body = excluded.body",
26
+ )
27
+ stmt->SqliteDriver.run([
28
+ JSON.Encode.string(bucket),
29
+ JSON.Encode.string(key),
30
+ JSON.Encode.string(body),
31
+ ])
32
+ }
33
+
34
+ let get = (~db: SqliteDriver.t, ~bucket: string, ~key: string): option<string> => {
35
+ ensureSchema(db)
36
+ let stmt = db->SqliteDriver.prepare(
37
+ "SELECT body FROM task_object WHERE bucket = ? AND key = ?",
38
+ )
39
+ switch stmt->SqliteDriver.get([JSON.Encode.string(bucket), JSON.Encode.string(key)]) {
40
+ | Some(row) =>
41
+ switch row->Dict.get("body") {
42
+ | Some(JSON.String(s)) => Some(s)
43
+ | _ => None
44
+ }
45
+ | None => None
46
+ }
47
+ }
@@ -0,0 +1,40 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as SqliteDriver$ReventlessLocal from "../SqliteDriver.res.mjs";
4
+
5
+ function ensureSchema(db) {
6
+ SqliteDriver$ReventlessLocal.exec(db, "CREATE TABLE IF NOT EXISTS task_object (bucket TEXT NOT NULL, key TEXT NOT NULL, body BLOB NOT NULL, PRIMARY KEY (bucket, key))");
7
+ }
8
+
9
+ function put(db, bucket, key, body) {
10
+ SqliteDriver$ReventlessLocal.exec(db, "CREATE TABLE IF NOT EXISTS task_object (bucket TEXT NOT NULL, key TEXT NOT NULL, body BLOB NOT NULL, PRIMARY KEY (bucket, key))");
11
+ let stmt = SqliteDriver$ReventlessLocal.prepare(db, "INSERT INTO task_object(bucket, key, body) VALUES(?, ?, ?) ON CONFLICT(bucket, key) DO UPDATE SET body = excluded.body");
12
+ SqliteDriver$ReventlessLocal.run(stmt, [
13
+ bucket,
14
+ key,
15
+ body
16
+ ]);
17
+ }
18
+
19
+ function get(db, bucket, key) {
20
+ SqliteDriver$ReventlessLocal.exec(db, "CREATE TABLE IF NOT EXISTS task_object (bucket TEXT NOT NULL, key TEXT NOT NULL, body BLOB NOT NULL, PRIMARY KEY (bucket, key))");
21
+ let stmt = SqliteDriver$ReventlessLocal.prepare(db, "SELECT body FROM task_object WHERE bucket = ? AND key = ?");
22
+ let row = SqliteDriver$ReventlessLocal.get(stmt, [
23
+ bucket,
24
+ key
25
+ ]);
26
+ if (row === undefined) {
27
+ return;
28
+ }
29
+ let match = row["body"];
30
+ if (typeof match === "string") {
31
+ return match;
32
+ }
33
+ }
34
+
35
+ export {
36
+ ensureSchema,
37
+ put,
38
+ get,
39
+ }
40
+ /* SqliteDriver-ReventlessLocal Not a pure module */
@@ -0,0 +1,55 @@
1
+ // In-memory aggregate builder.
2
+ // Wires in-memory adapters and delegates to ReventlessCore.Aggregate_Builder.Make.
3
+
4
+ let noHooks: ReventlessCore.Plugin_Helpers.platformHooks = {
5
+ adminExtensionPoints: ref(Pulumi.Output.make(Dict.make())),
6
+ scheduler: ref(None),
7
+ schedulerRoleUrn: ref(Pulumi.Output.make("")),
8
+ api: ref(None),
9
+ apiRole: ref(None),
10
+ deployTarget: ref("Domain"),
11
+ }
12
+
13
+ // MakeWithHooks — full version used by the Platform (passes hook callbacks to core builder).
14
+ module MakeWithHooks = (
15
+ Bus: LocalBus.T,
16
+ HooksConfig: ReventlessCore.Plugin_Helpers.HooksConfig,
17
+ ) => {
18
+ module RuntimeEnvironment = LocalRuntimeEnvironment
19
+ module CommandTopicChannel = LocalCommandTopicChannel.Make(Bus)
20
+ module EventTopicPublisher = LocalEventTopicPublisher.Make(Bus)
21
+ module EventCollectorChannel = LocalEventCollectorChannel.Make(Bus)
22
+ module AggregateRuntimeBuilder = LocalAggregateRuntime_Builder.Make(
23
+ Bus,
24
+ CommandTopicChannel,
25
+ EventCollectorChannel,
26
+ )
27
+
28
+ module Make = (
29
+ Spec: Reventless.Aggregate.Spec,
30
+ Behavior: Reventless.Behavior.T with module Spec := Spec,
31
+ EventMappings: ReventlessInfra.EventMapper.Mappings with module Target := Spec,
32
+ ) => {
33
+ include ReventlessCore.Aggregate_Builder.Make(
34
+ Spec,
35
+ Behavior,
36
+ EventMappings,
37
+ RuntimeEnvironment,
38
+ CommandGeneratorResolvers_GraphQL,
39
+ CommandTopicChannel,
40
+ EventLogStorage_InMemory.Make(Bus),
41
+ EventTopicPublisher,
42
+ EventCollectorChannel,
43
+ AggregateRuntimeBuilder,
44
+ HooksConfig,
45
+ )
46
+ // Re-shadow `operations` with explicit spec return type so callers without
47
+ // reventless in scope can still access ops.publishJsons (transparent alias).
48
+ let operations: component => Pulumi.Output.t<ReventlessInfra.Aggregate.operations> = operations
49
+ }
50
+ }
51
+
52
+ // Make — simple version for standalone tests and examples (no hook callbacks).
53
+ module Make = (Bus: LocalBus.T) => {
54
+ include MakeWithHooks(Bus, {let hooks = noHooks})
55
+ }
@@ -0,0 +1,140 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Pulumi from "@pulumi/pulumi";
4
+ import * as Aggregate_Builder$ReventlessCore from "@reventlessdev/reventless-core/src/components/Aggregate/Aggregate_Builder.res.mjs";
5
+ import * as LocalRuntimeEnvironment$ReventlessLocal from "../adapter/Runtime/LocalRuntimeEnvironment.res.mjs";
6
+ import * as EventLogStorage_InMemory$ReventlessLocal from "../adapter/EventLog/EventLogStorage_InMemory.res.mjs";
7
+ import * as LocalCommandTopicChannel$ReventlessLocal from "../adapter/CommandTopic/LocalCommandTopicChannel.res.mjs";
8
+ import * as LocalEventTopicPublisher$ReventlessLocal from "../adapter/EventTopic/LocalEventTopicPublisher.res.mjs";
9
+ import * as LocalEventCollectorChannel$ReventlessLocal from "../adapter/EventCollector/LocalEventCollectorChannel.res.mjs";
10
+ import * as LocalAggregateRuntime_Builder$ReventlessLocal from "../adapter/Runtime/LocalAggregateRuntime_Builder.res.mjs";
11
+ import * as CommandGeneratorResolvers_GraphQL$ReventlessLocal from "../adapter/CommandGenerator/CommandGeneratorResolvers_GraphQL.res.mjs";
12
+
13
+ let noHooks_adminExtensionPoints = {
14
+ contents: Pulumi.output({})
15
+ };
16
+
17
+ let noHooks_scheduler = {
18
+ contents: undefined
19
+ };
20
+
21
+ let noHooks_schedulerRoleUrn = {
22
+ contents: Pulumi.output("")
23
+ };
24
+
25
+ let noHooks_api = {
26
+ contents: undefined
27
+ };
28
+
29
+ let noHooks_apiRole = {
30
+ contents: undefined
31
+ };
32
+
33
+ let noHooks_deployTarget = {
34
+ contents: "Domain"
35
+ };
36
+
37
+ let noHooks = {
38
+ adminExtensionPoints: noHooks_adminExtensionPoints,
39
+ scheduler: noHooks_scheduler,
40
+ schedulerRoleUrn: noHooks_schedulerRoleUrn,
41
+ api: noHooks_api,
42
+ apiRole: noHooks_apiRole,
43
+ deployTarget: noHooks_deployTarget
44
+ };
45
+
46
+ function MakeWithHooks(Bus) {
47
+ return HooksConfig => {
48
+ let CommandTopicChannel = LocalCommandTopicChannel$ReventlessLocal.Make(Bus);
49
+ let EventTopicPublisher = LocalEventTopicPublisher$ReventlessLocal.Make(Bus);
50
+ let EventCollectorChannel = LocalEventCollectorChannel$ReventlessLocal.Make(Bus);
51
+ let AggregateRuntimeBuilder = LocalAggregateRuntime_Builder$ReventlessLocal.Make(Bus)({
52
+ make: CommandTopicChannel.make
53
+ })(EventCollectorChannel);
54
+ let Make = Spec => (Behavior => (EventMappings => {
55
+ let include = Aggregate_Builder$ReventlessCore.Make(Spec)(Behavior)({
56
+ mappings: EventMappings.mappings,
57
+ counter: EventMappings.counter
58
+ })({
59
+ make: LocalRuntimeEnvironment$ReventlessLocal.make,
60
+ groupBySource: LocalRuntimeEnvironment$ReventlessLocal.groupBySource,
61
+ extractCorrelationId: LocalRuntimeEnvironment$ReventlessLocal.extractCorrelationId,
62
+ asEventHandler: prim => prim,
63
+ asEffectHandler: prim => prim
64
+ })({
65
+ handleResolversEvent: CommandGeneratorResolvers_GraphQL$ReventlessLocal.handleResolversEvent,
66
+ make: CommandGeneratorResolvers_GraphQL$ReventlessLocal.make
67
+ })({
68
+ make: CommandTopicChannel.make
69
+ })(EventLogStorage_InMemory$ReventlessLocal.Make(Bus))(EventTopicPublisher)(EventCollectorChannel)(AggregateRuntimeBuilder)(HooksConfig);
70
+ return {
71
+ Spec: include.Spec,
72
+ AggregateRuntimeBuilder: include.AggregateRuntimeBuilder,
73
+ make: include.make,
74
+ outputs: include.outputs,
75
+ finish: include.finish,
76
+ operations: include.operations
77
+ };
78
+ }));
79
+ return {
80
+ RuntimeEnvironment: undefined,
81
+ CommandTopicChannel: CommandTopicChannel,
82
+ EventTopicPublisher: EventTopicPublisher,
83
+ EventCollectorChannel: EventCollectorChannel,
84
+ AggregateRuntimeBuilder: AggregateRuntimeBuilder,
85
+ Make: Make
86
+ };
87
+ };
88
+ }
89
+
90
+ function Make(Bus) {
91
+ let HooksConfig = {
92
+ hooks: noHooks
93
+ };
94
+ let CommandTopicChannel = LocalCommandTopicChannel$ReventlessLocal.Make(Bus);
95
+ let EventTopicPublisher = LocalEventTopicPublisher$ReventlessLocal.Make(Bus);
96
+ let EventCollectorChannel = LocalEventCollectorChannel$ReventlessLocal.Make(Bus);
97
+ let AggregateRuntimeBuilder = LocalAggregateRuntime_Builder$ReventlessLocal.Make(Bus)({
98
+ make: CommandTopicChannel.make
99
+ })(EventCollectorChannel);
100
+ let Make$1 = Spec => (Behavior => (EventMappings => {
101
+ let include = Aggregate_Builder$ReventlessCore.Make(Spec)(Behavior)({
102
+ mappings: EventMappings.mappings,
103
+ counter: EventMappings.counter
104
+ })({
105
+ make: LocalRuntimeEnvironment$ReventlessLocal.make,
106
+ groupBySource: LocalRuntimeEnvironment$ReventlessLocal.groupBySource,
107
+ extractCorrelationId: LocalRuntimeEnvironment$ReventlessLocal.extractCorrelationId,
108
+ asEventHandler: prim => prim,
109
+ asEffectHandler: prim => prim
110
+ })({
111
+ handleResolversEvent: CommandGeneratorResolvers_GraphQL$ReventlessLocal.handleResolversEvent,
112
+ make: CommandGeneratorResolvers_GraphQL$ReventlessLocal.make
113
+ })({
114
+ make: CommandTopicChannel.make
115
+ })(EventLogStorage_InMemory$ReventlessLocal.Make(Bus))(EventTopicPublisher)(EventCollectorChannel)(AggregateRuntimeBuilder)(HooksConfig);
116
+ return {
117
+ Spec: include.Spec,
118
+ AggregateRuntimeBuilder: include.AggregateRuntimeBuilder,
119
+ make: include.make,
120
+ outputs: include.outputs,
121
+ finish: include.finish,
122
+ operations: include.operations
123
+ };
124
+ }));
125
+ return {
126
+ RuntimeEnvironment: undefined,
127
+ CommandTopicChannel: CommandTopicChannel,
128
+ EventTopicPublisher: EventTopicPublisher,
129
+ EventCollectorChannel: EventCollectorChannel,
130
+ AggregateRuntimeBuilder: AggregateRuntimeBuilder,
131
+ Make: Make$1
132
+ };
133
+ }
134
+
135
+ export {
136
+ noHooks,
137
+ MakeWithHooks,
138
+ Make,
139
+ }
140
+ /* noHooks Not a pure module */