fix(marketplace): release builds ship the mock catalog and mock installs write to the real extensions folder
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 43/100
研究方向
Start with lib/core/market/marketplace_repository.dart and inspect the mock repository, ExtensionPaths.extensionsDirectory(), and where the Extension Manager is wired at startup; the issue also points to the generated theme around line 278. Check the related install-path issues #1560 and #1562 and the Beta epic #1499 for scope. Done means release builds cannot present mock installs as real or write them into the extensions folder, and the generated theme name is fixed.
由索引模型根據 Issue 內容生成。
描述
Problem
MarketplaceRepository.instance defaults to MockMarketplaceRepository() (lib/core/market/marketplace_repository.dart:27), and HttpMarketplaceRepository is constructed nowhere in lib/ (only in tests). So the release app's Extension Manager shows and installs a hard-coded demo catalog:
- 6 fake listings (ClickHouse / Redis / MongoDB / "postgres-exporter" drivers, two themes), some tagged
official, withcdn.queryahub.comURLs and fake checksums (e3b0c442...b855is the SHA-256 of an empty string). Nothing in the UI says the catalog is a demo; the only badge is "Preview" for drivers. - Search and "download" are
Future.delayedloops that fake progress. - Install writes to the user's real extensions folder (
ExtensionPaths.extensionsDirectory()): a manifest-only directory, and for themes a generatedtheme.json. These persist across updates and show as installed extensions. - Bug in the generated theme (
:278): the template is a non-raw'''...'''string containing"\${manifest.name}".\$escapes the interpolation, so every generic mock theme is literally named${manifest.name}.
CHANGELOG lists "Planned 0.5.0 — live Marketplace download and install", so the mock is intentional, but it should not reach users this way.
Fix
- Until the live API ships: in release builds either hide the Marketplace tab (keep Install from file), or show an explicit "Demo catalog, nothing is downloaded" banner and make Install a no-op that does not touch the extensions folder.
- Choose the repository by build/config (
kDebugModeor a dart-define with the API base URL) in one place at startup; moveMockMarketplaceRepositoryand its fixtures undertest/or a dev-only file. - Fix the
\${manifest.name}escape (or generate the JSON withjsonEncode, not a template string). - Relates to #1560 / #1562 (install path) and the Beta channel epic #1499 (live marketplace may ship to Beta first).
- 主要語言
- Dart
- 星號
- 23
- 分支
- 1
- 平均合併
- 31 分鐘
- 30 天內合併 PR
- 570
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
QueryaHub/Querya-Desktop 的其他 Issue
-
enhancement ui
難度 2/5 1-3 小時 新手友好度 78/100
QueryaHub/Querya-Desktop#1689 ·
維護者通常 1 天內回覆
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflow未關閉bug frontend
難度 2/5 1-3 小時 新手友好度 82/100
QueryaHub/Querya-Desktop#1642 ·
維護者通常 1 天內回覆
-
bug error-handling settings
難度 1/5 1-3 小時 新手友好度 78/100
QueryaHub/Querya-Desktop#1637 ·
維護者通常 1 天內回覆
-
enhancement
難度 1/5 1 小時以內 新手友好度 88/100
QueryaHub/Querya-Desktop#1636 ·
維護者通常 1 天內回覆
-
enhancement marketplace
難度 2/5 1-3 小時 新手友好度 78/100
QueryaHub/Querya-Desktop#1635 ·
維護者通常 1 天內回覆
查看 QueryaHub/Querya-Desktop 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 67/100
PhoebeSoftware/xrooster#41 ·
-
難度 2/5 1-3 小時 新手友好度 83/100
VeryGoodOpenSource/very_good_templates#665 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
VeryGoodOpenSource/very_good_cli#1783 ·
維護者通常 1 天內回覆
-
bug to check
難度 2/5 1-3 小時 新手友好度 66/100
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 76/100
aaronified/fluenough#665 ·
維護者通常 1 天內回覆