depsrun

package
v0.201.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package depsrun owns dependency selection and operation/report custody.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileRegex

func CompileRegex(value string) (*regexp.Regexp, error)

func DerivedScopes

func DerivedScopes(latest bool, scopes []string) []string

DerivedScopes records scopes only when they actually produced registry seeds.

func DiscoverModules

func DiscoverModules(root string) []string

func EffectiveValidationMode

func EffectiveValidationMode(value string, noVerify bool) deps.ValidationMode

EffectiveValidationMode applies the common legacy escape hatch/default policy after the caller has validated its command-specific flags.

Types

type BumpRequest

type BumpRequest struct {
	ProjectsRoot           string
	ReportDir              string
	Resume                 bool
	Events                 []deps.ReleaseEvent
	Repositories           []deps.Repository
	Options                deps.BumpOptions
	ResumeParallelExplicit bool
	Finish                 func(string)
}

type BumpResult

type BumpResult struct {
	Report    deps.BumpReport
	ReportDir string
}

type Dependencies

type Dependencies struct {
	DiscoverModules   func(string) []string
	AssessDirective   func(context.Context, string, deps.DirectivePolicy, deps.Options) (deps.DirectiveAssessment, error)
	ApplyDirective    func(context.Context, string, deps.DirectivePolicy, deps.Options) (deps.DirectiveAssessment, error)
	Fleet             func(root, filter string, extra []string) ([]deps.Repository, error)
	Identity          func(path, root string) (string, string, error)
	Abs               func(string) (string, error)
	EnsureRoot        func(string) (string, error)
	BuildGraph        func(context.Context, []deps.Repository, deps.GraphOptions) (deps.Graph, error)
	AnalyzeDrift      func(context.Context, []deps.Repository, deps.DriftOptions) (deps.DriftReport, error)
	InspectPeers      func(context.Context, deps.PeerOptions) (deps.PeerReport, error)
	RunSet            func(context.Context, deps.Target, []deps.Repository, deps.Options) (deps.Report, error)
	RunBump           func(context.Context, []deps.ReleaseEvent, []deps.Repository, deps.BumpOptions) (deps.BumpReport, error)
	DeriveLatest      func(context.Context, []deps.Repository, []string, deps.BumpOptions) ([]deps.ReleaseEvent, []deps.LatestScopeResolution, error)
	WriteGraphReports func(string, deps.Graph, deps.GraphView) (deps.GraphReportPaths, error)
	WriteDriftReports func(string, deps.DriftReport) error
	WriteSetReports   func(string, deps.Report) error
	WriteBumpReports  func(string, deps.BumpReport) error
	LoadBumpReport    func(string) (deps.BumpReport, error)
}

func DefaultDependencies

func DefaultDependencies(diagnostics io.Writer) Dependencies

type DirectiveCheckRequest

type DirectiveCheckRequest struct {
	Directory     string
	Policy        deps.DirectivePolicy
	Options       deps.Options
	Apply         bool
	CodeQLCeiling string
}

type DirectiveCheckResult

type DirectiveCheckResult struct{ ModuleCount, Attention int }

type DirectiveCheckRow

type DirectiveCheckRow struct {
	Label      string
	Assessment deps.DirectiveAssessment
	Error      error
	Detail     string
}

type DirectiveRow

type DirectiveRow struct {
	Repository   string                   `json:"repository"`
	Module       string                   `json:"module,omitempty"`
	Verdict      string                   `json:"verdict"`
	Detail       string                   `json:"detail"`
	Forcing      []deps.ForcingDependency `json:"forcing,omitempty"`
	CodeQLAtRisk bool                     `json:"codeQLAtRisk,omitempty"`
}

type DriftRequest

type DriftRequest struct {
	Repositories []deps.Repository
	Options      deps.DriftOptions
	ReportDir    string
	Finish       func(string)
}

type GraphRequest

type GraphRequest struct {
	Repositories []deps.Repository
	Options      deps.GraphOptions
	View         deps.GraphView
	ReportDir    string
	Finish       func(string)
}

type GraphResult

type GraphResult struct {
	Graph deps.Graph
	Paths deps.GraphReportPaths
}

type PolicyChange

type PolicyChange struct {
	Repository string `json:"repository"`
	Module     string `json:"module"`
	Before     int    `json:"before"`
	After      int    `json:"after"`
}

type PolicyDependencies

type PolicyDependencies struct {
	Select     func(context.Context, Selection) ([]deps.Repository, error)
	Abs        func(string) (string, error)
	Stat       func(string) (os.FileInfo, error)
	WriteFile  func(string, []byte, os.FileMode) error
	LoadConfig func(string) (policy.RepoConfig, error)
	Load       func(string) (policy.Policy, error)
	Scan       func(string) (policy.Module, error)
	Fetch      func(string) (string, error)
	Check      func(policy.Policy, policy.Module, string) (policy.Result, error)
	Explain    func(policy.Policy, string, string, string) (policy.Explanation, error)
	Describe   func(policy.Policy, string, string, string, bool) (policy.Effective, error)
}

func DefaultPolicyDependencies

func DefaultPolicyDependencies(diagnostics io.Writer) PolicyDependencies

type PolicyDriftResult

type PolicyDriftResult struct {
	Rows   []PolicyDriftRow
	Issues int
}

type PolicyDriftRow

type PolicyDriftRow struct {
	Repository string `json:"repository"`
	Module     string `json:"module"`
	Policy     string `json:"policy,omitempty"`
	Declared   string `json:"declaredType,omitempty"`
	Detected   string `json:"detectedType,omitempty"`
	Issue      string `json:"issue,omitempty"`
}

type PolicyFleetRequest

type PolicyFleetRequest struct {
	Selection Selection
	Policy    string
}

type PolicyImpactResult

type PolicyImpactResult struct {
	Candidate                  string
	NewlyFailing, NewlyPassing []PolicyChange
	Unchanged                  int
}

type PolicyInitNotice

type PolicyInitNotice struct{ Path, DetectedType string }

type PolicyModuleOutcome

type PolicyModuleOutcome struct {
	Repository string `json:"repository"`
	Module     string `json:"module"`
	Directory  string `json:"-"`
	Type       string `json:"type,omitempty"`
	PolicyRef  string `json:"policy,omitempty"`

	Governed bool   `json:"governed"`
	Skipped  string `json:"skipped,omitempty"`
	Blocking int    `json:"blocking"`
	Reported int    `json:"reported"`

	Findings []policy.Finding `json:"-"`
}

type PolicyRequest

type PolicyRequest struct {
	Directory, ProjectsRoot, Policy, DeclaredType string
	Strict                                        bool
}

type PolicyService

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

func NewPolicy

func NewPolicy(deps PolicyDependencies, usage func(string) error) *PolicyService

func (*PolicyService) Check

func (s *PolicyService) Check(_ context.Context, request PolicyRequest) (policy.Result, error)

func (*PolicyService) Describe

func (s *PolicyService) Describe(_ context.Context, request PolicyRequest) (policy.Effective, error)

func (*PolicyService) Drift

func (*PolicyService) Expectations

func (s *PolicyService) Expectations(_ context.Context, path string) ([]policy.ExpectationResult, error)

func (*PolicyService) Explain

func (s *PolicyService) Explain(_ context.Context, request PolicyRequest, importPath string) (policy.Explanation, error)

func (*PolicyService) Impact

func (s *PolicyService) Impact(ctx context.Context, request PolicyFleetRequest, candidateArgument string) (PolicyImpactResult, error)

func (*PolicyService) Init

func (s *PolicyService) Init(_ context.Context, request PolicyRequest, written func(PolicyInitNotice)) (policy.Result, error)

func (*PolicyService) Report

func (*PolicyService) Validate

func (s *PolicyService) Validate(_ context.Context, path string) (PolicyValidation, error)

type PolicyValidation

type PolicyValidation struct {
	GroupCount, TypeCount int
	Diagnostics           []policy.Diagnostic
}

type PropagationDependencies

type PropagationDependencies struct {
	OpenStore func(string) (*streams.Store, error)
	Home      func(string) (string, error)
	Git       func(time.Duration) locallink.Git
	Node      func(cacheRoot, contentHash string, timeout time.Duration) locallink.Node
	Verifier  func(time.Duration) locallink.Verifier
}

func DefaultPropagationDependencies

func DefaultPropagationDependencies() PropagationDependencies

type PropagationRequest

type PropagationRequest struct {
	ProjectsRoot string
	Options      locallink.Options
}

type PropagationService

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

func NewPropagation

func NewPropagation(dependencies PropagationDependencies) *PropagationService

func (*PropagationService) Run

type PublicationCallbacks

type PublicationCallbacks struct {
	ValidateOutput func() error
	Emit           func(PublicationOutput) error
	StartProgress  func(string) PublicationProgress
}

type PublicationDependencies

type PublicationDependencies struct {
	Select           func(context.Context, Selection) ([]deps.Repository, error)
	Bump             func(context.Context, BumpRequest) (BumpResult, error)
	Run              func(context.Context, []npmrelease.Release, npmrelease.Options) (npmrelease.Report, error)
	AcquireLock      func(string, string, bool) (orchestrate.OperationLock, error)
	EnsureRoot       func(string) (string, error)
	ReportExists     func(string) (bool, error)
	LoadPublication  func(string) (npmrelease.Report, error)
	LoadBump         func(string) (deps.BumpReport, error)
	WritePublication func(string, npmrelease.Report) error
}

func DefaultPublicationDependencies

func DefaultPublicationDependencies(diagnostics io.Writer) PublicationDependencies

type PublicationOutput

type PublicationOutput struct {
	Publication npmrelease.Report `json:"publication" yaml:"publication"`
	Propagation *deps.BumpReport  `json:"propagation,omitempty" yaml:"propagation,omitempty"`
}

type PublicationProgress

type PublicationProgress struct {
	Reporter progress.Reporter
	Finish   func(string)
}

type PublicationRequest

type PublicationRequest struct {
	Repositories, Workflows, Packages, Versions, WorkflowInputs []string
	Registry, Checks                                            string
	Apply, NoVerify                                             bool
	WorkflowPoll, ReleasePoll, RefreshAfter                     time.Duration
	MaxWaves                                                    int
	Selection                                                   Selection
	Lifecycle                                                   deps.Options
}

type PublicationService

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

func NewPublication

func NewPublication(deps PublicationDependencies, exitError func(int, string) error) *PublicationService

func (*PublicationService) Run

func (service *PublicationService) Run(ctx context.Context, request PublicationRequest, callbacks PublicationCallbacks) error

type SeedRequest

type SeedRequest struct {
	Ecosystem       deps.Ecosystem
	Changed, Scopes []string
	Latest          bool
	Repositories    []deps.Repository
	Options         deps.BumpOptions
}

type SeedResult

type SeedResult struct {
	Events      []deps.ReleaseEvent
	Resolutions []deps.LatestScopeResolution
}

type Selection

type Selection struct {
	ProjectsRoot, Filter, RepositoryPath, Match, Regex string
	ExtraOrgs                                          []string
	Fleet                                              bool
	Parallel, Retry                                    int
	Timeout                                            time.Duration
	Progress                                           progress.Reporter
}

type Service

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

func New

func New(deps Dependencies) *Service

func (*Service) Bump

func (service *Service) Bump(ctx context.Context, request BumpRequest) (BumpResult, error)

func (*Service) CheckDirectives

func (service *Service) CheckDirectives(ctx context.Context, request DirectiveCheckRequest, emit func(DirectiveCheckRow)) (DirectiveCheckResult, error)

func (*Service) Drift

func (service *Service) Drift(ctx context.Context, request DriftRequest) (deps.DriftReport, error)

func (*Service) Graph

func (service *Service) Graph(ctx context.Context, request GraphRequest) (GraphResult, error)

func (*Service) Peers

func (service *Service) Peers(ctx context.Context, options deps.PeerOptions) (deps.PeerReport, error)

func (*Service) ReportDirectives

func (service *Service) ReportDirectives(ctx context.Context, repositories []deps.Repository, policy deps.DirectivePolicy, options deps.Options, codeQLCeiling string) []DirectiveRow

func (*Service) Seed

func (service *Service) Seed(ctx context.Context, request SeedRequest) (SeedResult, error)

func (*Service) Select

func (service *Service) Select(_ context.Context, request Selection) ([]deps.Repository, error)

func (*Service) Set

func (service *Service) Set(ctx context.Context, request SetRequest) (SetResult, error)

type SetRequest

type SetRequest struct {
	Target       deps.Target
	Repositories []deps.Repository
	Options      deps.Options
	Finish       func(string)
}

type SetResult

type SetResult struct {
	Report   deps.Report
	RunError error
}

Jump to

Keyboard shortcuts

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