npm

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

README

npm - NPM packages in a NPM registry (e.g. npmjs.com)

Synopsis
type: npm/v1

Provided blobs use the following media type: application/x-tgz

Description

This method implements the access of an NPM package from an NPM registry.

Specification Versions

Supported specification version is v1

Version v1

The type specific specification fields are:

  • registry string

    Base URL of the NPM registry.

  • package string

    The name of the NPM package.

  • version string

    The version of the NPM package.

Documentation

Index

Constants

View Source
const (
	Type   = "npm"
	TypeV1 = Type + runtime.VersionSeparator + "v1"
)

Type is the access type of NPM registry.

Variables

This section is empty.

Functions

func AddConfig

func AddConfig(opts flagsets.ConfigOptions, config flagsets.Config) error

Types

type AccessSpec

type AccessSpec struct {
	runtime.ObjectVersionedType `json:",inline"`

	// Registry is the base URL of the NPM registry
	Registry string `json:"registry"`
	// Package is the name of NPM package
	Package string `json:"package"`
	// Version of the NPM package.
	Version string `json:"version"`
}

AccessSpec describes the access for a NPM registry.

func New

func New(registry, pkg, version string) *AccessSpec

New creates a new NPM registry access spec version v1.

func (*AccessSpec) AccessMethod

func (*AccessSpec) Describe

func (a *AccessSpec) Describe(_ accspeccpi.Context) string

func (*AccessSpec) GetInexpensiveContentVersionIdentity

func (a *AccessSpec) GetInexpensiveContentVersionIdentity(access accspeccpi.ComponentVersionAccess) string

func (*AccessSpec) GetReferenceHint

func (a *AccessSpec) GetReferenceHint(_ accspeccpi.ComponentVersionAccess) string

func (*AccessSpec) GetType

func (_ *AccessSpec) GetType() string

func (*AccessSpec) GlobalAccessSpec

func (a *AccessSpec) GlobalAccessSpec(_ accspeccpi.Context) accspeccpi.AccessSpec

func (*AccessSpec) IsLocal

func (_ *AccessSpec) IsLocal(accspeccpi.Context) bool

Jump to

Keyboard shortcuts

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