@event-driven-io/emmett-postgresql 0.32.0 → 0.34.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
@@ -739,8 +739,8 @@ var appendToStream = (pool, streamName, streamType, messages, options) => pool.w
739
739
  expectedStreamVersion
740
740
  }
741
741
  );
742
- if (_optionalChain([options, 'optionalAccess', _20 => _20.preCommitHook]))
743
- await options.preCommitHook(messagesToAppend, { transaction });
742
+ if (_optionalChain([options, 'optionalAccess', _20 => _20.beforeCommitHook]))
743
+ await options.beforeCommitHook(messagesToAppend, { transaction });
744
744
  } catch (error) {
745
745
  if (!isOptimisticConcurrencyError(error)) throw error;
746
746
  appendResult = {
@@ -1894,7 +1894,7 @@ var getPostgreSQLEventStore = (connectionString, options = defaultPostgreSQLOpti
1894
1894
  return migrateSchema;
1895
1895
  };
1896
1896
  const inlineProjections = (_nullishCoalesce(options.projections, () => ( []))).filter(({ type }) => type === "inline").map(({ projection: projection2 }) => projection2);
1897
- const preCommitHook = inlineProjections.length > 0 ? (events, { transaction }) => handleProjections({
1897
+ const beforeCommitHook = inlineProjections.length > 0 ? (events, { transaction }) => handleProjections({
1898
1898
  projections: inlineProjections,
1899
1899
  connection: {
1900
1900
  connectionString,
@@ -1949,7 +1949,7 @@ var getPostgreSQLEventStore = (connectionString, options = defaultPostgreSQLOpti
1949
1949
  events,
1950
1950
  {
1951
1951
  ...options2,
1952
- preCommitHook
1952
+ beforeCommitHook
1953
1953
  }
1954
1954
  );
1955
1955
  if (!appendResult.success)