@punks/backend-entity-manager 0.0.384 → 0.0.386

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/esm/index.js CHANGED
@@ -22652,7 +22652,7 @@ const normalizeAddress = (value) => {
22652
22652
  const normalizeAddressField = (values, invalidValues) => {
22653
22653
  return distinct(values
22654
22654
  ?.map(normalizeAddress)
22655
- ?.filter((value) => value && !invalidValues?.map(normalizeAddress).includes(value)));
22655
+ ?.filter((value) => value && !invalidValues?.map(normalizeAddress).includes(value)) ?? []);
22656
22656
  };
22657
22657
  const normalizeAddresses = (input) => {
22658
22658
  return {
@@ -22676,12 +22676,15 @@ let EmailService = class EmailService {
22676
22676
  input.payload;
22677
22677
  const sendInput = {
22678
22678
  ...input,
22679
- ...normalizeAddresses(input),
22680
22679
  payload: transformedPayload,
22681
22680
  };
22682
22681
  const transformedInput = (await this.templateMiddleware?.processInput(sendInput)) ?? sendInput;
22683
- await this.provider.sendTemplatedEmail(transformedInput, template);
22684
- await this.logger.logTemplatedEmail(transformedInput);
22682
+ const normalizedInput = {
22683
+ ...transformedInput,
22684
+ ...normalizeAddresses(input),
22685
+ };
22686
+ await this.provider.sendTemplatedEmail(normalizedInput, template);
22687
+ await this.logger.logTemplatedEmail(normalizedInput);
22685
22688
  }
22686
22689
  async sendHtmlEmail(input) {
22687
22690
  await this.provider.sendHtmlEmail(input);