| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.Npm.Publish
Description
npm mirror upload data, publication, and the first-party upload guard. The checked mirror upload data keeps publication fields paired with the admitted tarball.
Synopsis
- data NpmUploadMetadata
- prepareNpmSource :: PackageName -> Version -> VersionDoc -> Either PublishFault (MirrorInventory, NpmUploadMetadata)
- prepareNpmUpload :: MirrorInventory -> NpmUploadMetadata -> ExpectedMirrorFile -> VerifiedArtifactBytes -> Either PublishFault (MirrorUploadData NpmUploadMetadata)
- npmPublishCodec :: ServicePresentation -> PublishCodec
- publishRequest :: Text -> Maybe ClientCredential -> PackageName -> ByteString -> Either UrlFormationError Request
- npmPublishDocument :: PublishPlan -> MirrorUploadData NpmUploadMetadata -> ByteString
- uploadClaims :: ByteString -> Either PublishBodyFault [Text]
- npmNewReleaseOnly :: Text
- npmPublishAllowed :: [Scope] -> PackageName -> Bool
Documentation
data NpmUploadMetadata Source #
Original source fields bind the publication metadata to its admitted snapshot.
Instances
| Show NpmUploadMetadata Source # | |
Defined in Ecluse.Core.Registry.Npm.Publish Methods showsPrec :: Int -> NpmUploadMetadata -> ShowS # show :: NpmUploadMetadata -> String # showList :: [NpmUploadMetadata] -> ShowS # | |
| Eq NpmUploadMetadata Source # | |
Defined in Ecluse.Core.Registry.Npm.Publish Methods (==) :: NpmUploadMetadata -> NpmUploadMetadata -> Bool # (/=) :: NpmUploadMetadata -> NpmUploadMetadata -> Bool # | |
prepareNpmSource :: PackageName -> Version -> VersionDoc -> Either PublishFault (MirrorInventory, NpmUploadMetadata) Source #
Preserve the paired source fields and refuse an npm inventory with more than one physical tarball.
prepareNpmUpload :: MirrorInventory -> NpmUploadMetadata -> ExpectedMirrorFile -> VerifiedArtifactBytes -> Either PublishFault (MirrorUploadData NpmUploadMetadata) Source #
Bind npm source fields to this verified member of the complete version inventory.
npmPublishCodec :: ServicePresentation -> PublishCodec Source #
npm uses its ordinary bounded metadata reader and one immutable tarball upload per version.
publishRequest :: Text -> Maybe ClientCredential -> PackageName -> ByteString -> Either UrlFormationError Request Source #
Build the publish request with its credential, failing when the URL cannot be formed.
npmPublishDocument :: PublishPlan -> MirrorUploadData NpmUploadMetadata -> ByteString Source #
Preserve source metadata fields while replacing identity, attachment controls, and verified distribution facts.
uploadClaims :: ByteString -> Either PublishBodyFault [Text] Source #
The declared names of a new-release document, which never reads the attachment data beyond the JSON parse. A dependency a consumer's install would fetch from outside this proxy refuses the release.
npmNewReleaseOnly :: Text Source #
The 501 reason for a write that is not a new release, such as npm deprecate or npm star.
npmPublishAllowed :: [Scope] -> PackageName -> Bool Source #
Require an exact configured scope, refusing unscoped names and scope prefixes.