bun

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LockfileDetector

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

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

Ready reports whether the native parser can be used.

func (LockfileDetector) ResolveGraph

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

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

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

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

Ready reports whether Bun is available.

func (NativeDetector) ResolveGraph

ResolveGraph resolves the installed Bun package inventory via bun pm ls.

Jump to

Keyboard shortcuts

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