@punks/backend-entity-manager 0.0.385 → 0.0.387
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 +6 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/platforms/nest/services/email/utils.d.ts +1 -1
- package/dist/esm/index.js +6 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/platforms/nest/services/email/utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -22671,7 +22671,6 @@ const normalizeAddressField = (values, invalidValues) => {
|
|
|
22671
22671
|
};
|
|
22672
22672
|
const normalizeAddresses = (input) => {
|
|
22673
22673
|
return {
|
|
22674
|
-
...input,
|
|
22675
22674
|
to: normalizeAddressField(input.to, []),
|
|
22676
22675
|
cc: normalizeAddressField(input.cc, [...(input.to ?? [])]),
|
|
22677
22676
|
bcc: normalizeAddressField(input.bcc, [
|
|
@@ -22691,12 +22690,15 @@ exports.EmailService = class EmailService {
|
|
|
22691
22690
|
input.payload;
|
|
22692
22691
|
const sendInput = {
|
|
22693
22692
|
...input,
|
|
22694
|
-
...normalizeAddresses(input),
|
|
22695
22693
|
payload: transformedPayload,
|
|
22696
22694
|
};
|
|
22697
22695
|
const transformedInput = (await this.templateMiddleware?.processInput(sendInput)) ?? sendInput;
|
|
22698
|
-
|
|
22699
|
-
|
|
22696
|
+
const normalizedInput = {
|
|
22697
|
+
...transformedInput,
|
|
22698
|
+
...normalizeAddresses(transformedInput),
|
|
22699
|
+
};
|
|
22700
|
+
await this.provider.sendTemplatedEmail(normalizedInput, template);
|
|
22701
|
+
await this.logger.logTemplatedEmail(normalizedInput);
|
|
22700
22702
|
}
|
|
22701
22703
|
async sendHtmlEmail(input) {
|
|
22702
22704
|
await this.provider.sendHtmlEmail(input);
|