Add cataloger for Dart pubspec (#3292)

* Add cataloger for Dart pubspec

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>

* capture pubspec specific fields

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
Laurent Goderre
2025-05-13 21:51:49 +00:00
committed by GitHub
co-authored by Alex Goodman
parent f77d503892
commit 175a6719a9
20 changed files with 3520 additions and 97 deletions
+16
View File
@@ -7,3 +7,19 @@ type DartPubspecLockEntry struct {
HostedURL string `mapstructure:"hosted_url" json:"hosted_url,omitempty"`
VcsURL string `mapstructure:"vcs_url" json:"vcs_url,omitempty"`
}
// DartPubspec is a struct that represents a package described in a pubspec.yaml file
type DartPubspec struct {
Homepage string `mapstructure:"homepage" json:"homepage,omitempty"`
Repository string `mapstructure:"repository" json:"repository,omitempty"`
Documentation string `mapstructure:"documentation" json:"documentation,omitempty"`
PublishTo string `mapstructure:"publish_to" json:"publish_to,omitempty"`
Environment *DartPubspecEnvironment `mapstructure:"environment" json:"environment,omitempty"`
Platforms []string `mapstructure:"platforms" json:"platforms,omitempty"`
IgnoredAdvisories []string `mapstructure:"ignored_advisories" json:"ignored_advisories,omitempty"`
}
type DartPubspecEnvironment struct {
SDK string `mapstructure:"sdk" json:"sdk,omitempty"`
Flutter string `mapstructure:"flutter" json:"flutter,omitempty"`
}