Documentation
¶
Overview ¶
Package javascript provides a concrete Cataloger implementation for packages relating to the JavaScript language ecosystem.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLockCataloger ¶ added in v0.71.0
func NewLockCataloger(cfg CatalogerConfig) pkg.Cataloger
NewLockCataloger returns a new cataloger object for NPM (and NPM-adjacent, such as yarn) lock files.
func NewPackageCataloger ¶ added in v0.71.0
NewPackageCataloger returns a new cataloger object for NPM.
Types ¶
type CatalogerConfig ¶ added in v0.99.0
type CatalogerConfig struct {
// SearchRemoteLicenses enables querying the NPM registry API to retrieve license information for packages that are missing license data in their local metadata.
// app-config: javascript.search-remote-licenses
SearchRemoteLicenses bool `json:"search-remote-licenses" yaml:"search-remote-licenses" mapstructure:"search-remote-licenses"`
// NPMBaseURL specifies the base URL for the NPM registry API used when searching for remote license information.
// app-config: javascript.npm-base-url
NPMBaseURL string `json:"npm-base-url" yaml:"npm-base-url" mapstructure:"npm-base-url"`
// IncludeDevDependencies controls whether development dependencies should be included in the catalog results, in addition to production dependencies.
// app-config: javascript.include-dev-dependencies
IncludeDevDependencies bool `json:"include-dev-dependencies" yaml:"include-dev-dependencies" mapstructure:"include-dev-dependencies"`
}
func DefaultCatalogerConfig ¶ added in v0.99.0
func DefaultCatalogerConfig() CatalogerConfig
func (CatalogerConfig) WithIncludeDevDependencies ¶ added in v1.16.0
func (j CatalogerConfig) WithIncludeDevDependencies(input bool) CatalogerConfig
func (CatalogerConfig) WithNpmBaseURL ¶ added in v0.99.0
func (j CatalogerConfig) WithNpmBaseURL(input string) CatalogerConfig
func (CatalogerConfig) WithSearchRemoteLicenses ¶ added in v0.99.0
func (j CatalogerConfig) WithSearchRemoteLicenses(input bool) CatalogerConfig
Click to show internal directories.
Click to hide internal directories.