feat: release 2.3.0 with workspace plugin extensions
This commit is contained in:
1 parent
8380057548
commit
bb873ec0e0
44 files changed
+1497
-48
No files matched your search
@@ -43,7 +43,12 @@ def download(url: str, progress: Callable[[str, int], None]) -> bytes:
|
||||
|
||||
|
||||
def load_catalog() -> PluginCatalog:
|
||||
data = download(settings.ARTEMIS_PLUGIN_MARKETPLACE_URL, lambda *_: None)
|
||||
url = settings.ARTEMIS_PLUGIN_MARKETPLACE_URL
|
||||
# Older hosts reject schema-v3 entries before checking version constraints.
|
||||
# Keep their index intact, and route only the exact former official URL.
|
||||
if url == "https://git.playones.com/chenmingxuan/Artemis-Plugins/raw/branch/main/catalog.json":
|
||||
url = url.removesuffix("catalog.json") + "catalog-v3.json"
|
||||
data = download(url, lambda *_: None)
|
||||
if len(data) > 2 * 1024 * 1024:
|
||||
raise ValueError("市场索引过大")
|
||||
return PluginCatalog.model_validate_json(data)
|
||||
|
||||
Reference in new issue
Block a user