Expand description
FHIR NPM packages, the form implementation guides are published in:
reading a package tarball (read) and fetching one from a package
registry such as packages.fhir.org (resolve_version, download).
A package is a gzipped tarball with a package/ folder holding
package.json, the conformance resources as one JSON file each, and the
examples in package/example/. See
https://hl7.org/fhir/packages.html.
Structs§
- Directories
- Limits
- Bounds on what reading one package may cost. A tarball is untrusted input, and a small gzip can expand to far more than it weighs.
- Manifest
- A package’s
package.json, as far as installing it needs. - Package
- A package read from its tarball.
- Package
File - A JSON file in a package.
- Package
Spec - A package to install, named the way registries and
package.jsondependencies name one:name@version,name#versionornamealone for the latest version. A version may end in.xto take the latest match.
Enums§
- Package
Error - Why a package could not be read or fetched.
Functions§
- download
- Downloads
nameatversionfromregistry, refusing a tarball larger thanmax_bytes. - pack
- Packs a package folder (one holding
package.json) into a gzipped tarball laid out as npm packs one, underpackage/. Only whatreaduses is packed: the JSON files directly in the folder and in its example folder. - read
- Reads a package tarball, gzipped (
.tgz, as registries serve them) or not. - resolve_
version - The version of
nameto install:requestedwhen it names one exactly, else the registry’s latest (no version, orlatest) or newest match (6.1.x). - valid_
name - Package names are lowercase in practice (
hl7.fhir.us.core); any case is accepted here. They become a URL path segment, so nothing else is. - valid_
version - A semver-like version (
6.1.0,2.0.0-ballot,6.1.x). It becomes a URL path segment, so nothing else is accepted.