@nebutra/email 0.1.2 → 2.0.0
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/.turbo/turbo-build.log
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
> @nebutra/email@0.
|
|
2
|
+
> @nebutra/email@2.0.0 build /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/integrations/email
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.5.1
|
|
8
|
+
[34mCLI[39m Using tsup config: /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/integrations/email/tsup.config.ts
|
|
9
|
+
[34mCLI[39m Target: es2022
|
|
10
|
+
[34mCLI[39m Cleaning output folder
|
|
11
|
+
[34mESM[39m Build start
|
|
12
|
+
[32mESM[39m [1mdist/index.js [22m[32m28.11 KB[39m
|
|
13
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m54.83 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 94ms
|
|
15
|
+
[34mDTS[39m Build start
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 14688ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m14.09 KB[39m
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
> @nebutra/email@0.
|
|
2
|
+
> @nebutra/email@2.0.0 test /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/integrations/email
|
|
3
3
|
> vitest run
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
RUN
|
|
6
|
+
[1m[30m[46m RUN [49m[39m[22m [36mv4.1.4 [39m[90m/home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/integrations/email[39m
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
[32m✓[39m src/__tests__/provider.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 179[2mms[22m[39m
|
|
9
|
+
[32m✓[39m src/__tests__/email-contract.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 42[2mms[22m[39m
|
|
10
|
+
[32m✓[39m src/templates/__tests__/templates.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m 74[2mms[22m[39m
|
|
11
11
|
|
|
12
|
-
Test Files
|
|
13
|
-
Tests
|
|
14
|
-
Start at
|
|
15
|
-
Duration
|
|
12
|
+
[2m Test Files [22m [1m[32m3 passed[39m[22m[90m (3)[39m
|
|
13
|
+
[2m Tests [22m [1m[32m25 passed[39m[22m[90m (25)[39m
|
|
14
|
+
[2m Start at [22m 02:31:19
|
|
15
|
+
[2m Duration [22m 1.28s[2m (transform 921ms, setup 0ms, import 1.36s, tests 296ms, environment 0ms)[22m
|
|
16
16
|
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nebutra/email",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Multi-provider transactional email (Resend, Nodemailer, Console)",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"nebutra": {
|
|
9
|
+
"status": "foundation",
|
|
10
|
+
"graph": "core",
|
|
9
11
|
"featureId": "email",
|
|
10
12
|
"category": "integrations",
|
|
11
13
|
"summary": "Multi-provider transactional email (Resend, Nodemailer, Console)"
|
|
@@ -19,10 +21,10 @@
|
|
|
19
21
|
},
|
|
20
22
|
"dependencies": {
|
|
21
23
|
"resend": "^4.0.1",
|
|
22
|
-
"@nebutra/brand": "0.
|
|
24
|
+
"@nebutra/brand": "2.0.0"
|
|
23
25
|
},
|
|
24
26
|
"peerDependencies": {
|
|
25
|
-
"nodemailer": "^9.0
|
|
27
|
+
"nodemailer": "^9.1.0"
|
|
26
28
|
},
|
|
27
29
|
"peerDependenciesMeta": {
|
|
28
30
|
"nodemailer": {
|
|
@@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest";
|
|
|
2
2
|
import {
|
|
3
3
|
EMAIL_TEMPLATE_CATALOG,
|
|
4
4
|
sendContactFormReceivedEmail,
|
|
5
|
+
sendEmailChangeEmail,
|
|
5
6
|
sendInvitationEmail,
|
|
6
7
|
sendLicenseCreatedEmail,
|
|
7
8
|
sendMagicLinkEmail,
|
|
@@ -14,6 +15,7 @@ import {
|
|
|
14
15
|
|
|
15
16
|
const SEND_HELPERS = {
|
|
16
17
|
sendContactFormReceivedEmail,
|
|
18
|
+
sendEmailChangeEmail,
|
|
17
19
|
sendInvitationEmail,
|
|
18
20
|
sendLicenseCreatedEmail,
|
|
19
21
|
sendMagicLinkEmail,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
describe("welcome template", () => {
|
|
12
12
|
const props = {
|
|
13
13
|
userName: "Ada Lovelace",
|
|
14
|
-
loginUrl: "https://app.nebutra.
|
|
14
|
+
loginUrl: "https://app.nebutra.com/login",
|
|
15
15
|
brandName: "Nebutra",
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -28,7 +28,7 @@ describe("welcome template", () => {
|
|
|
28
28
|
expect(html.length).toBeGreaterThan(0);
|
|
29
29
|
expect(html).toContain("Ada Lovelace");
|
|
30
30
|
expect(html).toContain("Nebutra");
|
|
31
|
-
expect(html).toContain("https://app.nebutra.
|
|
31
|
+
expect(html).toContain("https://app.nebutra.com/login");
|
|
32
32
|
expect(html).toMatch(/<!DOCTYPE html>/i);
|
|
33
33
|
});
|
|
34
34
|
});
|
|
@@ -36,7 +36,7 @@ describe("welcome template", () => {
|
|
|
36
36
|
describe("password-reset template", () => {
|
|
37
37
|
const props = {
|
|
38
38
|
userName: "Grace Hopper",
|
|
39
|
-
resetUrl: "https://app.nebutra.
|
|
39
|
+
resetUrl: "https://app.nebutra.com/reset?token=abc",
|
|
40
40
|
expiresInMinutes: 30,
|
|
41
41
|
brandName: "Nebutra",
|
|
42
42
|
};
|
|
@@ -52,7 +52,7 @@ describe("password-reset template", () => {
|
|
|
52
52
|
it("includes reset url, user name, expiry and disclaimer in HTML body", () => {
|
|
53
53
|
const html = renderPasswordResetEmail(props);
|
|
54
54
|
expect(html).toContain("Grace Hopper");
|
|
55
|
-
expect(html).toContain("https://app.nebutra.
|
|
55
|
+
expect(html).toContain("https://app.nebutra.com/reset?token=abc");
|
|
56
56
|
expect(html).toContain("30 minutes");
|
|
57
57
|
expect(html.toLowerCase()).toContain("if this wasn't you");
|
|
58
58
|
});
|
|
@@ -63,7 +63,7 @@ describe("invitation template", () => {
|
|
|
63
63
|
inviterName: "Alan Turing",
|
|
64
64
|
organizationName: "Bletchley Inc.",
|
|
65
65
|
role: "admin",
|
|
66
|
-
acceptUrl: "https://app.nebutra.
|
|
66
|
+
acceptUrl: "https://app.nebutra.com/invites/xyz",
|
|
67
67
|
expiresAt: "2026-06-01",
|
|
68
68
|
brandName: "Nebutra",
|
|
69
69
|
};
|
|
@@ -79,7 +79,7 @@ describe("invitation template", () => {
|
|
|
79
79
|
expect(html).toContain("Alan Turing");
|
|
80
80
|
expect(html).toContain("Bletchley Inc.");
|
|
81
81
|
expect(html).toContain("admin");
|
|
82
|
-
expect(html).toContain("https://app.nebutra.
|
|
82
|
+
expect(html).toContain("https://app.nebutra.com/invites/xyz");
|
|
83
83
|
expect(html).toContain("2026-06-01");
|
|
84
84
|
expect(html).toContain("Sent by Nebutra");
|
|
85
85
|
});
|
|
@@ -93,7 +93,7 @@ describe("receipt template", () => {
|
|
|
93
93
|
currency: "USD",
|
|
94
94
|
periodStart: "2026-04-01",
|
|
95
95
|
periodEnd: "2026-04-30",
|
|
96
|
-
downloadUrl: "https://app.nebutra.
|
|
96
|
+
downloadUrl: "https://app.nebutra.com/receipts/INV-001234.pdf",
|
|
97
97
|
brandName: "Nebutra",
|
|
98
98
|
};
|
|
99
99
|
|
|
@@ -109,7 +109,7 @@ describe("receipt template", () => {
|
|
|
109
109
|
expect(html).toContain("USD");
|
|
110
110
|
expect(html).toContain("2026-04-01");
|
|
111
111
|
expect(html).toContain("2026-04-30");
|
|
112
|
-
expect(html).toContain("https://app.nebutra.
|
|
112
|
+
expect(html).toContain("https://app.nebutra.com/receipts/INV-001234.pdf");
|
|
113
113
|
});
|
|
114
114
|
});
|
|
115
115
|
|