utils

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildNpmUploadFromPackageJSON

func BuildNpmUploadFromPackageJSON(pkgJSON []byte, file io.ReadCloser) (*npm.PackageUpload, string, string, error)

func ExtractPackageJSONFromTarball

func ExtractPackageJSONFromTarball(file io.ReadCloser) ([]byte, error)

Types

type MinimalPackageJSON

type MinimalPackageJSON struct {
	Name                 string            `json:"name"`
	Version              string            `json:"version"`
	Description          string            `json:"description"`
	Homepage             string            `json:"homepage"`
	Keywords             []string          `json:"keywords"`
	Repository           interface{}       `json:"repository"`
	Author               interface{}       `json:"author"`
	License              interface{}       `json:"license"`
	Dependencies         map[string]string `json:"dependencies"`
	DevDependencies      map[string]string `json:"devDependencies"`
	PeerDependencies     map[string]string `json:"peerDependencies"`
	OptionalDependencies map[string]string `json:"optionalDependencies"`
	Bin                  interface{}       `json:"bin"`
}

minimalPackageJSON represents the subset of fields from package.json we care about.

Jump to

Keyboard shortcuts

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