Extensions: rename the internal name for repository JSON

Use the name "index.json" instead of "bl_ext_repo.json".

This makes more sense as the name is automatically added to the end
of file:// URL's a little like index.html for web-sites.
This commit is contained in:
Campbell Barton
2024-05-16 20:37:53 +10:00
parent 1e852879c5
commit 3003953e14
4 changed files with 7 additions and 8 deletions

View File

@@ -80,9 +80,9 @@ BLENDER_EXT_CMD = (
# This directory is in the local repository.
REPO_LOCAL_PRIVATE_DIR = ".blender_ext"
# Locate inside `REPO_LOCAL_PRIVATE_DIR`.
REPO_LOCAL_PRIVATE_LOCK = "bl_ext_repo.lock"
REPO_LOCAL_PRIVATE_LOCK = "index.lock"
PKG_REPO_LIST_FILENAME = "bl_ext_repo.json"
PKG_REPO_LIST_FILENAME = "index.json"
PKG_MANIFEST_FILENAME_TOML = "blender_manifest.toml"
PKG_EXT = ".zip"

View File

@@ -66,9 +66,9 @@ MessageFn = Callable[[str, PrimTypeOrSeq], bool]
VERSION = "0.1"
PKG_EXT = ".zip"
# PKG_JSON_INFO = "bl_ext_repo.json"
# PKG_JSON_INFO = "index.json"
PKG_REPO_LIST_FILENAME = "bl_ext_repo.json"
PKG_REPO_LIST_FILENAME = "index.json"
# Only for building.
PKG_MANIFEST_FILENAME_TOML = "blender_manifest.toml"

View File

@@ -47,7 +47,7 @@ sys.path.append(os.path.join(BASE_DIR, "modules"))
from http_server_context import HTTPServerContext # noqa: E402
PKG_REPO_LIST_FILENAME = "bl_ext_repo.json"
PKG_REPO_LIST_FILENAME = "index.json"
# Use an in-memory temp, when available.
TEMP_PREFIX = tempfile.gettempdir()

View File

@@ -37,8 +37,7 @@ REMOTE_REPO_HAS_JSON_IMPLIED = True
PKG_EXT = ".zip"
# PKG_REPO_LIST_FILENAME = "bl_ext_repo.json"
PKG_MANIFEST_FILENAME = "bl_ext_pkg_manifest.json"
# PKG_REPO_LIST_FILENAME = "index.json"
PKG_MANIFEST_FILENAME_TOML = "blender_manifest.toml"
@@ -293,7 +292,7 @@ class TestCLI_WithRepo(unittest.TestCase):
if USE_HTTP:
if REMOTE_REPO_HAS_JSON_IMPLIED:
cls.dirpath_url = "http://localhost:{:d}/bl_ext_repo.json".format(HTTP_PORT)
cls.dirpath_url = "http://localhost:{:d}/index.json".format(HTTP_PORT)
else:
cls.dirpath_url = "http://localhost:{:d}".format(HTTP_PORT)
else: