Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(push): 添加 WxPusher 推送支持 #356

Merged
merged 4 commits into from
Mar 4, 2025

Conversation

h7ml
Copy link
Contributor

@h7ml h7ml commented Feb 16, 2025

  • 新增 WxPusher 推送服务的实现和配置方案
  • 更新全局推送器列表,加入 WxPusher
  • 添加 WxPusher 相关的配置和选项架构

h7ml added 2 commits February 16, 2025 23:54
- 新增 WxPusher 推送服务的实现和配置方案
- 更新全局推送器列表,加入 WxPusher
- 添加 WxPusher 相关的配置和选项架构
- 在导入部分新增 WxPusher 模块
- 在批量推送函数中集成 WxPusher 推送
- 添加 WxPusher 推送配置的环境变量检查
Copy link

Walkthrough

此PR新增了对WxPusher推送服务的支持,包括实现和配置方案的添加,更新全局推送器列表,并加入了WxPusher相关的配置和选项架构。

Changes

文件 概要
examples/01-example.ts 添加了WxPusher推送的实现逻辑,包括环境变量检查和推送队列的更新。
src/index.ts 导出了新的WxPusher模块。
src/one.ts 将WxPusher添加到推送服务列表中。
src/push/wx-pusher.ts 新增WxPusher推送服务的实现,包括配置和选项的定义。

this.WX_PUSHER_UID = WX_PUSHER_UID
Debugger('set WX_PUSHER_APP_TOKEN: "%s", WX_PUSHER_UID: "%s"', WX_PUSHER_APP_TOKEN, WX_PUSHER_UID)
// 根据 configSchema 验证 config
validate(config, WxPusher.configSchema)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在调用validate函数时,请确保传递的配置对象符合WxPusher.configSchema的要求,以避免潜在的验证错误。

h7ml added 2 commits February 17, 2025 00:08
- 在 README.md 中添加了 WxPusher 推送的使用示例
- 包含了申请 appToken 和获取用户 uid 的步骤说明
- 示例中展示了如何发送 markdown 格式的消息,并设置消息摘要和链接
- 在 README.md 中添加了 WxPusher 的基础用法和高级用法示例
- 更新了 WxPusherOption 接口,增加了 uids 属性
- 修改了 WxPusher 类的 send 方法默认参数
- 优化了 wxPusherOptionSchema 中的属性描述和默认值
@CaoMeiYouRen CaoMeiYouRen changed the base branch from master to dev March 4, 2025 15:31
@CaoMeiYouRen CaoMeiYouRen merged commit d4b79c9 into CaoMeiYouRen:dev Mar 4, 2025
2 checks passed
@CaoMeiYouRen
Copy link
Owner

🎉 This PR is included in version 4.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants