diff --git a/config.yaml.example b/config.yaml.example index 1d39c6c..6fb6d6d 100644 --- a/config.yaml.example +++ b/config.yaml.example @@ -643,8 +643,8 @@ storage: # # root: "/var/lib/openhop_repeater/plugins" # # Unix domain socket used by Repeater HTTP → plugin manager IPC # # socket: "/var/lib/openhop_repeater/plugin-manager.sock" - # Optional override for the curated catalogue (default: openhop-dev/openhop-plugin-catalogue) - # catalogue_url: "https://raw.githubusercontent.com/openhop-dev/openhop-plugin-catalogue/main/catalogue.json" + # Optional override for the curated catalogue hosted on openHop's R2 endpoint + # catalogue_url: "https://repeater-plugins.openhop.dev/catalogue.json" diff --git a/docs/plugins.md b/docs/plugins.md index bd3d91a..0c49316 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -254,14 +254,14 @@ Repeater can browse a curated static catalogue and install plugins from GitHub R Default catalogue URL: ```text -https://raw.githubusercontent.com/openhop-dev/openhop-plugin-catalogue/main/catalogue.json +https://repeater-plugins.openhop.dev/catalogue.json ``` Override with: ```yaml plugins: - catalogue_url: "https://raw.githubusercontent.com/openhop-dev/openhop-plugin-catalogue/main/catalogue.json" + catalogue_url: "https://repeater-plugins.openhop.dev/catalogue.json" ``` The catalogue lists plugin **identity and repository only**. Versions and wheel assets come from GitHub Releases on each plugin repo (draft and prerelease tags are ignored by default). diff --git a/repeater/plugins/catalogue.py b/repeater/plugins/catalogue.py index cdbd3c5..79f8b54 100644 --- a/repeater/plugins/catalogue.py +++ b/repeater/plugins/catalogue.py @@ -14,9 +14,7 @@ from typing import Any, Callable, Optional logger = logging.getLogger("PluginCatalogue") -DEFAULT_CATALOGUE_URL = ( - "https://raw.githubusercontent.com/openhop-dev/openhop-plugin-catalogue/main/catalogue.json" -) +DEFAULT_CATALOGUE_URL = "https://repeater-plugins.openhop.dev/catalogue.json" DEFAULT_CACHE_TTL_SECONDS = 600 # 10 minutes SUPPORTED_SCHEMA = 1 USER_AGENT = "openhop-repeater-plugin-manager/1.0" diff --git a/tests/test_plugin_catalogue.py b/tests/test_plugin_catalogue.py index fc3f517..a29cc58 100644 --- a/tests/test_plugin_catalogue.py +++ b/tests/test_plugin_catalogue.py @@ -10,6 +10,7 @@ from urllib.request import Request import pytest from repeater.plugins.catalogue import ( + DEFAULT_CATALOGUE_URL, CatalogueClient, CatalogueError, parse_catalogue, @@ -30,6 +31,10 @@ VALID = { } +def test_default_catalogue_uses_openhop_r2_endpoint(): + assert DEFAULT_CATALOGUE_URL == "https://repeater-plugins.openhop.dev/catalogue.json" + + def test_parse_valid_catalogue(): cat = parse_catalogue(VALID) assert cat.schema == 1