@studiosonrai/nestjs-email 1.0.0
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/src/email.constants.d.ts +2 -0
- package/dist/src/email.constants.js +6 -0
- package/dist/src/email.constants.js.map +1 -0
- package/dist/src/email.module.d.ts +8 -0
- package/dist/src/email.module.js +105 -0
- package/dist/src/email.module.js.map +1 -0
- package/dist/src/email.service.d.ts +11 -0
- package/dist/src/email.service.js +59 -0
- package/dist/src/email.service.js.map +1 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.js +24 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interfaces/email.interfaces.d.ts +74 -0
- package/dist/src/interfaces/email.interfaces.js +3 -0
- package/dist/src/interfaces/email.interfaces.js.map +1 -0
- package/dist/src/providers/azure.provider.d.ts +16 -0
- package/dist/src/providers/azure.provider.js +183 -0
- package/dist/src/providers/azure.provider.js.map +1 -0
- package/dist/src/providers/index.d.ts +2 -0
- package/dist/src/providers/index.js +19 -0
- package/dist/src/providers/index.js.map +1 -0
- package/dist/src/providers/smtp.provider.d.ts +17 -0
- package/dist/src/providers/smtp.provider.js +152 -0
- package/dist/src/providers/smtp.provider.js.map +1 -0
- package/dist/src/template.service.d.ts +9 -0
- package/dist/src/template.service.js +76 -0
- package/dist/src/template.service.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SmtpEmailProvider = void 0;
|
|
37
|
+
class SmtpEmailProvider {
|
|
38
|
+
constructor(config, options) {
|
|
39
|
+
this.ready = false;
|
|
40
|
+
this.defaultFrom = options?.defaultFrom;
|
|
41
|
+
this.imageCompression = options?.imageCompression;
|
|
42
|
+
this.verbose = options?.verbose ?? false;
|
|
43
|
+
this.initializeTransporter(config);
|
|
44
|
+
}
|
|
45
|
+
async initializeTransporter(config) {
|
|
46
|
+
try {
|
|
47
|
+
const nodemailer = await Promise.resolve().then(() => __importStar(require('nodemailer')));
|
|
48
|
+
this.transporter = nodemailer.createTransport({
|
|
49
|
+
host: config.host,
|
|
50
|
+
port: config.port,
|
|
51
|
+
secure: config.secure ?? false,
|
|
52
|
+
auth: config.auth,
|
|
53
|
+
tls: config.tls ?? { rejectUnauthorized: false },
|
|
54
|
+
connectionTimeout: config.connectionTimeout ?? 5000,
|
|
55
|
+
greetingTimeout: config.greetingTimeout ?? 5000,
|
|
56
|
+
socketTimeout: config.socketTimeout ?? 10000,
|
|
57
|
+
});
|
|
58
|
+
this.ready = true;
|
|
59
|
+
if (this.verbose) {
|
|
60
|
+
console.log(`[EmailModule] SMTP provider initialized: ${config.host}:${config.port}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
console.error('[EmailModule] Failed to initialize SMTP provider:', error);
|
|
65
|
+
throw new Error('Failed to initialize SMTP provider. Make sure nodemailer is installed.');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async compressAttachment(attachment) {
|
|
69
|
+
if (!this.imageCompression?.enabled) {
|
|
70
|
+
return attachment;
|
|
71
|
+
}
|
|
72
|
+
if (!attachment.contentType?.startsWith('image/')) {
|
|
73
|
+
return attachment;
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
const sharp = (await Promise.resolve().then(() => __importStar(require('sharp')))).default;
|
|
77
|
+
const buffer = attachment.content instanceof Buffer
|
|
78
|
+
? attachment.content
|
|
79
|
+
: Buffer.from(attachment.content, 'base64');
|
|
80
|
+
const compressedBuffer = await sharp(buffer)
|
|
81
|
+
.resize({
|
|
82
|
+
width: this.imageCompression.maxWidth ?? 1200,
|
|
83
|
+
withoutEnlargement: true,
|
|
84
|
+
})
|
|
85
|
+
.jpeg({ quality: this.imageCompression.quality ?? 75 })
|
|
86
|
+
.toBuffer();
|
|
87
|
+
return {
|
|
88
|
+
...attachment,
|
|
89
|
+
content: compressedBuffer,
|
|
90
|
+
contentType: 'image/jpeg',
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
if (this.verbose) {
|
|
95
|
+
console.warn(`[EmailModule] Failed to compress ${attachment.filename}, sending original.`);
|
|
96
|
+
}
|
|
97
|
+
return attachment;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
async sendEmail(options) {
|
|
101
|
+
if (!this.transporter) {
|
|
102
|
+
return {
|
|
103
|
+
success: false,
|
|
104
|
+
error: new Error('SMTP transporter not initialized'),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
let processedAttachments = [];
|
|
109
|
+
if (options.attachments?.length) {
|
|
110
|
+
processedAttachments = await Promise.all(options.attachments.map((att) => this.compressAttachment(att)));
|
|
111
|
+
}
|
|
112
|
+
const mailOptions = {
|
|
113
|
+
from: options.from ?? this.defaultFrom,
|
|
114
|
+
to: Array.isArray(options.to) ? options.to.join(', ') : options.to,
|
|
115
|
+
subject: options.subject,
|
|
116
|
+
html: options.html,
|
|
117
|
+
text: options.text,
|
|
118
|
+
cc: options.cc,
|
|
119
|
+
bcc: options.bcc,
|
|
120
|
+
replyTo: options.replyTo,
|
|
121
|
+
};
|
|
122
|
+
if (processedAttachments.length > 0) {
|
|
123
|
+
mailOptions.attachments = processedAttachments.map((att) => ({
|
|
124
|
+
filename: att.filename,
|
|
125
|
+
content: att.content,
|
|
126
|
+
contentType: att.contentType,
|
|
127
|
+
encoding: att.encoding ?? 'base64',
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
130
|
+
const result = await this.transporter.sendMail(mailOptions);
|
|
131
|
+
if (this.verbose) {
|
|
132
|
+
console.log(`[EmailModule] Email sent successfully via SMTP to ${options.to}`);
|
|
133
|
+
}
|
|
134
|
+
return {
|
|
135
|
+
success: true,
|
|
136
|
+
messageId: result.messageId,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
console.error('[EmailModule] SMTP send error:', error);
|
|
141
|
+
return {
|
|
142
|
+
success: false,
|
|
143
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
isReady() {
|
|
148
|
+
return this.ready;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.SmtpEmailProvider = SmtpEmailProvider;
|
|
152
|
+
//# sourceMappingURL=smtp.provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smtp.provider.js","sourceRoot":"","sources":["../../../src/providers/smtp.provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAa,iBAAiB;IAO5B,YACE,MAA2B,EAC3B,OAIC;QAXK,UAAK,GAAG,KAAK,CAAC;QAapB,IAAI,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,OAAO,EAAE,gBAAgB,CAAC;QAClD,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,IAAI,KAAK,CAAC;QACzC,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAEO,KAAK,CAAC,qBAAqB,CAAC,MAA2B;QAC7D,IAAI,CAAC;YAEH,MAAM,UAAU,GAAG,wDAAa,YAAY,GAAC,CAAC;YAE9C,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,eAAe,CAAC;gBAC5C,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK;gBAC9B,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,GAAG,EAAE,MAAM,CAAC,GAAG,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE;gBAChD,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,IAAI,IAAI;gBACnD,eAAe,EAAE,MAAM,CAAC,eAAe,IAAI,IAAI;gBAC/C,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,KAAK;aACtC,CAAC,CAAC;YAEV,IAAI,CAAC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O;aACzB,CAAC;YAEF,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACpC,WAAW,CAAC,WAAW,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;oBAC3D,QAAQ,EAAE,GAAG,CAAC,QAAQ;oBACtB,OAAO,EAAE,GAAG,CAAC,OAAO;oBACpB,WAAW,EAAE,GAAG,CAAC,WAAW;oBAC5B,QAAQ,EAAE,GAAG,CAAC,QAAQ,IAAI,QAAQ;iBACnC,CAAC,CAAC,CAAC;YACN,CAAC;YAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YAE5D,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjB,OAAO,CAAC,GAAG,CAAC,qDAAqD,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACjF,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,MAAM,CAAC,SAAS;aAC5B,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;YACvD,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aACjE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AA1JD,8CA0JC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TemplateData, TemplateValidationResult } from './interfaces/email.interfaces';
|
|
2
|
+
export declare class EmailTemplateService {
|
|
3
|
+
replacePlaceholders(template: string, data: TemplateData): string;
|
|
4
|
+
private processConditionals;
|
|
5
|
+
render(template: string, data: TemplateData): string;
|
|
6
|
+
validateTemplate(template: string, data: TemplateData): TemplateValidationResult;
|
|
7
|
+
extractPlaceholders(template: string): string[];
|
|
8
|
+
extractConditionals(template: string): string[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.EmailTemplateService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
let EmailTemplateService = class EmailTemplateService {
|
|
12
|
+
replacePlaceholders(template, data) {
|
|
13
|
+
let processedTemplate = template;
|
|
14
|
+
Object.keys(data).forEach((key) => {
|
|
15
|
+
const regex = new RegExp(`{{${key}}}`, 'g');
|
|
16
|
+
const value = data[key] !== null && data[key] !== undefined ? data[key] : '';
|
|
17
|
+
processedTemplate = processedTemplate.replace(regex, value.toString());
|
|
18
|
+
});
|
|
19
|
+
processedTemplate = this.processConditionals(processedTemplate, data);
|
|
20
|
+
return processedTemplate;
|
|
21
|
+
}
|
|
22
|
+
processConditionals(template, data) {
|
|
23
|
+
const conditionalRegex = /{{#if (\w+)}}([\s\S]*?){{else}}([\s\S]*?){{\/if}}/g;
|
|
24
|
+
template = template.replace(conditionalRegex, (match, condition, truePart, falsePart) => {
|
|
25
|
+
return data[condition] ? truePart : falsePart;
|
|
26
|
+
});
|
|
27
|
+
const simpleConditionalRegex = /{{#if (\w+)}}([\s\S]*?){{\/if}}/g;
|
|
28
|
+
template = template.replace(simpleConditionalRegex, (match, condition, truePart) => {
|
|
29
|
+
return data[condition] ? truePart : '';
|
|
30
|
+
});
|
|
31
|
+
return template;
|
|
32
|
+
}
|
|
33
|
+
render(template, data) {
|
|
34
|
+
return this.replacePlaceholders(template, data);
|
|
35
|
+
}
|
|
36
|
+
validateTemplate(template, data) {
|
|
37
|
+
const placeholderRegex = /{{(\w+)}}/g;
|
|
38
|
+
const matches = template.matchAll(placeholderRegex);
|
|
39
|
+
const requiredKeys = new Set();
|
|
40
|
+
for (const match of matches) {
|
|
41
|
+
if (!['#if', '/if', 'else'].includes(match[1])) {
|
|
42
|
+
requiredKeys.add(match[1]);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const missingKeys = Array.from(requiredKeys).filter((key) => !(key in data) || data[key] === null || data[key] === undefined);
|
|
46
|
+
return {
|
|
47
|
+
isValid: missingKeys.length === 0,
|
|
48
|
+
missingKeys,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
extractPlaceholders(template) {
|
|
52
|
+
const placeholderRegex = /{{(\w+)}}/g;
|
|
53
|
+
const matches = template.matchAll(placeholderRegex);
|
|
54
|
+
const keys = new Set();
|
|
55
|
+
for (const match of matches) {
|
|
56
|
+
if (!['#if', '/if', 'else'].includes(match[1])) {
|
|
57
|
+
keys.add(match[1]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return Array.from(keys);
|
|
61
|
+
}
|
|
62
|
+
extractConditionals(template) {
|
|
63
|
+
const conditionalRegex = /{{#if (\w+)}}/g;
|
|
64
|
+
const matches = template.matchAll(conditionalRegex);
|
|
65
|
+
const keys = new Set();
|
|
66
|
+
for (const match of matches) {
|
|
67
|
+
keys.add(match[1]);
|
|
68
|
+
}
|
|
69
|
+
return Array.from(keys);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.EmailTemplateService = EmailTemplateService;
|
|
73
|
+
exports.EmailTemplateService = EmailTemplateService = __decorate([
|
|
74
|
+
(0, common_1.Injectable)()
|
|
75
|
+
], EmailTemplateService);
|
|
76
|
+
//# sourceMappingURL=template.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.service.js","sourceRoot":"","sources":["../../src/template.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAarC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAU/B,mBAAmB,CAAC,QAAgB,EAAE,IAAkB;QACtD,IAAI,iBAAiB,GAAG,QAAQ,CAAC;QAGjC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAChC,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC;YAC5C,MAAM,KAAK,GACT,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACjE,iBAAiB,GAAG,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;QAGH,iBAAiB,GAAG,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;QAEtE,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAYO,mBAAmB,CAAC,QAAgB,EAAE,IAAkB;QAE9D,MAAM,gBAAgB,GACpB,oDAAoD,CAAC;QACvD,QAAQ,GAAG,QAAQ,CAAC,OAAO,CACzB,gBAAgB,EAChB,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;YACxC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,Q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