Documentation ¶
Index ¶
Constants ¶
View Source
const Type string = "npm"
Variables ¶
View Source
var (
Manifests = []string{"package.json", "package-lock.json", ".package.json", ".package-lock.json", "yarn.lock", "pnpm-lock.yaml"}
)
Functions ¶
Types ¶
type Contributors ¶
type Contributors struct { Name string `json:"name" mapstruct:"name"` Username string `json:"email" mapstruct:"username"` URL string `json:"url" mapstruct:"url"` }
Contributors - PackageJSON contributors
type Dependency ¶
type LockDependency ¶
type LockDependency struct { Version string `json:"version"` Resolved string `json:"resolved"` Integrity string `json:"integrity"` Requires map[string]string }
LockDependency - PackageLock dependencies
type Metadata ¶
type Metadata struct { Name string `json:"name"` Version string `json:"version"` Latest []string `json:"latest"` Contributors interface{} `json:"contributors"` License interface{} `json:"license"` Homepage string `json:"homepage"` Description string `json:"description"` Dependencies map[string]interface{} `json:"dependencies"` DevDependencies map[string]interface{} `json:"devDependencies"` Repository interface{} `json:"repository"` Author interface{} `json:"author"` }
PackageJSON - packages.json model
type PackageLock ¶
type PackageLock struct { Requires bool `json:"requires"` LockfileVersion int `json:"lockfileVersion"` Dependencies map[string]LockDependency }
PackageLock - PackageLock model
type PnpmLockfile ¶
type Repository ¶
type Repository struct { Type string `json:"type" mapstructure:"type"` URL string `json:"url" mapstructure:"url"` }
Repository - PackageJSON repository
type YarnLockfile ¶ added in v1.12.3
Click to show internal directories.
Click to hide internal directories.