@tartine/common
Advanced tools
Comparing version
@@ -9,2 +9,2 @@ import sg from "@sendgrid/mail"; | ||
const customer = await stripe.customers.retrieve(session.customer); | ||
*/ | ||
*/ |
@@ -51,2 +51,5 @@ "use strict"; | ||
} | ||
if (!process.env.SENDGRID_SENDER_EMAIL) { | ||
throw new Error("SENDGRID_SENDER_EMAIL must be defined as an environment variable"); | ||
} | ||
mail_1.default.setApiKey(process.env.SENDGRID_API_KEY); | ||
@@ -74,4 +77,9 @@ function generateMagicLink(email, landingPage) { | ||
message = { | ||
to: "test@example.com", | ||
from: "m@ticketing.com", | ||
from: { | ||
name: "potato@no-reply", | ||
email: process.env.SENDGRID_SENDER_EMAIL, | ||
}, | ||
to: { | ||
email: email, | ||
}, | ||
subject: "Your login credentials", | ||
@@ -90,2 +98,2 @@ html: html, | ||
const customer = await stripe.customers.retrieve(session.customer); | ||
*/ | ||
*/ |
{ | ||
"name": "@tartine/common", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "Nothing but commons", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
40998
0.68%985
0.82%9
28.57%