npm

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

npm - NPM packages in an NPM registry

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 name 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(ctx accspeccpi.Context) string

func (*AccessSpec) GetInexpensiveContentVersionIdentity

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

func (*AccessSpec) GetReferenceHint

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

func (*AccessSpec) GetType

func (_ *AccessSpec) GetType() string

func (*AccessSpec) GlobalAccessSpec

func (a *AccessSpec) GlobalAccessSpec(ctx 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