ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Package.Filter.Internal

Description

The per-artifact location check behind Ecluse.Core.Package.Filter: a safe filename, the https normalisation, and an authority the document's upstream honours, in that order.

Importing this module opts out of the public surface's stability promises. It exists so a spec can hold the check to a per-artifact reference.

Synopsis

Documentation

data ArtifactOrigin Source #

The inputs every artifact of one document is checked against, derived once from its upstream.

Constructors

ArtifactOrigin 

Fields

artifactOrigin :: AllowedHostPorts -> Text -> ArtifactOrigin Source #

Derive a document's ArtifactOrigin from its ecosystem's artifact hosts and upstream base URL.

data ArtifactRefusal Source #

Why one artifact was refused, for the drop record that reports it.

Constructors

ArtifactRefusal 

Fields

resolveArtifact :: ArtifactOrigin -> Artifact -> Either ArtifactRefusal Artifact Source #

Check an artifact's filename, its https normalisation, then its authority. A non-https (loopback) upstream skips normalisation, but not the authority check, which the download gate also applies.