fix(cli): marketplace add --overwrite removes the old marketplace before the new one resolves
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 481
- Fork
- 45
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 91
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ai-driven-dev/framework
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
ai-driven-dev/framework#1311 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
ai-driven-dev/framework#1244 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ai-driven-dev/framework#1197 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
refactor(aidd-context): apply the new skill template to learnCó thể đã có người làm @blafourcade đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ai-driven-dev/framework#1186 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
ai-driven-dev/framework#1163 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ai-driven-dev/framework
Issue tương tự
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysCó thể đã có người làm @pcbeingused333 đã nhận hôm nay. Đang mởBug db: d1-sqlite Payload OSS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
payloadcms/payload#19766 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
device-management-toolkit/sample-web-ui#3711 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
elastic/kibana#306401 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
agentes-chat/agentes-chat#927 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Closing a pinned tab jumps to the Tabs section instead of the next open pinned tabCó thể đã có người làm @seenimohamed đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ardia-browser/ardia#2769 ·
Maintainer thường phản hồi trong vòng 1 ngày