helpers

package
v0.138.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CliEnv added in v0.112.0

func CliEnv(flags RootFlags) []string

CliEnv expands env with cli specific env vars - to been able to resend it back to cli from js SDK

func GlobalWunderGraphCacheDir added in v0.121.0

func GlobalWunderGraphCacheDir() (string, error)

GlobalWunderGraphCacheDir returns the path to the global cache directory for WunderGraph

func KillExistingHooksProcess added in v0.110.2

func KillExistingHooksProcess(serverListenPort int, log *zap.Logger)

KillExistingHooksProcess kills the existing hooks process before we start the new one some IDEs, like Goland, don't send a SIGINT to the process group this leads to the middleware hooks server (sub-process) not being killed on subsequent runs of the up command, we're not able to listen on the same port

func LocalWunderGraphCacheDir added in v0.133.0

func LocalWunderGraphCacheDir(wgDir string) (string, error)

LocalWunderGraphCacheDir returns the absolute path to the cache directory for the current WunderGraph app

func NewServerRunner

func NewServerRunner(log *zap.Logger, cfg *ServerRunConfig) *scriptrunner.ScriptRunner

func ServerPortFromConfig added in v0.110.2

func ServerPortFromConfig(configJsonPath string) (int, error)

Types

type RootFlags added in v0.112.0

type RootFlags struct {
	CliLogLevel        string
	PrettyLogs         bool
	DebugMode          bool
	Telemetry          bool
	TelemetryDebugMode bool
	// Pretty makes the output of the cli pretty printed
	Pretty bool
}

type ServerRunConfig

type ServerRunConfig struct {
	WunderGraphDirAbs string
	ServerScriptFile  string
	Env               []string
	Production        bool
	Debug             bool
}

Jump to

Keyboard shortcuts

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