fix(pack-update): 修复 bindOk 重复 enabled 导致 ootb TS1117 - #66
Merged
Tanya7z merged 2 commits intoJul 24, 2026
Conversation
main@baff02a 合并冲突在 probeSourceAfterInstall 的 bindOk 参数里留下两个 enabled,触发 TS1117,ootb Build 失败。删除重复键,以 binding.enabled (经 makeBindingFromHit)为唯一权威;bindingEnabledLabel / sources 列表 共用 packs.list.on|off。httpDownload 在无 Content-Length 时补最终进度回调。 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
Tanya7z
marked this pull request as ready for review
July 24, 2026 12:38
Contributor
Author
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Contributor
Author
There was a problem hiding this comment.
Push 审查(main@56466b8 合入后)
ootb success 30093856620 — TS1117 / bindOk 双 enabled 已关闭。
本 PR 已解决
| 级别 | 原则 | 结论 |
|---|---|---|
| BLOCKER | DRY/LSP | bindOk 重复 enabled 已消除 |
| MAJOR | DRY | bindingEnabledLabel 共用 packs.list.on|off |
| MINOR→部分 | LSP | httpDownload finish 无 Content-Length 补回调 ✅ |
合入后残余 → #67
| 级别 | 原则 | 问题 |
|---|---|---|
| MAJOR | LSP | bindByteProgressToBar 仍以占位 1MB start,总量变已知后不重设刻度 |
| MAJOR | DRY | bindOk / setBinding 多出口未抽取 |
| MINOR | OCP | needKey 文案写死 CurseForge |
补丁 PR:#67
Sent by Cursor Automation: SFMC-Review
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.


背景
Push
main@99b882d(合并 #64)与前序baff02a的 ootb 均失败:smoke→ Build all workspacesTS1117: An object literal cannot have multiple properties with the same namesfmc/src/pack-update/service.ts(packUpdate.bindOk参数)根因:
baff02a合并冲突同时保留了两侧的enabled键(#63 的bindingEnabledLabel(binding.enabled)+ 本地cfg.defaultBindingEnabled ? packs.list.on/off)。审查(原则标注)
bindOk对象字面量双enabled→ TS1117,构建失败bindingEnabledLabel写死on/off,与formatSourcesList的 i18n 分叉httpDownload中途无 Content-Length 仍回调,但 finish 在total=0时跳过最终回调改动
enabled;以binding.enabled(makeBindingFromHit已吸收defaultBindingEnabled)为唯一权威bindingEnabledLabel/ sources 列表共用packs.list.on|offhttpDownloadfinish:无 Content-Length 时用finalBytes作总量补最终进度回调验证
npm run typecheck -w @sfmc-bds/cli/bds-toolsnpm test -w @sfmc-bds/cli(15 pass)npm test -w @sfmc-bds/bds-tools(21 pass)未改
ServiceIdpack-manager 注册(主路径已不 spawn)needKey文案仍偏 CurseForge(仅一源时可用)