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

all-pusher-api

v1.6.0

Published

统一化推送服务API.

Readme

all-pusher-api

统一化推送服务Nodejs API. 已支持钉钉, Discord, 邮件, 飞书, PushDeer, PushPlus, QQ, QQ 频道机器人, Server 酱, Showdoc Push, Telegram Bot, 企业微信群机器人, 息知, WxPusher, iGot, Chanify, Bark, Push, Slack, Pushback, Zulip, RocketChat等平台.

!!!!!仅推送!!!!!不交互!!!!!!

已支持平台

安装

npm install all-pusher-api -S

使用

具体参数说明请查看说明文档

Example

多平台推送

const { PushApi } = require('all-pusher-api'); // 多平台同时推送

(async () => {
  console.log((await new PushApi([
    {
      name: 'ServerChanTurbo',
      config: {
        key: {
          token: '******'
        }
      }
    },
    {
      name: 'PushDeer',
      config: {
        key: {
          token: '******'
        }
      }
    },
    {
      name: 'WxPusher',
      config: {
        key: {
          token: '******',
          uids: ['******']
        }
      }
    },
    ...,
    {
      name: 'PushMe',
      config: {
        key: {
          token: '******'
        }
      }
    }
  ])
    .send({ message: '测试文本' })).map((e) => (e.result.status >= 200 && e.result.status < 300) ? `${e.name} 测试成功` : e));
})();

单平台推送

(async () => {
  // Example 1
  const { PushApi } = require('all-pusher-api'); // 多平台同时推送

  const result = await new PushApi([
    {
      name: 'ServerChanTurbo',
      config: {
        key: {
          token: '******'
        }
      }
    }
  ])
    .send({ message: '测试文本' });
  console.log(result.map((e) => (e.result.status >= 200 && e.result.status < 300) ? `${e.name} 测试成功` : e));

  // Example 2
  const { WxPusher } = require('all-pusher-api/dist/WxPusher'); // 单平台推送可选

  const wxPusherResult = await new WxPusher({
    token: '******',
    uids: ['******']
  })
    .send({ message: '测试文本' });
  console.log(wxPusherResult);
})();

命令行使用

全局安装

npm install all-pusher-api -g

快速使用

allpush send -m '测试文本' -c '{\"name\":\"ServerChanTurbo\",\"config\":{\"key\":{\"token\":\"******\"}}}'
allpush send -m '测试文本' -f './config.json'

allpush send -h

# Usage: allpush send [options]
#
# 向配置的推送平台发送消息
#
# Options:
#   -c, --config <config>     JSON 配置字符串,需对引号进行转义。在线生成: https://configer.hclonely.com/?fileLink=https://raw.githubusercontent.com/HCLonely/all-pusher-api/main/config/template.yaml.js
#   -f, --config-file <path>  JSON 配置文件路径。在线生成: https://configer.hclonely.com/?fileLink=https://raw.githubusercontent.com/HCLonely/all-pusher-api/main/config/template.yaml.js
#   -m, --message <text>      要发送的消息内容
#   -t, --title <text>        消息标题
#   -h, --help                显示帮助信息

使用-c选项时JSON字符串要压缩为单行,双引号要转义! 使用多个通道同时推送时建议使用-f选项而不是-c选项!

支持的消息类型

所有平台支持均纯文本(text)格式消息, 大部分支持markdown格式消息, 部分支持html格式消息

markdown*为支持html格式不支持markdown格式消息时自动将markdown转换为html格式

other为部分平台支持特殊格式的消息, 可通过customOptions传入参数, 具体参数请查看相应平台的文档

  • Showdoc: 'text'
  • Pushover: 'text'
  • 爱语飞飞: 'text'
  • SimplePush: 'text'
  • QQ(go-cqhttp): 'text', 'other'
  • Qmsg: 'text'
  • Discord: 'text', 'other'
  • 飞书: 'text', 'other'
  • PushBullet: 'text', 'other'
  • ~~NowPush: 'text', 'other'~~
  • Chanify: 'text', 'other'
  • Bark: 'text', 'other'
  • Server酱Turbo: 'text', 'markdown'
  • 息知: 'text', 'markdown'
  • WPush: 'text', 'markdown'
  • AnPush: 'text', 'markdown'
  • PushDeer: 'text', 'markdown', 'other'
  • QQ官方机器人: 'text', 'markdown', 'other'
  • 企业微信: 'text', 'markdown', 'other'
  • 企业微信群机器人: 'text', 'markdown', 'other'
  • 钉钉: 'text', 'markdown', 'other'
  • TelegramBot: 'text', 'markdown', 'html'
  • 一封传话: 'text', 'markdown', 'html'
  • PushMe: 'text', 'markdown', 'html'
  • 邮件: 'text', 'markdown*', 'html'
  • PushPlus: 'text', 'markdown*', 'html'
  • WxPusher: 'text', 'markdown*', 'html'

状态码

  • 0-Missing Parameter: ***: 缺少必要参数
  • 10-Missing Options: 缺少发送消息配置
  • 11-Unknown Error: 未知错误
  • 200-Success: 推送成功
  • 201-Waiting: 待审核
  • 100-Error: 请求发送成功, 服务器返回错误信息
  • 101-No Response Data: 请求发送成功, 但没有接收到服务器返回的数据
  • 102-Request Error: 请求发送失败, 一般是网络问题
  • 103-Options Format Error: 参数格式错误
  • 104-Get "***" Failed: 获取参数失败
  • 140-Check Sign Failed: 签名校检失败