
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@lovable.dev/email-js
Advanced tools
Utilities for Lovable email hooks and delivery.
npm install @lovable.dev/email-js
run_id (build-context emails)When sending from a webhook where a build run exists, pass the run_id from
the payload. You can override the idempotency key (defaults to run_id).
import { parseEmailWebhookPayload, sendLovableEmail } from "@lovable.dev/email-js";
import { verifyWebhookRequest, type EmailWebhookPayload } from "@lovable.dev/webhooks-js";
const apiKey = Deno.env.get("LOVABLE_API_KEY");
export async function handleWebhook(req: Request) {
if (!apiKey) {
throw new Error("Missing Lovable API key");
}
const { body } = await verifyWebhookRequest<EmailWebhookPayload>({
req,
secret: apiKey,
});
const payload = parseEmailWebhookPayload(body);
if (payload.version !== "1") {
throw new Error(`Unsupported payload version: ${payload.version}`);
}
if (!payload.run_id) {
throw new Error("Missing run_id");
}
const apiBaseUrl = payload.data?.api_base_url ?? "https://api.lovable.dev";
await sendLovableEmail(
{
run_id: payload.run_id,
to: payload.data?.email ?? "",
from: "My App <noreply@example.com>",
subject: "Welcome",
html: "<p>Hello</p>",
text: "Hello",
purpose: "transactional",
},
{ apiKey, apiBaseUrl },
);
}
run_id (runtime-triggered emails)For transactional emails sent outside a build context (e.g., webhook handlers,
admin actions, database triggers), run_id is not required. Provide an
idempotency_key with purpose: "transactional" and the API creates a
transactional run automatically:
await sendLovableEmail(
{
to: "user@example.com",
from: "App <noreply@notify.example.com>",
sender_domain: "notify.example.com",
subject: "Your request was approved",
html: "<p>Approved!</p>",
text: "Approved!",
purpose: "transactional",
idempotency_key: `approval-${requestId}`,
unsubscribe_token: token,
},
{ apiKey },
);
FAQs
Lovable Email JS
The npm package @lovable.dev/email-js receives a total of 27,740 weekly downloads. As such, @lovable.dev/email-js popularity was classified as popular.
We found that @lovable.dev/email-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.