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

@cvo/plugin-notification

v0.0.0

Published

Notification plugin for CVO Framework

Readme

@cvo/plugin-notification

Unified notification center for CVO Framework. Send messages via Email (SMTP), Feishu, DingTalk, and more with a single API.

🚀 Features

  • Unified API: A single send() or Notify.send() method to rule them all.
  • Multi-Driver Support: Built-in support for Email, Feishu Webhooks, DingTalk Webhooks, and Console Logs.
  • Broadcast Support: Easily send messages across all configured channels at once.
  • Simple Integration: Accessible via useNotification() hook or the static Notify helper.

🛠 Configuration

Configure your notification channels in cvo.config.ts:

import { defineConfig } from '@cvo/core';
import { NotificationPlugin } from '@cvo/plugin-notification';

export default defineConfig({
  plugins: [
    new NotificationPlugin({
      channels: {
        email: {
          host: 'smtp.example.com',
          port: 465,
          auth: { user: '[email protected]', pass: 'secret' },
          from: 'System <[email protected]>'
        },
        feishu: {
          webhook: 'https://open.feishu.cn/open-apis/bot/v2/hook/xxx'
        },
        log: true // Enable console logging for development
      }
    })
  ]
});

🧠 Usage

Minimalistic Approach (Notify Helper)

Use the Notify static class for quick notifications. It automatically routes to all available channels if no specific channel is provided.

import { Notify } from '@cvo/plugin-notification';

// Send email to a specific user
await Notify.send('[email protected]', 'Your verification code is 123456');

// Send to a specific channel
await Notify.send('admin@system', 'Server disk space low', { channel: 'log' });

Using the Hook (useNotification)

The hook provides full access to the plugin instance. Note the parameter order for the send method: (to, message, channel, options).

import { useNotification } from '@cvo/server';

export async function alertAdmin() {
  const notification = useNotification();
  
  // Method signature: send(to, message, channelName, options?)
  await notification.send(
    '[email protected]', 
    'Database backup failed!', 
    'email', 
    { subject: 'CRITICAL: Backup Failure' }
  );
  
  // Broadcast to ALL configured channels (Email, Feishu, etc.)
  await notification.broadcast('System upgrade scheduled for 10 PM tonight.');
}

🛠 Built-in Drivers

  1. Email (email): SMTP-based delivery using nodemailer.
  2. Log (log): Outputs to the console/audit logs. Recommended for development.
  3. Webhook (feishu, dingtalk): HTTP POST to platform-specific webhooks.

🛠 Custom Channels

You can extend the notification center by implementing the NotificationChannel interface.