Documentation
¶
Index ¶
- type LockfileDetector
- func (d LockfileDetector) Applicable(_ context.Context, req sdk.DetectionRequest) (bool, error)
- func (d LockfileDetector) Descriptor() sdk.DetectorDescriptor
- func (d LockfileDetector) FallbackDetector() sdk.Detector
- func (d LockfileDetector) PackageManagerSupport() []sdk.PackageManagerSupport
- func (d LockfileDetector) Ready(context.Context, sdk.DetectionRequest) error
- func (d LockfileDetector) ResolveGraph(_ context.Context, req sdk.DetectionRequest) (sdk.DetectionResult, error)
- type NativeDetector
- func (d NativeDetector) Applicable(_ context.Context, req sdk.DetectionRequest) (bool, error)
- func (d NativeDetector) Descriptor() sdk.DetectorDescriptor
- func (d NativeDetector) FallbackDetector() sdk.Detector
- func (d NativeDetector) Install(ctx context.Context, req sdk.DetectionRequest) error
- func (d NativeDetector) PackageManagerSupport() []sdk.PackageManagerSupport
- func (d NativeDetector) Ready(context.Context, sdk.DetectionRequest) error
- func (d NativeDetector) ResolveGraph(_ context.Context, req sdk.DetectionRequest) (sdk.DetectionResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LockfileDetector ¶
LockfileDetector resolves Bun text lockfiles without invoking Bun.
func (LockfileDetector) Applicable ¶
func (d LockfileDetector) Applicable(_ context.Context, req sdk.DetectionRequest) (bool, error)
Applicable reports whether a Bun text or binary lockfile is present.
func (LockfileDetector) Descriptor ¶
func (d LockfileDetector) Descriptor() sdk.DetectorDescriptor
Descriptor describes the Bun lockfile detector.
func (LockfileDetector) FallbackDetector ¶
func (d LockfileDetector) FallbackDetector() sdk.Detector
FallbackDetector returns the configured fallback detector.
func (LockfileDetector) PackageManagerSupport ¶
func (d LockfileDetector) PackageManagerSupport() []sdk.PackageManagerSupport
PackageManagerSupport returns Bun package-manager discovery metadata.
func (LockfileDetector) Ready ¶
func (d LockfileDetector) Ready(context.Context, sdk.DetectionRequest) error
Ready reports whether the native parser can be used.
func (LockfileDetector) ResolveGraph ¶
func (d LockfileDetector) ResolveGraph(_ context.Context, req sdk.DetectionRequest) (sdk.DetectionResult, error)
ResolveGraph parses bun.lock and returns one graph entry per workspace. Legacy bun.lockb files are deliberately delegated to the configured Syft fallback because their binary format is not a stable public contract.
type NativeDetector ¶
NativeDetector resolves installed Bun dependencies with the Bun CLI. Bun exposes a hoisted installed-package tree, so nested edges are preserved, direct dependencies are recovered from package.json, and hoisted packages without a provable parent retain an unknown relationship.
func (NativeDetector) Applicable ¶
func (d NativeDetector) Applicable(_ context.Context, req sdk.DetectionRequest) (bool, error)
Applicable reports whether a Bun project manifest is present.
func (NativeDetector) Descriptor ¶
func (d NativeDetector) Descriptor() sdk.DetectorDescriptor
Descriptor describes the Bun CLI fallback detector.
func (NativeDetector) FallbackDetector ¶
func (d NativeDetector) FallbackDetector() sdk.Detector
FallbackDetector returns the configured fallback detector.
func (NativeDetector) Install ¶
func (d NativeDetector) Install(ctx context.Context, req sdk.DetectionRequest) error
Install prepares Bun dependencies before graph resolution.
func (NativeDetector) PackageManagerSupport ¶
func (d NativeDetector) PackageManagerSupport() []sdk.PackageManagerSupport
PackageManagerSupport returns discovery metadata for the Bun CLI fallback detector.
func (NativeDetector) Ready ¶
func (d NativeDetector) Ready(context.Context, sdk.DetectionRequest) error
Ready reports whether Bun is available.
func (NativeDetector) ResolveGraph ¶
func (d NativeDetector) ResolveGraph(_ context.Context, req sdk.DetectionRequest) (sdk.DetectionResult, error)
ResolveGraph resolves the installed Bun package inventory via bun pm ls.