deps

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DepsGoFile = "deps.go"
View Source
const GoxJSONFile = "gox.json"

Variables

This section is empty.

Functions

func AddAndInstall

func AddAndInstall(root, goExec, module, version string) error

AddAndInstall adds a dependency and reconciles the Go module atomically. If reconciliation fails, dependency metadata and Go module files are restored.

func AddDependency

func AddDependency(root string, module string, version string) error

func EnsureSDK

func EnsureSDK(root, goExec string) error

EnsureSDK aligns an existing project's SDK with the server before plugins are compiled. Matching projects require no Go command or network access.

func Install

func Install(root string, goExec string) error

func RemoveAndInstall

func RemoveAndInstall(root, goExec, module string) error

RemoveAndInstall removes a dependency and reconciles the Go module atomically. If reconciliation fails, dependency metadata and Go module files are restored.

func RemoveDependency

func RemoveDependency(root string, module string) error

func Tidy

func Tidy(root string, goExec string) error

Tidy synchronizes deps.go and go.mod/go.sum from gox.json without modifying gox.json. deps.go remains in the project so the Go toolchain can see dependencies that are referenced only by GOX files.

func WriteDepsGo

func WriteDepsGo(root string, cfg GoxJSON, requiredImports ...string) error

WriteDepsGo synchronizes the permanent Go dependency bridge used to make dependencies declared by GOX files visible to the Go toolchain.

func WriteGoxJSON

func WriteGoxJSON(root string, cfg GoxJSON) error

Types

type Dependency

type Dependency struct {
	Path    string
	Version string
}

func SortedDependencies

func SortedDependencies(cfg GoxJSON) []Dependency

type Frameworks

type Frameworks map[string]map[string]string

type GoxJSON

type GoxJSON struct {
	Dependencies map[string]string `json:"dependencies"`
	Toolchain    Toolchain         `json:"toolchain"`
	Frameworks   Frameworks        `json:"frameworks"`
}

func NewGoxJSON

func NewGoxJSON() GoxJSON

func ReadGoxJSON

func ReadGoxJSON(root string) (GoxJSON, error)

type Toolchain

type Toolchain struct {
	Node       string `json:"node"`
	PNPM       string `json:"pnpm"`
	Vite       string `json:"vite"`
	TypeScript string `json:"typescript"`
}

Jump to

Keyboard shortcuts

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