npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@emito/provider-resend

v0.1.0

Published

Resend email provider plugin for Emito.

Readme

@emito/provider-resend

Resend email provider plugin for Emito.

License Types

TypeScript Zod

What it is

@emito/provider-resend is an email delivery adapter that sends Emito notifications through Resend. It wraps the official resend SDK in a ProviderPlugin — the common interface Emito uses to dispatch a notification to any channel — so the engine can hand it an email payload and get back a normalized DeliveryResult.

Provider plugins keep Emito provider-agnostic: the core engine never talks to Resend directly. It only knows the ProviderPlugin contract, and this package translates that contract into Resend API calls and maps Resend's failures back into Emito's typed error model.

Install

@emito/provider-resend is a workspace package in the Emito monorepo and is not yet published to npm. Inside the monorepo, depend on it with the workspace protocol and add resend, which is required at runtime:

// package.json
{
  "dependencies": {
    "@emito/provider-resend": "workspace:*",
    "resend": "^4.0.0"
  }
}

resend is the official Resend SDK. The plugin is designed to be registered with the Emito core engine alongside other channel providers. Standalone publishing to npm is planned.

Usage

createResendProvider validates its config and returns a ProviderPlugin bound to the email channel. Register the returned plugin with the Emito engine, which calls deliver with each email payload.

import { createResendProvider } from "@emito/provider-resend";

const provider = createResendProvider({
  apiKey: process.env.RESEND_API_KEY!,
  fromAddress: "Acme <[email protected]>",
  replyTo: "[email protected]", // optional
});

// The engine invokes this; shown here directly for illustration.
const result = await provider.deliver({
  channel: "email",
  to: "[email protected]",
  subject: "Welcome to Acme",
  html: "<h1>Welcome</h1>",
  text: "Welcome",
  metadata: {
    notificationId: "ntf_123",
    subscriberId: "sub_456",
    eventType: "user.welcome",
  },
});

console.log(result.success, result.providerMessageId);

On success, deliver resolves to { success: true, providerMessageId }. On failure it throws an EmitoError (from @emito/types) with a classified code — the engine uses these for retry and routing decisions.

API surface

| Export | Kind | Description | | --- | --- | --- | | createResendProvider(config) | function | Returns a ProviderPlugin for the email channel backed by Resend. | | ResendProviderConfigSchema | z.ZodObject | Zod schema used to validate provider config. | | ResendProviderConfig | type | Inferred config type: apiKey, fromAddress, and optional replyTo. |

Configuration

| Field | Type | Required | Description | | --- | --- | --- | --- | | apiKey | string | yes | Resend API key. | | fromAddress | string | yes | Sender address used for every send (e.g. Name <addr@domain>). | | replyTo | string | no | Default reply-to; falls back to the payload's replyTo when unset. |

Error mapping

Resend errors are translated into EmitoError codes from @emito/types so the engine can act on them consistently:

| Condition | Code | Retryable | | --- | --- | --- | | Rate limit (HTTP 429) | RATE_LIMITED | yes | | Invalid recipient address | DELIVERY_INVALID_ADDRESS | no | | Resend server error (HTTP 5xx) / unknown failure | PROVIDER_UNAVAILABLE | yes | | Other rejections | DELIVERY_REJECTED | no | | Invalid config | CONFIG_INVALID | — (thrown at construction) |

Each outgoing email carries an X-Entity-Ref-ID header set to the notification ID from metadata for downstream correlation.

Part of Emito

@emito/provider-resend is one package in the Emito monorepo — self-hosted, provider-agnostic notification infrastructure for Node.js and TypeScript.

License

MIT — part of the Emito project.