bun

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoMatchingVersion = errors.New("no Bun version satisfies constraint")
)

Functions

This section is empty.

Types

type Downloader

type Downloader struct {
	// contains filtered or unexported fields
}

Downloader handles downloading Bun binaries

func NewDownloader

func NewDownloader(cacheDir string, verbose, quiet bool) *Downloader

NewDownloader creates a new downloader

func (*Downloader) GetBinary

func (d *Downloader) GetBinary(version *semver.Version) (string, error)

GetBinary returns the path to the Bun binary, downloading if necessary

func (*Downloader) IsCached

func (d *Downloader) IsCached(version *semver.Version) bool

IsCached checks if a version is already downloaded

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver handles Bun version resolution

func NewResolver

func NewResolver(source VersionSource) *Resolver

NewResolver creates a new resolver with the given version source

func (*Resolver) Resolve

func (r *Resolver) Resolve(constraint string) (*semver.Version, error)

Resolve finds the highest Bun version matching the constraint

func (*Resolver) ResolveExact

func (r *Resolver) ResolveExact(version string) (*semver.Version, error)

ResolveExact finds an exact version or returns an error

type VersionSource

type VersionSource interface {
	GetVersions() ([]*semver.Version, error)
}

VersionSource provides available Bun versions

Jump to

Keyboard shortcuts

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