ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Npm.Route

Description

The npm router and OpenAPI description share one route table. Reserved routes take precedence over package captures. Ecluse.Core.Registry.Npm.Route.Internal holds the table and everything it is built from.

Synopsis

The mount's router

npmRouter :: MountRouter Source #

Match the first applicable route, otherwise answer npmNotFound.

The table, as OpenAPI reads it

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.