| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.Npm.DependencySource
Description
npm dependency specs a client fetches from outside the registry. Only registry ranges and tags,
npm: aliases, file:, link: and workspace: specs, and local paths pass, so any other scheme
fails closed. Aliases and local specs stay exempt on npm-package-arg's terms, by its POSIX path
grammar, the narrower of its two. Git detection follows hosted-git-info, widened to what another
client or URL parsing could fetch.
Synopsis
- data ExternalSource
- externalSource :: Text -> Maybe ExternalSource
- data InstallableField
- installableFieldName :: InstallableField -> Text
- data ExternalDependency = ExternalDependency {}
- externalDependencyOf :: KeyMap Value -> Maybe ExternalDependency
- earlierDependency :: ExternalDependency -> ExternalDependency -> ExternalDependency
- renderExternalDependency :: ExternalDependency -> Text
One spec
data ExternalSource Source #
Where a client fetches a dependency from instead of the registry.
Constructors
| GitSource | A git repository, by URL, hosted shortcut, GitHub shorthand or scp-like address. |
| RemoteUrl | A tarball at an |
| UnsupportedScheme | Any other scheme, such as pnpm's |
Instances
externalSource :: Text -> Maybe ExternalSource Source #
Classify one spec. A spec with neither a colon nor a slash is a registry range, a tag or a file name, so the common case reads the text once and allocates nothing.
A release's installable dependencies
data InstallableField Source #
The dependency maps a consumer's install reads, in the order a refusal names them.
Constructors
| Dependencies | |
| OptionalDependencies | |
| PeerDependencies |
Instances
| Generic InstallableField Source # | |||||
Defined in Ecluse.Core.Registry.Npm.DependencySource Associated Types
Methods from :: InstallableField -> Rep InstallableField x # to :: Rep InstallableField x -> InstallableField # | |||||
| Show InstallableField Source # | |||||
Defined in Ecluse.Core.Registry.Npm.DependencySource Methods showsPrec :: Int -> InstallableField -> ShowS # show :: InstallableField -> String # showList :: [InstallableField] -> ShowS # | |||||
| Eq InstallableField Source # | |||||
Defined in Ecluse.Core.Registry.Npm.DependencySource Methods (==) :: InstallableField -> InstallableField -> Bool # (/=) :: InstallableField -> InstallableField -> Bool # | |||||
| Ord InstallableField Source # | |||||
Defined in Ecluse.Core.Registry.Npm.DependencySource Methods compare :: InstallableField -> InstallableField -> Ordering # (<) :: InstallableField -> InstallableField -> Bool # (<=) :: InstallableField -> InstallableField -> Bool # (>) :: InstallableField -> InstallableField -> Bool # (>=) :: InstallableField -> InstallableField -> Bool # max :: InstallableField -> InstallableField -> InstallableField # min :: InstallableField -> InstallableField -> InstallableField # | |||||
| Universe InstallableField Source # | |||||
Defined in Ecluse.Core.Registry.Npm.DependencySource Methods universe :: [InstallableField] # | |||||
| type Rep InstallableField Source # | |||||
Defined in Ecluse.Core.Registry.Npm.DependencySource type Rep InstallableField = D1 ('MetaData "InstallableField" "Ecluse.Core.Registry.Npm.DependencySource" "ecluse-0.4.0-inplace-ecluse-core" 'False) (C1 ('MetaCons "Dependencies" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OptionalDependencies" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PeerDependencies" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
installableFieldName :: InstallableField -> Text Source #
The member name of the field in a release object.
data ExternalDependency Source #
One installable dependency whose spec fetches from outside the registry.
Constructors
| ExternalDependency | |
Fields
| |
Instances
| Show ExternalDependency Source # | |
Defined in Ecluse.Core.Registry.Npm.DependencySource Methods showsPrec :: Int -> ExternalDependency -> ShowS # show :: ExternalDependency -> String # showList :: [ExternalDependency] -> ShowS # | |
| Eq ExternalDependency Source # | |
Defined in Ecluse.Core.Registry.Npm.DependencySource Methods (==) :: ExternalDependency -> ExternalDependency -> Bool # (/=) :: ExternalDependency -> ExternalDependency -> Bool # | |
externalDependencyOf :: KeyMap Value -> Maybe ExternalDependency Source #
A release object's external dependency, reading only maps that are objects and specs that are strings. Several pick the first field, then the smallest name, so every read form reports one.
earlierDependency :: ExternalDependency -> ExternalDependency -> ExternalDependency Source #
The dependency externalDependencyOf would report of the two: the earlier field, then the smaller name.
renderExternalDependency :: ExternalDependency -> Text Source #
Name the dependency, its field and the kind of source, without the spec.