helpers

package
v0.177.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WgLogEnvKey       = "WG_LOG"
	WgLogPrettyEnvKey = "WG_LOG_PRETTY"
)

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 NewHooksServerRunner added in v0.139.0

func NewHooksServerRunner(log *zap.Logger, cfg *HooksServerRunConfig) *scriptrunner.ScriptRunner

func ScriptRunnerOutputConfig added in v0.166.0

func ScriptRunnerOutputConfig(flags RootFlags) *scriptrunner.OutputConfig

func ServerPortFromConfig added in v0.110.2

func ServerPortFromConfig(configJsonPath string) (int, error)

Types

type HooksServerRunConfig added in v0.139.0

type HooksServerRunConfig struct {
	WunderGraphDirAbs string
	ServerScriptFile  string
	Env               []string
	Log               string
	Production        bool
	DebugBindAddress  string
	Debug             bool
	Output            *scriptrunner.OutputConfig
}

type RootFlags added in v0.112.0

type RootFlags struct {
	Log        string
	PrettyLogs bool
	// Aka request logging (dumps), enriched error logging
	DebugMode          bool
	Telemetry          bool
	TelemetryDebugMode bool
}

Jump to

Keyboard shortcuts

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