pub

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachPubspecLockPositions

func AttachPubspecLockPositions(g *sdk.Graph, projectDir string)

AttachPubspecLockPositions wires pubspec.lock line numbers.

Types

type Detector

type Detector struct {
	Logger     *zap.Logger
	WorkingDir string
	Fallback   sdk.Detector
}

Detector resolves Dart pub dependency graphs from pubspec files.

func (Detector) Applicable

func (d Detector) Applicable(ctx context.Context, req sdk.DetectionRequest) (bool, error)

Applicable reports whether pub manifests are present.

func (Detector) Descriptor

func (d Detector) Descriptor() sdk.DetectorDescriptor

Descriptor describes the pub detector.

func (Detector) FallbackDetector

func (d Detector) FallbackDetector() sdk.Detector

FallbackDetector returns the configured fallback detector.

func (Detector) PackageManagerSupport

func (d Detector) PackageManagerSupport() []sdk.PackageManagerSupport

PackageManagerSupport returns pub package-manager discovery metadata.

func (Detector) Ready

func (d Detector) Ready() bool

Ready reports whether committed pub lockfiles can be parsed.

func (Detector) ResolveGraph

ResolveGraph resolves a pub dependency graph.

type NativeDetector

type NativeDetector struct {
	Logger     *zap.Logger
	WorkingDir string
	Fallback   sdk.Detector
}

NativeDetector resolves Dart pub dependency graphs by running `dart pub deps --json`. Unlike the lockfile-only Detector, this produces a proper transitive tree with parent-child edges from the `dependencies` field of each package record.

func (NativeDetector) Applicable

func (d NativeDetector) Applicable(ctx context.Context, req sdk.DetectionRequest) (bool, error)

Applicable reports whether pub manifests are present.

func (NativeDetector) Descriptor

func (d NativeDetector) Descriptor() sdk.DetectorDescriptor

Descriptor describes the pub native detector.

func (NativeDetector) FallbackDetector

func (d NativeDetector) FallbackDetector() sdk.Detector

FallbackDetector returns the configured fallback detector.

func (NativeDetector) PackageManagerSupport

func (d NativeDetector) PackageManagerSupport() []sdk.PackageManagerSupport

PackageManagerSupport returns pub package-manager discovery metadata.

func (NativeDetector) Ready

func (d NativeDetector) Ready() bool

Ready reports whether the dart binary is available.

func (NativeDetector) ResolveGraph

ResolveGraph resolves a pub dependency graph via dart pub deps --json.

Jump to

Keyboard shortcuts

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