@event-driven-io/emmett 0.35.0 → 0.36.0

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/dist/index.cjs CHANGED
@@ -824,6 +824,12 @@ var getInMemoryDatabase = () => {
824
824
  const firstOne = _nullishCoalesce(_optionalChain([filteredDocuments, 'optionalAccess', _42 => _42[0]]), () => ( null));
825
825
  return firstOne;
826
826
  },
827
+ find: (predicate) => {
828
+ ensureCollectionCreated();
829
+ const documentsInCollection = storage.get(collectionName);
830
+ const filteredDocuments = predicate ? _optionalChain([documentsInCollection, 'optionalAccess', _43 => _43.filter, 'call', _44 => _44((doc) => predicate(doc))]) : documentsInCollection;
831
+ return filteredDocuments;
832
+ },
827
833
  deleteOne: (predicate) => {
828
834
  ensureCollectionCreated();
829
835
  const documentsInCollection = storage.get(collectionName);
@@ -841,11 +847,11 @@ var getInMemoryDatabase = () => {
841
847
  { operationName: "deleteOne", collectionName, errors }
842
848
  );
843
849
  } else {
844
- const newCollection = documentsInCollection.toSpliced(
850
+ const newCollection2 = documentsInCollection.toSpliced(
845
851
  foundIndex,
846
852
  1
847
853
  );
848
- storage.set(collectionName, newCollection);
854
+ storage.set(collectionName, newCollection2);
849
855
  return operationResult(
850
856
  {
851
857
  successful: true,
@@ -855,25 +861,24 @@ var getInMemoryDatabase = () => {
855
861
  { operationName: "deleteOne", collectionName, errors }
856
862
  );
857
863
  }
858
- } else {
859
- const newCollection = documentsInCollection.slice(1);
860
- storage.set(collectionName, newCollection);
861
- return operationResult(
862
- {
863
- successful: true,
864
- matchedCount: 1,
865
- deletedCount: 1
866
- },
867
- { operationName: "deleteOne", collectionName, errors }
868
- );
869
864
  }
865
+ const newCollection = documentsInCollection.slice(1);
866
+ storage.set(collectionName, newCollection);
867
+ return operationResult(
868
+ {
869
+ successful: true,
870
+ matchedCount: 1,
871
+ deletedCount: 1
872
+ },
873
+ { operationName: "deleteOne", collectionName, errors }
874
+ );
870
875
  },
871
876
  replaceOne: (predicate, document, options) => {
872
877
  ensureCollectionCreated();
873
878
  const documentsInCollection = storage.get(collectionName);
874
879
  const foundIndexes = documentsInCollection.filter((doc) => predicate(doc)).map((_, index) => index);
875
880
  const firstIndex = foundIndexes[0];
876
- if (!firstIndex || firstIndex === -1) {
881
+ if (firstIndex === void 0 || firstIndex === -1) {
877
882
  return operationResult(
878
883
  {
879
884
  successful: false,
@@ -885,7 +890,7 @@ var getInMemoryDatabase = () => {
885
890
  );
886
891
  }
887
892
  const existing = documentsInCollection[firstIndex];
888
- if (typeof _optionalChain([options, 'optionalAccess', _43 => _43.expectedVersion]) === "bigint" && existing._version !== options.expectedVersion) {
893
+ if (typeof _optionalChain([options, 'optionalAccess', _45 => _45.expectedVersion]) === "bigint" && existing._version !== options.expectedVersion) {
889
894
  return operationResult(
890
895
  {
891
896
  successful: false,
@@ -916,7 +921,7 @@ var getInMemoryDatabase = () => {
916
921
  handle: (id, handle, options) => {
917
922
  const { expectedVersion: version, ...operationOptions } = _nullishCoalesce(options, () => ( {}));
918
923
  ensureCollectionCreated();
919
- const existing = collection.findOne((c) => c.id === id);
924
+ const existing = collection.findOne(({ _id }) => _id === id);
920
925
  const expectedVersion = expectedVersionValue(version);
921
926
  if (existing == null && version === "DOCUMENT_EXISTS" || existing == null && expectedVersion != null || existing != null && version === "DOCUMENT_DOES_NOT_EXIST" || existing != null && expectedVersion !== null && existing._version !== expectedVersion) {
922
927
  return operationResult(
@@ -1018,7 +1023,9 @@ var getInMemoryMessageBus = () => {
1018
1023
  `Cannot register handler for commands ${alreadyRegistered.join(", ")} as they're already registered!`
1019
1024
  );
1020
1025
  for (const commandType of commandTypes) {
1021
- allHandlers.set(commandType, [commandHandler]);
1026
+ allHandlers.set(commandType, [
1027
+ commandHandler
1028
+ ]);
1022
1029
  }
1023
1030
  },
1024
1031
  subscribe(eventHandler, ...eventTypes) {
@@ -1038,6 +1045,122 @@ var getInMemoryMessageBus = () => {
1038
1045
  };
1039
1046
  };
1040
1047
 
1048
+ // src/processors/processors.ts
1049
+ var MessageProcessorType = {
1050
+ PROJECTOR: "projector",
1051
+ REACTOR: "reactor"
1052
+ };
1053
+ var MessageProcessor = {
1054
+ result: {
1055
+ skip: (options) => ({
1056
+ type: "SKIP",
1057
+ ..._nullishCoalesce(options, () => ( {}))
1058
+ }),
1059
+ stop: (options) => ({
1060
+ type: "STOP",
1061
+ ..._nullishCoalesce(options, () => ( {}))
1062
+ })
1063
+ }
1064
+ };
1065
+ var defaultProcessingMessageProcessingScope = (handler, partialContext) => handler(partialContext);
1066
+ var reactor = (options) => {
1067
+ const eachMessage = "eachMessage" in options && options.eachMessage ? options.eachMessage : () => Promise.resolve();
1068
+ let isActive = true;
1069
+ const { checkpoints, processorId, partition } = options;
1070
+ const processingScope = _nullishCoalesce(options.processingScope, () => ( defaultProcessingMessageProcessingScope));
1071
+ return {
1072
+ id: options.processorId,
1073
+ type: _nullishCoalesce(options.type, () => ( MessageProcessorType.REACTOR)),
1074
+ close: () => _optionalChain([options, 'access', _46 => _46.hooks, 'optionalAccess', _47 => _47.onClose]) ? _optionalChain([options, 'access', _48 => _48.hooks, 'optionalAccess', _49 => _49.onClose, 'call', _50 => _50()]) : Promise.resolve(),
1075
+ start: async (startOptions) => {
1076
+ isActive = true;
1077
+ return await processingScope(async (context) => {
1078
+ if (_optionalChain([options, 'access', _51 => _51.hooks, 'optionalAccess', _52 => _52.onStart])) {
1079
+ await _optionalChain([options, 'access', _53 => _53.hooks, 'optionalAccess', _54 => _54.onStart, 'call', _55 => _55(context)]);
1080
+ }
1081
+ if (options.startFrom !== "CURRENT" && options.startFrom)
1082
+ return options.startFrom;
1083
+ let lastCheckpoint = null;
1084
+ if (checkpoints) {
1085
+ const readResult = await _optionalChain([checkpoints, 'optionalAccess', _56 => _56.read, 'call', _57 => _57(
1086
+ {
1087
+ processorId,
1088
+ partition
1089
+ },
1090
+ startOptions
1091
+ )]);
1092
+ lastCheckpoint = readResult.lastCheckpoint;
1093
+ }
1094
+ if (lastCheckpoint === null) return "BEGINNING";
1095
+ return {
1096
+ lastCheckpoint
1097
+ };
1098
+ }, startOptions);
1099
+ },
1100
+ get isActive() {
1101
+ return isActive;
1102
+ },
1103
+ handle: async (messages, partialContext) => {
1104
+ if (!isActive) return Promise.resolve();
1105
+ return await processingScope(async (context) => {
1106
+ let result = void 0;
1107
+ let lastCheckpoint = null;
1108
+ for (const message2 of messages) {
1109
+ const messageProcessingResult = await eachMessage(message2, context);
1110
+ if (checkpoints) {
1111
+ const storeCheckpointResult = await checkpoints.store(
1112
+ {
1113
+ processorId: options.processorId,
1114
+ version: options.version,
1115
+ message: message2,
1116
+ lastCheckpoint,
1117
+ partition: options.partition
1118
+ },
1119
+ context
1120
+ );
1121
+ if (storeCheckpointResult && storeCheckpointResult.success) {
1122
+ lastCheckpoint = storeCheckpointResult.newCheckpoint;
1123
+ }
1124
+ }
1125
+ if (messageProcessingResult && messageProcessingResult.type === "STOP") {
1126
+ isActive = false;
1127
+ result = messageProcessingResult;
1128
+ break;
1129
+ }
1130
+ if (options.stopAfter && options.stopAfter(message2)) {
1131
+ isActive = false;
1132
+ result = { type: "STOP", reason: "Stop condition reached" };
1133
+ break;
1134
+ }
1135
+ if (messageProcessingResult && messageProcessingResult.type === "SKIP")
1136
+ continue;
1137
+ }
1138
+ return result;
1139
+ }, partialContext);
1140
+ }
1141
+ };
1142
+ };
1143
+ var projector = (options) => {
1144
+ const { projection: projection2, ...rest } = options;
1145
+ return reactor({
1146
+ ...rest,
1147
+ type: MessageProcessorType.PROJECTOR,
1148
+ processorId: _nullishCoalesce(options.processorId, () => ( `projection:${projection2.name}`)),
1149
+ hooks: {
1150
+ onStart: options.truncateOnStart && options.projection.truncate || _optionalChain([options, 'access', _58 => _58.hooks, 'optionalAccess', _59 => _59.onStart]) ? async (context) => {
1151
+ if (options.truncateOnStart && options.projection.truncate)
1152
+ await options.projection.truncate(context);
1153
+ if (_optionalChain([options, 'access', _60 => _60.hooks, 'optionalAccess', _61 => _61.onStart])) await _optionalChain([options, 'access', _62 => _62.hooks, 'optionalAccess', _63 => _63.onStart, 'call', _64 => _64(context)]);
1154
+ } : void 0,
1155
+ onClose: _optionalChain([options, 'access', _65 => _65.hooks, 'optionalAccess', _66 => _66.onClose])
1156
+ },
1157
+ eachMessage: async (event2, context) => {
1158
+ if (!projection2.canHandle.includes(event2.type)) return;
1159
+ await projection2.handle([event2], context);
1160
+ }
1161
+ });
1162
+ };
1163
+
1041
1164
  // src/projections/index.ts
1042
1165
  var filterProjections = (type, projections2) => {
1043
1166
  const inlineProjections2 = projections2.filter((projection2) => projection2.type === type).map(({ projection: projection2 }) => projection2);
@@ -1190,7 +1313,7 @@ var CompositeDecoder = class {
1190
1313
  return decoder[1];
1191
1314
  }
1192
1315
  addToBuffer(data) {
1193
- _optionalChain([this, 'access', _44 => _44.decoderFor, 'call', _45 => _45(data), 'optionalAccess', _46 => _46.addToBuffer, 'call', _47 => _47(data)]);
1316
+ _optionalChain([this, 'access', _67 => _67.decoderFor, 'call', _68 => _68(data), 'optionalAccess', _69 => _69.addToBuffer, 'call', _70 => _70(data)]);
1194
1317
  }
1195
1318
  clearBuffer() {
1196
1319
  for (const decoder of this.decoders.map((d) => d[1])) {
@@ -1202,7 +1325,7 @@ var CompositeDecoder = class {
1202
1325
  }
1203
1326
  decode() {
1204
1327
  const decoder = this.decoders.map((d) => d[1]).find((d) => d.hasCompleteMessage());
1205
- return _nullishCoalesce(_optionalChain([decoder, 'optionalAccess', _48 => _48.decode, 'call', _49 => _49()]), () => ( null));
1328
+ return _nullishCoalesce(_optionalChain([decoder, 'optionalAccess', _71 => _71.decode, 'call', _72 => _72()]), () => ( null));
1206
1329
  }
1207
1330
  };
1208
1331
  var DefaultDecoder = class extends CompositeDecoder {
@@ -1417,7 +1540,7 @@ var decodeAndTransform = (decoder, transform, controller) => {
1417
1540
  const transformed = transform(decoded);
1418
1541
  controller.enqueue(transformed);
1419
1542
  } catch (error2) {
1420
- controller.error(new Error(`Decoding error: ${_optionalChain([error2, 'optionalAccess', _50 => _50.toString, 'call', _51 => _51()])}`));
1543
+ controller.error(new Error(`Decoding error: ${_optionalChain([error2, 'optionalAccess', _73 => _73.toString, 'call', _74 => _74()])}`));
1421
1544
  }
1422
1545
  };
1423
1546
 
@@ -1578,39 +1701,39 @@ var argMatches = (matches) => (arg) => matches(arg);
1578
1701
  function verifyThat(fn) {
1579
1702
  return {
1580
1703
  calledTimes: (times) => {
1581
- assertEqual(_optionalChain([fn, 'access', _52 => _52.mock, 'optionalAccess', _53 => _53.calls, 'optionalAccess', _54 => _54.length]), times);
1704
+ assertEqual(_optionalChain([fn, 'access', _75 => _75.mock, 'optionalAccess', _76 => _76.calls, 'optionalAccess', _77 => _77.length]), times);
1582
1705
  },
1583
1706
  notCalled: () => {
1584
- assertEqual(_optionalChain([fn, 'optionalAccess', _55 => _55.mock, 'optionalAccess', _56 => _56.calls, 'optionalAccess', _57 => _57.length]), 0);
1707
+ assertEqual(_optionalChain([fn, 'optionalAccess', _78 => _78.mock, 'optionalAccess', _79 => _79.calls, 'optionalAccess', _80 => _80.length]), 0);
1585
1708
  },
1586
1709
  called: () => {
1587
1710
  assertTrue(
1588
- _optionalChain([fn, 'access', _58 => _58.mock, 'optionalAccess', _59 => _59.calls, 'access', _60 => _60.length]) !== void 0 && fn.mock.calls.length > 0
1711
+ _optionalChain([fn, 'access', _81 => _81.mock, 'optionalAccess', _82 => _82.calls, 'access', _83 => _83.length]) !== void 0 && fn.mock.calls.length > 0
1589
1712
  );
1590
1713
  },
1591
1714
  calledWith: (...args) => {
1592
1715
  assertTrue(
1593
- _optionalChain([fn, 'access', _61 => _61.mock, 'optionalAccess', _62 => _62.calls, 'access', _63 => _63.length]) !== void 0 && fn.mock.calls.length >= 1 && fn.mock.calls.some((call) => deepEquals(call.arguments, args))
1716
+ _optionalChain([fn, 'access', _84 => _84.mock, 'optionalAccess', _85 => _85.calls, 'access', _86 => _86.length]) !== void 0 && fn.mock.calls.length >= 1 && fn.mock.calls.some((call) => deepEquals(call.arguments, args))
1594
1717
  );
1595
1718
  },
1596
1719
  calledOnceWith: (...args) => {
1597
1720
  assertTrue(
1598
- _optionalChain([fn, 'access', _64 => _64.mock, 'optionalAccess', _65 => _65.calls, 'access', _66 => _66.length]) !== void 0 && fn.mock.calls.length === 1 && fn.mock.calls.some((call) => deepEquals(call.arguments, args))
1721
+ _optionalChain([fn, 'access', _87 => _87.mock, 'optionalAccess', _88 => _88.calls, 'access', _89 => _89.length]) !== void 0 && fn.mock.calls.length === 1 && fn.mock.calls.some((call) => deepEquals(call.arguments, args))
1599
1722
  );
1600
1723
  },
1601
1724
  calledWithArgumentMatching: (...matches) => {
1602
1725
  assertTrue(
1603
- _optionalChain([fn, 'access', _67 => _67.mock, 'optionalAccess', _68 => _68.calls, 'access', _69 => _69.length]) !== void 0 && fn.mock.calls.length >= 1
1726
+ _optionalChain([fn, 'access', _90 => _90.mock, 'optionalAccess', _91 => _91.calls, 'access', _92 => _92.length]) !== void 0 && fn.mock.calls.length >= 1
1604
1727
  );
1605
1728
  assertTrue(
1606
- _optionalChain([fn, 'access', _70 => _70.mock, 'optionalAccess', _71 => _71.calls, 'access', _72 => _72.length]) !== void 0 && fn.mock.calls.length >= 1 && fn.mock.calls.some(
1729
+ _optionalChain([fn, 'access', _93 => _93.mock, 'optionalAccess', _94 => _94.calls, 'access', _95 => _95.length]) !== void 0 && fn.mock.calls.length >= 1 && fn.mock.calls.some(
1607
1730
  (call) => call.arguments && call.arguments.length >= matches.length && matches.every((match, index) => match(call.arguments[index]))
1608
1731
  )
1609
1732
  );
1610
1733
  },
1611
1734
  notCalledWithArgumentMatching: (...matches) => {
1612
1735
  assertFalse(
1613
- _optionalChain([fn, 'access', _73 => _73.mock, 'optionalAccess', _74 => _74.calls, 'access', _75 => _75.length]) !== void 0 && fn.mock.calls.length >= 1 && fn.mock.calls[0].arguments && fn.mock.calls[0].arguments.length >= matches.length && matches.every(
1736
+ _optionalChain([fn, 'access', _96 => _96.mock, 'optionalAccess', _97 => _97.calls, 'access', _98 => _98.length]) !== void 0 && fn.mock.calls.length >= 1 && fn.mock.calls[0].arguments && fn.mock.calls[0].arguments.length >= matches.length && matches.every(
1614
1737
  (match, index) => match(fn.mock.calls[0].arguments[index])
1615
1738
  )
1616
1739
  );
@@ -1755,18 +1878,18 @@ function thenThrowsErrorHandler(error2, args) {
1755
1878
  if (!_chunkWIOXGPNNcjs.isErrorConstructor.call(void 0, args[0])) {
1756
1879
  assertTrue(
1757
1880
  args[0](error2),
1758
- `Error didn't match the error condition: ${_optionalChain([error2, 'optionalAccess', _76 => _76.toString, 'call', _77 => _77()])}`
1881
+ `Error didn't match the error condition: ${_optionalChain([error2, 'optionalAccess', _99 => _99.toString, 'call', _100 => _100()])}`
1759
1882
  );
1760
1883
  return;
1761
1884
  }
1762
1885
  assertTrue(
1763
1886
  error2 instanceof args[0],
1764
- `Caught error is not an instance of the expected type: ${_optionalChain([error2, 'optionalAccess', _78 => _78.toString, 'call', _79 => _79()])}`
1887
+ `Caught error is not an instance of the expected type: ${_optionalChain([error2, 'optionalAccess', _101 => _101.toString, 'call', _102 => _102()])}`
1765
1888
  );
1766
1889
  if (args[1]) {
1767
1890
  assertTrue(
1768
1891
  args[1](error2),
1769
- `Error didn't match the error condition: ${_optionalChain([error2, 'optionalAccess', _80 => _80.toString, 'call', _81 => _81()])}`
1892
+ `Error didn't match the error condition: ${_optionalChain([error2, 'optionalAccess', _103 => _103.toString, 'call', _104 => _104()])}`
1770
1893
  );
1771
1894
  }
1772
1895
  }
@@ -1918,5 +2041,10 @@ var WrapEventStore = (eventStore) => {
1918
2041
 
1919
2042
 
1920
2043
 
1921
- exports.AssertionError = AssertionError; exports.BinaryJsonDecoder = BinaryJsonDecoder; exports.CaughtUpTransformStream = CaughtUpTransformStream; exports.CommandHandler = CommandHandler; exports.CommandHandlerStreamVersionConflictRetryOptions = CommandHandlerStreamVersionConflictRetryOptions; exports.CompositeDecoder = CompositeDecoder; exports.ConcurrencyError = _chunkWIOXGPNNcjs.ConcurrencyError; exports.ConcurrencyInMemoryDatabaseError = _chunkWIOXGPNNcjs.ConcurrencyInMemoryDatabaseError; exports.DeciderCommandHandler = DeciderCommandHandler; exports.DeciderSpecification = DeciderSpecification; exports.DefaultDecoder = DefaultDecoder; exports.EmmettError = _chunkWIOXGPNNcjs.EmmettError; exports.ExpectedVersionConflictError = ExpectedVersionConflictError; exports.GlobalStreamCaughtUpType = GlobalStreamCaughtUpType; exports.IllegalStateError = _chunkWIOXGPNNcjs.IllegalStateError; exports.InMemoryEventStoreDefaultStreamVersion = InMemoryEventStoreDefaultStreamVersion; exports.InProcessLock = InProcessLock; exports.JSONParser = JSONParser; exports.JsonDecoder = JsonDecoder; exports.NO_CONCURRENCY_CHECK = NO_CONCURRENCY_CHECK; exports.NoRetries = NoRetries; exports.NotFoundError = _chunkWIOXGPNNcjs.NotFoundError; exports.ObjectDecoder = ObjectDecoder; exports.ParseError = ParseError; exports.STREAM_DOES_NOT_EXIST = STREAM_DOES_NOT_EXIST; exports.STREAM_EXISTS = STREAM_EXISTS; exports.StreamingCoordinator = StreamingCoordinator; exports.StringDecoder = StringDecoder; exports.TaskProcessor = TaskProcessor; exports.ValidationError = _chunkWIOXGPNNcjs.ValidationError; exports.ValidationErrors = _chunkWIOXGPNNcjs.ValidationErrors; exports.WrapEventStore = WrapEventStore; exports.accept = accept; exports.argMatches = argMatches; exports.argValue = argValue; exports.arrayUtils = arrayUtils; exports.assertDeepEqual = assertDeepEqual; exports.assertDoesNotThrow = assertDoesNotThrow; exports.assertEqual = assertEqual; exports.assertExpectedVersionMatchesCurrent = assertExpectedVersionMatchesCurrent; exports.assertFails = assertFails; exports.assertFalse = assertFalse; exports.assertIsNotNull = assertIsNotNull; exports.assertIsNull = assertIsNull; exports.assertMatches = assertMatches; exports.assertNotDeepEqual = assertNotDeepEqual; exports.assertNotEmptyString = _chunkWIOXGPNNcjs.assertNotEmptyString; exports.assertNotEqual = assertNotEqual; exports.assertOk = assertOk; exports.assertPositiveNumber = _chunkWIOXGPNNcjs.assertPositiveNumber; exports.assertRejects = assertRejects; exports.assertThat = assertThat; exports.assertThatArray = assertThatArray; exports.assertThrows = assertThrows; exports.assertThrowsAsync = assertThrowsAsync; exports.assertTrue = assertTrue; exports.assertUnsignedBigInt = _chunkWIOXGPNNcjs.assertUnsignedBigInt; exports.asyncProjections = asyncProjections; exports.asyncRetry = asyncRetry; exports.canCreateEventStoreSession = canCreateEventStoreSession; exports.caughtUpEventFrom = caughtUpEventFrom; exports.collect = collect; exports.command = command; exports.complete = complete; exports.concatUint8Arrays = concatUint8Arrays; exports.deepEquals = deepEquals; exports.error = error; exports.event = event; exports.filterProjections = filterProjections; exports.formatDateToUtcYYYYMMDD = _chunkWIOXGPNNcjs.formatDateToUtcYYYYMMDD; exports.forwardToMessageBus = forwardToMessageBus; exports.getInMemoryDatabase = getInMemoryDatabase; exports.getInMemoryEventStore = getInMemoryEventStore; exports.getInMemoryMessageBus = getInMemoryMessageBus; exports.globalStreamCaughtUp = globalStreamCaughtUp; exports.ignore = ignore; exports.inlineProjections = inlineProjections; exports.isEquatable = isEquatable; exports.isErrorConstructor = _chunkWIOXGPNNcjs.isErrorConstructor; exports.isExpectedVersionConflictError = isExpectedVersionConflictError; exports.isGlobalStreamCaughtUp = isGlobalStreamCaughtUp; exports.isNotInternalEvent = isNotInternalEvent; exports.isNumber = _chunkWIOXGPNNcjs.isNumber; exports.isPluginConfig = _chunkWIOXGPNNcjs.isPluginConfig; exports.isString = _chunkWIOXGPNNcjs.isString; exports.isSubscriptionEvent = isSubscriptionEvent; exports.isSubset = isSubset; exports.isValidYYYYMMDD = _chunkWIOXGPNNcjs.isValidYYYYMMDD; exports.matchesExpectedVersion = matchesExpectedVersion; exports.merge = merge; exports.message = message; exports.nulloSessionFactory = nulloSessionFactory; exports.parseDateFromUtcYYYYMMDD = _chunkWIOXGPNNcjs.parseDateFromUtcYYYYMMDD; exports.projection = projection; exports.projections = projections; exports.publish = publish; exports.reply = reply; exports.restream = restream; exports.schedule = schedule; exports.send = send; exports.streamGenerators = streamGenerators; exports.streamTrackingGlobalPosition = streamTrackingGlobalPosition; exports.streamTransformations = streamTransformations; exports.sum = sum; exports.tryPublishMessagesAfterCommit = tryPublishMessagesAfterCommit; exports.verifyThat = verifyThat;
2044
+
2045
+
2046
+
2047
+
2048
+
2049
+ exports.AssertionError = AssertionError; exports.BinaryJsonDecoder = BinaryJsonDecoder; exports.CaughtUpTransformStream = CaughtUpTransformStream; exports.CommandHandler = CommandHandler; exports.CommandHandlerStreamVersionConflictRetryOptions = CommandHandlerStreamVersionConflictRetryOptions; exports.CompositeDecoder = CompositeDecoder; exports.ConcurrencyError = _chunkWIOXGPNNcjs.ConcurrencyError; exports.ConcurrencyInMemoryDatabaseError = _chunkWIOXGPNNcjs.ConcurrencyInMemoryDatabaseError; exports.DeciderCommandHandler = DeciderCommandHandler; exports.DeciderSpecification = DeciderSpecification; exports.DefaultDecoder = DefaultDecoder; exports.EmmettError = _chunkWIOXGPNNcjs.EmmettError; exports.ExpectedVersionConflictError = ExpectedVersionConflictError; exports.GlobalStreamCaughtUpType = GlobalStreamCaughtUpType; exports.IllegalStateError = _chunkWIOXGPNNcjs.IllegalStateError; exports.InMemoryEventStoreDefaultStreamVersion = InMemoryEventStoreDefaultStreamVersion; exports.InProcessLock = InProcessLock; exports.JSONParser = JSONParser; exports.JsonDecoder = JsonDecoder; exports.MessageProcessor = MessageProcessor; exports.MessageProcessorType = MessageProcessorType; exports.NO_CONCURRENCY_CHECK = NO_CONCURRENCY_CHECK; exports.NoRetries = NoRetries; exports.NotFoundError = _chunkWIOXGPNNcjs.NotFoundError; exports.ObjectDecoder = ObjectDecoder; exports.ParseError = ParseError; exports.STREAM_DOES_NOT_EXIST = STREAM_DOES_NOT_EXIST; exports.STREAM_EXISTS = STREAM_EXISTS; exports.StreamingCoordinator = StreamingCoordinator; exports.StringDecoder = StringDecoder; exports.TaskProcessor = TaskProcessor; exports.ValidationError = _chunkWIOXGPNNcjs.ValidationError; exports.ValidationErrors = _chunkWIOXGPNNcjs.ValidationErrors; exports.WrapEventStore = WrapEventStore; exports.accept = accept; exports.argMatches = argMatches; exports.argValue = argValue; exports.arrayUtils = arrayUtils; exports.assertDeepEqual = assertDeepEqual; exports.assertDoesNotThrow = assertDoesNotThrow; exports.assertEqual = assertEqual; exports.assertExpectedVersionMatchesCurrent = assertExpectedVersionMatchesCurrent; exports.assertFails = assertFails; exports.assertFalse = assertFalse; exports.assertIsNotNull = assertIsNotNull; exports.assertIsNull = assertIsNull; exports.assertMatches = assertMatches; exports.assertNotDeepEqual = assertNotDeepEqual; exports.assertNotEmptyString = _chunkWIOXGPNNcjs.assertNotEmptyString; exports.assertNotEqual = assertNotEqual; exports.assertOk = assertOk; exports.assertPositiveNumber = _chunkWIOXGPNNcjs.assertPositiveNumber; exports.assertRejects = assertRejects; exports.assertThat = assertThat; exports.assertThatArray = assertThatArray; exports.assertThrows = assertThrows; exports.assertThrowsAsync = assertThrowsAsync; exports.assertTrue = assertTrue; exports.assertUnsignedBigInt = _chunkWIOXGPNNcjs.assertUnsignedBigInt; exports.asyncProjections = asyncProjections; exports.asyncRetry = asyncRetry; exports.canCreateEventStoreSession = canCreateEventStoreSession; exports.caughtUpEventFrom = caughtUpEventFrom; exports.collect = collect; exports.command = command; exports.complete = complete; exports.concatUint8Arrays = concatUint8Arrays; exports.deepEquals = deepEquals; exports.defaultProcessingMessageProcessingScope = defaultProcessingMessageProcessingScope; exports.error = error; exports.event = event; exports.filterProjections = filterProjections; exports.formatDateToUtcYYYYMMDD = _chunkWIOXGPNNcjs.formatDateToUtcYYYYMMDD; exports.forwardToMessageBus = forwardToMessageBus; exports.getInMemoryDatabase = getInMemoryDatabase; exports.getInMemoryEventStore = getInMemoryEventStore; exports.getInMemoryMessageBus = getInMemoryMessageBus; exports.globalStreamCaughtUp = globalStreamCaughtUp; exports.ignore = ignore; exports.inlineProjections = inlineProjections; exports.isEquatable = isEquatable; exports.isErrorConstructor = _chunkWIOXGPNNcjs.isErrorConstructor; exports.isExpectedVersionConflictError = isExpectedVersionConflictError; exports.isGlobalStreamCaughtUp = isGlobalStreamCaughtUp; exports.isNotInternalEvent = isNotInternalEvent; exports.isNumber = _chunkWIOXGPNNcjs.isNumber; exports.isPluginConfig = _chunkWIOXGPNNcjs.isPluginConfig; exports.isString = _chunkWIOXGPNNcjs.isString; exports.isSubscriptionEvent = isSubscriptionEvent; exports.isSubset = isSubset; exports.isValidYYYYMMDD = _chunkWIOXGPNNcjs.isValidYYYYMMDD; exports.matchesExpectedVersion = matchesExpectedVersion; exports.merge = merge; exports.message = message; exports.nulloSessionFactory = nulloSessionFactory; exports.parseDateFromUtcYYYYMMDD = _chunkWIOXGPNNcjs.parseDateFromUtcYYYYMMDD; exports.projection = projection; exports.projections = projections; exports.projector = projector; exports.publish = publish; exports.reactor = reactor; exports.reply = reply; exports.restream = restream; exports.schedule = schedule; exports.send = send; exports.streamGenerators = streamGenerators; exports.streamTrackingGlobalPosition = streamTrackingGlobalPosition; exports.streamTransformations = streamTransformations; exports.sum = sum; exports.tryPublishMessagesAfterCommit = tryPublishMessagesAfterCommit; exports.verifyThat = verifyThat;
1922
2050
  //# sourceMappingURL=index.cjs.map