ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Npm.Project

Description

Project npm metadata into the shared package model. Version-map keys identify artifacts independently of their filenames.

Synopsis

Projection

projectVersionListEntry :: Text -> Maybe Value -> VersionListItem Source #

Recognise a compact release with the same optional-field checks as a complete release.

projectVersionEntryResult :: PackageName -> Version -> Maybe UTCTime -> Value -> Either String PackageDetails Source #

Project a compact release while retaining the decoder reason for the invalid-entry report.

projectVersionManifest :: PackageName -> Version -> Maybe UTCTime -> VersionManifest -> PackageDetails Source #

Project already decoded facts using the version-map key as the artifact identity.

installHooks :: [Text] Source #

Hook presence declares install code, including an empty command.

Name validation

projectName :: Text -> Either ParseError PackageName Source #

Parse a package name. A bare @foo never falls back to an unscoped name.

projectScope :: Text -> Either ParseError Scope Source #

Parse a scope with or without its leading @.

npmNameLeadChars :: [Char] Source #

The store walk's bucket alphabet follows the package-name grammar.

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

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