update

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package update provides the update command implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildUpdateOptions

func BuildUpdateOptions(provider, source, catalogPath string, dryRun, force, cleanup, reformat bool, sourcesDir, modelsDevGitCommit string, autoInstallDeps, skipDepPrompts, requireAllSources bool) ([]sync.Option, error)

BuildUpdateOptions creates a slice of update options based on the provided flags.

func ConfirmChanges

func ConfirmChanges() (bool, error)

ConfirmChanges asks the user to confirm applying changes. Returns true if the user confirms, false if cancelled.

func ExecuteUpdate

func ExecuteUpdate(ctx context.Context, app application, flags *Flags, logger *zerolog.Logger) error

ExecuteUpdate orchestrates the complete update process using app context.

func LoadCatalog

func LoadCatalog(app application, catalogPath string, isQuiet bool) (*starmap.Client, error)

LoadCatalog creates a starmap instance using app context. If catalogPath is provided, it is the single local read/write workspace. Otherwise, the application composition supplies its configured default.

func NewCommand

func NewCommand(app application) *cobra.Command

NewCommand creates the update command using app context.

func ValidateForceUpdate

func ValidateForceUpdate(isQuiet, autoApprove bool) (bool, error)

ValidateForceUpdate shows a warning for force updates and asks for confirmation. Returns true if the user confirms to proceed, false if cancelled.

Types

type Flags

type Flags struct {
	Provider           string
	Source             string
	DryRun             bool
	Force              bool
	AutoApprove        bool
	CatalogPath        string
	Cleanup            bool
	Reformat           bool
	SourcesDir         string
	ModelsDevGitCommit string
	AutoInstallDeps    bool
	SkipDepPrompts     bool
	RequireAllSources  bool
}

Flags holds flags for update command.

Jump to

Keyboard shortcuts

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