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

@json-express/email-console

v2.0.0

Published

Console email provider for JSON Express — logs the message instead of sending. Default for local dev.

Downloads

157

Readme

@json-express/email-console

Console email provider for JSONExpress v2. Implements IEmailProvider by formatting messages and writing them to the configured logger — no SMTP creds, no I/O, no flake. The default for local dev and the unit-test fixture for plugin-identity.


What It Does

This plugin implements IEmailProvider from @json-express/core. When any consumer (typically @json-express/plugin-identity) calls emailProvider.send(message), the provider formats a multi-line block with the From, To, Subject, and body, and emits a single logger.info(...) call. The message body also lives in the logger's structured text / html fields so log scrapers and Playwright webServer.stdout capture can find tokens deterministically.

It satisfies the contract just well enough to wire up the real flow end-to-end without any external service.


Installation

npm install @json-express/email-console

The CLI auto-discovers any package matching @json-express/email-* in your package.json and registers it as the active email provider. If multiple are installed, the standard jex.email=... or JEX.EMAIL=... selector applies.


Configuration

# Default From address used when message.from is omitted.
[email protected]

| Key | Type | Default | Description | |---|---|---|---| | email.from | string | no-reply@localhost | Falls back into EmailMessage.from when the caller didn't set one. |


When To Use This vs. Real SMTP

| Scenario | Provider | |---|---| | Local dev, examples, CI unit tests | email-console (this package) | | Production transactional email | email-smtp (planned) — same IEmailProvider interface, swap the package |

Switching is a one-line package.json change — your application code never imports the provider directly; it always resolves it from the kernel container.


The IEmailProvider Contract

Defined in @json-express/core:

export interface EmailMessage {
    to: string | string[];
    from?: string;        // falls back to the provider's configured default
    subject: string;
    text?: string;        // at least one of text or html must be set
    html?: string;
    replyTo?: string;
    headers?: Record<string, string>;
}

export interface IEmailProvider {
    send(message: EmailMessage): Promise<void>;
    isHealthy?(): Promise<boolean>;
}

This package's send() throws if neither text nor html is provided.


Sample Output

[INFO]
┌── Email (console) ──────────────────────────────────────
│ From:    [email protected]
│ To:      [email protected]
│ Subject: Verify your email for My App
├─────────────────────────────────────────────────────────
│ Welcome to My App!
│
│ Please verify your email address by visiting:
│ https://my-app.example/auth/verify?token=hQ8…
│
│ If you didn't sign up, you can safely ignore this email.
└─────────────────────────────────────────────────────────
{ from: '...', to: '...', subject: '...', text: '...', html: '...' }

The structured payload at the end is what JSON loggers (Pino, etc.) emit — keeping the message scriptable.