@ccci/micro-server 1.0.50 → 1.0.52
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/index.js +15381 -2
- package/dist/types/ApplicationOptionType.d.ts +4 -0
- package/dist/utils/Mailer.d.ts +26 -0
- package/package.json +4 -1
|
@@ -15,5 +15,9 @@ export type ApplicationOptionType = {
|
|
|
15
15
|
minioAccessKey?: string;
|
|
16
16
|
minioSecretKey?: string;
|
|
17
17
|
minioUseSSL?: boolean;
|
|
18
|
+
smtpService?: string;
|
|
19
|
+
smtpHost?: string;
|
|
20
|
+
smtpUser?: string;
|
|
21
|
+
smtpPassword?: string;
|
|
18
22
|
};
|
|
19
23
|
//# sourceMappingURL=ApplicationOptionType.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ApplicationOptionType } from '..';
|
|
2
|
+
interface MailInterface {
|
|
3
|
+
from?: string;
|
|
4
|
+
to: string | string[];
|
|
5
|
+
cc?: string | string[];
|
|
6
|
+
bcc?: string | string[];
|
|
7
|
+
subject: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
html: string;
|
|
10
|
+
}
|
|
11
|
+
export default class Mailer {
|
|
12
|
+
private static instance;
|
|
13
|
+
private transporter;
|
|
14
|
+
private sender;
|
|
15
|
+
private LOCAL_DIR;
|
|
16
|
+
static getInstance(): Mailer;
|
|
17
|
+
connect(options: ApplicationOptionType): Promise<void>;
|
|
18
|
+
hasValidConfig(options: ApplicationOptionType): boolean;
|
|
19
|
+
sendMail(options: MailInterface, template?: string, values?: any): Promise<{
|
|
20
|
+
info: any;
|
|
21
|
+
emailLink: string | false;
|
|
22
|
+
}>;
|
|
23
|
+
findTemplate(name: string): Promise<unknown>;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=Mailer.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccci/micro-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"@types/express": "^4.17.21",
|
|
19
19
|
"@types/express-fileupload": "^1.5.0",
|
|
20
20
|
"@types/jsonwebtoken": "^9.0.6",
|
|
21
|
+
"@types/nodemailer": "^6.4.15",
|
|
21
22
|
"prettier": "^3.0.3",
|
|
22
23
|
"rimraf": "^5.0.5",
|
|
23
24
|
"typescript": "^5.2.2"
|
|
@@ -38,9 +39,11 @@
|
|
|
38
39
|
"cors": "^2.8.5",
|
|
39
40
|
"express": "^4.19.2",
|
|
40
41
|
"express-fileupload": "^1.5.0",
|
|
42
|
+
"handlebars": "^4.7.8",
|
|
41
43
|
"helmet": "^7.1.0",
|
|
42
44
|
"jsonwebtoken": "^9.0.2",
|
|
43
45
|
"minio": "^8.0.0",
|
|
46
|
+
"nodemailer": "^6.9.13",
|
|
44
47
|
"pg": "^8.11.5",
|
|
45
48
|
"pg-hstore": "^2.3.4",
|
|
46
49
|
"sequelize": "^6.37.3",
|