github.com/anchore/syft@v1.38.2/syft/pkg/dart.go (about) 1 package pkg 2 3 // DartPubspecLockEntry is a struct that represents a single entry found in the "packages" section in a Dart pubspec.lock file. 4 type DartPubspecLockEntry struct { 5 // Name is the package name as found in the pubspec.lock file 6 Name string `mapstructure:"name" json:"name"` 7 8 // Version is the package version as found in the pubspec.lock file 9 Version string `mapstructure:"version" json:"version"` 10 11 // HostedURL is the URL of the package repository for hosted packages (typically pub.dev, but can be custom repository identified by hosted-url). When PUB_HOSTED_URL environment variable changes, lockfile tracks the source. 12 HostedURL string `mapstructure:"hosted_url" json:"hosted_url,omitempty"` 13 14 // VcsURL is the URL of the VCS repository for git/path dependencies (for packages fetched from version control systems like Git) 15 VcsURL string `mapstructure:"vcs_url" json:"vcs_url,omitempty"` 16 } 17 18 // DartPubspec is a struct that represents a package described in a pubspec.yaml file 19 type DartPubspec struct { 20 // Homepage is the package homepage URL 21 Homepage string `mapstructure:"homepage" json:"homepage,omitempty"` 22 23 // Repository is the source code repository URL 24 Repository string `mapstructure:"repository" json:"repository,omitempty"` 25 26 // Documentation is the documentation site URL 27 Documentation string `mapstructure:"documentation" json:"documentation,omitempty"` 28 29 // PublishTo is the package repository to publish to, or "none" to prevent accidental publishing 30 PublishTo string `mapstructure:"publish_to" json:"publish_to,omitempty"` 31 32 // Environment is SDK version constraints for Dart and Flutter 33 Environment *DartPubspecEnvironment `mapstructure:"environment" json:"environment,omitempty"` 34 35 // Platforms are the supported platforms (Android, iOS, web, etc.) 36 Platforms []string `mapstructure:"platforms" json:"platforms,omitempty"` 37 38 // IgnoredAdvisories are the security advisories to explicitly ignore for this package 39 IgnoredAdvisories []string `mapstructure:"ignored_advisories" json:"ignored_advisories,omitempty"` 40 } 41 42 // DartPubspecEnvironment represents SDK version constraints from the environment section of pubspec.yaml. 43 type DartPubspecEnvironment struct { 44 // SDK is the Dart SDK version constraint (e.g. ">=2.12.0 <3.0.0") 45 SDK string `mapstructure:"sdk" json:"sdk,omitempty"` 46 47 // Flutter is the Flutter SDK version constraint if this is a Flutter package 48 Flutter string `mapstructure:"flutter" json:"flutter,omitempty"` 49 }