ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.PyPI.Route.Internal

Description

PyPI routes, response contracts and capture parsers. Importing this internal module opts out of the public API's stability promise.

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.