@punks/backend-entity-manager 0.0.359 → 0.0.361

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
@@ -40502,12 +40502,7 @@ let SendgridEmailProvider = class SendgridEmailProvider {
40502
40502
  cc: input.cc ?? templateData.cc,
40503
40503
  from: input.from ?? templateData.from,
40504
40504
  to: input.to ?? templateData.to,
40505
- attachments: input.attachments?.map((attachment) => ({
40506
- ...attachment,
40507
- content: attachment.content instanceof Buffer
40508
- ? attachment.content.toString("utf-8")
40509
- : attachment.content,
40510
- })),
40505
+ attachments: input.attachments,
40511
40506
  });
40512
40507
  return;
40513
40508
  }
@@ -40536,7 +40531,7 @@ let SendgridEmailProvider = class SendgridEmailProvider {
40536
40531
  attachments: input.attachments?.map((attachment) => ({
40537
40532
  ...attachment,
40538
40533
  content: attachment.content instanceof Buffer
40539
- ? attachment.content.toString("utf-8")
40534
+ ? attachment.content.toString("base64")
40540
40535
  : attachment.content,
40541
40536
  })),
40542
40537
  });
@@ -40582,6 +40577,12 @@ let SendgridEmailProvider = class SendgridEmailProvider {
40582
40577
  context: input.payload,
40583
40578
  }),
40584
40579
  replyTo: sanitizeValue(input.replyTo ?? sendgridSettings.value.defaultReplyTo),
40580
+ attachments: input.attachments?.map((attachment) => ({
40581
+ ...attachment,
40582
+ content: attachment.content instanceof Buffer
40583
+ ? attachment.content.toString("base64")
40584
+ : attachment.content,
40585
+ })),
40585
40586
  });
40586
40587
  if (sendgridSettings.value.loggingEnabled) {
40587
40588
  this.logger.info("Sending html email", {