Files
yun-xue-tang-assistant/package.json
T
void 65bf63ea6a feat: v2.9.0 终端实时面板,学习时长与学分统计
新增 runner/tui.mjs(~470 行):前台运行时自动开一块实时面板,
框线布局显示状态 / 课程 / 学时 / 课时 / 视频进度条 / 进度 / 最近日志。

- 学习统计 runner/study.mjs:只累计视频真在播的时长(暂停、重试退避、
  页面加载都不计),学分按课程去重(重试 / 刷新不重复计)
- 页面侧新增 credit 快照:平台只把本门学分写在倒计时文案里,
  学完文案就消失,所以边播边记
- log.mjs 增加 setConsoleSink:面板接管终端那一路,日志文件仍是纯文本
- 面板里按 q 等价 Ctrl+C,走 stop.request 同一条优雅收尾路径
- 尺寸自适应:宽度跟随终端(不封顶 120 列),无 resize 事件的平台
  靠定时刷新发现尺寸变化;变窄时按旧帧在新宽度下的折行数回退光标,
  折完超过窗口高就整屏重置;宽度 / 高度不足按重要性丢字段
- 非 TTY(重定向 / 管道 / 计划任务 / --check)自动降级为逐行日志,
  不写 ANSI 控制字符;--no-tui / YUN_XUE_TANG_TUI=0 可手动关闭,
  --no-color / NO_COLOR 关颜色
- 监控轮询从 2000ms 调到 1000ms,与面板刷新对齐
- supervisor 收尾时先收面板再逐行打退出日志,并汇总本次学习时长 / 学分
- check.mjs 增加裸 CR 检查:脚本里的 config\runner 曾被写成裸 CR,
  变成 config<CR>unner 导致找不到配置文件

自测:npm run test:tui(渲染 / 列宽 / 极端尺寸)、npm run test:study(假时钟口径)
2026-10-26 21:49:13 +08:00

27 lines
909 B
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "yun-xue-tang-assistant",
"version": "2.8.0",
"private": true,
"description": "云学堂(*.yunxuetang.cn)Tampermonkey 助手:自动登录、顺序听课、自动切节、批量刷课",
"scripts": {
"build": "node scripts/build.mjs",
"build:watch": "node scripts/build.mjs --watch",
"dev": "node dev/serve.mjs",
"check": "node scripts/check.mjs",
"test:real": "node dev/tests/real-test.mjs",
"test:real:headless": "node dev/tests/real-test.mjs --headless",
"test:e2e": "node dev/tests/real-e2e.mjs",
"test:e2e:play": "node dev/tests/real-e2e.mjs --play",
"test:tui": "node dev/tests/tui-test.mjs",
"test:study": "node dev/tests/study-test.mjs",
"headless": "node runner/headless.mjs",
"headless:check": "node runner/headless.mjs --check"
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"esbuild": "^0.28.2"
}
}