@travetto/email-compiler 5.0.0-rc.7 → 5.0.0-rc.9
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/package.json +8 -8
- package/support/bin/config.ts +1 -2
- package/support/bin/send.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/email-compiler",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.9",
|
|
4
4
|
"description": "Email compiling module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"directory": "module/email-compiler"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@travetto/runtime": "^5.0.0-rc.
|
|
30
|
-
"@travetto/config": "^5.0.0-rc.
|
|
31
|
-
"@travetto/di": "^5.0.0-rc.
|
|
32
|
-
"@travetto/email": "^5.0.0-rc.
|
|
33
|
-
"@travetto/image": "^5.0.0-rc.
|
|
34
|
-
"@travetto/worker": "^5.0.0-rc.
|
|
29
|
+
"@travetto/runtime": "^5.0.0-rc.9",
|
|
30
|
+
"@travetto/config": "^5.0.0-rc.9",
|
|
31
|
+
"@travetto/di": "^5.0.0-rc.9",
|
|
32
|
+
"@travetto/email": "^5.0.0-rc.9",
|
|
33
|
+
"@travetto/image": "^5.0.0-rc.9",
|
|
34
|
+
"@travetto/worker": "^5.0.0-rc.9",
|
|
35
35
|
"@types/inline-css": "^3.0.3",
|
|
36
36
|
"html-entities": "^2.5.2",
|
|
37
37
|
"inline-css": "^4.0.2",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"sass": "^1.77.6"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@travetto/cli": "^5.0.0-rc.
|
|
42
|
+
"@travetto/cli": "^5.0.0-rc.9"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"@travetto/cli": {
|
package/support/bin/config.ts
CHANGED
|
@@ -40,8 +40,7 @@ export class EditorConfig {
|
|
|
40
40
|
const data: EditorConfigType = parse(content) ?? {};
|
|
41
41
|
return key ? data[key] : data;
|
|
42
42
|
} catch {
|
|
43
|
-
|
|
44
|
-
return {} as EditorConfigType;
|
|
43
|
+
return { to: undefined!, from: undefined! };
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
|
package/support/bin/send.ts
CHANGED
|
@@ -29,7 +29,7 @@ export class EditorSendService {
|
|
|
29
29
|
DependencyRegistry.install(cls, { curr: cls, type: 'added' });
|
|
30
30
|
|
|
31
31
|
this.ethereal = !!senderConfig.host?.includes('ethereal.email');
|
|
32
|
-
} catch
|
|
32
|
+
} catch {
|
|
33
33
|
console.error('A mail transport is currently needed to support sending emails. Please install @travetto/email-nodemailer or any other compatible transport');
|
|
34
34
|
throw new Error('A mail transport is currently needed to support sending emails. Please install @travetto/email-nodemailer or any other compatible transport');
|
|
35
35
|
}
|
|
@@ -47,8 +47,8 @@ export class EditorSendService {
|
|
|
47
47
|
const svc = await this.service();
|
|
48
48
|
if (this.ethereal) {
|
|
49
49
|
const { getTestMessageUrl } = await import('nodemailer');
|
|
50
|
-
const { default:
|
|
51
|
-
type SendMessage = Parameters<Parameters<(typeof
|
|
50
|
+
const { default: _smtp } = await import('nodemailer/lib/smtp-transport/index');
|
|
51
|
+
type SendMessage = Parameters<Parameters<(typeof _smtp)['prototype']['send']>[1]>[1];
|
|
52
52
|
const info = await svc.send<SendMessage>(message);
|
|
53
53
|
const url = getTestMessageUrl(info);
|
|
54
54
|
console.log('Sent email', { to, url });
|