ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.PyPI.Route.Internal

Description

The PyPI route table itself: the router, the table as data, the capture values, and the leaf parsers. Ecluse.Core.Registry.PyPI.Route curates what a caller outside needs of it.

Importing this module opts out of the public surface's stability promises. It exists so a spec can match one route or one parser on its own.

Synopsis

The mount's router

pypiRouter :: MountRouter Source #

Match the first applicable route, otherwise answer with the 404 fallback.

The table, as data

pypiRoutes :: [Route PyPICap] Source #

PyPI's routes, in matching order.

pypiRouteSpecs :: NonEmpty RouteSpec Source #

Describe the live router and its deny-by-default catch-all for OpenAPI.

The served file URL (rendered from the route that claims it)

distributionPath :: PackageName -> Text -> Maybe Text Source #

Render through the distribution route so generated URLs obey its capture rules.

The capture values and leaf parsers

data PyPICap Source #

Positional captures distinguish parsed projects from checked distribution filenames.

takeProject :: [Text] -> Maybe (PackageName, [Text]) Source #

Reject project spellings that an index would redirect outside the matched route.

artifactCoordinate :: PackageName -> Text -> Maybe (Version, Filename) Source #

Require the file's project identity to match the requested package.