@lenne.tech/nest-server 11.1.8 → 11.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lenne.tech/nest-server",
3
- "version": "11.1.8",
3
+ "version": "11.1.10",
4
4
  "description": "Modern, fast, powerful Node.js web framework in TypeScript based on Nest with a GraphQL API and a connection to MongoDB (or other databases).",
5
5
  "keywords": [
6
6
  "node",
@@ -147,7 +147,7 @@
147
147
  "husky": "9.1.7",
148
148
  "jest": "29.7.0",
149
149
  "npm-watch": "0.13.0",
150
- "pm2": "6.0.5",
150
+ "pm2": "6.0.8",
151
151
  "prettier": "3.5.3",
152
152
  "pretty-quick": "4.1.1",
153
153
  "supertest": "7.1.0",
@@ -57,7 +57,7 @@ export class CheckSecurityInterceptor implements NestInterceptor {
57
57
  const dataJson = JSON.stringify(data);
58
58
  const response = data.securityCheck(user, force);
59
59
  new Promise(() => {
60
- if (dataJson !== JSON.stringify(response)) {
60
+ if (this.config.debug && dataJson !== JSON.stringify(response)) {
61
61
  const id = getStringIds(data);
62
62
  console.debug(
63
63
  'CheckSecurityInterceptor: securityCheck changed data of type',
@@ -1,3 +1,5 @@
1
+ import type SMTPPool = require('nodemailer/lib/smtp-pool');
2
+
1
3
  import { Injectable } from '@nestjs/common';
2
4
  import nodemailer = require('nodemailer');
3
5
  import { Attachment } from 'nodemailer/lib/mailer';
@@ -31,15 +33,17 @@ export class EmailService {
31
33
  htmlTemplate?: string;
32
34
  senderEmail?: string;
33
35
  senderName?: string;
36
+ smtp?: SMTPPool | SMTPPool.Options;
34
37
  templateData?: { [key: string]: any };
35
38
  text?: string;
36
39
  textTemplate?: string;
37
40
  },
38
41
  ): Promise<any> {
39
42
  // Process config
40
- const { attachments, htmlTemplate, senderEmail, senderName, templateData, textTemplate } = {
43
+ const { attachments, htmlTemplate, senderEmail, senderName, smtp, templateData, textTemplate } = {
41
44
  senderEmail: this.configService.getFastButReadOnly('email.defaultSender.email'),
42
45
  senderName: this.configService.getFastButReadOnly('email.defaultSender.name'),
46
+ smtp: config.smtp || this.configService.get('email.smtp'),
43
47
  ...config,
44
48
  };
45
49
 
@@ -71,7 +75,7 @@ export class EmailService {
71
75
  }
72
76
 
73
77
  // Init transporter
74
- const transporter = nodemailer.createTransport(this.configService.get('email.smtp'));
78
+ const transporter = nodemailer.createTransport(smtp);
75
79
 
76
80
  // Send mail
77
81
  return transporter.sendMail({