Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Detect ¶
func Detect(dir string) capability.CapabilitySet
Detect scans JS/TS source files in dir and returns the combined capability set. It also checks package.json install scripts for network/exec patterns.
func DownloadPackage ¶
DownloadPackage fetches pkgName@version from the npm registry, extracts the tarball into a temp directory, and returns that directory path. The caller is responsible for removing the directory when done.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter implements the Analyzer interface for Node.js projects.
type NpmPackage ¶
NpmPackage represents an npm package extracted from a lockfile.
func Load ¶
func Load(dir string) ([]NpmPackage, error)
Load detects the lockfile type in dir and parses it. It tries package-lock.json, then yarn.lock, then pnpm-lock.yaml.
Click to show internal directories.
Click to hide internal directories.