github.com/anchore/syft@v1.4.2-0.20240516191711-1bec1fc5d397/syft/pkg/npm.go (about)

     1  package pkg
     2  
     3  // NpmPackage represents the contents of a javascript package.json file.
     4  type NpmPackage struct {
     5  	Name        string `mapstructure:"name" json:"name"`
     6  	Version     string `mapstructure:"version" json:"version"`
     7  	Author      string `mapstructure:"author" json:"author"`
     8  	Homepage    string `mapstructure:"homepage" json:"homepage"`
     9  	Description string `mapstructure:"description" json:"description"`
    10  	URL         string `mapstructure:"url" json:"url"`
    11  	Private     bool   `mapstructure:"private" json:"private"`
    12  }
    13  
    14  // NpmPackageLockEntry represents a single entry within the "packages" section of a package-lock.json file.
    15  type NpmPackageLockEntry struct {
    16  	Resolved  string `mapstructure:"resolved" json:"resolved"`
    17  	Integrity string `mapstructure:"integrity" json:"integrity"`
    18  }
    19  
    20  // YarnLockEntry represents a single entry section of a yarn.lock file.
    21  type YarnLockEntry struct {
    22  	Resolved  string `mapstructure:"resolved" json:"resolved"`
    23  	Integrity string `mapstructure:"integrity" json:"integrity"`
    24  }