Documentation ¶
Overview ¶
Package javascript provides a concrete Cataloger implementation for JavaScript ecosystem files (yarn and npm).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewJavascriptLockCataloger ¶
func NewJavascriptLockCataloger() *common.GenericCataloger
NewJavascriptLockCataloger returns a new Javascript cataloger object base on package lock files.
func NewJavascriptPackageCataloger ¶
func NewJavascriptPackageCataloger() *common.GenericCataloger
NewJavascriptPackageCataloger returns a new JavaScript cataloger object based on detection of npm based packages.
Types ¶
type Author ¶
type Author struct { Name string `json:"name" mapstruct:"name"` Email string `json:"email" mapstruct:"email"` URL string `json:"url" mapstruct:"url"` }
func (*Author) AuthorString ¶
func (*Author) UnmarshalJSON ¶
type Dependency ¶
type Dependency struct { Version string `json:"version"` Resolved string `json:"resolved"` Integrity string `json:"integrity"` Requires map[string]string }
Dependency represents a single package dependency listed in the package.lock json file
type PackageJSON ¶
type PackageJSON struct { Version string `json:"version"` Latest []string `json:"latest"` Author Author `json:"author"` License json.RawMessage `json:"license"` Licenses []license `json:"licenses"` Name string `json:"name"` Homepage string `json:"homepage"` Description string `json:"description"` Dependencies map[string]string `json:"dependencies"` Repository Repository `json:"repository"` }
PackageJSON represents a JavaScript package.json file
type PackageLock ¶
type PackageLock struct { Requires bool `json:"requires"` LockfileVersion int `json:"lockfileVersion"` Dependencies map[string]Dependency }
PackageLock represents a JavaScript package.lock json file
type Repository ¶
type Repository struct { Type string `json:"type" mapstructure:"type"` URL string `json:"url" mapstructure:"url"` }
func (*Repository) UnmarshalJSON ¶
func (r *Repository) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.