ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Npm.Reader

Description

The packument walk for full and selected reads. It emits the fields that Ecluse.Core.Registry.Npm.Streaming emits for the same mode, in the same order, and builds each retained release once with its keys and strings interned as read.

Synopsis

Documentation

data PackumentRead Source #

The whole packument, or one release with its timestamp and the latest tag.

npmWalk :: (Build b r, Result r ~ Walked s) => b -> Int -> PackumentRead -> FieldStep s (NpmFieldOf (Built b)) r -> (s -> Text -> Bool) -> InternTable -> s -> TokenResult -> r Source #

Walk one packument into the builder, passing each field to the step as it completes. Only a release the consumer keeps enters the table, and only the first of each member it repeats.

releaseUniqueFields :: [Text] Source #

Members whose values differ in every release, so the table keeps them as read. A name matches at any depth, so a rarer member such as _npmUser.url is kept as read too.