ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Cargo.Manifest

Description

Native packaged Cargo manifests and publication metadata, without executing package code.

Synopsis

Documentation

data CargoManifest Source #

Identity is the exact spelling from the effective normalised Cargo.toml.

data CargoPublishMetadata Source #

A complete native upload document. It contains no registry publication time or yank override.

decodeManifest :: Limits -> Text -> Text -> ByteString -> Either ParseError CargoManifest Source #

Bound bytes and parsed nesting, reject duplicate TOML keys, and check exact native identity.

manifestTextPaths :: CargoManifest -> Set Text -> Either ParseError [Text] Source #

Select Cargo's declared or default README and licence file without retaining other text payloads.

publicationMetadata :: CargoManifest -> Map Text ByteString -> Either ParseError CargoPublishMetadata Source #

Reconstruct the native publish document from normalised metadata and selected archive text.

checkPublicationIndex :: Limits -> CargoPublishMetadata -> Value -> Either ParseError CargoPublishMetadata Source #

Cross-check source index facts and preserve its dependency requirements and merged feature representation.

checkUploadAgreement :: Limits -> Text -> CargoManifest -> Value -> Either ParseError () Source #

Compare resolver meaning against the effective archive manifest, relative to the selected logical registry.

checkDependencyRegistries :: [Text] -> Value -> Either ParseError () Source #

Refuse a consumed dependency from a registry other than crates.io or one of this proxy's own. A null or absent source is the publication registry. Run after checkUploadAgreement.

acceptedRegistries :: [Text] -> Either ParseError (Set Text) Source #

The comparison keys of crates.io and the given registries, the sources a consumed dependency may name.

namesOtherRegistry :: Set Text -> KeyMap Value -> Either ParseError Bool Source #

Whether a dependency names a registry outside accepted. A null or absent registry is the current one, and a dev-dependency never counts, because no consumer resolves it, as with npm's devDependencies.

parseRustRelease :: Text -> Either ParseError CargoKey Source #

Numeric minimum Rust releases permit one to three components, with trailing zeroes implied.

publishMetadataValue :: CargoPublishMetadata -> Value Source #

The native JSON body excludes the archive length framing and archive bytes.

cratesIoIndex :: Text Source #

The logical crates.io dependency source. This identity grants no transport authority.

unstableDependencyFields :: [Key] Source #

Nightly -Z bindeps and public-dependency fields. Mirrored index rows refuse them, and first-party publication refuses them in the upload and, under their manifest keys, in the archived manifest.

usesUnstableDependencyField :: KeyMap Value -> Bool Source #

Whether a dependency carries any of unstableDependencyFields, by presence.