@toa.io/extensions.mail 1.0.0-alpha.144 → 1.0.0-alpha.146

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.
@@ -21,5 +21,5 @@ configuration:
21
21
  provider: { type: string, enum: [Console, Resend] }
22
22
  from: { type: string, format: email }
23
23
  templates: { type: string, format: uri }
24
- options: { type: object }
24
+ options: { type: object } # provider-specific options
25
25
  required: [provider, from]
@@ -1,4 +1,4 @@
1
- export class Console {
1
+ class Console {
2
2
  logs
3
3
 
4
4
  constructor (context) {
@@ -9,3 +9,5 @@ export class Console {
9
9
  this.logs.debug('Email kinda sent', message)
10
10
  }
11
11
  }
12
+
13
+ exports.Console = Console
@@ -1,7 +1,7 @@
1
- import * as assert from 'node:assert'
2
- import * as resend from 'resend'
1
+ const { assert } = require('node:assert')
2
+ const { Resend: Client } = require('resend')
3
3
 
4
- export class Resend {
4
+ class Resend {
5
5
  resend
6
6
  logs
7
7
 
@@ -10,7 +10,7 @@ export class Resend {
10
10
 
11
11
  assert.ok(typeof key === 'string', 'Resend API key is not set')
12
12
 
13
- this.resend = new resend.Resend(key)
13
+ this.resend = new Client(key)
14
14
  this.logs = context.logs
15
15
  }
16
16
 
@@ -27,3 +27,5 @@ export class Resend {
27
27
  this.logs.debug('Email sent', data)
28
28
  }
29
29
  }
30
+
31
+ exports.Resend = Resend
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/extensions.mail",
3
- "version": "1.0.0-alpha.144",
3
+ "version": "1.0.0-alpha.146",
4
4
  "description": "Toa Mail",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -22,9 +22,12 @@
22
22
  "features": "cucumber-js"
23
23
  },
24
24
  "dependencies": {
25
+ "@toa.io/boot": "1.0.0-alpha.143",
26
+ "@toa.io/core": "1.0.0-alpha.136",
27
+ "@toa.io/generic": "1.0.0-alpha.93",
25
28
  "@toa.io/schemas": "1.0.0-alpha.143",
26
29
  "cheerio": "1.0.0",
27
30
  "resend": "4.1.2"
28
31
  },
29
- "gitHead": "2921d82008e9354c00007ee4cd49555075023936"
32
+ "gitHead": "4e201b67db78998cbdca33c5abf7bf3493b85ff0"
30
33
  }