@nestjs-modules/mailer 2.0.2 → 2.1.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/CHANGELOG.md +150 -185
- package/dist/adapters/ejs.adapter.js +4 -3
- package/dist/adapters/handlebars.adapter.js +5 -4
- package/dist/adapters/liquid.adapter.d.ts +1 -1
- package/dist/adapters/liquid.adapter.js +12 -5
- package/dist/adapters/mjml.adapter.d.ts +2 -2
- package/dist/adapters/mjml.adapter.js +6 -4
- package/dist/adapters/pug.adapter.js +3 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/interfaces/mailer-async-options.interface.d.ts +1 -1
- package/dist/interfaces/mailer-options.interface.d.ts +4 -4
- package/dist/interfaces/send-mail-options.interface.d.ts +0 -1
- package/dist/mailer-core.module.d.ts +1 -1
- package/dist/mailer-core.module.js +4 -2
- package/dist/mailer-transport.factory.js +1 -1
- package/dist/mailer.module.d.ts +1 -1
- package/dist/mailer.service.d.ts +1 -1
- package/dist/mailer.service.js +12 -10
- package/package.json +79 -59
- package/.env +0 -2
- package/.nvmrc +0 -1
- package/LICENSE +0 -21
- package/README.md +0 -72
- package/SECURITY.md +0 -21
- package/index.d.ts +0 -1
- package/index.js +0 -6
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EjsAdapter = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
6
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
7
|
+
const css_inline_1 = require("@css-inline/css-inline");
|
|
4
8
|
const ejs_1 = require("ejs");
|
|
5
9
|
const lodash_1 = require("lodash");
|
|
6
|
-
const fs = require("fs");
|
|
7
|
-
const path = require("path");
|
|
8
|
-
const css_inline_1 = require("@css-inline/css-inline");
|
|
9
10
|
class EjsAdapter {
|
|
10
11
|
constructor(config) {
|
|
11
12
|
this.precompiledTemplates = {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HandlebarsAdapter = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
6
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
7
7
|
const css_inline_1 = require("@css-inline/css-inline");
|
|
8
|
-
const glob = require("glob");
|
|
8
|
+
const glob = tslib_1.__importStar(require("glob"));
|
|
9
|
+
const handlebars = tslib_1.__importStar(require("handlebars"));
|
|
9
10
|
const lodash_1 = require("lodash");
|
|
10
11
|
class HandlebarsAdapter {
|
|
11
12
|
constructor(helpers, config) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Liquid } from 'liquidjs';
|
|
1
2
|
import { MailerOptions } from '../interfaces/mailer-options.interface';
|
|
2
3
|
import { TemplateAdapter } from '../interfaces/template-adapter.interface';
|
|
3
|
-
import { Liquid } from 'liquidjs';
|
|
4
4
|
export declare class LiquidAdapter implements TemplateAdapter {
|
|
5
5
|
private config;
|
|
6
6
|
constructor(config?: Partial<Liquid['options']>);
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LiquidAdapter = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
6
6
|
const liquidjs_1 = require("liquidjs");
|
|
7
|
+
const lodash_1 = require("lodash");
|
|
7
8
|
class LiquidAdapter {
|
|
8
9
|
constructor(config) {
|
|
9
|
-
|
|
10
|
+
this.config = {};
|
|
11
|
+
if (config) {
|
|
12
|
+
Object.assign(this.config, config);
|
|
13
|
+
}
|
|
10
14
|
}
|
|
11
15
|
compile(mail, callback, mailerOptions) {
|
|
12
16
|
const { context, template } = mail.data;
|
|
@@ -16,10 +20,13 @@ class LiquidAdapter {
|
|
|
16
20
|
? path.dirname(template)
|
|
17
21
|
: path.join((0, lodash_1.get)(mailerOptions, 'template.dir', ''), path.dirname(template));
|
|
18
22
|
const engine = new liquidjs_1.Liquid(Object.assign({ extname: templateExt, root: templateDir }, this.config.globals));
|
|
19
|
-
engine
|
|
23
|
+
engine
|
|
24
|
+
.renderFile(templateName, context)
|
|
25
|
+
.then((body) => {
|
|
20
26
|
mail.data.html = body;
|
|
21
27
|
return callback();
|
|
22
|
-
})
|
|
28
|
+
})
|
|
29
|
+
.catch((err) => {
|
|
23
30
|
return callback(err);
|
|
24
31
|
});
|
|
25
32
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TemplateAdapterConfig } from '../interfaces/template-adapter-config.interface';
|
|
2
|
-
import { TemplateAdapter } from '../interfaces/template-adapter.interface';
|
|
3
1
|
import { MailerOptions } from '../interfaces/mailer-options.interface';
|
|
2
|
+
import { TemplateAdapter } from '../interfaces/template-adapter.interface';
|
|
3
|
+
import { TemplateAdapterConfig } from '../interfaces/template-adapter-config.interface';
|
|
4
4
|
export declare class MjmlAdapter implements TemplateAdapter {
|
|
5
5
|
private engine;
|
|
6
6
|
constructor(engine: TemplateAdapter | '' | 'pug' | 'handlebars' | 'ejs', config?: TemplateAdapterConfig, others?: {
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MjmlAdapter = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const mjml_1 = tslib_1.__importDefault(require("mjml"));
|
|
5
6
|
const ejs_adapter_1 = require("./ejs.adapter");
|
|
7
|
+
const handlebars_adapter_1 = require("./handlebars.adapter");
|
|
6
8
|
const pug_adapter_1 = require("./pug.adapter");
|
|
7
|
-
const mjml_1 = require("mjml");
|
|
8
9
|
class MjmlAdapter {
|
|
9
10
|
constructor(engine, config, others) {
|
|
11
|
+
var _a;
|
|
10
12
|
this.engine = engine;
|
|
11
|
-
if (typeof engine
|
|
13
|
+
if (typeof engine === 'string') {
|
|
12
14
|
if (engine === 'pug') {
|
|
13
15
|
this.engine = new pug_adapter_1.PugAdapter(config);
|
|
14
16
|
}
|
|
15
17
|
else if (engine === 'handlebars') {
|
|
16
|
-
this.engine = new handlebars_adapter_1.HandlebarsAdapter(others.handlebar.helper, config);
|
|
18
|
+
this.engine = new handlebars_adapter_1.HandlebarsAdapter((_a = others === null || others === void 0 ? void 0 : others.handlebar) === null || _a === void 0 ? void 0 : _a.helper, config);
|
|
17
19
|
}
|
|
18
20
|
else if (engine === 'ejs') {
|
|
19
21
|
this.engine = new ejs_adapter_1.EjsAdapter(config);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PugAdapter = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
6
|
+
const css_inline_1 = require("@css-inline/css-inline");
|
|
5
7
|
const lodash_1 = require("lodash");
|
|
6
8
|
const pug_1 = require("pug");
|
|
7
|
-
const css_inline_1 = require("@css-inline/css-inline");
|
|
8
9
|
class PugAdapter {
|
|
9
10
|
constructor(config) {
|
|
10
11
|
this.config = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { MailerModule } from './mailer.module';
|
|
2
1
|
export { MAILER_OPTIONS, MAILER_TRANSPORT_FACTORY, } from './constants/mailer.constant';
|
|
3
2
|
export { MailerOptions } from './interfaces/mailer-options.interface';
|
|
4
|
-
export { TemplateAdapter } from './interfaces/template-adapter.interface';
|
|
5
3
|
export { MailerOptionsFactory } from './interfaces/mailer-options-factory.interface';
|
|
6
|
-
export { ISendMailOptions } from './interfaces/send-mail-options.interface';
|
|
7
4
|
export { MailerTransportFactory } from './interfaces/mailer-transport-factory.interface';
|
|
5
|
+
export { ISendMailOptions } from './interfaces/send-mail-options.interface';
|
|
6
|
+
export { TemplateAdapter } from './interfaces/template-adapter.interface';
|
|
7
|
+
export { MailerModule } from './mailer.module';
|
|
8
8
|
export { MailerService } from './mailer.service';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MailerService = exports.
|
|
4
|
-
var mailer_module_1 = require("./mailer.module");
|
|
5
|
-
Object.defineProperty(exports, "MailerModule", { enumerable: true, get: function () { return mailer_module_1.MailerModule; } });
|
|
3
|
+
exports.MailerService = exports.MailerModule = exports.MAILER_TRANSPORT_FACTORY = exports.MAILER_OPTIONS = void 0;
|
|
6
4
|
var mailer_constant_1 = require("./constants/mailer.constant");
|
|
7
5
|
Object.defineProperty(exports, "MAILER_OPTIONS", { enumerable: true, get: function () { return mailer_constant_1.MAILER_OPTIONS; } });
|
|
8
6
|
Object.defineProperty(exports, "MAILER_TRANSPORT_FACTORY", { enumerable: true, get: function () { return mailer_constant_1.MAILER_TRANSPORT_FACTORY; } });
|
|
7
|
+
var mailer_module_1 = require("./mailer.module");
|
|
8
|
+
Object.defineProperty(exports, "MailerModule", { enumerable: true, get: function () { return mailer_module_1.MailerModule; } });
|
|
9
9
|
var mailer_service_1 = require("./mailer.service");
|
|
10
10
|
Object.defineProperty(exports, "MailerService", { enumerable: true, get: function () { return mailer_service_1.MailerService; } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
|
|
2
1
|
import { Provider } from '@nestjs/common';
|
|
2
|
+
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
|
|
3
3
|
import { MailerOptions } from './mailer-options.interface';
|
|
4
4
|
import { MailerOptionsFactory } from './mailer-options-factory.interface';
|
|
5
5
|
export interface MailerAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Transport, TransportOptions } from 'nodemailer';
|
|
2
|
-
import * as SMTPTransport from 'nodemailer/lib/smtp-transport';
|
|
3
|
-
import * as SMTPPool from 'nodemailer/lib/smtp-pool';
|
|
4
|
-
import * as SendmailTransport from 'nodemailer/lib/sendmail-transport';
|
|
5
|
-
import * as StreamTransport from 'nodemailer/lib/stream-transport';
|
|
6
2
|
import * as JSONTransport from 'nodemailer/lib/json-transport';
|
|
3
|
+
import * as SendmailTransport from 'nodemailer/lib/sendmail-transport';
|
|
7
4
|
import * as SESTransport from 'nodemailer/lib/ses-transport';
|
|
5
|
+
import * as SMTPPool from 'nodemailer/lib/smtp-pool';
|
|
6
|
+
import * as SMTPTransport from 'nodemailer/lib/smtp-transport';
|
|
7
|
+
import * as StreamTransport from 'nodemailer/lib/stream-transport';
|
|
8
8
|
import { TemplateAdapter } from './template-adapter.interface';
|
|
9
9
|
type Options = SMTPTransport.Options | SMTPPool.Options | SendmailTransport.Options | StreamTransport.Options | JSONTransport.Options | SESTransport.Options | TransportOptions;
|
|
10
10
|
export type TransportType = Options | SMTPTransport | SMTPPool | SendmailTransport | StreamTransport | JSONTransport | SESTransport | Transport | string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule } from '@nestjs/common';
|
|
2
|
-
import { MailerOptions } from './interfaces/mailer-options.interface';
|
|
3
2
|
import { MailerAsyncOptions } from './interfaces/mailer-async-options.interface';
|
|
3
|
+
import { MailerOptions } from './interfaces/mailer-options.interface';
|
|
4
4
|
export declare class MailerCoreModule {
|
|
5
5
|
static forRoot(options: MailerOptions): DynamicModule;
|
|
6
6
|
static forRootAsync(options: MailerAsyncOptions): DynamicModule;
|
|
@@ -24,7 +24,7 @@ let MailerCoreModule = MailerCoreModule_1 = class MailerCoreModule {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
static forRootAsync(options) {
|
|
27
|
-
const providers =
|
|
27
|
+
const providers = MailerCoreModule_1.createAsyncProviders(options);
|
|
28
28
|
return {
|
|
29
29
|
module: MailerCoreModule_1,
|
|
30
30
|
providers: [
|
|
@@ -39,7 +39,9 @@ let MailerCoreModule = MailerCoreModule_1 = class MailerCoreModule {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
static createAsyncProviders(options) {
|
|
42
|
-
const providers = [
|
|
42
|
+
const providers = [
|
|
43
|
+
MailerCoreModule_1.createAsyncOptionsProvider(options),
|
|
44
|
+
];
|
|
43
45
|
if (options.useClass) {
|
|
44
46
|
providers.push({
|
|
45
47
|
provide: options.useClass,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MailerTransportFactory = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const nodemailer_1 = require("nodemailer");
|
|
6
5
|
const common_1 = require("@nestjs/common");
|
|
6
|
+
const nodemailer_1 = require("nodemailer");
|
|
7
7
|
const mailer_constant_1 = require("./constants/mailer.constant");
|
|
8
8
|
let MailerTransportFactory = class MailerTransportFactory {
|
|
9
9
|
constructor(options) {
|
package/dist/mailer.module.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamicModule } from '@nestjs/common';
|
|
2
|
-
import { MailerOptions } from './interfaces/mailer-options.interface';
|
|
3
2
|
import { MailerAsyncOptions } from './interfaces/mailer-async-options.interface';
|
|
3
|
+
import { MailerOptions } from './interfaces/mailer-options.interface';
|
|
4
4
|
export declare class MailerModule {
|
|
5
5
|
static forRoot(options?: MailerOptions): DynamicModule;
|
|
6
6
|
static forRootAsync(options: MailerAsyncOptions): DynamicModule;
|
package/dist/mailer.service.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SentMessageInfo } from 'nodemailer';
|
|
2
2
|
import * as smtpTransport from 'nodemailer/lib/smtp-transport';
|
|
3
3
|
import { MailerOptions } from './interfaces/mailer-options.interface';
|
|
4
|
-
import { ISendMailOptions } from './interfaces/send-mail-options.interface';
|
|
5
4
|
import { MailerTransportFactory as IMailerTransportFactory } from './interfaces/mailer-transport-factory.interface';
|
|
5
|
+
import { ISendMailOptions } from './interfaces/send-mail-options.interface';
|
|
6
6
|
export declare class MailerService {
|
|
7
7
|
private readonly mailerOptions;
|
|
8
8
|
private readonly transportFactory;
|
package/dist/mailer.service.js
CHANGED
|
@@ -3,8 +3,8 @@ var MailerService_1;
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.MailerService = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const lodash_1 = require("lodash");
|
|
7
6
|
const common_1 = require("@nestjs/common");
|
|
7
|
+
const lodash_1 = require("lodash");
|
|
8
8
|
const mailer_constant_1 = require("./constants/mailer.constant");
|
|
9
9
|
const mailer_transport_factory_1 = require("./mailer-transport.factory");
|
|
10
10
|
let MailerService = MailerService_1 = class MailerService {
|
|
@@ -20,7 +20,7 @@ let MailerService = MailerService_1 = class MailerService {
|
|
|
20
20
|
try {
|
|
21
21
|
previewEmail = require('preview-email');
|
|
22
22
|
}
|
|
23
|
-
catch (
|
|
23
|
+
catch (_err) {
|
|
24
24
|
this.mailerLogger.warn('preview-email is not installed. This is an optional dependency. Install it if you want to preview emails in the development environment. You can install it using npm (npm install preview-email), yarn (yarn add preview-email), or pnpm (pnpm add preview-email).');
|
|
25
25
|
}
|
|
26
26
|
if (this.mailerOptions.preview) {
|
|
@@ -87,25 +87,27 @@ let MailerService = MailerService_1 = class MailerService {
|
|
|
87
87
|
if (!transporter.verify)
|
|
88
88
|
return;
|
|
89
89
|
Promise.resolve(transporter.verify())
|
|
90
|
-
.then(() => this.mailerLogger.
|
|
90
|
+
.then(() => this.mailerLogger.log(`Transporter${transporterName} is ready`))
|
|
91
91
|
.catch((error) => this.mailerLogger.error(`Error occurred while verifying the transporter${transporterName}: ${error.message}`));
|
|
92
92
|
}
|
|
93
93
|
verifyAllTransporters() {
|
|
94
94
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
95
95
|
const transporters = [...this.transporters.values(), this.transporter];
|
|
96
|
-
const transportersVerified = yield Promise.all(transporters.map(transporter => {
|
|
96
|
+
const transportersVerified = yield Promise.all(transporters.map((transporter) => {
|
|
97
97
|
if (!transporter.verify)
|
|
98
98
|
return true;
|
|
99
|
-
return Promise.resolve(transporter.verify())
|
|
99
|
+
return Promise.resolve(transporter.verify())
|
|
100
|
+
.then(() => true)
|
|
101
|
+
.catch(() => false);
|
|
100
102
|
}));
|
|
101
|
-
return transportersVerified.every(verified => verified);
|
|
103
|
+
return transportersVerified.every((verified) => verified);
|
|
102
104
|
});
|
|
103
105
|
}
|
|
104
106
|
sendMail(sendMailOptions) {
|
|
105
107
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
var _a;
|
|
106
109
|
if (sendMailOptions.transporterName) {
|
|
107
|
-
if (this.transporters
|
|
108
|
-
this.transporters.get(sendMailOptions.transporterName)) {
|
|
110
|
+
if ((_a = this.transporters) === null || _a === void 0 ? void 0 : _a.get(sendMailOptions.transporterName)) {
|
|
109
111
|
return yield this.transporters
|
|
110
112
|
.get(sendMailOptions.transporterName)
|
|
111
113
|
.sendMail(sendMailOptions);
|
|
@@ -125,8 +127,8 @@ let MailerService = MailerService_1 = class MailerService {
|
|
|
125
127
|
});
|
|
126
128
|
}
|
|
127
129
|
addTransporter(transporterName, config) {
|
|
128
|
-
this.
|
|
129
|
-
this.
|
|
130
|
+
const transporter = this.createTransporter(config, transporterName);
|
|
131
|
+
this.transporters.set(transporterName, transporter);
|
|
130
132
|
return transporterName;
|
|
131
133
|
}
|
|
132
134
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs-modules/mailer",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "NestJS - a mailer module (@mailer)",
|
|
6
6
|
"keywords": [
|
|
@@ -18,6 +18,25 @@
|
|
|
18
18
|
"url": "git+https://github.com/nest-modules/mailer.git"
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"default": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./adapters/*": {
|
|
29
|
+
"types": "./dist/adapters/*.d.ts",
|
|
30
|
+
"default": "./dist/adapters/*.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"typesVersions": {
|
|
34
|
+
"*": {
|
|
35
|
+
"adapters/*": [
|
|
36
|
+
"./dist/adapters/*"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
21
40
|
"author": "Nest Modules TM",
|
|
22
41
|
"contributors": [
|
|
23
42
|
"Cristiam Díaz <c.diaz@udla.edu.co>",
|
|
@@ -31,85 +50,86 @@
|
|
|
31
50
|
"scripts": {
|
|
32
51
|
"prebuild": "rimraf dist",
|
|
33
52
|
"build": "tsc -p tsconfig.json",
|
|
34
|
-
"
|
|
35
|
-
"format": "prettier **/**/*.ts --ignore-path ./.prettierignore --write",
|
|
36
|
-
"audit:convert": "yarn-audit-fix --flow=convert",
|
|
37
|
-
"audit:patch": "yarn-audit-fix --flow=patch",
|
|
38
|
-
"audit:fix": "npx yarn-audit-fix --package-lock-only=false --force --legacy-peer-deps --flow=convert",
|
|
39
|
-
"major": "npm run release -- --release-as major",
|
|
40
|
-
"minor": "npm run release -- --release-as minor",
|
|
41
|
-
"patch": "npm run release -- --release-as patch",
|
|
42
|
-
"release": "standard-version",
|
|
53
|
+
"check": "biome check .",
|
|
43
54
|
"test": "jest"
|
|
44
55
|
},
|
|
45
|
-
"husky": {
|
|
46
|
-
"hooks": {
|
|
47
|
-
"pre-commit": "lint-staged",
|
|
48
|
-
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"lint-staged": {
|
|
52
|
-
"*.ts": [
|
|
53
|
-
"prettier --write"
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@css-inline/css-inline": "0.
|
|
58
|
-
"glob": "
|
|
57
|
+
"@css-inline/css-inline": "0.20.0",
|
|
58
|
+
"glob": "13.0.6",
|
|
59
|
+
"tslib": "^2.8.1"
|
|
59
60
|
},
|
|
60
61
|
"optionalDependencies": {
|
|
61
62
|
"@types/ejs": "^3.1.5",
|
|
62
|
-
"@types/pug": "^2.0.10",
|
|
63
63
|
"@types/mjml": "^4.7.4",
|
|
64
|
-
"
|
|
64
|
+
"@types/pug": "^2.0.10",
|
|
65
|
+
"ejs": "^5.0.1",
|
|
65
66
|
"handlebars": "^4.7.8",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
67
|
+
"liquidjs": "^10.25.0",
|
|
68
|
+
"mjml": "^5.0.0-alpha.4",
|
|
69
|
+
"preview-email": "^3.1.1",
|
|
70
|
+
"pug": "^3.0.4"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"@nestjs/
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"@types/
|
|
78
|
-
"@types/
|
|
79
|
-
"@types/lodash": "4.17.0",
|
|
80
|
-
"@types/nodemailer": "6.4.14",
|
|
73
|
+
"@nestjs/common": "11.1.17",
|
|
74
|
+
"@nestjs/core": "11.1.17",
|
|
75
|
+
"@nestjs/testing": "11.1.17",
|
|
76
|
+
"@types/glob": "9.0.0",
|
|
77
|
+
"@types/jest": "30.0.0",
|
|
78
|
+
"@types/lodash": "4.17.24",
|
|
79
|
+
"@types/nodemailer": "7.0.11",
|
|
81
80
|
"@types/pug": "2.0.10",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"lint-staged": "15.2.2",
|
|
87
|
-
"nodemailer": "6.9.13",
|
|
88
|
-
"nodemailer-mock": "2.0.6",
|
|
89
|
-
"prettier": "3.2.5",
|
|
90
|
-
"preview-email": "3.0.19",
|
|
81
|
+
"jest": "30.3.0",
|
|
82
|
+
"nodemailer": "8.0.3",
|
|
83
|
+
"nodemailer-mock": "2.0.9",
|
|
84
|
+
"preview-email": "3.1.1",
|
|
91
85
|
"reflect-metadata": "0.2.2",
|
|
92
|
-
"rimraf": "
|
|
93
|
-
"rxjs": "7.8.
|
|
94
|
-
"
|
|
95
|
-
"ts-jest": "29.1.2",
|
|
86
|
+
"rimraf": "6.1.3",
|
|
87
|
+
"rxjs": "7.8.2",
|
|
88
|
+
"ts-jest": "29.4.6",
|
|
96
89
|
"ts-node": "10.9.2",
|
|
97
|
-
"
|
|
98
|
-
"typescript": "5.4.5",
|
|
99
|
-
"yarn-audit-fix": "10.0.7"
|
|
90
|
+
"typescript": "5.9.3"
|
|
100
91
|
},
|
|
101
92
|
"peerDependencies": {
|
|
102
93
|
"@nestjs/common": ">=7.0.9",
|
|
103
94
|
"@nestjs/core": ">=7.0.9",
|
|
104
95
|
"@types/ejs": ">=3.0.3",
|
|
105
|
-
"@types/pug": ">=2.0.6",
|
|
106
96
|
"@types/mjml": ">=4.7.4",
|
|
107
|
-
"
|
|
97
|
+
"@types/pug": ">=2.0.6",
|
|
108
98
|
"ejs": ">=3.1.2",
|
|
109
99
|
"handlebars": ">=4.7.6",
|
|
110
|
-
"mjml": ">=4.15.3",
|
|
111
|
-
"pug": ">=3.0.1",
|
|
112
100
|
"liquidjs": ">=10.8.2",
|
|
113
|
-
"
|
|
101
|
+
"mjml": ">=4.15.3",
|
|
102
|
+
"nodemailer": ">=6.4.6",
|
|
103
|
+
"preview-email": ">=3.0.19",
|
|
104
|
+
"pug": ">=3.0.1"
|
|
105
|
+
},
|
|
106
|
+
"peerDependenciesMeta": {
|
|
107
|
+
"@types/ejs": {
|
|
108
|
+
"optional": true
|
|
109
|
+
},
|
|
110
|
+
"@types/pug": {
|
|
111
|
+
"optional": true
|
|
112
|
+
},
|
|
113
|
+
"@types/mjml": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
116
|
+
"ejs": {
|
|
117
|
+
"optional": true
|
|
118
|
+
},
|
|
119
|
+
"handlebars": {
|
|
120
|
+
"optional": true
|
|
121
|
+
},
|
|
122
|
+
"mjml": {
|
|
123
|
+
"optional": true
|
|
124
|
+
},
|
|
125
|
+
"pug": {
|
|
126
|
+
"optional": true
|
|
127
|
+
},
|
|
128
|
+
"liquidjs": {
|
|
129
|
+
"optional": true
|
|
130
|
+
},
|
|
131
|
+
"preview-email": {
|
|
132
|
+
"optional": true
|
|
133
|
+
}
|
|
114
134
|
}
|
|
115
135
|
}
|
package/.env
DELETED
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
v20.12.2
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 Nest modules
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
package/README.md
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="http://nestjs.com/" target="blank">
|
|
3
|
-
<img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" />
|
|
4
|
-
</a>
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
A mailer module for Nest framework (node.js) using <a href="https://nodemailer.com/">Nodemailer</a> library
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
<p align="center">
|
|
12
|
-
<a href="https://www.npmjs.com/org/nestjs-modules"><img src="https://img.shields.io/npm/v/@nestjs-modules/mailer.svg" alt="NPM Version" /></a>
|
|
13
|
-
<a href="https://www.npmjs.com/org/nestjs-modules"><img src="https://img.shields.io/npm/l/@nestjs-modules/mailer.svg" alt="Package License" /></a>
|
|
14
|
-
<a href="https://www.npmjs.com/org/nestjs-modules"><img src="https://img.shields.io/npm/dm/@nestjs-modules/mailer.svg" alt="NPM Downloads" /></a>
|
|
15
|
-
<a href="https://opencollective.com/nest-modules#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
|
|
16
|
-
</p>
|
|
17
|
-
|
|
18
|
-
### Installation
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
npm install --save @nestjs-modules/mailer nodemailer
|
|
22
|
-
npm install --save-dev @types/nodemailer
|
|
23
|
-
#or
|
|
24
|
-
yarn add @nestjs-modules/mailer nodemailer
|
|
25
|
-
yarn add -D @types/nodemailer
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**Hint:** handlebars and pug is an optional dependency, if you want to use the template, you must install it.
|
|
29
|
-
|
|
30
|
-
#### with npm
|
|
31
|
-
```sh
|
|
32
|
-
npm install --save handlebars
|
|
33
|
-
#or
|
|
34
|
-
npm install --save pug
|
|
35
|
-
#or
|
|
36
|
-
npm install --save ejs
|
|
37
|
-
#or
|
|
38
|
-
npm install --save mjml
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
#### with yarn
|
|
42
|
-
```sh
|
|
43
|
-
yarn add handlebars
|
|
44
|
-
#or
|
|
45
|
-
yarn add pug
|
|
46
|
-
#or
|
|
47
|
-
yarn add ejs
|
|
48
|
-
#or
|
|
49
|
-
yarn add mjml
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Documentation
|
|
53
|
-
|
|
54
|
-
you can find all the documentation [here](https://nest-modules.github.io/mailer/) for the email module
|
|
55
|
-
|
|
56
|
-
### Starter kit
|
|
57
|
-
|
|
58
|
-
- [Sending email-template with outlook](https://github.com/yanarp/nestjs-mailer) - Starter kit, nestjs mailer implementation on outlook smtp with email-template
|
|
59
|
-
|
|
60
|
-
### Contributing
|
|
61
|
-
|
|
62
|
-
* [Cristiam Diaz](https://github.com/cdiaz)
|
|
63
|
-
* [Eduardo Leal](https://github.com/eduardoleal)
|
|
64
|
-
* [Juan Echeverry](https://github.com/juandav)
|
|
65
|
-
* [Pat McGowan](https://github.com/p-mcgowan)
|
|
66
|
-
* [Paweł Partyka](https://github.com/partyka95)
|
|
67
|
-
* [Wasutan Kitijerapat](https://github.com/kitimark)
|
|
68
|
-
* [Alexandre Titeux](https://github.com/GFoniX)
|
|
69
|
-
|
|
70
|
-
### License
|
|
71
|
-
|
|
72
|
-
MIT
|
package/SECURITY.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
Use this section to tell people about which versions of your project are
|
|
6
|
-
currently being supported with security updates.
|
|
7
|
-
|
|
8
|
-
| Version | Supported |
|
|
9
|
-
| ------- | ------------------ |
|
|
10
|
-
| 5.1.x | :white_check_mark: |
|
|
11
|
-
| 5.0.x | :x: |
|
|
12
|
-
| 4.0.x | :white_check_mark: |
|
|
13
|
-
| < 4.0 | :x: |
|
|
14
|
-
|
|
15
|
-
## Reporting a Vulnerability
|
|
16
|
-
|
|
17
|
-
Use this section to tell people how to report a vulnerability.
|
|
18
|
-
|
|
19
|
-
Tell them where to go, how often they can expect to get an update on a
|
|
20
|
-
reported vulnerability, what to expect if the vulnerability is accepted or
|
|
21
|
-
declined, etc.
|
package/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist';
|