✨ 完善备份/还原/导入完整性:SC/TM/VM 自定义配置 + 设置备份 + 资源修复#1554
Draft
CodFrm wants to merge 11 commits into
Draft
Conversation
设置属于备份的一部分(#1533「扩大备份范围」),不应作为独立的 导出/导入配置功能存在。删除 Tools 页的「导出配置/导入配置」按钮、 独立配置文件流程、client.getConfigBundle 及其 group.on 注册、 以及 3 个孤立 i18n 键;保留设置随主备份 zip 往返(backup 内嵌 getConfigBundle)与导入页「同时还原设置」开关(restoreConfigBundle)。
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.
Checklist / 检查清单
Description / 描述
系统性完善备份 / 还原 / 导入的完整性,覆盖 ScriptCat / Tampermonkey / Violentmonkey 三种格式,并把「设置」纳入备份范围。不涉及云同步。
Closes #1483
Closes #1484
Closes #1529
Closes #1533
Closes #684
Closes #841
Closes #1150
脚本层
selfMeta。options.override.use_*+run_at/noframes按 merge 语义推导selfMetadata(替换 / 合并)。violentmonkey清单里的custom→selfMetadata、values(按编码 uri 解码)、enabled/position,全部归一化为 SC 形状后走统一落库逻辑。OverrideInput→overrideToSelfMetadata→ 同一种selfMetadata。设置层(#1533 / #684)
SystemConfig+ Agent 模型 / MCP / 定时任务,随主备份 zip 往返(scriptcat-config.json)。cloud_sync/backup/cat_file_storage)在序列化时排除,不随明文 zip 外泄。资源与覆盖
importResource由resourceDAO.update改为save(update在 key 不存在时返回 false 且不持久化 → 从备份导入的新资源从未落库),并支持二进制资源(base64)导入;导入逐项暴露资源失败(不再误标为「跳过」)。测试与验证
pnpm typecheck+ 改动文件lint全绿。dist/ext,一次性 scratch 脚本,不进 CI):5 个端到端场景全绿 —— SC 往返、VM 导入、TM 导入、设置往返、覆盖模式。Screenshots / 截图
本地 e2e 录屏(真实扩展驱动,git-ignored 本地证据)已覆盖全部 5 条操作流程:SC 备份往返、VM 导入归一化、TM
override→selfMetadata推导、设置随主备份往返、覆盖导入。合入前可补贴录屏 / 截图。backup-restore.zip