@event-driven-io/emmett 0.42.0-beta.1 → 0.42.0-beta.3

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
@@ -84,6 +84,12 @@ var accept = () => {
84
84
  return { action: "Accept" };
85
85
  };
86
86
 
87
+ // src/typing/index.ts
88
+ var emmettPrefix = "emt";
89
+ var globalTag = "global";
90
+ var defaultTag = `${emmettPrefix}:default`;
91
+ var unknownTag = `${emmettPrefix}:unknown`;
92
+
87
93
  // src/eventStore/afterCommit/afterEventStoreCommitHandler.ts
88
94
  async function tryPublishMessagesAfterCommit(messages, options, context) {
89
95
  if (_optionalChain([options, 'optionalAccess', _2 => _2.onAfterCommit]) === void 0) return false;
@@ -586,6 +592,12 @@ var InProcessLock = () => {
586
592
  };
587
593
  };
588
594
 
595
+ // src/utils/numbers/bigint.ts
596
+ var toNormalizedString = (value) => value.toString().padStart(19, "0");
597
+ var bigInt = {
598
+ toNormalizedString
599
+ };
600
+
589
601
  // src/utils/promises.ts
590
602
  var delay = (ms) => {
591
603
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -653,6 +665,17 @@ var asyncRetry = async (fn, opts) => {
653
665
  );
654
666
  };
655
667
 
668
+ // src/utils/strings/hashText.ts
669
+ var textEncoder = new TextEncoder();
670
+ var hashText = async (text) => {
671
+ const hashBuffer = await crypto.subtle.digest(
672
+ "SHA-256",
673
+ textEncoder.encode(text)
674
+ );
675
+ const view = new BigInt64Array(hashBuffer, 0, 1);
676
+ return view[0];
677
+ };
678
+
656
679
  // src/database/utils.ts
657
680
  var isGeneralExpectedDocumentVersion = (version) => {
658
681
  return version === "DOCUMENT_DOES_NOT_EXIST" || version === "DOCUMENT_EXISTS" || version === "NO_CONCURRENCY_CHECK";
@@ -1429,6 +1452,9 @@ var InMemoryProjectionSpec = {
1429
1452
  nextExpectedStreamVersion: 0n,
1430
1453
  createdNewStream: false
1431
1454
  });
1455
+ },
1456
+ streamExists: async () => {
1457
+ return Promise.resolve(false);
1432
1458
  }
1433
1459
  };
1434
1460
  await handleInMemoryProjections({
@@ -1617,6 +1643,10 @@ var getInMemoryEventStore = (eventStoreOptions) => {
1617
1643
  _optionalChain([eventStoreOptions, 'optionalAccess', _84 => _84.hooks])
1618
1644
  );
1619
1645
  return result;
1646
+ },
1647
+ streamExists: (streamName) => {
1648
+ const events = streams.get(streamName);
1649
+ return Promise.resolve(events !== void 0 && events.length > 0);
1620
1650
  }
1621
1651
  };
1622
1652
  return eventStore;
@@ -1782,6 +1812,7 @@ var getInMemoryMessageBus = () => {
1782
1812
  };
1783
1813
 
1784
1814
  // src/processors/processors.ts
1815
+
1785
1816
  var getCheckpoint = (message2) => {
1786
1817
  return "checkpoint" in message2.metadata ? (
1787
1818
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
@@ -1818,30 +1849,60 @@ var MessageProcessor = {
1818
1849
  }
1819
1850
  };
1820
1851
  var defaultProcessingMessageProcessingScope = (handler, partialContext) => handler(partialContext);
1852
+ var defaultProcessorVersion = 1;
1853
+ var defaultProcessorPartition = defaultTag;
1854
+ var getProcessorInstanceId = (processorId) => `${processorId}:${_uuid.v7.call(void 0, )}`;
1855
+ var getProjectorId = (options) => `emt:processor:projector:${options.projectionName}`;
1821
1856
  var reactor = (options) => {
1857
+ const {
1858
+ checkpoints,
1859
+ processorId,
1860
+ processorInstanceId: instanceId = getProcessorInstanceId(processorId),
1861
+ type = MessageProcessorType.REACTOR,
1862
+ version = defaultProcessorVersion,
1863
+ partition = defaultProcessorPartition,
1864
+ hooks = {},
1865
+ processingScope = defaultProcessingMessageProcessingScope,
1866
+ startFrom,
1867
+ canHandle,
1868
+ stopAfter
1869
+ } = options;
1822
1870
  const eachMessage = "eachMessage" in options && options.eachMessage ? options.eachMessage : () => Promise.resolve();
1823
- let isActive = true;
1824
- const { checkpoints, processorId, partition } = options;
1825
- const processingScope = _nullishCoalesce(options.processingScope, () => ( defaultProcessingMessageProcessingScope));
1871
+ let isInitiated = false;
1872
+ let isActive = false;
1826
1873
  let lastCheckpoint = null;
1874
+ const init = async (initOptions) => {
1875
+ if (isInitiated) return;
1876
+ if (hooks.onInit === void 0) {
1877
+ isInitiated = true;
1878
+ return;
1879
+ }
1880
+ return await processingScope(async (context) => {
1881
+ await hooks.onInit(context);
1882
+ isInitiated = true;
1883
+ }, initOptions);
1884
+ };
1827
1885
  return {
1828
- id: options.processorId,
1829
- type: _nullishCoalesce(options.type, () => ( MessageProcessorType.REACTOR)),
1830
- close: () => _optionalChain([options, 'access', _87 => _87.hooks, 'optionalAccess', _88 => _88.onClose]) ? _optionalChain([options, 'access', _89 => _89.hooks, 'optionalAccess', _90 => _90.onClose, 'call', _91 => _91()]) : Promise.resolve(),
1886
+ // TODO: Consider whether not make it optional or add URN prefix
1887
+ id: processorId,
1888
+ instanceId,
1889
+ type,
1890
+ init,
1831
1891
  start: async (startOptions) => {
1892
+ if (isActive) return;
1893
+ await init(startOptions);
1832
1894
  isActive = true;
1833
1895
  if (lastCheckpoint !== null)
1834
1896
  return {
1835
1897
  lastCheckpoint
1836
1898
  };
1837
1899
  return await processingScope(async (context) => {
1838
- if (_optionalChain([options, 'access', _92 => _92.hooks, 'optionalAccess', _93 => _93.onStart])) {
1839
- await _optionalChain([options, 'access', _94 => _94.hooks, 'optionalAccess', _95 => _95.onStart, 'call', _96 => _96(context)]);
1900
+ if (hooks.onStart) {
1901
+ await hooks.onStart(context);
1840
1902
  }
1841
- if (options.startFrom !== "CURRENT" && options.startFrom)
1842
- return options.startFrom;
1903
+ if (startFrom && startFrom !== "CURRENT") return startFrom;
1843
1904
  if (checkpoints) {
1844
- const readResult = await _optionalChain([checkpoints, 'optionalAccess', _97 => _97.read, 'call', _98 => _98(
1905
+ const readResult = await _optionalChain([checkpoints, 'optionalAccess', _87 => _87.read, 'call', _88 => _88(
1845
1906
  {
1846
1907
  processorId,
1847
1908
  partition
@@ -1856,6 +1917,7 @@ var reactor = (options) => {
1856
1917
  };
1857
1918
  }, startOptions);
1858
1919
  },
1920
+ close: _optionalChain([hooks, 'optionalAccess', _89 => _89.onClose]) ? async (closeOptions) => await processingScope(hooks.onClose, closeOptions) : () => Promise.resolve(),
1859
1921
  get isActive() {
1860
1922
  return isActive;
1861
1923
  },
@@ -1865,15 +1927,17 @@ var reactor = (options) => {
1865
1927
  let result = void 0;
1866
1928
  for (const message2 of messages) {
1867
1929
  if (wasMessageHandled(message2, lastCheckpoint)) continue;
1930
+ if (canHandle !== void 0 && !canHandle.includes(message2.type))
1931
+ return;
1868
1932
  const messageProcessingResult = await eachMessage(message2, context);
1869
1933
  if (checkpoints) {
1870
1934
  const storeCheckpointResult = await checkpoints.store(
1871
1935
  {
1872
- processorId: options.processorId,
1873
- version: options.version,
1936
+ processorId,
1937
+ version,
1874
1938
  message: message2,
1875
1939
  lastCheckpoint,
1876
- partition: options.partition
1940
+ partition
1877
1941
  },
1878
1942
  context
1879
1943
  );
@@ -1886,7 +1950,7 @@ var reactor = (options) => {
1886
1950
  result = messageProcessingResult;
1887
1951
  break;
1888
1952
  }
1889
- if (options.stopAfter && options.stopAfter(message2)) {
1953
+ if (stopAfter && stopAfter(message2)) {
1890
1954
  isActive = false;
1891
1955
  result = { type: "STOP", reason: "Stop condition reached" };
1892
1956
  break;
@@ -1900,23 +1964,28 @@ var reactor = (options) => {
1900
1964
  };
1901
1965
  };
1902
1966
  var projector = (options) => {
1903
- const { projection: projection2, ...rest } = options;
1967
+ const {
1968
+ projection: projection2,
1969
+ processorId = getProjectorId({
1970
+ projectionName: _nullishCoalesce(projection2.name, () => ( "unknown"))
1971
+ }),
1972
+ ...rest
1973
+ } = options;
1904
1974
  return reactor({
1905
1975
  ...rest,
1906
1976
  type: MessageProcessorType.PROJECTOR,
1907
- processorId: _nullishCoalesce(options.processorId, () => ( `projection:${projection2.name}`)),
1977
+ canHandle: projection2.canHandle,
1978
+ processorId,
1908
1979
  hooks: {
1909
- onStart: options.truncateOnStart && options.projection.truncate || _optionalChain([options, 'access', _99 => _99.hooks, 'optionalAccess', _100 => _100.onStart]) ? async (context) => {
1980
+ onInit: _optionalChain([options, 'access', _90 => _90.hooks, 'optionalAccess', _91 => _91.onInit]),
1981
+ onStart: options.truncateOnStart && options.projection.truncate || _optionalChain([options, 'access', _92 => _92.hooks, 'optionalAccess', _93 => _93.onStart]) ? async (context) => {
1910
1982
  if (options.truncateOnStart && options.projection.truncate)
1911
1983
  await options.projection.truncate(context);
1912
- if (_optionalChain([options, 'access', _101 => _101.hooks, 'optionalAccess', _102 => _102.onStart])) await _optionalChain([options, 'access', _103 => _103.hooks, 'optionalAccess', _104 => _104.onStart, 'call', _105 => _105(context)]);
1984
+ if (_optionalChain([options, 'access', _94 => _94.hooks, 'optionalAccess', _95 => _95.onStart])) await _optionalChain([options, 'access', _96 => _96.hooks, 'optionalAccess', _97 => _97.onStart, 'call', _98 => _98(context)]);
1913
1985
  } : void 0,
1914
- onClose: _optionalChain([options, 'access', _106 => _106.hooks, 'optionalAccess', _107 => _107.onClose])
1986
+ onClose: _optionalChain([options, 'access', _99 => _99.hooks, 'optionalAccess', _100 => _100.onClose])
1915
1987
  },
1916
- eachMessage: async (event2, context) => {
1917
- if (!projection2.canHandle.includes(event2.type)) return;
1918
- await projection2.handle([event2], context);
1919
- }
1988
+ eachMessage: async (event2, context) => projection2.handle([event2], context)
1920
1989
  });
1921
1990
  };
1922
1991
 
@@ -1926,7 +1995,7 @@ var inMemoryCheckpointer = () => {
1926
1995
  read: async ({ processorId }, { database }) => {
1927
1996
  const checkpoint = await database.collection("emt_processor_checkpoints").findOne((d) => d._id === processorId);
1928
1997
  return Promise.resolve({
1929
- lastCheckpoint: _nullishCoalesce(_optionalChain([checkpoint, 'optionalAccess', _108 => _108.lastCheckpoint]), () => ( null))
1998
+ lastCheckpoint: _nullishCoalesce(_optionalChain([checkpoint, 'optionalAccess', _101 => _101.lastCheckpoint]), () => ( null))
1930
1999
  });
1931
2000
  },
1932
2001
  store: async (context, { database }) => {
@@ -1937,12 +2006,12 @@ var inMemoryCheckpointer = () => {
1937
2006
  const checkpoint = await checkpoints.findOne(
1938
2007
  (d) => d._id === processorId
1939
2008
  );
1940
- const currentPosition = _nullishCoalesce(_optionalChain([checkpoint, 'optionalAccess', _109 => _109.lastCheckpoint]), () => ( null));
2009
+ const currentPosition = _nullishCoalesce(_optionalChain([checkpoint, 'optionalAccess', _102 => _102.lastCheckpoint]), () => ( null));
1941
2010
  const newCheckpoint = getCheckpoint(message2);
1942
2011
  if (currentPosition && (currentPosition === newCheckpoint || currentPosition !== lastCheckpoint)) {
1943
2012
  return {
1944
2013
  success: false,
1945
- reason: currentPosition === newCheckpoint ? "IGNORED" : "MISMATCH"
2014
+ reason: currentPosition === newCheckpoint ? "IGNORED" : newCheckpoint !== null && currentPosition > newCheckpoint ? "CURRENT_AHEAD" : "MISMATCH"
1946
2015
  };
1947
2016
  }
1948
2017
  await checkpoints.handle(processorId, (existing) => ({
@@ -1957,7 +2026,7 @@ var inMemoryCheckpointer = () => {
1957
2026
  var inMemoryProcessingScope = (options) => {
1958
2027
  const processorDatabase = options.database;
1959
2028
  const processingScope = (handler, partialContext) => {
1960
- const database = _nullishCoalesce(processorDatabase, () => ( _optionalChain([partialContext, 'optionalAccess', _110 => _110.database])));
2029
+ const database = _nullishCoalesce(processorDatabase, () => ( _optionalChain([partialContext, 'optionalAccess', _103 => _103.database])));
1961
2030
  if (!database)
1962
2031
  throw new (0, _chunkWND32L6Pcjs.EmmettError)(
1963
2032
  `InMemory processor '${options.processorId}' is missing database. Ensure that you passed it through options`
@@ -1967,46 +2036,42 @@ var inMemoryProcessingScope = (options) => {
1967
2036
  return processingScope;
1968
2037
  };
1969
2038
  var inMemoryProjector = (options) => {
1970
- const database = _nullishCoalesce(_optionalChain([options, 'access', _111 => _111.connectionOptions, 'optionalAccess', _112 => _112.database]), () => ( getInMemoryDatabase()));
2039
+ const database = _nullishCoalesce(_optionalChain([options, 'access', _104 => _104.connectionOptions, 'optionalAccess', _105 => _105.database]), () => ( getInMemoryDatabase()));
1971
2040
  const hooks = {
1972
- onStart: _optionalChain([options, 'access', _113 => _113.hooks, 'optionalAccess', _114 => _114.onStart]),
1973
- onClose: _optionalChain([options, 'access', _115 => _115.hooks, 'optionalAccess', _116 => _116.onClose]) ? async () => {
1974
- if (_optionalChain([options, 'access', _117 => _117.hooks, 'optionalAccess', _118 => _118.onClose])) await _optionalChain([options, 'access', _119 => _119.hooks, 'optionalAccess', _120 => _120.onClose, 'call', _121 => _121()]);
2041
+ onInit: _optionalChain([options, 'access', _106 => _106.hooks, 'optionalAccess', _107 => _107.onInit]),
2042
+ onStart: _optionalChain([options, 'access', _108 => _108.hooks, 'optionalAccess', _109 => _109.onStart]),
2043
+ onClose: _optionalChain([options, 'access', _110 => _110.hooks, 'optionalAccess', _111 => _111.onClose]) ? async (context) => {
2044
+ if (_optionalChain([options, 'access', _112 => _112.hooks, 'optionalAccess', _113 => _113.onClose])) await _optionalChain([options, 'access', _114 => _114.hooks, 'optionalAccess', _115 => _115.onClose, 'call', _116 => _116(context)]);
1975
2045
  } : void 0
1976
2046
  };
1977
- return {
1978
- ...projector({
1979
- ...options,
1980
- hooks,
1981
- processingScope: inMemoryProcessingScope({
1982
- database,
1983
- processorId: _nullishCoalesce(options.processorId, () => ( `projection:${options.projection.name}`))
1984
- }),
1985
- checkpoints: inMemoryCheckpointer()
2047
+ const processor = projector({
2048
+ ...options,
2049
+ hooks,
2050
+ processingScope: inMemoryProcessingScope({
2051
+ database,
2052
+ processorId: _nullishCoalesce(options.processorId, () => ( `projection:${options.projection.name}`))
1986
2053
  }),
1987
- database
1988
- };
2054
+ checkpoints: inMemoryCheckpointer()
2055
+ });
2056
+ return Object.assign(processor, { database });
1989
2057
  };
1990
2058
  var inMemoryReactor = (options) => {
1991
- const database = _nullishCoalesce(_optionalChain([options, 'access', _122 => _122.connectionOptions, 'optionalAccess', _123 => _123.database]), () => ( getInMemoryDatabase()));
2059
+ const database = _nullishCoalesce(_optionalChain([options, 'access', _117 => _117.connectionOptions, 'optionalAccess', _118 => _118.database]), () => ( getInMemoryDatabase()));
1992
2060
  const hooks = {
1993
- onStart: _optionalChain([options, 'access', _124 => _124.hooks, 'optionalAccess', _125 => _125.onStart]),
1994
- onClose: _optionalChain([options, 'access', _126 => _126.hooks, 'optionalAccess', _127 => _127.onClose]) ? async () => {
1995
- if (_optionalChain([options, 'access', _128 => _128.hooks, 'optionalAccess', _129 => _129.onClose])) await _optionalChain([options, 'access', _130 => _130.hooks, 'optionalAccess', _131 => _131.onClose, 'call', _132 => _132()]);
1996
- } : void 0
2061
+ onInit: _optionalChain([options, 'access', _119 => _119.hooks, 'optionalAccess', _120 => _120.onInit]),
2062
+ onStart: _optionalChain([options, 'access', _121 => _121.hooks, 'optionalAccess', _122 => _122.onStart]),
2063
+ onClose: _optionalChain([options, 'access', _123 => _123.hooks, 'optionalAccess', _124 => _124.onClose])
1997
2064
  };
1998
- return {
1999
- ...reactor({
2000
- ...options,
2001
- hooks,
2002
- processingScope: inMemoryProcessingScope({
2003
- database,
2004
- processorId: options.processorId
2005
- }),
2006
- checkpoints: inMemoryCheckpointer()
2065
+ const processor = reactor({
2066
+ ...options,
2067
+ hooks,
2068
+ processingScope: inMemoryProcessingScope({
2069
+ database,
2070
+ processorId: options.processorId
2007
2071
  }),
2008
- database
2009
- };
2072
+ checkpoints: inMemoryCheckpointer()
2073
+ });
2074
+ return Object.assign(processor, { database });
2010
2075
  };
2011
2076
 
2012
2077
  // src/projections/index.ts
@@ -2155,5 +2220,16 @@ var projections = {
2155
2220
 
2156
2221
 
2157
2222
 
2158
- exports.AssertionError = AssertionError; exports.CommandHandler = CommandHandler; exports.CommandHandlerStreamVersionConflictRetryOptions = CommandHandlerStreamVersionConflictRetryOptions; exports.ConcurrencyError = _chunkWND32L6Pcjs.ConcurrencyError; exports.ConcurrencyInMemoryDatabaseError = _chunkWND32L6Pcjs.ConcurrencyInMemoryDatabaseError; exports.DATABASE_REQUIRED_ERROR_MESSAGE = DATABASE_REQUIRED_ERROR_MESSAGE; exports.DeciderCommandHandler = DeciderCommandHandler; exports.DeciderSpecification = DeciderSpecification; exports.EmmettError = _chunkWND32L6Pcjs.EmmettError; exports.ExpectedVersionConflictError = ExpectedVersionConflictError; exports.GlobalStreamCaughtUpType = GlobalStreamCaughtUpType; exports.IllegalStateError = _chunkWND32L6Pcjs.IllegalStateError; exports.InMemoryEventStoreDefaultStreamVersion = InMemoryEventStoreDefaultStreamVersion; exports.InMemoryProjectionSpec = InMemoryProjectionSpec; exports.InProcessLock = InProcessLock; exports.JSONParser = JSONParser; exports.MessageProcessor = MessageProcessor; exports.MessageProcessorType = MessageProcessorType; exports.NO_CONCURRENCY_CHECK = NO_CONCURRENCY_CHECK; exports.NoRetries = NoRetries; exports.NotFoundError = _chunkWND32L6Pcjs.NotFoundError; exports.ParseError = ParseError; exports.STREAM_DOES_NOT_EXIST = STREAM_DOES_NOT_EXIST; exports.STREAM_EXISTS = STREAM_EXISTS; exports.TaskProcessor = TaskProcessor; exports.ValidationError = _chunkWND32L6Pcjs.ValidationError; exports.ValidationErrors = _chunkWND32L6Pcjs.ValidationErrors; exports.WrapEventStore = WrapEventStore; exports.accept = accept; exports.argMatches = argMatches; exports.argValue = argValue; exports.arrayUtils = arrayUtils; exports.assertDeepEqual = assertDeepEqual; exports.assertDefined = assertDefined; 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 = _chunkWND32L6Pcjs.assertNotEmptyString; exports.assertNotEqual = assertNotEqual; exports.assertOk = assertOk; exports.assertPositiveNumber = _chunkWND32L6Pcjs.assertPositiveNumber; exports.assertRejects = assertRejects; exports.assertThat = assertThat; exports.assertThatArray = assertThatArray; exports.assertThrows = assertThrows; exports.assertThrowsAsync = assertThrowsAsync; exports.assertTrue = assertTrue; exports.assertUnsignedBigInt = _chunkWND32L6Pcjs.assertUnsignedBigInt; exports.asyncAwaiter = asyncAwaiter; exports.asyncProjections = asyncProjections; exports.asyncRetry = asyncRetry; exports.canCreateEventStoreSession = canCreateEventStoreSession; exports.caughtUpEventFrom = caughtUpEventFrom; exports.command = command; exports.complete = complete; exports.deepEquals = deepEquals; exports.defaultProcessingMessageProcessingScope = defaultProcessingMessageProcessingScope; exports.delay = delay; exports.documentExists = documentExists; exports.error = error; exports.event = event; exports.eventInStream = eventInStream; exports.eventsInStream = eventsInStream; exports.expectInMemoryDocuments = expectInMemoryDocuments; exports.filterProjections = filterProjections; exports.formatDateToUtcYYYYMMDD = _chunkWND32L6Pcjs.formatDateToUtcYYYYMMDD; exports.forwardToMessageBus = forwardToMessageBus; exports.getCheckpoint = getCheckpoint; exports.getInMemoryDatabase = getInMemoryDatabase; exports.getInMemoryEventStore = getInMemoryEventStore; exports.getInMemoryMessageBus = getInMemoryMessageBus; exports.globalStreamCaughtUp = globalStreamCaughtUp; exports.handleInMemoryProjections = handleInMemoryProjections; exports.ignore = ignore; exports.inMemoryCheckpointer = inMemoryCheckpointer; exports.inMemoryMultiStreamProjection = inMemoryMultiStreamProjection; exports.inMemoryProjection = inMemoryProjection; exports.inMemoryProjector = inMemoryProjector; exports.inMemoryReactor = inMemoryReactor; exports.inMemorySingleStreamProjection = inMemorySingleStreamProjection; exports.inlineProjections = inlineProjections; exports.isBigint = _chunkWND32L6Pcjs.isBigint; exports.isEquatable = isEquatable; exports.isErrorConstructor = _chunkWND32L6Pcjs.isErrorConstructor; exports.isExpectedVersionConflictError = isExpectedVersionConflictError; exports.isGlobalStreamCaughtUp = isGlobalStreamCaughtUp; exports.isNotInternalEvent = isNotInternalEvent; exports.isNumber = _chunkWND32L6Pcjs.isNumber; exports.isPluginConfig = _chunkWND32L6Pcjs.isPluginConfig; exports.isString = _chunkWND32L6Pcjs.isString; exports.isSubscriptionEvent = isSubscriptionEvent; exports.isSubset = isSubset; exports.isValidYYYYMMDD = _chunkWND32L6Pcjs.isValidYYYYMMDD; exports.matchesExpectedVersion = matchesExpectedVersion; exports.merge = merge; exports.message = message; exports.newEventsInStream = newEventsInStream; exports.nulloSessionFactory = nulloSessionFactory; exports.parseDateFromUtcYYYYMMDD = _chunkWND32L6Pcjs.parseDateFromUtcYYYYMMDD; exports.projection = projection; exports.projections = projections; exports.projector = projector; exports.publish = publish; exports.reactor = reactor; exports.reply = reply; exports.schedule = schedule; exports.send = send; exports.sum = sum; exports.tryPublishMessagesAfterCommit = tryPublishMessagesAfterCommit; exports.verifyThat = verifyThat; exports.wasMessageHandled = wasMessageHandled;
2223
+
2224
+
2225
+
2226
+
2227
+
2228
+
2229
+
2230
+
2231
+
2232
+
2233
+
2234
+ exports.AssertionError = AssertionError; exports.CommandHandler = CommandHandler; exports.CommandHandlerStreamVersionConflictRetryOptions = CommandHandlerStreamVersionConflictRetryOptions; exports.ConcurrencyError = _chunkWND32L6Pcjs.ConcurrencyError; exports.ConcurrencyInMemoryDatabaseError = _chunkWND32L6Pcjs.ConcurrencyInMemoryDatabaseError; exports.DATABASE_REQUIRED_ERROR_MESSAGE = DATABASE_REQUIRED_ERROR_MESSAGE; exports.DeciderCommandHandler = DeciderCommandHandler; exports.DeciderSpecification = DeciderSpecification; exports.EmmettError = _chunkWND32L6Pcjs.EmmettError; exports.ExpectedVersionConflictError = ExpectedVersionConflictError; exports.GlobalStreamCaughtUpType = GlobalStreamCaughtUpType; exports.IllegalStateError = _chunkWND32L6Pcjs.IllegalStateError; exports.InMemoryEventStoreDefaultStreamVersion = InMemoryEventStoreDefaultStreamVersion; exports.InMemoryProjectionSpec = InMemoryProjectionSpec; exports.InProcessLock = InProcessLock; exports.JSONParser = JSONParser; exports.MessageProcessor = MessageProcessor; exports.MessageProcessorType = MessageProcessorType; exports.NO_CONCURRENCY_CHECK = NO_CONCURRENCY_CHECK; exports.NoRetries = NoRetries; exports.NotFoundError = _chunkWND32L6Pcjs.NotFoundError; exports.ParseError = ParseError; exports.STREAM_DOES_NOT_EXIST = STREAM_DOES_NOT_EXIST; exports.STREAM_EXISTS = STREAM_EXISTS; exports.TaskProcessor = TaskProcessor; exports.ValidationError = _chunkWND32L6Pcjs.ValidationError; exports.ValidationErrors = _chunkWND32L6Pcjs.ValidationErrors; exports.WrapEventStore = WrapEventStore; exports.accept = accept; exports.argMatches = argMatches; exports.argValue = argValue; exports.arrayUtils = arrayUtils; exports.assertDeepEqual = assertDeepEqual; exports.assertDefined = assertDefined; 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 = _chunkWND32L6Pcjs.assertNotEmptyString; exports.assertNotEqual = assertNotEqual; exports.assertOk = assertOk; exports.assertPositiveNumber = _chunkWND32L6Pcjs.assertPositiveNumber; exports.assertRejects = assertRejects; exports.assertThat = assertThat; exports.assertThatArray = assertThatArray; exports.assertThrows = assertThrows; exports.assertThrowsAsync = assertThrowsAsync; exports.assertTrue = assertTrue; exports.assertUnsignedBigInt = _chunkWND32L6Pcjs.assertUnsignedBigInt; exports.asyncAwaiter = asyncAwaiter; exports.asyncProjections = asyncProjections; exports.asyncRetry = asyncRetry; exports.bigInt = bigInt; exports.canCreateEventStoreSession = canCreateEventStoreSession; exports.caughtUpEventFrom = caughtUpEventFrom; exports.command = command; exports.complete = complete; exports.deepEquals = deepEquals; exports.defaultProcessingMessageProcessingScope = defaultProcessingMessageProcessingScope; exports.defaultProcessorPartition = defaultProcessorPartition; exports.defaultProcessorVersion = defaultProcessorVersion; exports.defaultTag = defaultTag; exports.delay = delay; exports.documentExists = documentExists; exports.emmettPrefix = emmettPrefix; exports.error = error; exports.event = event; exports.eventInStream = eventInStream; exports.eventsInStream = eventsInStream; exports.expectInMemoryDocuments = expectInMemoryDocuments; exports.filterProjections = filterProjections; exports.formatDateToUtcYYYYMMDD = _chunkWND32L6Pcjs.formatDateToUtcYYYYMMDD; exports.forwardToMessageBus = forwardToMessageBus; exports.getCheckpoint = getCheckpoint; exports.getInMemoryDatabase = getInMemoryDatabase; exports.getInMemoryEventStore = getInMemoryEventStore; exports.getInMemoryMessageBus = getInMemoryMessageBus; exports.getProcessorInstanceId = getProcessorInstanceId; exports.getProjectorId = getProjectorId; exports.globalStreamCaughtUp = globalStreamCaughtUp; exports.globalTag = globalTag; exports.handleInMemoryProjections = handleInMemoryProjections; exports.hashText = hashText; exports.ignore = ignore; exports.inMemoryCheckpointer = inMemoryCheckpointer; exports.inMemoryMultiStreamProjection = inMemoryMultiStreamProjection; exports.inMemoryProjection = inMemoryProjection; exports.inMemoryProjector = inMemoryProjector; exports.inMemoryReactor = inMemoryReactor; exports.inMemorySingleStreamProjection = inMemorySingleStreamProjection; exports.inlineProjections = inlineProjections; exports.isBigint = _chunkWND32L6Pcjs.isBigint; exports.isEquatable = isEquatable; exports.isErrorConstructor = _chunkWND32L6Pcjs.isErrorConstructor; exports.isExpectedVersionConflictError = isExpectedVersionConflictError; exports.isGlobalStreamCaughtUp = isGlobalStreamCaughtUp; exports.isNotInternalEvent = isNotInternalEvent; exports.isNumber = _chunkWND32L6Pcjs.isNumber; exports.isPluginConfig = _chunkWND32L6Pcjs.isPluginConfig; exports.isString = _chunkWND32L6Pcjs.isString; exports.isSubscriptionEvent = isSubscriptionEvent; exports.isSubset = isSubset; exports.isValidYYYYMMDD = _chunkWND32L6Pcjs.isValidYYYYMMDD; exports.matchesExpectedVersion = matchesExpectedVersion; exports.merge = merge; exports.message = message; exports.newEventsInStream = newEventsInStream; exports.nulloSessionFactory = nulloSessionFactory; exports.parseDateFromUtcYYYYMMDD = _chunkWND32L6Pcjs.parseDateFromUtcYYYYMMDD; exports.projection = projection; exports.projections = projections; exports.projector = projector; exports.publish = publish; exports.reactor = reactor; exports.reply = reply; exports.schedule = schedule; exports.send = send; exports.sum = sum; exports.toNormalizedString = toNormalizedString; exports.tryPublishMessagesAfterCommit = tryPublishMessagesAfterCommit; exports.unknownTag = unknownTag; exports.verifyThat = verifyThat; exports.wasMessageHandled = wasMessageHandled;
2159
2235
  //# sourceMappingURL=index.cjs.map