Documentation
¶
Overview ¶
Package bower validates Bower package trees and indexes versions from their bower.json manifest. The item tree remains the source of truth.
Index ¶
- Constants
- Variables
- func ManifestPath(name, version string) string
- func ParsePath(p string) (name, version, file string, ok bool)
- func Serves(t repo.PackageType) bool
- func ValidName(name string) bool
- func ValidVersion(version string) bool
- type Handler
- func (Handler) Admit(ctx context.Context, env format.Env, c repo.Config, w format.Write) (format.Write, error)
- func (Handler) Deployed(ctx context.Context, env format.Env, c repo.Config, it types.Item) error
- func (Handler) Inspect(ctx context.Context, env format.Env, _ repo.Config, w format.Write) (any, error)
- func (Handler) Reindex(ctx context.Context, env format.Env, c repo.Config) error
- type Manifest
Constants ¶
View Source
const MaxManifestBytes = 1 << 20
Variables ¶
View Source
var ErrManifest = errors.New("bower: invalid bower manifest")
Functions ¶
func ManifestPath ¶
func Serves ¶
func Serves(t repo.PackageType) bool
func ValidVersion ¶
Types ¶
type Manifest ¶
type Manifest struct {
Name string `json:"name"`
Version string `json:"version"`
Dependencies map[string]string `json:"dependencies,omitempty"`
}
func DecodeGitManifest ¶
DecodeGitManifest accepts upstream Git tags whose bower.json omits version; Bower takes that version from the selected Git tag. A stated version must still agree with the tag before the archive enters the remote cache.
func DecodeManifest ¶
DecodeManifest accepts one bounded JSON object and rejects duplicate security-sensitive keys, since clients can interpret duplicate keys differently when selecting a package identity or dependency.
Click to show internal directories.
Click to hide internal directories.