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

@chrono-os/email-transactional

v0.3.1

Published

Email transacional (Resend) com templates para lead magnet, order paid, manual fallback + unsubscribe token signing + RFC 8058 List-Unsubscribe headers

Readme

@chrono-os/email-transactional

E-mail transacional pelo Resend: template HTML com a marca do app, link de descadastro assinado (HMAC-SHA256) e cabeçalhos RFC 8058 (List-Unsubscribe + one-click, o botão nativo de descadastro no Gmail, Outlook e Apple Mail).

yarn add @chrono-os/email-transactional resend
import { buildEmailService, verifyUnsubscribeToken } from '@chrono-os/email-transactional'

const email = buildEmailService({
  resendApiKey: process.env.RESEND_API_KEY,          // sem ela: modo bootstrap, tudo vira { kind: 'skipped' }
  emailFrom: 'Nina | Minha Marca <[email protected]>',
  unsubscribeSecret: process.env.UNSUBSCRIBE_SECRET, // sem ela: sem link nem cabeçalho de descadastro
  siteUrl: 'https://meusite.com.br',
  unsubscribePath: '/cancelar',                      // default
  branding: { siteName: 'Minha Marca', primaryColor: '#184E77', logoUrl: 'https://meusite.com.br/logo.png' },
})

const r = await email.sendEmail({
  to: '[email protected]',
  subject: 'Seu material chegou',
  preheader: 'O link está aqui dentro',
  title: 'Seu material chegou',
  body: '<p>…</p>',
  cta: { label: 'Baixar', href: 'https://…' },
})
// r: { kind: 'sent', id } | { kind: 'skipped', reason } | { kind: 'failed', error } — nunca lança

// na rota /cancelar
const v = verifyUnsubscribeToken(token, process.env.UNSUBSCRIBE_SECRET!) // { ok: true, email } | { ok: false, reason }

Modo pronto (0.3.0)

await email.sendEmail({ to, subject, html: meuHtml, text: meuTexto, replyTo: '[email protected]' })
await email.sendEmail({ to, subject, text: corpoEscritoNoPainel })   // só texto

Sai como veio, sem layout nem rodapé. No modo template, branding pode vir por envio (white-label) e branding.footerNote troca ou tira (null) a frase do rodapé. timeoutMs (default 15 s) evita que um Resend lento trave a request.

Entradas

| Import | O que tem | |---|---| | @chrono-os/email-transactional ou /core | buildEmailService, signUnsubscribeToken, verifyUnsubscribeToken | | /templates | wrapHtml, escapeHtml, BrandingConfig | | /fastify | alias antigo do /core (nunca teve nada de Fastify); sai na 1.0 |

Até a 0.1.0 este README documentava emailTransactionalPlugin, sendLeadMagnet, sendOrderPaid e sendOrderManualFallback, que nunca existiram no código. O envio é um só (sendEmail); o conteúdo de cada tipo de e-mail é do app.

Versionamento

SemVer. Tag v* → npmjs.org.