@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/cjs/index.js CHANGED
@@ -22667,7 +22667,7 @@ const normalizeAddress = (value) => {
22667
22667
  const normalizeAddressField = (values, invalidValues) => {
22668
22668
  return backendCore.distinct(values
22669
22669
  ?.map(normalizeAddress)
22670
- ?.filter((value) => value && !invalidValues?.map(normalizeAddress).includes(value)));
22670
+ ?.filter((value) => value && !invalidValues?.map(normalizeAddress).includes(value)) ?? []);
22671
22671
  };
22672
22672
  const normalizeAddresses = (input) => {
22673
22673
  return {
@@ -22691,12 +22691,15 @@ exports.EmailService = class EmailService {
22691
22691
  input.payload;
22692
22692
  const sendInput = {
22693
22693
  ...input,
22694
- ...normalizeAddresses(input),
22695
22694
  payload: transformedPayload,
22696
22695
  };
22697
22696
  const transformedInput = (await this.templateMiddleware?.processInput(sendInput)) ?? sendInput;
22698
- await this.provider.sendTemplatedEmail(transformedInput, template);
22699
- await this.logger.logTemplatedEmail(transformedInput);
22697
+ const normalizedInput = {
22698
+ ...transformedInput,
22699
+ ...normalizeAddresses(input),
22700
+ };
22701
+ await this.provider.sendTemplatedEmail(normalizedInput, template);
22702
+ await this.logger.logTemplatedEmail(normalizedInput);
22700
22703
  }
22701
22704
  async sendHtmlEmail(input) {
22702
22705
  await this.provider.sendHtmlEmail(input);