ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Npm.Maintenance

Description

npm listing and unpublish requests for the protocol maintenance backend. The final version requires whole-package deletion, because an empty Verdaccio packument truncates subsequent store listings.

Synopsis

Documentation

npmMaintenance :: AdapterMaintenance Source #

npm's maintenance slice. It fills both verbs, so an npm mount is sweepable.

The listing

listingRequestFor :: OriginClient -> Either UrlFormationError Request Source #

Read the store listing. The caller classifies any response other than 200.

packageListingParser :: Parser [PackageName] Source #

Read only package-name keys. Values are skipped without constructing package objects.

The unpublish

packumentRequestFor :: OriginClient -> PackageName -> Either UrlFormationError Request Source #

Read the full packument, because the install view omits _rev and time.

versionDeleteRequestsFor :: OriginClient -> PackageName -> Version -> RegistryResponse -> Either StoreRefusal (NonEmpty Request) Source #

Refuse absent versions and unreadable revisions. Delete the whole package only for its last version.