| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Server.Pipeline.Publish
Contents
Description
The serve path behind the first-party publish route: PUT /{pkg}.
This module handles the publish flow: it validates edge authentication, applies
anti-shadowing scope guards to ensure the package name is permitted for publication,
bounds the request body at the per-request size cap (a declared over-cap length fails
closed up front; a chunked body is bounded by a counted read, both answered 413),
enforces body-name agreement between the URL path and the publish document, and
relays the request to the upstream publication target with the publisher's credential.
Synopsis
- data PublishReplies response = PublishReplies {
- publishRelayed :: Status -> ResponseHeaders -> LByteString -> response
- publishError :: Status -> ResponseHeaders -> Text -> response
- servePublish :: PublishReplies response -> PackageName -> Request -> (response -> IO ResponseReceived) -> Handler ResponseReceived
Documentation
data PublishReplies response Source #
The route-owned ways the publish pipeline may answer. The configured target may
return any status, so npm supplies these constructors from an explicit OpenAPI default
contract whose media type remains application/json.
Constructors
| PublishReplies | |
Fields
| |
The first-party publish handler
servePublish :: PublishReplies response -> PackageName -> Request -> (response -> IO ResponseReceived) -> Handler ResponseReceived Source #