@punks/backend-entity-manager 0.0.43 → 0.0.45

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
@@ -25040,6 +25040,7 @@ let SendgridEmailProvider = class SendgridEmailProvider {
25040
25040
  }
25041
25041
  const request = removeUndefinedProps({
25042
25042
  from: input.from ?? templateData.from ?? sendgridSettings.value.defaultSender,
25043
+ to: sanitizeArray(input.to ?? templateData.to),
25043
25044
  cc: sanitizeArray([
25044
25045
  ...(input.cc ?? templateData.cc ?? []),
25045
25046
  ...(sendgridSettings.value.defaultCc ?? []),
@@ -25061,16 +25062,23 @@ let SendgridEmailProvider = class SendgridEmailProvider {
25061
25062
  templateId: templateData.sendgridTemplateId,
25062
25063
  });
25063
25064
  if (sendgridSettings.value.loggingEnabled) {
25064
- this.logger.info("Sending templated email", request);
25065
+ this.logger.info("Sending templated email", {
25066
+ input,
25067
+ request,
25068
+ });
25065
25069
  }
25066
25070
  await this.client.send(request);
25067
25071
  if (sendgridSettings.value.loggingEnabled) {
25068
- this.logger.info("Templated email sent", request);
25072
+ this.logger.info("Templated email sent", {
25073
+ input,
25074
+ request,
25075
+ });
25069
25076
  }
25070
25077
  }
25071
25078
  async sendHtmlEmail(input) {
25072
25079
  const request = removeUndefinedProps({
25073
25080
  from: input.from ?? sendgridSettings.value.defaultSender,
25081
+ to: sanitizeArray(input.to),
25074
25082
  cc: sanitizeArray(input.cc),
25075
25083
  bcc: sanitizeArray([
25076
25084
  ...(input.bcc ?? []),
@@ -25087,11 +25095,17 @@ let SendgridEmailProvider = class SendgridEmailProvider {
25087
25095
  replyTo: sanitizeValue(input.replyTo ?? sendgridSettings.value.defaultReplyTo),
25088
25096
  });
25089
25097
  if (sendgridSettings.value.loggingEnabled) {
25090
- this.logger.info("Sending html email", request);
25098
+ this.logger.info("Sending html email", {
25099
+ input,
25100
+ request,
25101
+ });
25091
25102
  }
25092
25103
  await this.client.send(request);
25093
25104
  if (sendgridSettings.value.loggingEnabled) {
25094
- this.logger.info("Html email sent", request);
25105
+ this.logger.info("Html email sent", {
25106
+ input,
25107
+ request,
25108
+ });
25095
25109
  }
25096
25110
  }
25097
25111
  };