@h3ravel/mail 11.0.13 → 11.0.16
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.d.cts → index.d.ts} +2 -2
- package/package.json +10 -9
- package/dist/index.d.mts +0 -154
- /package/dist/{index.mjs → index.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference path="./app.globals.d.ts" />
|
|
2
2
|
import { SendMailOptions as SendMailOptions$1, SentMessageInfo } from "nodemailer";
|
|
3
|
+
import * as nodemailer_lib_ses_transport0 from "nodemailer/lib/ses-transport";
|
|
3
4
|
import SESConnection from "nodemailer/lib/ses-transport";
|
|
4
5
|
import SMTPConnection from "nodemailer/lib/smtp-connection";
|
|
5
6
|
import * as nodemailer_lib_sendmail_transport0 from "nodemailer/lib/sendmail-transport";
|
|
6
7
|
import SendmailTransport from "nodemailer/lib/sendmail-transport";
|
|
7
|
-
import * as nodemailer_lib_smtp_pool0 from "nodemailer/lib/smtp-pool";
|
|
8
8
|
import * as nodemailer_lib_smtp_transport0 from "nodemailer/lib/smtp-transport";
|
|
9
9
|
import { Application, ServiceProvider } from "@h3ravel/core";
|
|
10
10
|
|
|
@@ -75,7 +75,7 @@ declare class SendMailDriver implements MailDriverContract {
|
|
|
75
75
|
declare class SESDriver implements MailDriverContract {
|
|
76
76
|
private transporter;
|
|
77
77
|
constructor(config: SESConfig);
|
|
78
|
-
send(options: SendMailOptions$1): Promise<
|
|
78
|
+
send(options: SendMailOptions$1): Promise<nodemailer_lib_ses_transport0.SentMessageInfo>;
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/Drivers/SMTPDriver.d.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h3ravel/mail",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.16",
|
|
4
4
|
"description": "Mail drivers and templates system for H3ravel.",
|
|
5
5
|
"h3ravel": {
|
|
6
6
|
"providers": [
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
]
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
|
-
"main": "./dist/index.
|
|
12
|
-
"types": "./dist/index.d.
|
|
13
|
-
"module": "./dist/index.
|
|
11
|
+
"main": "./dist/index.cjs",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"
|
|
17
|
-
"import": "./dist/index.mjs",
|
|
16
|
+
"import": "./dist/index.js",
|
|
18
17
|
"require": "./dist/index.cjs"
|
|
19
|
-
}
|
|
18
|
+
},
|
|
19
|
+
"./*": "./*"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"dist"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"directory": "packages/mail"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@h3ravel/core": "^1.21.
|
|
34
|
+
"@h3ravel/core": "^1.21.6"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/nodemailer": "^6.4.17",
|
|
@@ -42,9 +42,10 @@
|
|
|
42
42
|
"nodemailer": "^7.0.5"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
|
+
"barrel": "barrelsby --directory src --delete --singleQuotes",
|
|
45
46
|
"build": "tsdown --config-loader unconfig",
|
|
46
47
|
"dev": "tsx watch src/index.ts",
|
|
47
|
-
"start": "node dist/index.
|
|
48
|
+
"start": "node dist/index.js",
|
|
48
49
|
"lint": "eslint . --ext .ts",
|
|
49
50
|
"test": "jest --passWithNoTests",
|
|
50
51
|
"version-patch": "pnpm version patch"
|
package/dist/index.d.mts
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/// <reference path="./app.globals.d.ts" />
|
|
2
|
-
import { SendMailOptions as SendMailOptions$1, SentMessageInfo } from "nodemailer";
|
|
3
|
-
import { Application, ServiceProvider } from "@h3ravel/core";
|
|
4
|
-
import SESConnection from "nodemailer/lib/ses-transport";
|
|
5
|
-
import SMTPConnection from "nodemailer/lib/smtp-connection";
|
|
6
|
-
import * as nodemailer_lib_sendmail_transport0 from "nodemailer/lib/sendmail-transport";
|
|
7
|
-
import SendmailTransport from "nodemailer/lib/sendmail-transport";
|
|
8
|
-
import * as nodemailer_lib_smtp_pool0 from "nodemailer/lib/smtp-pool";
|
|
9
|
-
import * as nodemailer_lib_smtp_transport0 from "nodemailer/lib/smtp-transport";
|
|
10
|
-
|
|
11
|
-
//#region src/Contracts/Mailer.d.ts
|
|
12
|
-
interface DeliveryReport {
|
|
13
|
-
accepted: string[];
|
|
14
|
-
rejected: string[];
|
|
15
|
-
ehlo: string[];
|
|
16
|
-
envelopeTime: number;
|
|
17
|
-
messageTime: number;
|
|
18
|
-
messageSize: number;
|
|
19
|
-
response: string;
|
|
20
|
-
envelope: {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
to: string[];
|
|
23
|
-
from: string;
|
|
24
|
-
};
|
|
25
|
-
messageId: string;
|
|
26
|
-
}
|
|
27
|
-
interface SendMailOptions extends SendMailOptions$1 {
|
|
28
|
-
viewPath?: string;
|
|
29
|
-
viewData?: Record<string, any>;
|
|
30
|
-
}
|
|
31
|
-
interface SMTPConfig extends SMTPConnection.Options {
|
|
32
|
-
/** the hostname or IP address to connect to (defaults to ‘localhost’) */
|
|
33
|
-
host?: string | undefined;
|
|
34
|
-
/** the port to connect to (defaults to 25 or 465) */
|
|
35
|
-
port?: number | undefined;
|
|
36
|
-
/** defines authentication data */
|
|
37
|
-
auth: {
|
|
38
|
-
user: string;
|
|
39
|
-
pass: string;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
interface SESConfig extends SESConnection.Options {
|
|
43
|
-
/** How many messages per second is allowed to be delivered to SES */
|
|
44
|
-
maxConnections?: number | undefined;
|
|
45
|
-
/** How many parallel connections to allow towards SES */
|
|
46
|
-
sendingRate?: number | undefined;
|
|
47
|
-
region?: string;
|
|
48
|
-
secret: string;
|
|
49
|
-
token?: string;
|
|
50
|
-
key: string;
|
|
51
|
-
}
|
|
52
|
-
interface SendMailConfig extends SendmailTransport.Options {
|
|
53
|
-
/** path to the sendmail command (defaults to ‘sendmail’) */
|
|
54
|
-
path?: string | undefined;
|
|
55
|
-
}
|
|
56
|
-
interface MailDriverContract {
|
|
57
|
-
send(options: SendMailOptions$1): Promise<DeliveryReport | SentMessageInfo | undefined | void>;
|
|
58
|
-
}
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region src/Drivers/LOGDriver.d.ts
|
|
61
|
-
declare class LOGDriver implements MailDriverContract {
|
|
62
|
-
private transporter;
|
|
63
|
-
constructor(_config: any);
|
|
64
|
-
send(options: SendMailOptions$1): Promise<void>;
|
|
65
|
-
}
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region src/Drivers/SendMailDriver.d.ts
|
|
68
|
-
declare class SendMailDriver implements MailDriverContract {
|
|
69
|
-
private transporter;
|
|
70
|
-
constructor(config: SendMailConfig);
|
|
71
|
-
send(options: SendMailOptions$1): Promise<nodemailer_lib_sendmail_transport0.SentMessageInfo>;
|
|
72
|
-
}
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/Drivers/SESDriver.d.ts
|
|
75
|
-
declare class SESDriver implements MailDriverContract {
|
|
76
|
-
private transporter;
|
|
77
|
-
constructor(config: SESConfig);
|
|
78
|
-
send(options: SendMailOptions$1): Promise<nodemailer_lib_smtp_pool0.SentMessageInfo>;
|
|
79
|
-
}
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region src/Drivers/SMTPDriver.d.ts
|
|
82
|
-
declare class SMTPDriver implements MailDriverContract {
|
|
83
|
-
private transporter;
|
|
84
|
-
constructor(config: SMTPConfig);
|
|
85
|
-
send(options: SendMailOptions$1): Promise<nodemailer_lib_smtp_transport0.SentMessageInfo>;
|
|
86
|
-
}
|
|
87
|
-
//#endregion
|
|
88
|
-
//#region src/Mailable.d.ts
|
|
89
|
-
declare abstract class Mailable {
|
|
90
|
-
protected toAddress?: string;
|
|
91
|
-
protected ccAddresses?: string[];
|
|
92
|
-
protected bccAddresses?: string[];
|
|
93
|
-
protected subjectText?: string;
|
|
94
|
-
protected htmlContent?: string;
|
|
95
|
-
protected textContent?: string;
|
|
96
|
-
protected viewPath?: string;
|
|
97
|
-
protected viewData?: Record<string, any>;
|
|
98
|
-
protected attachmentsList?: SendMailOptions['attachments'];
|
|
99
|
-
to(address: string): this;
|
|
100
|
-
cc(...addresses: string[]): this;
|
|
101
|
-
bcc(...addresses: string[]): this;
|
|
102
|
-
subject(subject: string): this;
|
|
103
|
-
html(html: string): this;
|
|
104
|
-
text(text: string): this;
|
|
105
|
-
view(path: string, data?: Record<string, any>): this;
|
|
106
|
-
attach(filename: string, filePath: string): this;
|
|
107
|
-
/**
|
|
108
|
-
* Child classes should define build() like in Laravel
|
|
109
|
-
*/
|
|
110
|
-
abstract build(): Promise<this> | this;
|
|
111
|
-
/**
|
|
112
|
-
* Called internally by Mailer
|
|
113
|
-
*/
|
|
114
|
-
getMessageOptions(): SendMailOptions;
|
|
115
|
-
}
|
|
116
|
-
//#endregion
|
|
117
|
-
//#region src/Mailer.d.ts
|
|
118
|
-
declare class Mailer {
|
|
119
|
-
private driver;
|
|
120
|
-
private edgeRenderer;
|
|
121
|
-
constructor(driver: MailDriverContract, edgeRenderer: (viewPath: string, data: Record<string, any>) => Promise<string>);
|
|
122
|
-
send(mailable: Mailable): Promise<DeliveryReport | undefined | void>;
|
|
123
|
-
}
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region src/Providers/MailServiceProvider.d.ts
|
|
126
|
-
/**
|
|
127
|
-
* Mail delivery setup.
|
|
128
|
-
*
|
|
129
|
-
* Bind Mailer service.
|
|
130
|
-
* Load mail drivers (SMTP, SES, etc.).
|
|
131
|
-
* Register Mail facade.
|
|
132
|
-
*
|
|
133
|
-
*/
|
|
134
|
-
declare class MailServiceProvider extends ServiceProvider {
|
|
135
|
-
static priority: number;
|
|
136
|
-
register(): void;
|
|
137
|
-
boot(): void;
|
|
138
|
-
}
|
|
139
|
-
//#endregion
|
|
140
|
-
//#region src/Service.d.ts
|
|
141
|
-
/**
|
|
142
|
-
* Service class to initialize and configure the mailer service
|
|
143
|
-
*/
|
|
144
|
-
declare class Service {
|
|
145
|
-
/**
|
|
146
|
-
* Initializes the mailer service with the given application instance
|
|
147
|
-
*
|
|
148
|
-
* @param app
|
|
149
|
-
* @returns
|
|
150
|
-
*/
|
|
151
|
-
static init(app: Application): Mailer;
|
|
152
|
-
}
|
|
153
|
-
//#endregion
|
|
154
|
-
export { DeliveryReport, LOGDriver, MailDriverContract, MailServiceProvider, Mailable, Mailer, SESConfig, SESDriver, SMTPConfig, SMTPDriver, SendMailConfig, SendMailDriver, SendMailOptions, Service };
|
|
File without changes
|