Start graph explorer contract

This commit is contained in:
2026-05-18 14:08:01 +02:00
parent ae4f567a2b
commit eec7e2a9f6
10 changed files with 1429 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ from pathlib import Path
from typing import Any
from urllib.parse import parse_qs, urlparse
from .graph_explorer import fabric_graph_explorer_manifest, fabric_graph_explorer_payload
from .registry import (
RegistryError,
RegistryStore,
@@ -79,6 +80,14 @@ class RegistryHandler(BaseHTTPRequestHandler):
return HTTPStatus.OK, backstage_projection(self.store.combined_graph())
if parts == ["exports", "xregistry"]:
return HTTPStatus.OK, xregistry_projection(self.store.combined_graph())
if parts == ["exports", "graph-explorer"]:
return HTTPStatus.OK, fabric_graph_explorer_payload(
self.store.combined_graph(),
self.store.list_repositories(),
{str(snapshot["repo_slug"]) for snapshot in self.store.latest_snapshots()},
)
if parts == ["exports", "graph-explorer", "manifest"]:
return HTTPStatus.OK, fabric_graph_explorer_manifest()
if parts == ["artifacts"]:
return HTTPStatus.OK, self.store.list_artifacts(
repo_slug=_query_optional(query, "repo_slug"),