ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Npm.Route.Internal

Description

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

Synopsis

The mount's router and fallback action

npmRouter :: MountRouter Source #

Match the first applicable route, otherwise answer npmNotFound.

npmNotFound :: RouteAction Source #

The deny-by-default 404 action for a path no route claims.

Route-scoped pipeline contracts

The table, as data

npmRoutes :: [Route NpmCap] Source #

Try reserved meta-routes before package captures.

npmRouteSpecs :: NonEmpty RouteSpec Source #

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

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

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

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

The capture values and leaf parsers

data NpmCap Source #

Positional captures distinguish parsed package identities from checked path segments.

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

Parse an npm tarball-slot file into the Version and verbatim Filename it names for name.