app

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownMode                  = errors.New("unknown mode")
	ErrFailOnIncrease               = errors.New("dependency waste increased beyond threshold")
	ErrBaselineRequired             = errors.New("baseline report is required for fail-on-increase")
	ErrLockfileDrift                = errors.New("lockfile drift detected")
	ErrUncertaintyThresholdExceeded = errors.New("uncertain dynamic import/require usage exceeded threshold")
)

Functions

This section is empty.

Types

type AnalyseRequest

type AnalyseRequest struct {
	Dependency         string
	TopN               int
	SuggestOnly        bool
	Format             report.Format
	Language           string
	CacheEnabled       bool
	CachePath          string
	CacheReadOnly      bool
	RuntimeProfile     string
	BaselinePath       string
	BaselineStorePath  string
	BaselineKey        string
	BaselineLabel      string
	SaveBaseline       bool
	RuntimeTracePath   string
	RuntimeTestCommand string
	IncludePatterns    []string
	ExcludePatterns    []string
	ConfigPath         string
	PolicySources      []string
	Thresholds         thresholds.Values
}

type App

type App struct {
	Analyzer  analysis.Analyser
	Formatter *report.Formatter
	TUI       ui.TUI
}

func New

func New(out io.Writer, in io.Reader) *App

func (*App) Execute

func (a *App) Execute(ctx context.Context, req Request) (string, error)

type Mode

type Mode string
const (
	ModeTUI     Mode = "tui"
	ModeAnalyse Mode = "analyse"
)

type Request

type Request struct {
	Mode     Mode
	RepoPath string
	Analyse  AnalyseRequest
	TUI      TUIRequest
}

func DefaultRequest

func DefaultRequest() Request

type TUIRequest

type TUIRequest struct {
	Language     string
	SnapshotPath string
	Filter       string
	Sort         string
	TopN         int
	PageSize     int
}

Jump to

Keyboard shortcuts

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