config

package
v0.0.0-...-1ed863c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NpmAuditMirrorConfig string
View Source
var VerdaccioConfigTemplate string

Functions

func GetMirrorConfigTmpl

func GetMirrorConfigTmpl() (*template.Template, error)

GetMirrorConfigTmpl is utility function that returns a template of the verdaccio config.

Types

type Config

type Config struct {
	SupportedProjects map[string]*SupportedProject `json:"supported_projects"`
}

Config is a struct that contains all required configurations of projects supported by the npm-audit-mirror framework.

func GetConfig

func GetConfig() (*Config, error)

GetConfig is a utility function that returns the npm audit mirror config.

type IssueTrackerConfig

type IssueTrackerConfig struct {
	Owner string `json:"owner"`
}

type PackagesAllowList

type PackagesAllowList struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type SupportedProject

type SupportedProject struct {
	// A gitiles link to the repo. Eg: "https://skia.googlesource.com/buildbot.git".
	RepoURL string `json:"repo_url"`
	// The branch to use in the above repo. Eg: "main".
	GitBranch string `json:"git_branch"`
	// The directory in the above repo that contains the package.json file
	// we want to audit. Use empty string if it is at the top-level.
	// Eg: "" or "appengine/monorail".
	PackageJSONDir string `json:"package_json_dir"`
	// The packages we skip pre-download checks for.
	PackagesAllowList []PackagesAllowList `json:"packages_allow_list,omitempty"`
	// The scopes we skip pre-download checks for.
	TrustedScopes []string `json:"trusted_scopes,omitempty"`
	// The issue tracker config used for filing audit and downloaded packages bugs.
	IssueTrackerConfig *IssueTrackerConfig `json:"issue_tracker_config,omitempty"`
	// Whether to audit devDependencies for the project.
	AuditDevDependencies bool `json:"audit_dev_dependencies"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL