internal

package
v0.0.0-...-c261336 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModPathBase = "gohugo.io/npmjs"
)

Variables

This section is empty.

Functions

func CreateZipFromVersion

func CreateZipFromVersion(last Version) (nameReadSeekCloser, error)

func EscapePackage

func EscapePackage(p string) string

func UnEscapePackage

func UnEscapePackage(p string) string

Types

type Dependencies

type Dependencies []Dependency

func (*Dependencies) UnmarshalJSON

func (vs *Dependencies) UnmarshalJSON(b []byte) error

type Dependency

type Dependency struct {
	Name         string
	VersionRange string
}

type Dist

type Dist struct {
	ShaSum  string `json:"shasum"`
	Tarball string `json:"tarball"`
}

type DistTags

type DistTags struct {
	Latest string
}

func (*DistTags) UnmarshalJSON

func (tags *DistTags) UnmarshalJSON(b []byte) error

type NpmPackage

type NpmPackage struct {
	Name     string   `json:"name"`
	DistTags DistTags `json:"dist-tags"`
	Versions Versions `json:"versions"`
}

func FetchPackage

func FetchPackage(s string) (NpmPackage, error)

type Version

type Version struct {
	Name         string       `json:"name"`
	Version      string       `json:"version"`
	Dependencies Dependencies `json:"dependencies"`
	Dist         Dist         `json:"dist"`
}

func FetchPackageVersion

func FetchPackageVersion(pack, version string) (Version, error)

type Versions

type Versions []Version

func (Versions) ByVersion

func (vs Versions) ByVersion(v string) (ver Version, found bool)

func (*Versions) UnmarshalJSON

func (vs *Versions) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL