Documentation
¶
Overview ¶
Package dev owns the Wails YAML development session. It is an internal, Wails-specific controller, not a general-purpose process supervisor.
Index ¶
- func FrontendSessionChanged(current, next manifest.Config) bool
- func Generation(ctx context.Context) uint64
- func IsForcedRebuild(ctx context.Context) bool
- func Run(ctx context.Context, options Options, ops Operations) (resultErr error)
- func WaitHTTP(ctx context.Context, p Process, address string, timeout time.Duration) error
- func WatchSessionChanged(current, next manifest.Config) bool
- func WithForcedRebuild(ctx context.Context) context.Context
- func WithGeneration(ctx context.Context, g uint64) context.Context
- func WithOutput(ctx context.Context, o *Output) context.Context
- type BuildResult
- type Diagnostic
- type Event
- type EventKind
- type Operations
- type Options
- type Output
- func (o *Output) BuildReporter(generation ...uint64) report.Reporter
- func (o *Output) Clear()
- func (o *Output) Failure(g uint64, c, p string, err error, message string)
- func (o *Output) Observe(f func(Event))
- func (o *Output) Status(g uint64, c, p, m string)
- func (o *Output) Writer(component, stream string) io.WriteCloser
- type Process
- type Readiness
- type Tail
- type WatchSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FrontendSessionChanged ¶
func Generation ¶
func IsForcedRebuild ¶
func WaitHTTP ¶
WaitHTTP requires an actual HTTP response, rather than merely an open port. Client errors are accepted for custom root routes; server errors keep waiting.
func WatchSessionChanged ¶
Types ¶
type BuildResult ¶
type Diagnostic ¶
type Diagnostic struct {
Component, Phase string
Generation uint64
Command []string
ExitCode int
Output string
Err error
}
Diagnostic retains the cause and launch/build identity for CLI diagnostics.
func (*Diagnostic) Error ¶
func (d *Diagnostic) Error() string
func (*Diagnostic) Unwrap ¶
func (d *Diagnostic) Unwrap() error
type Event ¶
type Event struct {
Generation uint64
Component, Phase, Message string
Diagnostic *Diagnostic
}
Event is a Wails dev lifecycle notification. Child output remains text so multiline compiler diagnostics and application stack traces stay intact.
type Operations ¶
type Operations struct {
GenerateBindings func(context.Context, *manifest.Loaded) error
ValidateTarget func(string, string) error
Getwd func() (string, error)
Load func(string, string) (*manifest.Loaded, error)
Target func(string) (string, string, error)
Plan func(*manifest.Loaded, string, string, []string) error
CheckPort func(string, int) error
Build func(context.Context, *manifest.Loaded, string, string, string, int) (BuildResult, error)
StartFrontend func(string, manifest.Config, string, int, string) (Process, error)
WaitFrontendReady func(context.Context, Process, string, time.Duration) error
BinaryPath func(string, BuildResult, string, string) (string, error)
StartApp func(string, string, string, int, []string) (Process, error)
WaitReady func(context.Context, Process, time.Duration) error
StartWatches func(string, manifest.Config) (WatchSet, error)
RestartWatches func(string, manifest.Config, WatchSet) (WatchSet, error)
RestoreFrontend func(context.Context, string, manifest.Config, int, string, string) (Process, error)
RestoreApp func(context.Context, string, Process, string, int) (Process, error)
BackendChanged func(BuildResult, string, string) bool
}
Operations adapts Wails build and host tools; Run owns their lifetime.
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
Output serialises builds, lifecycle events and child output on one sink. It deliberately uses stable lines: a long-lived application must never race a build spinner for ownership of terminal cursor positions.
func OutputFrom ¶
type Readiness ¶
type Readiness struct {
// contains filtered or unexported fields
}
Readiness is unique to one candidate launch; an old application cannot mark its replacement ready. Desktop listeners bind loopback; physical iOS uses the explicitly selected LAN interface.