@tellimer/mailer
Advanced tools
Comparing version 1.0.4 to 1.0.5
import { Mailable, MailableVersionFactory, Personalization as SendgridPersonalization } from '@tellimer/mailable'; | ||
import { Response } from './response'; | ||
export declare type Person = string | PersonObj; | ||
export declare type Person = string | PersonObj | (() => string | PersonObj); | ||
export declare type PersonObj = { | ||
@@ -5,0 +5,0 @@ name?: string; |
@@ -106,2 +106,5 @@ "use strict"; | ||
function convertFrom(from) { | ||
if (typeof from === 'function') { | ||
return convertFrom(from()); | ||
} | ||
if (typeof from === 'string') { | ||
@@ -126,2 +129,5 @@ return from; | ||
}; | ||
if (mailable.replyTo) { | ||
data.replyTo = mailable.replyTo; | ||
} | ||
const responses = yield sendInChunks(data); | ||
@@ -128,0 +134,0 @@ const r = new response_1.Response(personalizations, { default: personalizations }, { default: responses }, { default: html }); |
{ | ||
"name": "@tellimer/mailer", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"license": "MIT", | ||
@@ -19,12 +19,13 @@ "main": "dist/index.js", | ||
"peerDependencies": { | ||
"@sendgrid/client": "^7.7.0", | ||
"@sendgrid/mail": "^7.6.0", | ||
"@sendgrid/client": "^7.7.0" | ||
"@tellimer/mailable": "*" | ||
}, | ||
"dependencies": { | ||
"@tellimer/mailable": "*", | ||
"tiny-async-pool": "^2.0.1" | ||
}, | ||
"devDependencies": { | ||
"@sendgrid/client": "^7.7.0", | ||
"@sendgrid/mail": "^7.6.0", | ||
"@types/expect": "^24.3.0", | ||
"@tellimer/mailable": "workspace:*", | ||
"@types/faker": "^5.5.8", | ||
@@ -31,0 +32,0 @@ "@types/mocha": "^9.0.0", |
@@ -16,3 +16,3 @@ import sendgrid from '@sendgrid/mail' | ||
export type Person = string | PersonObj | ||
export type Person = string | PersonObj | (() => string | PersonObj) | ||
@@ -123,2 +123,6 @@ export type PersonObj = { | ||
function convertFrom(from: Person) { | ||
if (typeof from === 'function') { | ||
return convertFrom(from()) | ||
} | ||
if (typeof from === 'string') { | ||
@@ -146,2 +150,6 @@ return from | ||
if (mailable.replyTo) { | ||
data.replyTo = mailable.replyTo | ||
} | ||
const responses = await sendInChunks(data) | ||
@@ -148,0 +156,0 @@ const r = new Response( |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
38155
1021
1
20
- Removed@tellimer/mailable@*