fix(cli): marketplace add --overwrite removes the old marketplace before the new one resolves
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 76/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- node.js, typescript
研究方向
Read cli/src/contexts/distribution/application/marketplace-add-use-case.ts, focusing on execute and the order of removal, resolution, validation, trust confirmation, and save. Add red-first tests for resolve failure, a null catalog, and denied trust; verify the old registry entry and installed plugin files remain intact in each case. Then run the relevant CLI tests and confirm successful overwrite still works.
由索引模型根據 Issue 內容生成。
描述
Description
aidd marketplace add --overwrite removes the existing marketplace of the same name before it fetches and validates the new source. If the fetch fails, or the source has no marketplace.json, the command errors and the previous entry is already gone.
Affected file(s)
next:cli/src/contexts/distribution/application/marketplace-add-use-case.ts(execute:assertNotRegisteredruns beforeresolveMarketplace.execute;assertNotRegisteredcallsremoveUseCase.executewithautoConfirm: true).refactor/cli-target:cli/src/contexts/distribution/application/add-marketplace.ts(same order,remover.remove).
Expected behaviour
The existing marketplace is replaced only once the new one resolved and its marketplace.json was found (ideally after trust is confirmed). A failed add leaves the registry as it was.
Observed behaviour
Order in execute: remove the old entry, Marketplace.create, resolveMarketplace.execute, catalog === null check (throws InvalidPluginManifestError), ensureTrust, registry.save. Any throw after the first step, including a denied trust prompt, loses the old entry. Removal also deletes installed plugin files, so the loss is not limited to the registry line.
AI tool
All
aidd-cli version
unreleased, next
OS
Any
Additional context
Red-first test: register marketplace m from source A; run add with overwrite: true and a source whose resolve throws (and a second case where catalog is null, and a third where trust is denied). Assert the registry still lists m with source A and its installed plugin files are untouched. Fix direction: resolve and validate the new marketplace first, then remove and save.
- 主要語言
- TypeScript
- 星號
- 481
- 分支
- 45
- 平均合併
- 1 天 13 小時
- 30 天內合併 PR
- 91
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ai-driven-dev/framework 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 86/100
ai-driven-dev/framework#1311 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 79/100
ai-driven-dev/framework#1244 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
ai-driven-dev/framework#1197 ·
維護者通常 1 天內回覆
-
refactor(aidd-context): apply the new skill template to learn可能已有人在做 @blafourcade 於 3 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
ai-driven-dev/framework#1186 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 83/100
ai-driven-dev/framework#1163 · 1 則留言 ·
維護者通常 1 天內回覆
查看 ai-driven-dev/framework 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
solidjs/solid-docs#1716 ·
維護者通常 1 天內回覆
-
bug needs-triage
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
Progress indicated by console logs is off by one可能已有人在做 @marceliwac 今天認領。 未關閉bug needs-triage
難度 2/5 1-3 小時 新手友好度 76/100
aws-samples/aws-cdk-examples#1336 ·
-
難度 2/5 1-3 小時 新手友好度 74/100
melgarafael/DeskcommCRM#4999 · 1 則留言 ·
維護者通常 1 天內回覆
-
type: bug
難度 2/5 1-3 小時 新手友好度 78/100
nrwl/nx#37955 · 1 個 reaction ·
維護者通常 2 天內回覆