feat: add Feishu notifier for message notifications

- Implemented a lightweight notification library with support for multiple channels.
- Added FeishuNotifier class to send messages via Feishu webhook.
- Created README documentation for usage and configuration of Feishu notifier.
- Added TypeScript configuration for the project.
- Included a test script for verifying Feishu message notifications.
This commit is contained in:
2026-01-08 16:43:53 +08:00
commit 6cf949bcd1
14 changed files with 1374 additions and 0 deletions

32
readme.md Normal file
View File

@@ -0,0 +1,32 @@
# @kevisual/notifier
一个轻量级的消息通知库,支持多种推送渠道。
## 支持的推送渠道
### 飞书 (Feishu)
通过 Webhook 将消息推送到飞书群机器人。
#### 配置
```typescript
import { FeishuNotifier } from '@kevisual/notifier';
const feishu = new FeishuNotifier({
webhook: 'https://open.feishu.cn/open-apis/bot/v2/hook/xxx',
});
```
#### 使用
```typescript
await feishu.notify('这是一条测试消息');
```
#### 创建飞书群机器人 Webhook
1. 打开飞书群设置,点击「群机器人」
2. 添加「自定义机器人」
3. 复制 Webhook URL
4. (可选) 设置安全策略:签名校验或 IP 白名单