fix(pack-update): 顶层 match + 按 provider id 分派(审查 #61) - #62
Closed
cursor[bot] wants to merge 1 commit into
Closed
Conversation
合入 #61 后残余 SOLID 债: - match 从 providers.curseforge 提升到 PackUpdateConfig 顶层(OCP/DIP/Demeter),兼容旧嵌套字段 - createPackSourceProvider(cfg, id) switch 分派;prepareCheck 按 binding.provider(OCP/LSP) - CheckResult.archivePath 更名为 stagingDir;去掉无意义 getProvider 包装 - 移除已无 runtime 依赖的 @types/cli-progress Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
Tanya7z
added a commit
that referenced
this pull request
Jul 24, 2026
…9e82-c35299430588-e665 fix(pack-update): 修复 ootb TS2353 + defaultBindingEnabled 契约(含 #62)
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.
背景
main合入 #61(8ca75ac)后 ootb 已绿(run30088797940)。本 PR 收敛审查中仍可验证的 DRY / OCP / DIP / LSP / Demeter 残余债。审查(原则标注)
match(源无关名称策略)仍挂在providers.curseforge,编排层经getPackMatchConfig深挖 CF 配置createPackSourceProvider/getProvider忽略binding.provider,绑定字段与运行时分派不一致getProvider包装;CheckResult.archivePath实际是 staging 目录@types/cli-progress在移除 runtime 依赖后仍残留改动
PackUpdateConfig.match顶层化;加载时兼容旧providers.curseforge.match并剥离脏字段createPackSourceProvider(cfg, id)exhaustive switch;prepareCheck按binding.provider构造archivePath→stagingDir;直接调用工厂@types/cli-progress;同步 defaults / 文档验证
npm run typecheck -w @sfmc-bds/clinpm test -w @sfmc-bds/cli(12 pass)npm test -w @sfmc-bds/bds-tools(21 pass)SFMC_ROOT冒烟:旧嵌套 match 提升 + 顶层优先未改
httpDownload进度环路进一步抽取(跨包,风险更高)