@stacksjs/email 0.51.0 → 0.52.1
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/README.md +1 -1
- package/dist/index.d.ts +82 -9
- package/dist/index.mjs +234 -9
- package/package.json +33 -28
- package/dist/actions/send.d.ts +0 -2
- package/dist/actions/send.mjs +0 -30
- package/dist/drivers/emailjs.d.ts +0 -3
- package/dist/drivers/emailjs.mjs +0 -16
- package/dist/drivers/mailgun.d.ts +0 -3
- package/dist/drivers/mailgun.mjs +0 -14
- package/dist/drivers/mailjet.d.ts +0 -3
- package/dist/drivers/mailjet.mjs +0 -13
- package/dist/drivers/mandrill.d.ts +0 -3
- package/dist/drivers/mandrill.mjs +0 -12
- package/dist/drivers/netcore.d.ts +0 -3
- package/dist/drivers/netcore.mjs +0 -12
- package/dist/drivers/nodemailer.d.ts +0 -3
- package/dist/drivers/nodemailer.mjs +0 -16
- package/dist/drivers/postmark.d.ts +0 -3
- package/dist/drivers/postmark.mjs +0 -12
- package/dist/drivers/sendgrid.d.ts +0 -3
- package/dist/drivers/sendgrid.mjs +0 -13
- package/dist/drivers/ses.d.ts +0 -3
- package/dist/drivers/ses.mjs +0 -14
- package/dist/tailwind.config.d.ts +0 -1
- package/dist/tailwind.config.mjs +0 -37
- package/dist/utils/config.d.ts +0 -5
- package/dist/utils/config.mjs +0 -5
- package/dist/utils/template.html +0 -8
package/README.md
CHANGED
|
@@ -126,7 +126,7 @@ pnpm test
|
|
|
126
126
|
|
|
127
127
|
Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
|
|
128
128
|
|
|
129
|
-
##
|
|
129
|
+
## 🚜 Contributing
|
|
130
130
|
|
|
131
131
|
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
|
|
132
132
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,82 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { EmailOptions } from '@stacksjs/types';
|
|
2
|
+
import { ResultAsync } from '@stacksjs/error-handling';
|
|
3
|
+
|
|
4
|
+
declare function send$7(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>>;
|
|
5
|
+
|
|
6
|
+
declare namespace sendgrid {
|
|
7
|
+
export {
|
|
8
|
+
send$7 as Send,
|
|
9
|
+
send$7 as send,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare function send$6(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>>;
|
|
14
|
+
|
|
15
|
+
declare namespace mailgun {
|
|
16
|
+
export {
|
|
17
|
+
send$6 as Send,
|
|
18
|
+
send$6 as send,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare function send$5(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>>;
|
|
23
|
+
|
|
24
|
+
declare namespace mailjet {
|
|
25
|
+
export {
|
|
26
|
+
send$5 as Send,
|
|
27
|
+
send$5 as send,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare function send$4(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>>;
|
|
32
|
+
|
|
33
|
+
declare namespace mandrill {
|
|
34
|
+
export {
|
|
35
|
+
send$4 as Send,
|
|
36
|
+
send$4 as send,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare function send$3(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>>;
|
|
41
|
+
|
|
42
|
+
declare namespace netcore {
|
|
43
|
+
export {
|
|
44
|
+
send$3 as Send,
|
|
45
|
+
send$3 as send,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare function send$2(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>>;
|
|
50
|
+
|
|
51
|
+
declare namespace nodemailer {
|
|
52
|
+
export {
|
|
53
|
+
send$2 as Send,
|
|
54
|
+
send$2 as send,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare function send$1(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>>;
|
|
59
|
+
|
|
60
|
+
declare namespace postmark {
|
|
61
|
+
export {
|
|
62
|
+
send$1 as Send,
|
|
63
|
+
send$1 as send,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare namespace ses {
|
|
68
|
+
export {
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare function send(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>>;
|
|
73
|
+
|
|
74
|
+
declare const emailjs_send: typeof send;
|
|
75
|
+
declare namespace emailjs {
|
|
76
|
+
export {
|
|
77
|
+
send as Send,
|
|
78
|
+
emailjs_send as send,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { emailjs, mailgun, mailjet, mandrill, netcore, nodemailer, postmark, sendgrid, ses };
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,234 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { SendgridEmailProvider } from '@novu/sendgrid';
|
|
2
|
+
import { notification } from '@stacksjs/config';
|
|
3
|
+
import { italic } from '@stacksjs/cli';
|
|
4
|
+
import { log } from '@stacksjs/logging';
|
|
5
|
+
import { ResultAsync } from '@stacksjs/error-handling';
|
|
6
|
+
import * as Maizzle from '@maizzle/framework';
|
|
7
|
+
import { MailgunEmailProvider } from '@novu/mailgun';
|
|
8
|
+
import { MailjetEmailProvider } from '@novu/mailjet';
|
|
9
|
+
import { MandrillProvider } from '@novu/mandrill';
|
|
10
|
+
import { NetCoreProvider } from '@novu/netcore';
|
|
11
|
+
import { NodemailerProvider } from '@novu/nodemailer';
|
|
12
|
+
import { PostmarkEmailProvider } from '@novu/postmark';
|
|
13
|
+
import { EmailJsProvider } from '@novu/emailjs';
|
|
14
|
+
|
|
15
|
+
const email$1 = notification.email;
|
|
16
|
+
const config$1 = {
|
|
17
|
+
email: email$1
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const maizzleConfig = {
|
|
21
|
+
__proto__: null,
|
|
22
|
+
default: config$1,
|
|
23
|
+
email: email$1
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const email = notification.email;
|
|
27
|
+
const config = {
|
|
28
|
+
...email?.build,
|
|
29
|
+
theme: {
|
|
30
|
+
screens: {
|
|
31
|
+
sm: "480px",
|
|
32
|
+
md: "768px",
|
|
33
|
+
lg: "976px",
|
|
34
|
+
xl: "1440px"
|
|
35
|
+
},
|
|
36
|
+
colors: {
|
|
37
|
+
"blue": "#1fb6ff",
|
|
38
|
+
"purple": "#7e5bef",
|
|
39
|
+
"pink": "#ff49db",
|
|
40
|
+
"orange": "#ff7849",
|
|
41
|
+
"green": "#13ce66",
|
|
42
|
+
"yellow": "#ffc82c",
|
|
43
|
+
"gray-dark": "#273444",
|
|
44
|
+
"gray": "#8492a6",
|
|
45
|
+
"gray-light": "#d3dce6"
|
|
46
|
+
},
|
|
47
|
+
fontFamily: {
|
|
48
|
+
sans: ["Graphik", "sans-serif"],
|
|
49
|
+
serif: ["Merriweather", "serif"]
|
|
50
|
+
},
|
|
51
|
+
extend: {
|
|
52
|
+
spacing: {
|
|
53
|
+
128: "32rem",
|
|
54
|
+
144: "36rem"
|
|
55
|
+
},
|
|
56
|
+
borderRadius: {
|
|
57
|
+
"4xl": "2rem"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
async function send$8(options, provider, providerName, css) {
|
|
64
|
+
const template = `
|
|
65
|
+
<extends src="./core/notifications/src/utils/template.html">
|
|
66
|
+
<block name="template">
|
|
67
|
+
${options.html}
|
|
68
|
+
</block>
|
|
69
|
+
</extends>`;
|
|
70
|
+
await Maizzle.render(
|
|
71
|
+
template,
|
|
72
|
+
{
|
|
73
|
+
tailwind: {
|
|
74
|
+
config,
|
|
75
|
+
css,
|
|
76
|
+
maizzle: maizzleConfig
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
).then(({ html }) => {
|
|
80
|
+
options.html = html;
|
|
81
|
+
}).catch((error) => log.error(`Failed to render email template using provider: ${italic(providerName)}.`, error));
|
|
82
|
+
return ResultAsync.fromPromise(
|
|
83
|
+
provider.sendMessage(options),
|
|
84
|
+
() => new Error(`Failed to send message using provider: ${italic(providerName)}`)
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const env$7 = notification.email;
|
|
89
|
+
const service$7 = notification.email?.drivers.sendgrid;
|
|
90
|
+
const driver = new SendgridEmailProvider({
|
|
91
|
+
apiKey: service$7?.key || "",
|
|
92
|
+
from: env$7?.from || "",
|
|
93
|
+
senderName: service$7?.senderName || ""
|
|
94
|
+
});
|
|
95
|
+
async function send$7(options, css) {
|
|
96
|
+
return send$8(options, driver, "Sendgrid", css);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const sendgrid = {
|
|
100
|
+
__proto__: null,
|
|
101
|
+
Send: send$7,
|
|
102
|
+
send: send$7
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const env$6 = notification.email;
|
|
106
|
+
const service$6 = notification.email?.drivers.mailgun;
|
|
107
|
+
const provider$6 = new MailgunEmailProvider({
|
|
108
|
+
apiKey: service$6?.key || "",
|
|
109
|
+
domain: service$6?.domain || "",
|
|
110
|
+
username: service$6?.username || "",
|
|
111
|
+
from: env$6?.from || ""
|
|
112
|
+
});
|
|
113
|
+
async function send$6(options, css) {
|
|
114
|
+
return send$8(options, provider$6, "Mailgun", css);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const mailgun = {
|
|
118
|
+
__proto__: null,
|
|
119
|
+
Send: send$6,
|
|
120
|
+
send: send$6
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const env$5 = notification.email;
|
|
124
|
+
const service$5 = notification.email?.drivers.mailjet;
|
|
125
|
+
const provider$5 = new MailjetEmailProvider({
|
|
126
|
+
apiKey: service$5?.key || "",
|
|
127
|
+
apiSecret: service$5?.secret || "",
|
|
128
|
+
from: env$5?.from || "",
|
|
129
|
+
senderName: env$5?.from || ""
|
|
130
|
+
// look into what exactly this stands for
|
|
131
|
+
});
|
|
132
|
+
async function send$5(options, css) {
|
|
133
|
+
return send$8(options, provider$5, "Mailjet", css);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const mailjet = {
|
|
137
|
+
__proto__: null,
|
|
138
|
+
Send: send$5,
|
|
139
|
+
send: send$5
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const env$4 = notification.email;
|
|
143
|
+
const service$4 = notification.email?.drivers.mandrill;
|
|
144
|
+
const provider$4 = new MandrillProvider({
|
|
145
|
+
apiKey: service$4?.key || "",
|
|
146
|
+
from: env$4?.from || ""
|
|
147
|
+
});
|
|
148
|
+
async function send$4(options, css) {
|
|
149
|
+
return send$8(options, provider$4, "Mandrill", css);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const mandrill = {
|
|
153
|
+
__proto__: null,
|
|
154
|
+
Send: send$4,
|
|
155
|
+
send: send$4
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const env$3 = notification.email;
|
|
159
|
+
const service$3 = notification.email?.drivers.netcore;
|
|
160
|
+
const provider$3 = new NetCoreProvider({
|
|
161
|
+
apiKey: service$3?.key || "",
|
|
162
|
+
from: env$3?.from || ""
|
|
163
|
+
});
|
|
164
|
+
async function send$3(options, css) {
|
|
165
|
+
return send$8(options, provider$3, "Netcore", css);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const netcore = {
|
|
169
|
+
__proto__: null,
|
|
170
|
+
Send: send$3,
|
|
171
|
+
send: send$3
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const env$2 = notification.email;
|
|
175
|
+
const service$2 = notification.email?.drivers.nodemailer;
|
|
176
|
+
const provider$2 = new NodemailerProvider({
|
|
177
|
+
from: env$2?.from || "",
|
|
178
|
+
host: service$2?.host || "",
|
|
179
|
+
user: service$2?.user,
|
|
180
|
+
password: service$2?.password,
|
|
181
|
+
port: service$2?.port || 587,
|
|
182
|
+
secure: service$2?.secure
|
|
183
|
+
});
|
|
184
|
+
async function send$2(options, css) {
|
|
185
|
+
return send$8(options, provider$2, "Nodemailer", css);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const nodemailer = {
|
|
189
|
+
__proto__: null,
|
|
190
|
+
Send: send$2,
|
|
191
|
+
send: send$2
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const env$1 = notification.email;
|
|
195
|
+
const service$1 = notification.email?.drivers.postmark;
|
|
196
|
+
const provider$1 = new PostmarkEmailProvider({
|
|
197
|
+
apiKey: service$1?.key || "",
|
|
198
|
+
from: env$1?.from || ""
|
|
199
|
+
});
|
|
200
|
+
async function send$1(options, css) {
|
|
201
|
+
return send$8(options, provider$1, "Postmark", css);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const postmark = {
|
|
205
|
+
__proto__: null,
|
|
206
|
+
Send: send$1,
|
|
207
|
+
send: send$1
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
const ses = {
|
|
211
|
+
__proto__: null
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
const env = notification.email;
|
|
215
|
+
const service = notification.email?.drivers.emailjs;
|
|
216
|
+
const provider = new EmailJsProvider({
|
|
217
|
+
from: env?.from || "",
|
|
218
|
+
host: service?.host || "",
|
|
219
|
+
user: service?.user,
|
|
220
|
+
password: service?.password,
|
|
221
|
+
port: service?.port || 587,
|
|
222
|
+
secure: service?.secure
|
|
223
|
+
});
|
|
224
|
+
async function send(options, css) {
|
|
225
|
+
return send$8(options, provider, "EmailJS", css);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
const emailjs = {
|
|
229
|
+
__proto__: null,
|
|
230
|
+
Send: send,
|
|
231
|
+
send: send
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
export { emailjs, mailgun, mailjet, mandrill, netcore, nodemailer, postmark, sendgrid, ses };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/email",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "0.52.1",
|
|
5
|
+
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks Email integration. Painlessly create & manage your inboxes, templates, and send emails.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -31,7 +31,12 @@
|
|
|
31
31
|
"postmark",
|
|
32
32
|
"sendgrid"
|
|
33
33
|
],
|
|
34
|
-
"
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"import": "./dist/index.mjs"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
35
40
|
"module": "dist/index.mjs",
|
|
36
41
|
"types": "dist/index.d.ts",
|
|
37
42
|
"contributors": [
|
|
@@ -41,36 +46,36 @@
|
|
|
41
46
|
"dist",
|
|
42
47
|
"README.md"
|
|
43
48
|
],
|
|
44
|
-
"engines": {
|
|
45
|
-
"node": ">=v18.14.0",
|
|
46
|
-
"pnpm": ">=7.26.3"
|
|
47
|
-
},
|
|
48
49
|
"peerDependencies": {
|
|
49
|
-
"@maizzle/framework": "^4.
|
|
50
|
-
"@novu/emailjs": "^0.
|
|
51
|
-
"@novu/mailgun": "^0.
|
|
52
|
-
"@novu/mailjet": "^0.
|
|
53
|
-
"@novu/mandrill": "^0.
|
|
54
|
-
"@novu/netcore": "^0.
|
|
55
|
-
"@novu/node": "^0.
|
|
56
|
-
"@novu/nodemailer": "^0.
|
|
57
|
-
"@novu/postmark": "^0.
|
|
58
|
-
"@novu/sendgrid": "^0.
|
|
59
|
-
"@novu/ses": "^0.
|
|
60
|
-
"@novu/stateless": "^0.
|
|
61
|
-
"@stacksjs/cli": "0.
|
|
62
|
-
"@stacksjs/config": "0.
|
|
63
|
-
"@stacksjs/error-handling": "0.
|
|
64
|
-
"@stacksjs/types": "0.
|
|
50
|
+
"@maizzle/framework": "^4.4.4",
|
|
51
|
+
"@novu/emailjs": "^0.15.0",
|
|
52
|
+
"@novu/mailgun": "^0.15.0",
|
|
53
|
+
"@novu/mailjet": "^0.15.0",
|
|
54
|
+
"@novu/mandrill": "^0.15.0",
|
|
55
|
+
"@novu/netcore": "^0.15.0",
|
|
56
|
+
"@novu/node": "^0.15.0",
|
|
57
|
+
"@novu/nodemailer": "^0.15.0",
|
|
58
|
+
"@novu/postmark": "^0.15.0",
|
|
59
|
+
"@novu/sendgrid": "^0.15.0",
|
|
60
|
+
"@novu/ses": "^0.15.0",
|
|
61
|
+
"@novu/stateless": "^0.15.0",
|
|
62
|
+
"@stacksjs/cli": "0.52.1",
|
|
63
|
+
"@stacksjs/config": "0.52.1",
|
|
64
|
+
"@stacksjs/error-handling": "0.52.1",
|
|
65
|
+
"@stacksjs/types": "0.52.1"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@stacksjs/cli": "0.52.1",
|
|
69
|
+
"@stacksjs/error-handling": "0.52.1",
|
|
70
|
+
"@stacksjs/logging": "0.52.1"
|
|
65
71
|
},
|
|
66
72
|
"devDependencies": {
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"@stacksjs/testing": "0.51.0"
|
|
73
|
+
"@stacksjs/development": "0.52.1",
|
|
74
|
+
"@stacksjs/types": "0.52.1"
|
|
70
75
|
},
|
|
71
76
|
"scripts": {
|
|
72
|
-
"build": "
|
|
73
|
-
"dev": "
|
|
77
|
+
"build": "unbuild",
|
|
78
|
+
"dev": "unbuild --stub",
|
|
74
79
|
"typecheck": "tsc --noEmit"
|
|
75
80
|
}
|
|
76
81
|
}
|
package/dist/actions/send.d.ts
DELETED
package/dist/actions/send.mjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { italic } from "@stacksjs/cli";
|
|
2
|
-
import { log } from "@stacksjs/logging";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import * as Maizzle from "@maizzle/framework";
|
|
5
|
-
import * as maizzleConfig from "../utils/config.mjs";
|
|
6
|
-
import { config } from "../tailwind.config.mjs";
|
|
7
|
-
export async function send(options, provider, providerName, css) {
|
|
8
|
-
const template = `
|
|
9
|
-
<extends src="./core/notifications/src/utils/template.html">
|
|
10
|
-
<block name="template">
|
|
11
|
-
${options.html}
|
|
12
|
-
</block>
|
|
13
|
-
</extends>`;
|
|
14
|
-
await Maizzle.render(
|
|
15
|
-
template,
|
|
16
|
-
{
|
|
17
|
-
tailwind: {
|
|
18
|
-
config,
|
|
19
|
-
css,
|
|
20
|
-
maizzle: maizzleConfig
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
).then(({ html }) => {
|
|
24
|
-
options.html = html;
|
|
25
|
-
}).catch((error) => log.error(`Failed to render email template using provider: ${italic(providerName)}.`, error));
|
|
26
|
-
return ResultAsync.fromPromise(
|
|
27
|
-
provider.sendMessage(options),
|
|
28
|
-
() => new Error(`Failed to send message using provider: ${italic(providerName)}`)
|
|
29
|
-
);
|
|
30
|
-
}
|
package/dist/drivers/emailjs.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { EmailJsProvider } from "@novu/emailjs";
|
|
2
|
-
import { notification } from "@stacksjs/config";
|
|
3
|
-
import { send as sendEmail } from "../actions/send.mjs";
|
|
4
|
-
const env = notification.email.emailjs;
|
|
5
|
-
const provider = new EmailJsProvider({
|
|
6
|
-
from: env.from,
|
|
7
|
-
host: env.host,
|
|
8
|
-
user: env.user,
|
|
9
|
-
password: env.password,
|
|
10
|
-
port: env.port,
|
|
11
|
-
secure: env.secure
|
|
12
|
-
});
|
|
13
|
-
async function send(options, css) {
|
|
14
|
-
return sendEmail(options, provider, "EmailJS", css);
|
|
15
|
-
}
|
|
16
|
-
export { send as Send, send };
|
package/dist/drivers/mailgun.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { MailgunEmailProvider } from "@novu/mailgun";
|
|
2
|
-
import { notification } from "@stacksjs/config";
|
|
3
|
-
import { send as sendEmail } from "../actions/send.mjs";
|
|
4
|
-
const env = notification.email.mailgun;
|
|
5
|
-
const provider = new MailgunEmailProvider({
|
|
6
|
-
apiKey: env.key,
|
|
7
|
-
domain: env.domain,
|
|
8
|
-
username: env.username,
|
|
9
|
-
from: env.from
|
|
10
|
-
});
|
|
11
|
-
async function send(options, css) {
|
|
12
|
-
return sendEmail(options, provider, "Mailgun", css);
|
|
13
|
-
}
|
|
14
|
-
export { send as Send, send };
|
package/dist/drivers/mailjet.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MailjetEmailProvider } from "@novu/mailjet";
|
|
2
|
-
import { notification } from "@stacksjs/config";
|
|
3
|
-
import { send as sendEmail } from "../actions/send.mjs";
|
|
4
|
-
const env = notification.email.mailjet;
|
|
5
|
-
const provider = new MailjetEmailProvider({
|
|
6
|
-
apiKey: env.key,
|
|
7
|
-
apiSecret: env.secret,
|
|
8
|
-
from: env.from
|
|
9
|
-
});
|
|
10
|
-
async function send(options, css) {
|
|
11
|
-
return sendEmail(options, provider, "Mailjet", css);
|
|
12
|
-
}
|
|
13
|
-
export { send as Send, send };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { MandrillProvider } from "@novu/mandrill";
|
|
2
|
-
import { notification } from "@stacksjs/config";
|
|
3
|
-
import { send as sendEmail } from "../actions/send.mjs";
|
|
4
|
-
const env = notification.email.mandrill;
|
|
5
|
-
const provider = new MandrillProvider({
|
|
6
|
-
apiKey: env.key,
|
|
7
|
-
from: env.from
|
|
8
|
-
});
|
|
9
|
-
async function send(options, css) {
|
|
10
|
-
return sendEmail(options, provider, "Mandrill", css);
|
|
11
|
-
}
|
|
12
|
-
export { send as Send, send };
|
package/dist/drivers/netcore.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { NetCoreProvider } from "@novu/netcore";
|
|
2
|
-
import { notification } from "@stacksjs/config";
|
|
3
|
-
import { send as sendEmail } from "../actions/send.mjs";
|
|
4
|
-
const env = notification.email.netcore;
|
|
5
|
-
const provider = new NetCoreProvider({
|
|
6
|
-
apiKey: env.key,
|
|
7
|
-
from: env.from
|
|
8
|
-
});
|
|
9
|
-
async function send(options, css) {
|
|
10
|
-
return sendEmail(options, provider, "Netcore", css);
|
|
11
|
-
}
|
|
12
|
-
export { send as Send, send };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NodemailerProvider } from "@novu/nodemailer";
|
|
2
|
-
import { notification } from "@stacksjs/config";
|
|
3
|
-
import { send as sendEmail } from "../actions/send.mjs";
|
|
4
|
-
const env = notification.email.nodemailer;
|
|
5
|
-
const provider = new NodemailerProvider({
|
|
6
|
-
from: env.from,
|
|
7
|
-
host: env.host,
|
|
8
|
-
user: env.user,
|
|
9
|
-
password: env.password,
|
|
10
|
-
port: env.port,
|
|
11
|
-
secure: env.secure
|
|
12
|
-
});
|
|
13
|
-
async function send(options, css) {
|
|
14
|
-
return sendEmail(options, provider, "Nodemailer", css);
|
|
15
|
-
}
|
|
16
|
-
export { send as Send, send };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PostmarkEmailProvider } from "@novu/postmark";
|
|
2
|
-
import { notification } from "@stacksjs/config";
|
|
3
|
-
import { send as sendEmail } from "../actions/send.mjs";
|
|
4
|
-
const env = notification.email.postmark;
|
|
5
|
-
const provider = new PostmarkEmailProvider({
|
|
6
|
-
apiKey: env.key,
|
|
7
|
-
from: env.from
|
|
8
|
-
});
|
|
9
|
-
async function send(options, css) {
|
|
10
|
-
return sendEmail(options, provider, "Postmark", css);
|
|
11
|
-
}
|
|
12
|
-
export { send as Send, send };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SendgridEmailProvider } from "@novu/sendgrid";
|
|
2
|
-
import { notification } from "@stacksjs/config";
|
|
3
|
-
import { send as sendEmail } from "../actions/send.mjs";
|
|
4
|
-
const config = notification.email.sendgrid;
|
|
5
|
-
const driver = new SendgridEmailProvider({
|
|
6
|
-
apiKey: config.key,
|
|
7
|
-
from: config.from,
|
|
8
|
-
senderName: config.senderName
|
|
9
|
-
});
|
|
10
|
-
async function send(options, css) {
|
|
11
|
-
return sendEmail(options, driver, "Sendgrid", css);
|
|
12
|
-
}
|
|
13
|
-
export { send as Send, send };
|
package/dist/drivers/ses.d.ts
DELETED
package/dist/drivers/ses.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SESEmailProvider } from "@novu/ses";
|
|
2
|
-
import { notification } from "@stacksjs/config";
|
|
3
|
-
import { send as sendEmail } from "../actions/send.mjs";
|
|
4
|
-
const env = notification.email.ses;
|
|
5
|
-
const provider = new SESEmailProvider({
|
|
6
|
-
region: env.region,
|
|
7
|
-
accessKeyId: env.key,
|
|
8
|
-
secretAccessKey: env.secret,
|
|
9
|
-
from: env.from
|
|
10
|
-
});
|
|
11
|
-
async function send(options, css) {
|
|
12
|
-
return sendEmail(options, provider, "Ses", css);
|
|
13
|
-
}
|
|
14
|
-
export { send as Send, send };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const config: any;
|
package/dist/tailwind.config.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { notification } from "@stacksjs/config";
|
|
2
|
-
const email = notification.email;
|
|
3
|
-
export const config = {
|
|
4
|
-
...email.build,
|
|
5
|
-
theme: {
|
|
6
|
-
screens: {
|
|
7
|
-
sm: "480px",
|
|
8
|
-
md: "768px",
|
|
9
|
-
lg: "976px",
|
|
10
|
-
xl: "1440px"
|
|
11
|
-
},
|
|
12
|
-
colors: {
|
|
13
|
-
"blue": "#1fb6ff",
|
|
14
|
-
"purple": "#7e5bef",
|
|
15
|
-
"pink": "#ff49db",
|
|
16
|
-
"orange": "#ff7849",
|
|
17
|
-
"green": "#13ce66",
|
|
18
|
-
"yellow": "#ffc82c",
|
|
19
|
-
"gray-dark": "#273444",
|
|
20
|
-
"gray": "#8492a6",
|
|
21
|
-
"gray-light": "#d3dce6"
|
|
22
|
-
},
|
|
23
|
-
fontFamily: {
|
|
24
|
-
sans: ["Graphik", "sans-serif"],
|
|
25
|
-
serif: ["Merriweather", "serif"]
|
|
26
|
-
},
|
|
27
|
-
extend: {
|
|
28
|
-
spacing: {
|
|
29
|
-
128: "32rem",
|
|
30
|
-
144: "36rem"
|
|
31
|
-
},
|
|
32
|
-
borderRadius: {
|
|
33
|
-
"4xl": "2rem"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
package/dist/utils/config.d.ts
DELETED
package/dist/utils/config.mjs
DELETED