Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "dev" Commit = "none" CommitDate = "unknown" )
Functions ¶
func New ¶ added in v0.4.0
New builds a configuration for the current runtime and returns a pre-configured NPMI main
func NewConfigBuilder ¶ added in v0.4.0
func NewConfigBuilder() *configBuilder
func NewWithConfig ¶ added in v0.4.0
NewWithConfig creates a NPMI main using the supplied options and config
Types ¶
type Config ¶ added in v0.4.0
type Config struct { Platform string // contains filtered or unexported fields }
type LocalCacheOptions ¶ added in v0.4.0
type LocalCacheOptions struct {
Dir string `env:"NPMI_LOCAL_DIR"`
}
LocalCacheOptions constains configuration for Local Cache
type MinioCacheOptions ¶ added in v0.4.0
type MinioCacheOptions struct { Endpoint string `env:"NPMI_MINIO_ENDPOINT"` AccessKeyID string `env:"NPMI_MINIO_ACCESS_KEY_ID"` SecretAccessKey string `env:"NPMI_MINIO_SECRET_ACCESS_KEY"` Bucket string `env:"NPMI_MINIO_BUCKET"` UseTLS bool `env:"NPMI_MINIO_TLS"` InsecureTLS bool `env:"NPMI_MINIO_TLS_INSECURE"` }
MinioCacheOptions contains configuration for Minio Cache
type NpmInstaller ¶ added in v0.4.0
type NpmInstaller struct {
// contains filtered or unexported fields
}
func NewNpmInstaller ¶ added in v0.4.0
func NewNpmInstaller(config *Config, log hclog.Logger) *NpmInstaller
func (*NpmInstaller) Run ¶ added in v0.4.0
func (i *NpmInstaller) Run() (stdout string, stderr string, err error)
Run installs packages from NPM
func (*NpmInstaller) RunPrecacheCommand ¶ added in v0.4.0
func (i *NpmInstaller) RunPrecacheCommand(commandLine string) (stdout string, stderr string, err error)
RunPrecacheCommand runs a given command before inserting freshly installed NPM deps into cache
type Options ¶ added in v0.4.0
type Options struct { Verbose bool `env:"NPMI_VERBOSE"` Force bool `env:"NPMI_FORCE"` LocalCache *LocalCacheOptions LogLevel LogLevel `env:"NPMI_LOGLEVEL"` MinioCache *MinioCacheOptions PrecacheCommand string `env:"NPMI_PRECACHE"` TempDir string `env:"NPMI_TEMP_DIR"` UseLocalCache bool `env:"NPMI_LOCAL"` UseMinioCache bool `env:"NPMI_MINIO"` Json bool `env:"NPMI_JSON"` TarDoubleDotPaths bool `env:"NPMI_TAR_DOUBLE_DOT_PATHS"` TarAbsolutePaths bool `env:"NPMI_TAR_ABSOLUTE_PATHS"` TarLinksOutsideCwd bool `env:"NPMI_TAR_LINKS_OUTSIDE_CWD"` }
Options describes the runtime configuration
Click to show internal directories.
Click to hide internal directories.