Documentation ¶
Index ¶
- func CalculateDependenciesList(typeRestriction TypeRestriction, npmArgs []string, ...) (dependenciesList map[string]*Dependency, err error)
- func GetNpmVersionAndExecPath() (*version.Version, string, error)
- func RunList(flags, executablePath string) (stdResult, errResult []byte, err error)
- func Version(executablePath string) (*version.Version, error)
- type Dependency
- type NpmConfig
- type PackageInfo
- type TypeRestriction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateDependenciesList ¶
func CalculateDependenciesList(typeRestriction TypeRestriction, npmArgs []string, executablePath, buildInfoModuleId string) (dependenciesList map[string]*Dependency, err error)
func GetNpmVersionAndExecPath ¶ added in v2.2.0
Types ¶
type Dependency ¶
type Dependency struct { Name string Version string Scopes []string FileType string Checksum *buildinfo.Checksum PathToRoot [][]string }
func (*Dependency) GetPathToRoot ¶
func (dep *Dependency) GetPathToRoot() [][]string
type NpmConfig ¶ added in v2.1.0
type NpmConfig struct { Npm string Command []string CommandFlags []string StrWriter io.WriteCloser ErrWriter io.WriteCloser }
func (*NpmConfig) GetErrWriter ¶ added in v2.1.0
func (config *NpmConfig) GetErrWriter() io.WriteCloser
func (*NpmConfig) GetStdWriter ¶ added in v2.1.0
func (config *NpmConfig) GetStdWriter() io.WriteCloser
type PackageInfo ¶ added in v2.2.0
type PackageInfo struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` Scope string }
func ReadPackageInfo ¶ added in v2.2.0
func ReadPackageInfo(data []byte, npmVersion *version.Version) (*PackageInfo, error)
func ReadPackageInfoFromPackageJson ¶ added in v2.2.0
func ReadPackageInfoFromPackageJson(packageJsonDirectory string, npmVersion *version.Version) (*PackageInfo, error)
func (*PackageInfo) BuildInfoModuleId ¶ added in v2.2.0
func (pi *PackageInfo) BuildInfoModuleId() string
func (*PackageInfo) FullName ¶ added in v2.2.0
func (pi *PackageInfo) FullName() string
func (*PackageInfo) GetDeployPath ¶ added in v2.2.0
func (pi *PackageInfo) GetDeployPath() string
type TypeRestriction ¶
type TypeRestriction int
const ( DefaultRestriction TypeRestriction = iota All DevOnly ProdOnly )
Click to show internal directories.
Click to hide internal directories.