@lenne.tech/nest-server 9.0.23 → 9.0.24
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/core/common/helpers/input.helper.js +2 -2
- package/dist/core/common/helpers/input.helper.js.map +1 -1
- package/dist/core/common/services/mailjet.service.js +11 -1
- package/dist/core/common/services/mailjet.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/core/common/helpers/input.helper.ts +2 -2
- package/src/core/common/services/mailjet.service.ts +22 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lenne.tech/nest-server",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.24",
|
|
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",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"light-my-request": "5.8.0",
|
|
85
85
|
"lodash": "4.17.21",
|
|
86
86
|
"mongodb": "4.13.0",
|
|
87
|
-
"mongoose": "6.8.
|
|
87
|
+
"mongoose": "6.8.4",
|
|
88
88
|
"mongoose-gridfs": "1.3.0",
|
|
89
89
|
"multer-gridfs-storage": "5.0.2",
|
|
90
90
|
"multer": "1.4.5-lts.1",
|
|
@@ -95,24 +95,24 @@
|
|
|
95
95
|
"passport-jwt": "4.0.1",
|
|
96
96
|
"reflect-metadata": "0.1.13",
|
|
97
97
|
"rfdc": "1.3.0",
|
|
98
|
-
"rimraf": "4.
|
|
98
|
+
"rimraf": "4.1.1",
|
|
99
99
|
"rxjs": "7.8.0"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@nestjs/testing": "9.2.1",
|
|
103
103
|
"@types/cron": "2.0.0",
|
|
104
104
|
"@types/ejs": "3.1.1",
|
|
105
|
-
"@types/jest": "29.2.
|
|
105
|
+
"@types/jest": "29.2.6",
|
|
106
106
|
"@types/lodash": "4.14.191",
|
|
107
107
|
"@types/multer": "1.4.7",
|
|
108
108
|
"@types/node": "18.11.18",
|
|
109
109
|
"@types/nodemailer": "6.4.7",
|
|
110
110
|
"@types/passport": "1.0.11",
|
|
111
111
|
"@types/supertest": "2.0.12",
|
|
112
|
-
"@typescript-eslint/eslint-plugin": "5.48.
|
|
113
|
-
"@typescript-eslint/parser": "5.48.
|
|
112
|
+
"@typescript-eslint/eslint-plugin": "5.48.2",
|
|
113
|
+
"@typescript-eslint/parser": "5.48.2",
|
|
114
114
|
"coffeescript": "2.7.0",
|
|
115
|
-
"eslint": "8.
|
|
115
|
+
"eslint": "8.32.0",
|
|
116
116
|
"eslint-config-prettier": "8.6.0",
|
|
117
117
|
"find-file-up": "2.0.1",
|
|
118
118
|
"grunt": "1.5.3",
|
|
@@ -324,12 +324,12 @@ export function clone(object: any, options?: { proto?: boolean; circles?: boolea
|
|
|
324
324
|
try {
|
|
325
325
|
return rfdc(config)(object);
|
|
326
326
|
} catch (e) {
|
|
327
|
-
console.debug(e);
|
|
327
|
+
console.debug(e, config, object, 'automatic try to use rfdc with circles');
|
|
328
328
|
if (!config.circles) {
|
|
329
329
|
try {
|
|
330
330
|
return rfdc({ ...config, ...{ circles: true } })(object);
|
|
331
331
|
} catch (e) {
|
|
332
|
-
console.debug(e);
|
|
332
|
+
console.debug(e, 'rfcd with circles did not work automatic use of _.clone!');
|
|
333
333
|
return _.clone(object);
|
|
334
334
|
}
|
|
335
335
|
} else {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Injectable } from '@nestjs/common';
|
|
2
|
+
import { template } from 'lodash';
|
|
2
3
|
import { ConfigService } from './config.service';
|
|
3
4
|
// eslint-disable-next-line
|
|
4
5
|
const Mailjet = require('node-mailjet');
|
|
@@ -81,7 +82,27 @@ export class MailjetService {
|
|
|
81
82
|
apiSecret: this.configService.getFastButReadOnly('email.mailjet.api_key_private'),
|
|
82
83
|
});
|
|
83
84
|
} catch (e) {
|
|
84
|
-
|
|
85
|
+
if (
|
|
86
|
+
this.configService.getFastButReadOnly('email.mailjet.api_key_public') &&
|
|
87
|
+
this.configService.getFastButReadOnly('email.mailjet.api_key_private')
|
|
88
|
+
) {
|
|
89
|
+
throw new Error('Cannot connect to mailjet.');
|
|
90
|
+
}
|
|
91
|
+
console.debug(
|
|
92
|
+
JSON.stringify(
|
|
93
|
+
{
|
|
94
|
+
info: 'Mailjet credentials are missing',
|
|
95
|
+
'email.mailjet.api_key_public':
|
|
96
|
+
this.configService.getFastButReadOnly('email.mailjet.api_key_public') || 'missing',
|
|
97
|
+
'email.mailjet.api_key_private':
|
|
98
|
+
this.configService.getFastButReadOnly('email.mailjet.api_key_private') || 'missing',
|
|
99
|
+
templateData: templateData,
|
|
100
|
+
},
|
|
101
|
+
null,
|
|
102
|
+
2
|
|
103
|
+
)
|
|
104
|
+
);
|
|
105
|
+
return;
|
|
85
106
|
}
|
|
86
107
|
|
|
87
108
|
// Send mail with mailjet
|