shell

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package shell ...

Package shell ...

Package shell ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalShell

type LocalShell struct {
}

LocalShell is a Shell implementation.

func (*LocalShell) BackgroundExecute

func (s *LocalShell) BackgroundExecute(ctx context.Context, pmName string, pmCmd string, packageList string) ([]byte, error)

BackgroundExecute runs an action on the npm client in background.

func (*LocalShell) Execute

func (s *LocalShell) Execute(pmName string, pmCmd string, silentMode bool) error

Execute runs an action on the npm client.

type NodePackageManager

type NodePackageManager struct {
	// contains filtered or unexported fields
}

NodePackageManager is a Shell implementation used to interact with a npnClient.

func NewNodePackageManager

func NewNodePackageManager() *NodePackageManager

NewNodePackageManager returns a pointer to a NodePackageManager struct.

func (*NodePackageManager) GetShell

func (n *NodePackageManager) GetShell() Shell

GetShell returns a Shell.

func (*NodePackageManager) RunAddPackages

func (n *NodePackageManager) RunAddPackages(pmName string, operation string, mode string, packages []string, silentMode bool) error

RunAddPackages execute the relative npmClient install|add package command.

func (*NodePackageManager) RunInstall

func (n *NodePackageManager) RunInstall(pmName string, operation string, silentMode bool) (err error)

RunInstall execute the relative npmClient install command.

func (*NodePackageManager) RunSvelteKitCommand

func (n *NodePackageManager) RunSvelteKitCommand(pmName string, operation string, silentMode bool) (err error)

RunSvelteKitCommand execute the relative npmClient sveltekit script command as defined on the package.json file.

func (*NodePackageManager) RunUpdate

func (n *NodePackageManager) RunUpdate(pmName string, operation string, silentMode bool) (err error)

RunUpdate execute the relative npmClient update command.

type Shell

type Shell interface {
	Execute(string, string, bool) error
	BackgroundExecute(context.Context, string, string, string) ([]byte, error)
}

Shell is the interface defining the methods to be implemented by a shell instance.

Jump to

Keyboard shortcuts

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