Skip to content

fix(pack-update): 修复 merge 后 bindOk 重复 enabled(ootb TS1117) - #65

Merged
Tanya7z merged 2 commits into
mainfrom
cursor/bc-39d882cb-756c-4917-b0f4-65081ab87545-d245
Jul 24, 2026
Merged

fix(pack-update): 修复 merge 后 bindOk 重复 enabled(ootb TS1117)#65
Tanya7z merged 2 commits into
mainfrom
cursor/bc-39d882cb-756c-4917-b0f4-65081ab87545-d245

Conversation

@cursor

@cursor cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

背景

ootb@baff02a(Merge「修复更新相关内容」+ #63)失败:

sfmc/src/pack-update/service.ts(223,7): error TS1117:
An object literal cannot have multiple properties with the same name.

Run: https://github.com/DogeLakeDev/ScriptsForMinecraftServer/actions/runs/30093374459

审查(原则标注)

级别 原则 问题
BLOCKER LSP / 契约 probeSourceAfterInstallbindOk 合并后并列两个 enabled#63bindingEnabledLabel + 526a65c 的 cfg 派生),tsc7 直接红
MAJOR DRY bindingEnabledLabel 硬编码 on/offformatSourcesList 另写 packs.list.*
MAJOR DRY prepareCheckremoteNewer 两分支重复 lastFileId + setBinding
MINOR DRY docs/guide/pack-update.md 字段表重复 defaultBindingEnabled / 裸 nameMinScorematch.*

改动

  1. bindOk 只保留实际写入的 binding.enabled 文案(LSP)
  2. bindingEnabledLabelpacks.list.on/offformatSourcesList 复用
  3. 收敛 lastFileId / lastAppliedFileId 写入为单次 setBinding
  4. 文档字段表去重,权威源为顶层 match.*

保留 526a65c 意图:lastAppliedFileId 跳过重复下载、applyUpdate 返回 {ok,message}bindingLabelForUuid 显示 src=tag:off

验证

  • npm run build --workspaces --if-present
  • npm run typecheck -w @sfmc-bds/cli
  • npm test -w @sfmc-bds/cli(12 pass)

未改(交给已开 #64

Open in Web View Automation 

cursoragent and others added 2 commits July 24, 2026 12:34
ootb@baff02a 在 Build 阶段因 probeSourceAfterInstall 的 bindOk
对象字面量合并留下两个 enabled 键而失败。保留实际写入的
binding.enabled 文案(LSP),并让 sources list 复用同一 helper(DRY);
顺带收敛 lastFileId/lastApplied 的重复 setBinding 分支。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
baff02a 合并 #63 与「修复更新相关内容」后,字段说明表同时保留了
顶层 match.* 与旧版裸 nameMinScore/stripFolderTags,以及两份
defaultBindingEnabled。收敛为单一权威描述。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
@Tanya7z
Tanya7z marked this pull request as ready for review July 24, 2026 12:37
@cursor

cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown
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.

@Tanya7z
Tanya7z merged commit 2ae4b0f into main Jul 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants