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

release: 第一个正式版 #206

Open
wants to merge 530 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
530 commits
Select commit Hold shift + click to select a range
bea9870
fix: 中间键返回错误
sj817 Sep 15, 2024
c815b09
chore(dev): release 0.12.14 (#179)
github-actions[bot] Sep 15, 2024
e90f6b1
fix: todo
sj817 Sep 17, 2024
5b64fc5
fix: close #183
sj817 Oct 5, 2024
58932bc
fix: close #182 优化部分变量名称
sj817 Oct 5, 2024
a16bb28
chore(dev): release 0.12.15 (#180)
github-actions[bot] Oct 5, 2024
46021f6
fix: 增加`yaml.read` `yaml.save`
sj817 Oct 6, 2024
5c119a4
chore(dev): release 0.12.16 (#184)
github-actions[bot] Oct 6, 2024
5cf930e
fix: 引入部分新语法
sj817 Oct 7, 2024
88d4d5b
fix: 我也不想水啊...但是他没pr?
sj817 Oct 7, 2024
d2065b3
chore(dev): release 0.12.17 (#185)
github-actions[bot] Oct 7, 2024
9954110
fix: isArray && object
sj817 Oct 7, 2024
255fdc0
perf: 优化类型
sj817 Oct 13, 2024
d77bfcc
perf: 完成事件定义
sj817 Oct 14, 2024
af983f5
perf: 乏了 吃饭去
sj817 Oct 17, 2024
e740209
perf: 乏了 睡觉去
sj817 Oct 26, 2024
b303b6b
perf: 乏了 吃饭去
sj817 Oct 27, 2024
39caca4
fix: 乏了 玩去了
sj817 Oct 27, 2024
4286725
fix: 乏了 睡觉去
sj817 Oct 31, 2024
881d967
fix: 乏了 睡觉了
sj817 Oct 31, 2024
b9a7040
fix: 乏了 出去玩
sj817 Nov 1, 2024
aec3813
test: 看样子能跑了。
sj817 Nov 1, 2024
fc50451
fix: 真的可以跑了...
sj817 Nov 1, 2024
366ff80
fix: 困了 睡觉去
sj817 Nov 1, 2024
abe9bdf
fix: 困了 真的睡了
sj817 Nov 1, 2024
0d363a4
fix: 困了 洗澡睡觉qaq
sj817 Nov 2, 2024
95e260f
perf: 困了 睡觉~
sj817 Nov 4, 2024
a78528b
perf: 困了( ̄o ̄) . z Z
sj817 Nov 8, 2024
26471b0
perf: 群聊通知事件
sj817 Nov 9, 2024
4eb59cc
perf: onebot11通知事件
sj817 Nov 9, 2024
20ebcdf
perf: request
sj817 Nov 10, 2024
a1fa7b3
perf: event
sj817 Nov 10, 2024
9ffda18
feat: context
sj817 Nov 10, 2024
b55e4a9
perf: 优化配置文件导入
sj817 Nov 13, 2024
aeba274
perf: getYaml可选参数
sj817 Nov 13, 2024
1cb9efe
fix: Watcher.value return array
sj817 Nov 13, 2024
9d8c690
feat: plugin hmr
sj817 Nov 13, 2024
2eb003a
perf: 优化导出
sj817 Nov 13, 2024
9e55ec3
fix: 修正类插件导出错误 加载插件抛出异常捕获
sj817 Nov 13, 2024
0fd8d33
fix: 函数防抖
sj817 Nov 13, 2024
5f3b72a
docs: 简化
sj817 Nov 13, 2024
a75706d
Create LICENSE
sj817 Nov 13, 2024
4e3687a
feat: onebot11正向、鉴权
sj817 Nov 14, 2024
bf1f619
feat: onebot11http、鉴权
sj817 Nov 15, 2024
b3fa0e5
feat: level redis
sj817 Nov 17, 2024
55e2ca1
feat: 渲染
sj817 Nov 20, 2024
3335c2c
feat: 插件依赖缺失打印、快速回复中间件
sj817 Nov 21, 2024
1b665ea
feat: 哦吼 还剩个合并转发中间件捏
sj817 Nov 21, 2024
13ddeed
feat: 最后一个中间件
sj817 Nov 21, 2024
995c4db
fix: pm2 scripts
sj817 Nov 24, 2024
2403490
fix: build
sj817 Nov 24, 2024
523631f
feat: 新增pr工作流
sj817 Nov 25, 2024
e426118
fix: 不应该直接删release的。。。
sj817 Nov 25, 2024
52d6843
Merge remote-tracking branch 'origin/main' into 187-feat-重构
sj817 Nov 25, 2024
76581bf
fix: 这合并的是啥玩意啊
sj817 Nov 25, 2024
a6dc156
fix: actions
sj817 Nov 25, 2024
aba208a
fix: 奇奇怪怪的
sj817 Nov 25, 2024
fceedbb
pr版本号: <主版本号>.<次版本号>.<修订号>-<预发布标识>.<PR标识>.<PR编号>.<工作流唯一编号>-<时间戳>
sj817 Nov 25, 2024
ee5455a
fix: 优化构建提示
sj817 Nov 25, 2024
74f69ec
更新 pr.yml
sj817 Nov 25, 2024
ce43bbc
fix: no such file or directory
sj817 Nov 25, 2024
97eaeff
fix: init error
sj817 Nov 25, 2024
5a599fa
fix: 创建配置文件优先级
sj817 Nov 25, 2024
ae07a16
fix: 初始化的时候修改为esm环境
sj817 Nov 25, 2024
3733341
更新 package.json
sj817 Nov 25, 2024
4f8e7e9
更新 package.json
sj817 Nov 25, 2024
5869b79
feat: 初步新增npm插件更新
sj817 Nov 25, 2024
d053593
fix: up error
sj817 Nov 25, 2024
5ffcdf8
feat: git插件更新
sj817 Nov 25, 2024
96e2653
fix: 无更新
sj817 Nov 25, 2024
18788f0
fix: 优化更新提示
sj817 Nov 25, 2024
4df4c35
feat: ffmpeg ffprobe ffplay
sj817 Nov 26, 2024
0387c77
feat: npx karin ts
sj817 Nov 26, 2024
9d13912
fix: 修正混乱的判断
sj817 Nov 26, 2024
bdfbf58
fix: 加载apps错误
sj817 Nov 26, 2024
1dae8ed
feat: types包
sj817 Nov 26, 2024
4c85f39
fix: build error
sj817 Nov 26, 2024
f85ca35
啥也不是。。。
sj817 Nov 27, 2024
5c68428
fix: plugins不存在
sj817 Nov 27, 2024
7b90214
perf: 兼容性提高
sj817 Nov 27, 2024
17dc607
perf: 兼容Bot 补充handler
sj817 Nov 27, 2024
0536eff
feat: karin.handler
sj817 Nov 27, 2024
47360f3
perf: 兼容性提高
sj817 Nov 27, 2024
4da572e
perf: `sendMsg`返回值
sj817 Nov 27, 2024
e32ec25
fix: 修正ws类型
sj817 Nov 27, 2024
3133b77
fix: 补充 TaskOptions 接口参数
ikenxuan Nov 28, 2024
86f9586
refactor: 重构渲染器返回值 仅返回str
sj817 Nov 28, 2024
c50bee9
fix: 修正群文件相关类型
sj817 Nov 28, 2024
b0652bc
fix: build
sj817 Nov 28, 2024
36d9f79
fix: 热更新后定时任务停止
sj817 Nov 28, 2024
8c828a9
feat: save时自动写入注释
sj817 Nov 28, 2024
a2ac489
fix: 防抖函数导致的错误退出异常
sj817 Nov 29, 2024
57a4699
fix: 修正提示日志
sj817 Nov 29, 2024
a3c588a
fix: 兼容性提升
sj817 Nov 29, 2024
285437a
fix: 兼容性提升
sj817 Nov 29, 2024
5ca258e
fix: TypeScript 监察者模式
sj817 Nov 29, 2024
61ef97d
fix: qaq 我是笨比
sj817 Nov 29, 2024
6ee1171
fix: build error
sj817 Nov 29, 2024
e0cb428
fix: pkg修改为纯函数
sj817 Nov 29, 2024
dd91fea
fix: 兼容性提高
sj817 Nov 29, 2024
7728249
fix: build error
sj817 Nov 29, 2024
5065a60
fix: 兼容性提高
sj817 Nov 30, 2024
0982ecc
fix: 类型错误
sj817 Nov 30, 2024
faa9770
fix: 类型错误
sj817 Nov 30, 2024
27f8c1c
fix: 类型优化
sj817 Nov 30, 2024
262112b
fix: 修正类型
sj817 Nov 30, 2024
7f15635
fix: 新增sendApi 修正编译错误
sj817 Nov 30, 2024
3e8b7ca
fix: 处理包名为组织名称
sj817 Dec 2, 2024
cc6607a
fix: `npx karin ts -w`
sj817 Dec 2, 2024
6daab89
fix: 嵌套合并转发类型错误
sj817 Dec 3, 2024
fec7d81
fix: 多层嵌套类型错误
sj817 Dec 3, 2024
968eb4a
fix: onebot嵌套转发兼容性提升
sj817 Dec 3, 2024
856933d
fix: onebot请求错误 栈打印对齐
sj817 Dec 3, 2024
07cb804
fix: 兼容性提高
sj817 Dec 3, 2024
5151580
fix: ctx超时修改为抛出异常而不是返回`null`
sj817 Dec 5, 2024
f098f26
feat: ts main
sj817 Dec 5, 2024
c3e9d50
perf: tips
sj817 Dec 5, 2024
aa2b550
feat: 主人和管理员支持指定Bot 新增发主人 发管理方法
sj817 Dec 5, 2024
c3dc3b3
fix: 初始化错误
sj817 Dec 6, 2024
362f7a5
fix: 初始化逻辑优化
sj817 Dec 6, 2024
85d2d9e
fix: 初始化完成主动退出
sj817 Dec 6, 2024
7a44f03
perf: 路径修改为映射
sj817 Dec 6, 2024
841d407
feat: protocol qqbot
sj817 Dec 6, 2024
e5851f6
fix: export error
sj817 Dec 6, 2024
c0a9e7c
fix: 修正拼接模板路径错误
sj817 Dec 6, 2024
721a2e3
更新 template.ts
sj817 Dec 6, 2024
7944f97
fix: 好嘛 我是笨比
sj817 Dec 6, 2024
c8a5580
feat: restart
sj817 Dec 7, 2024
f8e7894
feat: 更新npm包支持指定标签
ikenxuan Dec 7, 2024
f343971
fix: on 该死 为什么你要抛出错误~~~
sj817 Dec 8, 2024
ff27610
fix: 初始化express
sj817 Dec 11, 2024
df81f16
fix: ffmpeg明确返回类型
ikenxuan Dec 11, 2024
38b6593
fix: 写漏了
ikenxuan Dec 11, 2024
9869d80
feat: `mergeImage` 修复`ffmpeg`相关函数的返回值
sj817 Dec 12, 2024
b3acbf2
fix: 修复传参`booleanResult`的时候返回值错误
sj817 Dec 12, 2024
35cda83
fix: 啊 我是笨比~
sj817 Dec 12, 2024
6a41966
fix: `mergeImage`兼容性提高
sj817 Dec 12, 2024
a11a41d
fix: 安逸
sj817 Dec 13, 2024
5327633
fix: 抽象
sj817 Dec 14, 2024
3928404
fix: ccc
sj817 Dec 14, 2024
6870f3d
feat: fileToUrl
sj817 Dec 14, 2024
02bda6b
export fileToUrl
sj817 Dec 14, 2024
9916615
更新 fileToUrl.ts
sj817 Dec 15, 2024
a2e14be
fix: `fileToUrl` 修改返回值类型
sj817 Dec 15, 2024
33a2806
fix: `fileToUrl` 支持更多文件数据
sj817 Dec 15, 2024
ec27736
fix: 被动事件支持来源
sj817 Dec 15, 2024
a3c3e0f
feat: 支持创建频道、频道私信事件
sj817 Dec 15, 2024
35c4b12
fix: 修正`message`子事件的类型
sj817 Dec 15, 2024
ea0ac7a
fix: 过早return
sj817 Dec 16, 2024
3df5555
fix: 更新账号子ID结构为键值对并调整相关方法
sj817 Dec 16, 2024
022015e
fix: 优化日志输出格式,增强可读性
sj817 Dec 16, 2024
6ec6849
refactor: 将CD相关参数名称从`isCD`更改为`cd`,增强代码可读性
sj817 Dec 18, 2024
4b1bb45
fix: 优化事件提示格式,增强可读性
sj817 Dec 18, 2024
a511f43
feat: 更新runTsx函数以支持动态包含和排除文件,增强灵活性
sj817 Dec 18, 2024
8798505
feat: 添加.pnpmfile.cjs以清空对等依赖中的node-karin并支持插件开发环境
sj817 Dec 18, 2024
25ad2da
fix: 修复对等依赖中node-karin的检查逻辑,确保正确清空依赖
sj817 Dec 18, 2024
d65ce10
fix: 移除配置中的dist目录,优化初始化设置
sj817 Dec 18, 2024
54c17de
feat: 添加重启接口
sj817 Dec 18, 2024
cab5700
feat: 导出重启接口,简化API访问
sj817 Dec 18, 2024
f042fee
feat: 重构重启逻辑,新增直接重启功能并优化发布流程
sj817 Dec 18, 2024
dbebe37
feat: 优化重启函数,支持环境检查并返回重启状态
sj817 Dec 18, 2024
77a5290
feat: 引入消息事件常量,优化事件处理逻辑
sj817 Dec 18, 2024
2c31ef1
feat: 优化事件基类,添加消息发送逻辑并更新结果类型
sj817 Dec 19, 2024
3c897d7
feat: 更新事件计数逻辑,简化插件信息传递
sj817 Dec 19, 2024
2f119a7
feat: 添加日志解析功能,支持提取指定版本的更新日志
sj817 Dec 19, 2024
8d39eb7
feat: 添加npm包更新检查功能,优化版本获取逻辑并处理错误
sj817 Dec 19, 2024
a1afa3e
feat: 修改checkPkgUpdate函数返回值,改为布尔类型以简化更新检查逻辑
sj817 Dec 19, 2024
1afa337
feat: 修改checkPkgUpdate函数返回值,返回更新状态及版本信息以增强功能
sj817 Dec 19, 2024
ff1502c
fix: 优化checkPkgUpdate和checkGitPluginUpdate函数,增强错误处理和返回结构
sj817 Dec 19, 2024
e65da9b
fix: 更新checkPkgUpdate和checkGitPluginUpdate函数的返回值结构,增强错误处理和状态指示
sj817 Dec 19, 2024
b7e5b0f
fix: 更新checkPkgUpdate函数的错误处理,确保错误信息类型为Error
sj817 Dec 19, 2024
7ffa50d
fix: 增强updatePkg和updateAllPkg函数的错误处理,确保异常情况被正确捕获并记录
sj817 Dec 19, 2024
f85e7a5
chore: 更新构建成功评论的安装命令,添加卸载步骤并支持开发依赖安装
sj817 Dec 19, 2024
15050c3
fix: 修正构建成功评论中的安装命令,确保正确的安装步骤
sj817 Dec 19, 2024
7fdd554
feat: 添加提取指定版本号之间更新日志的功能
sj817 Dec 19, 2024
80ea3cb
fix: 重命名parseLog模块为changelog模块
sj817 Dec 19, 2024
20c1008
fix: 更新updatePkg和updateGitPlugin函数的返回类型,增强错误处理和返回信息
sj817 Dec 19, 2024
bfbfc2b
chore: 将CHANGELOG.md添加到文件监视列表中
sj817 Dec 19, 2024
fe98e2f
fix: 更新updateAllGitPlugin函数,增加cmd参数以自定义更新命令
sj817 Dec 19, 2024
77a115b
feat: 添加console控制台适配器配置,更新相关文件路径和权限设置
sj817 Dec 20, 2024
6faf4f1
fix: 优化clearTemp函数,增加路径存在性检查以避免错误
sj817 Dec 20, 2024
54ad08f
fix: 更新注册Bot日志信息,使用account.name替代adapter.name以提高可读性
sj817 Dec 20, 2024
6fc67f2
feat: 创建.pnpmfile.cjs文件,添加清空对等依赖中的node-karin的逻辑
sj817 Dec 20, 2024
edd49a4
fix: 修复路径拼接错误,确保正确加载插件的package.json文件
sj817 Dec 20, 2024
29f2d9f
feat: 添加事件创建相关的类型和导出,优化适配器的成员信息处理
sj817 Dec 20, 2024
d14267d
refactor: 重构事件相关的导入路径,优化代码结构
sj817 Dec 20, 2024
291b289
feat: 添加应用启动命令并更新事件类型,优化上下文处理
sj817 Dec 22, 2024
cea77c7
fix: 简化配置文件保存逻辑,优化文件存在性检查
sj817 Dec 22, 2024
d39bff1
feat: 添加get value属性到配置对象,优化数据访问方式
sj817 Dec 22, 2024
404a053
refactor: 将配置对象中的get value属性重命名为get key,优化属性命名
sj817 Dec 22, 2024
56fafb9
refactor: 更新配置对象中的get key属性注释,增强可读性
sj817 Dec 22, 2024
aa216de
refactor: 移除不必要的yaml导入,优化模块依赖
sj817 Dec 23, 2024
cdafc28
refactor: 移除yaml函数的多余调用,简化代码结构
sj817 Dec 23, 2024
9b6bdfe
refactor: 更新GroupMemberInfo接口中的role属性为必填,增强类型安全性
sj817 Dec 23, 2024
4ea1d26
chore: test ci
sj817 Dec 23, 2024
8dd5d82
chore: test ci
sj817 Dec 23, 2024
7d7a101
chore: test ci
sj817 Dec 23, 2024
d0918fc
chore: test ci
sj817 Dec 23, 2024
dd0270d
chore: test ci
sj817 Dec 23, 2024
1cbdff1
chore: test ci
sj817 Dec 23, 2024
9d528c2
chore: test ci
sj817 Dec 23, 2024
9e7a0fb
=。=不玩了 不好玩
sj817 Dec 23, 2024
5f2bedb
=。=不行 我还要再试一下(这次看文档了!!!
sj817 Dec 23, 2024
2308ea0
再来
sj817 Dec 23, 2024
500027c
再来+1
sj817 Dec 23, 2024
a8f3991
再来+2
sj817 Dec 23, 2024
381556f
再来+3
sj817 Dec 23, 2024
d8ad793
再来+4
sj817 Dec 23, 2024
f6e5497
chore: 移除调试信息 删除评论时的日志输出
sj817 Dec 23, 2024
d793ba7
feat: 添加新的渲染重载以支持类型选项
sj817 Dec 24, 2024
e073f85
feat: 导出文件系统模块的命名空间以简化导入
sj817 Dec 24, 2024
e54f431
feat: 重构消息处理模块,调整 createRawMessage 的导入路径
sj817 Dec 24, 2024
44a4d2d
fix: 修正注释参数描述并优化注释添加逻辑
sj817 Dec 24, 2024
08409b9
fix: 初始化日志管理器以确保正确创建
sj817 Dec 24, 2024
53510f1
fix: 更新配置处理逻辑以缓存数据
sj817 Dec 24, 2024
bcda0a4
feat: 添加按钮处理器并更新事件参数类型
sj817 Dec 24, 2024
63f1ad5
feat: 重构按钮处理器,将其移至新文件并更新导出路径
sj817 Dec 24, 2024
2b1ed97
fix: 更新事件处理逻辑以返回事件对象
sj817 Dec 24, 2024
1543fa9
banner
ikenxuan Dec 25, 2024
8636fae
banner
ikenxuan Dec 25, 2024
53ec21a
fix: 更新配置文件处理逻辑,优化临时文件清理和函数命名
sj817 Dec 25, 2024
64d4f77
Merge branch '187-feat-重构' of https://github.com/KarinJS/Karin into 1…
sj817 Dec 25, 2024
b24fbd9
feat: 启用文件嵌套功能并添加相关模式配置
sj817 Dec 25, 2024
de168e7
fix: 移除.gitignore中的子模块历史版本遗留条目
sj817 Dec 26, 2024
90a80f3
test
sj817 Jan 3, 2025
c3c6043
test1
sj817 Jan 3, 2025
ce0798f
feat: 重构服务模块,添加调试功能并更新路径引用
sj817 Jan 4, 2025
8aa40fe
feat: 添加服务和工具模块的导入,更新配置文件和初始化逻辑,修改默认端口号为`7777`
sj817 Jan 4, 2025
65374de
feat: 更换编译工具未`tsup` dev模式修改为直接运行`ts`
sj817 Jan 5, 2025
f20c630
refactor: update project structure and configuration; remove unused f…
sj817 Jan 7, 2025
431e78e
refactor: 删除不再使用的脚本文件,更新依赖项和配置,优化错误处理逻辑
sj817 Jan 7, 2025
4bd730b
feat: enhance project configuration and structure; add new type defin…
sj817 Jan 9, 2025
6fada85
chore: update package.json scripts to use pnpm and modify GitHub Acti…
sj817 Jan 9, 2025
1355eb2
chore: remove pnpm-lock.yaml from .gitignore to streamline package ma…
sj817 Jan 9, 2025
c782f3a
feat: add compatibility check for @karinjs/karin-types; create index.…
sj817 Jan 9, 2025
c656f1b
refactor: update build scripts in package.json and improve type defin…
sj817 Jan 9, 2025
2a1074a
feat: export types
sj817 Jan 9, 2025
b023ed8
feat: update exports in index.ts and add new ElementTypes in segment.ts
sj817 Jan 9, 2025
d91bad1
feat: add export for adapter module in index.ts
sj817 Jan 9, 2025
fc8fa86
fix: DirectContact types
sj817 Jan 9, 2025
669ee3b
feat: add export for root module in index.ts
sj817 Jan 9, 2025
0d348ba
fix: command types
sj817 Jan 9, 2025
05e34c6
fix: fix export
sj817 Jan 9, 2025
69b8322
refactor: 重构配置文件为`json`
sj817 Jan 9, 2025
3b2320c
refactor: update user and group filtering logic to use new config str…
sj817 Jan 9, 2025
32c4a9b
chore: remove deprecated main entry files and related scripts
sj817 Jan 9, 2025
990e722
refactor: update cooldown logic to handle optional properties and rem…
sj817 Jan 9, 2025
846c975
fix: ensure authFailMsg defaults to true in LoaderPlugin
sj817 Jan 9, 2025
24aa6ab
feat: add web api
sj817 Jan 10, 2025
01e1661
fix: 修复初始化过快
sj817 Jan 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 13 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ij_any_space_before_colon = true
ij_any_space_after_colon = true
ij_any_keep_indents_on_empty_lines = false

[{*.cjs,*.js}]
[{*.cjs,*.js,*.ts}]
ij_javascript_align_imports = false
ij_javascript_use_semicolon_after_statement = false
ij_javascript_use_double_quotes = false
Expand All @@ -33,3 +33,15 @@ ij_json_space_before_colon = false
ij_json_space_before_comma = false
ij_json_spaces_within_braces = false
ij_json_spaces_within_brackets = false

[{*.yaml,*.yml}]
indent_size = 2
indent_style = space
tab_width = 2
insert_final_newline = true
trim_trailing_whitespace = true
ij_yaml_indent_mapping_value = true
ij_yaml_indent_sequence_value = true
ij_yaml_space_before_colon = false
ij_yaml_space_after_colon = true
ij_yaml_keep_indents_on_empty_lines = false
34 changes: 34 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 是否启用HTTP
HTTP_ENABLE=true
# HTTP监听端口
HTTP_PORT=7777
# HTTP监听地址
HTTP_HOST=0.0.0.0
# HTTP鉴权秘钥 仅用于karin自身Api
HTTP_AUTH_KEY=default
# ws_server鉴权秘钥
WS_SERVER_AUTH_KEY=

# 是否启用Redis 关闭后将使用内部虚拟Redis
REDIS_ENABLE=true
# 重启是否调用pm2 如果不调用则会直接关机 此配置适合有进程守护的程序
PM2_RESTART=true

# 日志等级
LOG_LEVEL=info
# 日志保留天数
LOG_DAYS_TO_KEEP=7
# 日志文件最大大小 如果此项大于0则启用日志分割
LOG_MAX_LOG_SIZE=0
# logger.fnc颜色
LOG_FNC_COLOR="#E1D919"

# ffmpeg
FFMPEG_PATH=
# ffprobe
FFPROBE_PATH=
# ffplay
FFPLAY_PATH=

# 这里请勿修改
RUNTIME=node
2 changes: 2 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NODE_ENV=development
RUNTIME=tsx
39 changes: 39 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable
# packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency review'
on:
pull_request:
branches: [ "dev", "禁止强推、删除" ]

# If using a dependency submission action in this workflow this permission will need to be set to:
#
# permissions:
# contents: write
#
# https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
permissions:
contents: read
# Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option
pull-requests: write

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
# Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options.
with:
comment-summary-in-pr: always
# fail-on-severity: moderate
# deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later
# retry-on-snapshot-warnings: true
16 changes: 16 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Greetings

on: [pull_request_target, issues]

jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "👋 你好!感谢你提交了第一个问题!🔍 你的细心帮助我们发现了新的改进机会,我们会尽快处理。🚀 如果你有更多的想法或疑问,请继续分享,我们非常乐意听取你的声音!🌟 感谢你的支持!"
pr-message: "🙌 你好,贡献者!感谢你提交的第一个拉取请求!🛠️ 你正在帮助我们打造更好的项目,我们会认真审查并与你一起优化它。💡 如果你有任何问题或需要帮助,随时联系!✨ 很高兴与你合作,欢迎成为我们社区的一员!"
27 changes: 27 additions & 0 deletions .github/workflows/issue_geetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
issues:
types: [labeled]

jobs:
create-comment:
runs-on: ubuntu-latest
steps:
- name: Create comment for enhancement
if: github.event.label.name == 'enhancement'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
body: |
你好 @${{ github.event.issue.user.login }},我们已经记录了你的新功能提议。如果你有任何具体的实现想法或设计草图,欢迎随时分享给我们。
emoji: 'eyes'

- name: Create comment for bug
if: github.event.label.name == 'bug'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
body: |
你好 @${{ github.event.issue.user.login }},看来我们的代码不小心打了个盹儿。别担心,我们已经唤醒了开发团队,他们正快马加鞭地赶来修复!🔨🐞
emoji: 'eyes'
20 changes: 20 additions & 0 deletions .github/workflows/issue_similarity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 问题相似性分析
name: Issues Similarity Analysis

on:
issues:
types: [opened, edited]

jobs:
similarity-analysis:
runs-on: ubuntu-latest
steps:
- name: analysis
uses: actions-cool/issues-similarity-analysis@v1
with:
filter-threshold: 0.5
comment-title: '### 似乎有相似的问题'
comment-body: '${index}. ${similarity} #${number}'
show-footer: false
show-mentioned: true
since-days: 730
17 changes: 17 additions & 0 deletions .github/workflows/issue_welcome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Issue Welcome

on:
issues:
types: [opened]

jobs:
issue-welcome:
runs-on: ubuntu-latest
steps:
- name: welcome
uses: actions-cool/issues-helper@v3
with:
actions: 'welcome'
token: ${{ secrets.GITHUB_TOKEN }}
body: 你好 @${{ github.event.issue.user.login }},我们注意到你是一次创建问题,感谢你的加入!我们非常期待你的想法和贡献。🌟
issue-emoji: 'eyes'
109 changes: 109 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: PR

# 监听 PR 相关事件
on:
pull_request:
# 监听 PR 被打开、重新打开和推送事件
types: [opened, reopened, synchronize]

# 赋予 release-please-action 权限
permissions:
contents: write
pull-requests: write
jobs:
# 设置 release-please 任务
release-please:
# 设置任务运行环境为 ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v4
# 设置 pnpm
- name: 设置 pnpm
uses: pnpm/action-setup@v2
with:
version: 8
# 设置 Node.js 环境
- name: 设置 Node.js 环境
uses: actions/setup-node@v4
with:
# 设置 Node.js 版本
node-version: 20
# 设置 npm 源
registry-url: "https://registry.npmjs.org"
# 添加 pnpm 缓存支持
cache: pnpm
# 使用 pnpm 安装依赖
- name: 安装依赖
run: pnpm install --no-frozen-lockfile
# 构建输出
- name: 构建输出
id: build
run: pnpm run build:prod > build.log 2>&1
continue-on-error: true # 捕获失败并允许后续步骤运行
# 获取当前 PR 编号并设置环境变量
- name: 获取 PR 编号
run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
# 自动修改 package.json 的版本号、删除开发、对等依赖
- name: 修订版本号
run: pnpm run pr all
if: success()
# 发布到 npm
- name: 发布到 npm
run: pnpm run pub-beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: success()
# 在 PR 上发布构建完成或失败信息
- name: 发布评论
run: |
if [ "${{ steps.build.outcome }}" = "failure" ]; then
# 捕获构建失败日志
ERROR_MESSAGE=$(cat build.log || echo "未找到详细的构建日志。")
# 发布构建失败评论
gh pr comment ${{ env.PR_NUMBER }} --body $'❌ 构建失败!以下是错误日志:\n\n<details>\n<summary>展开查看错误日志</summary>\n\n```\n'"${ERROR_MESSAGE}"$'\n```\n\n</details>'
else
# 构建成功评论
INSTALL_COMMAND_1="pnpm rm ${{ env.PKG_NAME }} && pnpm install ${{ env.PKG_NAME }}@${{ env.PKG_VERSION }} -D"
INSTALL_COMMAND_2="pnpm install ${{ env.PKG_NAME }}@${{ env.PKG_VERSION }} -w"
gh pr comment ${{ env.PR_NUMBER }} --body $'🎉 构建完成!请不要使用此版本,正在重构中:\n\n```\n'"${INSTALL_COMMAND_1}"$'\n```\n\n```\n'"${INSTALL_COMMAND_2}"$'\n```'
fi
env:
GITHUB_TOKEN: ${{ secrets.RELEASE }}
# 撤回历史评论 保留最新的3条评论
- name: 撤回历史评论
run: |
# 获取当前PR的所有评论
comments=$(gh pr view ${{ env.PR_NUMBER }} --json comments)

# 过滤目标评论并按时间排序
target_comments=$(echo "$comments" | jq -r '.comments[] | select(.body | test("🎉 构建完成!|❌ 构建失败!")) | {url: .url, created_at: .createdAt}' | jq -s '. | sort_by(.created_at) | reverse')

# 获取需要删除的评论ID (保留最新的3条)
comment_ids_to_delete=$(echo "$target_comments" | jq -r 'if length > 3 then .[3:][] | .url | capture("#issuecomment-(?<id>\\d+)$").id else empty end')

# 删除旧评论
if [ ! -z "$comment_ids_to_delete" ]; then
for id in $comment_ids_to_delete; do
# 调试信息
echo "删除请求URL: /repos/${{ github.repository }}/issues/comments/$id"
response=$(curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.RELEASE }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-w "%{http_code}" \
-o /dev/null \
"https://api.github.com/repos/${{ github.repository }}/issues/comments/$id")
if [ "$response" = "204" ]; then
echo "✓ 成功删除评论 $id"
else
echo "❌ 删除评论 $id 失败,HTTP状态码: $response"
exit 1
fi
done
else
echo "没有需要删除的历史评论"
fi
env:
GITHUB_TOKEN: ${{ secrets.RELEASE }}
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release and Publish
on:
push:
# 监听 dev 分支的 push 事件
branches:
- dev
# 赋予 release-please-action 权限
permissions:
contents: write
pull-requests: write
jobs:
# 设置 release-please 任务
release-please:
# 设置任务运行环境为 ubuntu-latest
runs-on: ubuntu-latest
steps:
# 使用 release-please-action 动作来自动创建发布 PR
- uses: googleapis/release-please-action@v4
id: release
with:
# 设置发布类型为 node
release-type: node
# 设置发布PR分支
default-branch: dev
# 检出代码
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
# 设置 Node.js 环境
- uses: actions/setup-node@v4
with:
# 设置 Node.js 版本
node-version: 20
# 设置 npm 源
registry-url: "https://registry.npmjs.org"
# 安装依赖 不安装对等依赖
- run: npm install --config.auto-install-peers=false --ignore-scripts --omit=peer
env:
NODE_AUTH_TOKEN: ${{ secrets.RELEASE }}
if: ${{ steps.release.outputs.release_created }}
# 构建输出
- run: npm run build
if: ${{ steps.release.outputs.release_created }}
# 删除开发依赖、对等依赖
- run: npm run pr clean
if: ${{ steps.release.outputs.release_created }}
# 发布到 npm
- run: npm run pub
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
27 changes: 27 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests

on:
schedule:
- cron: '24 5 * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
Loading
Loading