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

napcat-plugin-epic-free

v1.0.0

Published

Epic Games Store 每周免费游戏订阅推送插件

Readme

napcat-plugin-epic-free

一个用于订阅和推送 Epic Games Store 每周免费游戏的 NapCat 插件。

LICENSE

功能特色

  • 指令查询:随时使用指令查询当前免费游戏,以合并转发消息发送(封面图 + 介绍 + 链接 + 截止时间)
  • 定时推送:按群/私聊粒度订阅每日定时推送,可自定义推送时间
  • 灵活订阅:支持群聊和私聊分别订阅,命令式管理
  • 去重推送:基于内容指纹(MD5 Hash)避免重复推送同一批游戏
  • 代理支持:内置 HTTP/SOCKS5 代理配置,方便在网络受限的环境下使用
  • 权限管理:订阅/取消订阅等操作限群管理员使用
  • WebUI 管理:React 前端面板,可视化管理配置、订阅和状态

安装

Releases 下载最新构建包,解压到 NapCat 的 plugins 目录即可。

配置

代理配置(可选)

如果服务器无法直接访问 Epic Games API(例如在中国大陆),需要在 WebUI 配置面板中设置代理。

| 配置项 | 默认值 | 说明 | |:---:|:---:|:---| | 代理类型 | (无) | 可选 httpsocks5,留空不使用代理 | | 代理地址 | 127.0.0.1 | 代理服务器地址 | | 代理端口 | 7890 | 代理服务器端口 | | 代理用户名 | (无) | 代理认证用户名(可选) | | 代理密码 | (无) | 代理认证密码(可选) |

使用

指令表

| 指令 | 权限 | 说明 | |:---:|:---:|:---| | epic喜加一 / 喜加一 | 所有用户 | 获取当前 Epic 免费游戏信息 | | epic订阅 HH:MM | 群管理员 | 为当前群/私聊开启每日定时推送,例如 epic订阅 8:30 | | epic取消订阅 | 群管理员 | 取消当前群/私聊的推送 | | epic订阅状态 | 所有用户 | 查看当前群/私聊的订阅状态和推送时间 |

项目结构

napcat-plugin-epic-free/
├── src/
│   ├── index.ts                # 插件入口:生命周期钩子、定时任务加载、路由注册
│   ├── config.ts               # 默认配置 + WebUI 配置 Schema(含代理配置项)
│   ├── types.ts                # TypeScript 类型定义
│   ├── core/
│   │   └── state.ts            # 全局状态单例 + 配置/订阅/定时器管理
│   ├── handlers/
│   │   └── message-handler.ts  # 消息命令处理:喜加一、订阅管理、权限检查
│   ├── services/
│   │   ├── api-service.ts      # WebUI API 路由
│   │   ├── epic-api.ts         # Epic Store 促销 API 调用 + 消息构建
│   │   ├── scheduler.ts        # 定时推送任务管理 + 去重检查
│   │   └── subscription.ts     # 订阅数据持久化(JSON 文件存储)
│   └── webui/                  # React SPA 前端(独立构建)
│       └── src/
│           ├── pages/
│           │   ├── StatusPage.tsx    # 仪表盘
│           │   ├── ConfigPage.tsx    # 配置管理
│           │   └── GroupsPage.tsx    # 订阅管理
│           └── ...
├── .github/
│   ├── workflows/
│   │   ├── release.yml         # 自动构建发布
│   │   └── update-index.yml    # 自动更新插件索引
│   └── copilot-instructions.md
├── package.json
├── vite.config.ts
└── README.md

开发

环境准备

pnpm install

构建

# 完整构建(前端 + 后端)
pnpm run build

# 前端开发服务器
pnpm run dev:webui

# 类型检查
pnpm run typecheck

热重载开发

需要在 NapCat 端安装 napcat-plugin-debug 插件:

# 一键部署:构建 → 自动复制 → 自动重载
pnpm run deploy

# 开发模式:watch 构建 + 自动部署 + 热重载
pnpm run dev

数据文件

| 文件 | 位置 | 说明 | |------|------|------| | 插件配置 | ctx.configPath | 代理、权限等配置 | | scheduler.json | ctx.dataPath | 定时推送任务配置 | | subscriptions.json | ctx.dataPath | 订阅列表 | | push_history.json | ctx.dataPath | 推送历史指纹(去重用) |

致谢

许可证

MIT License