npm

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: Apache-2.0 Imports: 35 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DistTagPropKey = "npm.disttag"
)

Variables

This section is empty.

Functions

func SetArtifactoryAsResolutionServer

func SetArtifactoryAsResolutionServer(serverDetails *config.ServerDetails, depsRepo string) (clearResolutionServerFunc func() error, err error)

Creates an .npmrc file in the project's directory in order to configure the provided Artifactory server as a resolution server

Types

type CommonArgs

type CommonArgs struct {
	// contains filtered or unexported fields
}

func (*CommonArgs) SetBuildConfiguration

func (ca *CommonArgs) SetBuildConfiguration(buildConfiguration *build.BuildConfiguration) *CommonArgs

func (*CommonArgs) SetNpmArgs

func (ca *CommonArgs) SetNpmArgs(npmArgs []string) *CommonArgs

func (*CommonArgs) SetRepo

func (ca *CommonArgs) SetRepo(repo string) *CommonArgs

func (*CommonArgs) SetServerDetails

func (ca *CommonArgs) SetServerDetails(serverDetails *config.ServerDetails) *CommonArgs

func (*CommonArgs) SetUseNative added in v0.3.0

func (ca *CommonArgs) SetUseNative(useNpmRc bool) *CommonArgs

func (*CommonArgs) UseNative added in v0.3.0

func (ca *CommonArgs) UseNative() bool

type Installer added in v0.3.0

type Installer interface {
	PrepareInstallPrerequisites(repo string) error
	Run() error
	RestoreNpmrc() error
}

type NpmCommand

type NpmCommand struct {
	CommonArgs
	// contains filtered or unexported fields
}

func NewNpmCiCommand

func NewNpmCiCommand() *NpmCommand

func NewNpmCommand

func NewNpmCommand(cmdName string, collectBuildInfo bool) *NpmCommand

func NewNpmInstallCommand

func NewNpmInstallCommand() *NpmCommand

func (*NpmCommand) CommandName

func (nc *NpmCommand) CommandName() string

func (*NpmCommand) CreateTempNpmrc

func (nc *NpmCommand) CreateTempNpmrc() error

func (*NpmCommand) GetRepo

func (nc *NpmCommand) GetRepo() string

func (*NpmCommand) Init

func (nc *NpmCommand) Init() error

func (*NpmCommand) PreparePrerequisites

func (nc *NpmCommand) PreparePrerequisites(repo string) error

func (*NpmCommand) RestoreNpmrcFunc

func (nc *NpmCommand) RestoreNpmrcFunc() func() error

func (*NpmCommand) Run

func (nc *NpmCommand) Run() (err error)

func (*NpmCommand) ServerDetails

func (nc *NpmCommand) ServerDetails() (*config.ServerDetails, error)

func (*NpmCommand) SetArgs

func (nc *NpmCommand) SetArgs(args []string) *NpmCommand

func (*NpmCommand) SetBuildConfiguration

func (nc *NpmCommand) SetBuildConfiguration(buildConfiguration *buildUtils.BuildConfiguration) *NpmCommand

func (*NpmCommand) SetConfigFilePath

func (nc *NpmCommand) SetConfigFilePath(configFilePath string) *NpmCommand

func (*NpmCommand) SetRepo

func (nc *NpmCommand) SetRepo(repo string) *NpmCommand

func (*NpmCommand) SetRepoConfig

func (nc *NpmCommand) SetRepoConfig(conf *project.RepositoryConfig) *NpmCommand

func (*NpmCommand) SetServerDetails

func (nc *NpmCommand) SetServerDetails(serverDetails *config.ServerDetails) *NpmCommand

type NpmInstallStrategy added in v0.3.0

type NpmInstallStrategy struct {
	// contains filtered or unexported fields
}

func NewNpmInstallStrategy added in v0.3.0

func NewNpmInstallStrategy(useNativeClient bool, npmCommand *NpmCommand) *NpmInstallStrategy

Get npm implementation

func (*NpmInstallStrategy) Install added in v0.3.0

func (npi *NpmInstallStrategy) Install() error

func (*NpmInstallStrategy) PrepareInstallPrerequisites added in v0.3.0

func (npi *NpmInstallStrategy) PrepareInstallPrerequisites(repo string) error

func (*NpmInstallStrategy) RestoreNpmrc added in v0.3.0

func (npi *NpmInstallStrategy) RestoreNpmrc() error

type NpmPublishCommand

type NpmPublishCommand struct {
	*NpmPublishCommandArgs
	// contains filtered or unexported fields
}

func NewNpmPublishCommand

func NewNpmPublishCommand() *NpmPublishCommand

func (*NpmPublishCommand) CommandName

func (npc *NpmPublishCommand) CommandName() string

func (*NpmPublishCommand) GetXrayScan

func (npc *NpmPublishCommand) GetXrayScan() bool

func (*NpmPublishCommand) Init

func (npc *NpmPublishCommand) Init() error

func (*NpmPublishCommand) IsDetailedSummary

func (npc *NpmPublishCommand) IsDetailedSummary() bool

func (*NpmPublishCommand) Result

func (npc *NpmPublishCommand) Result() *commandsutils.Result

func (*NpmPublishCommand) Run

func (npc *NpmPublishCommand) Run() (err error)

func (*NpmPublishCommand) ServerDetails

func (npc *NpmPublishCommand) ServerDetails() (*config.ServerDetails, error)

func (*NpmPublishCommand) SetArgs

func (npc *NpmPublishCommand) SetArgs(args []string) *NpmPublishCommand

func (*NpmPublishCommand) SetConfigFilePath

func (npc *NpmPublishCommand) SetConfigFilePath(configFilePath string) *NpmPublishCommand

func (*NpmPublishCommand) SetDetailedSummary

func (npc *NpmPublishCommand) SetDetailedSummary(detailedSummary bool) *NpmPublishCommand

func (*NpmPublishCommand) SetDistTag

func (npc *NpmPublishCommand) SetDistTag(tag string) *NpmPublishCommand

func (*NpmPublishCommand) SetScanOutputFormat

func (npc *NpmPublishCommand) SetScanOutputFormat(format format.OutputFormat) *NpmPublishCommand

func (*NpmPublishCommand) SetXrayScan

func (npc *NpmPublishCommand) SetXrayScan(xrayScan bool) *NpmPublishCommand

type NpmPublishCommandArgs

type NpmPublishCommandArgs struct {
	CommonArgs
	// contains filtered or unexported fields
}

func NewNpmPublishCommandArgs

func NewNpmPublishCommandArgs() *NpmPublishCommandArgs

type NpmPublishStrategy added in v0.3.0

type NpmPublishStrategy struct {
	// contains filtered or unexported fields
}

func NewNpmPublishStrategy added in v0.3.0

func NewNpmPublishStrategy(shouldUseNpmRc bool, npmPublishCommand *NpmPublishCommand) *NpmPublishStrategy

Get npm implementation

func (*NpmPublishStrategy) GetBuildArtifacts added in v0.3.0

func (nps *NpmPublishStrategy) GetBuildArtifacts() ([]buildinfo.Artifact, error)

func (*NpmPublishStrategy) Publish added in v0.3.0

func (nps *NpmPublishStrategy) Publish() error

type Publisher added in v0.3.0

type Publisher interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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