Enhance Windows Cron support and improve script testing#780
Open
zx3022448 wants to merge 2 commits into
Open
Conversation
- 增加 buildWindowsCronLauncherScript 函数单元测试覆盖 - 验证生成的 VBScript 启动脚本中包含 WScript.Shell 创建和隐藏窗口运行相关代码 - 测试中添加对生成的启动脚本文本内容的断言 feat(Cron): 支持 Windows Cron VBS 启动脚本 - 新增 buildWindowsCronLauncherScript 用于生成调用 PowerShell 的 VBScript - 扩展 CronTaskScriptExt 类型,增加 'vbs' 脚本格式支持 - 在 WindowsSystemScheduler 模块添加生成和写入 VBS 启动脚本逻辑 - 修改任务脚本路径支持 'vbs' 后缀 - 在写入 Wrapper 时同时生成 VBS 启动脚本,执行时通过 wscript.exe 启动 - 添加获取 wscript.exe 路径方法,优先查找 Sysnative 和 System32 目录 - 任务删除时同时删除对应的 vbs 启动脚本文件 refactor(scripts): 使用集中变量管理系统路径 - 统一使用 systemRoot 变量获取系统根目录 - 将系统路径连接操作集中处理,增强代码可读性和一致性 test(vite): 新增 vite monaco Node 兼容性测试用例 - 创建 vite 服务实例 - 验证中间件是否正确加载 - 在测试完成后关闭服务 fix(vite-plugin-monaco-editor): 替换过时的 fs.rmdirSync 调用 - 将 fs.rmdirSync 替换为 fs.rmSync 以兼容最新 Node 版本 - 保持功能行为不变,继续递归删除缓存目录
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test(scripts): 添加 Windows Cron 启动脚本测试用例
feat(Cron): 支持 Windows Cron VBS 启动脚本
refactor(scripts): 使用集中变量管理系统路径
test(vite): 新增 vite monaco Node 兼容性测试用例
fix(vite-plugin-monaco-editor): 替换过时的 fs.rmdirSync 调用
最终效果:定时任务不在弹出终端,并闪退,而是直接在后台执行,修复一个node-26 yarn dev 启动报错问题