package project
import "github.com/cloudboss/unobin/pkg/project"
Functions
func SourceGraph
func SourceGraph(
options Options,
reporter diagnostic.Reporter,
) (*runtime.DAG, string, error)
func UnobinReplacement
func UnobinReplacement(
projectDir string,
cliReplace string,
replace map[deps.Dependency]string,
) (string, error)
func VerifyDependencies
func VerifyDependencies(options Options) (*deps.VerifyResult, error)
Types
type CacheCleanResult
type CacheCleanResult struct {
Path string
Removed bool
}
func CleanDependencies
func CleanDependencies(options Options) (*CacheCleanResult, error)
type DependencyEntry
type DependencyEntry struct {
ID string `json:"id" ub:"id"`
Kind deps.ProjectLockKind `json:"kind" ub:"kind"`
Version string `json:"version" ub:"version"`
Indirect bool `json:"indirect" ub:"indirect"`
}
func ListDependencies
func ListDependencies(path string) ([]DependencyEntry, error)
type DependencyProgress
type DependencyProgress struct {
Dependency deps.Dependency
Version string
SelectedVersion string
Err error
}
type DependencyResult
type DependencyResult struct {
Dependency string
Version string
SelectedVersion string
Indirect bool
Write *DependencyWriteResult
Diagnostics []diagnostic.Diagnostic
}
func UpdateDependency
func UpdateDependency(options Options, arg string) (*DependencyResult, error)
type DependencyWriteResult
type DependencyWriteResult struct {
ProjectFile string
LockFile string
Direct int
Indirect int
Selected int
Files []filechange.Change
Diagnostics []diagnostic.Diagnostic
}
func SyncDependencies
func SyncDependencies(options Options) (*DependencyWriteResult, error)
type Options
type Options struct {
Path string
ReplaceUnobin string
UnobinVersion string
LibraryAPIDescriptor *libraryapi.Descriptor
NewResolver func(string) (resolve.Resolver, error)
NewRemoteResolver func() (*resolve.RemoteResolver, error)
ListTags func(string) ([]string, error)
ToolOutput io.Writer
Progress func(DependencyProgress)
}
func (Options) Compatibility
func (o Options) Compatibility(
projectDir string, project *deps.Project, replacement string,
) (*golibrary.CompatibilityContext, error)
type SourceTarget
type SourceTarget struct {
Path string
Type string
}
func CheckSource
func CheckSource(
options Options,
reporter diagnostic.Reporter,
) (SourceTarget, error)