Documentation
¶
Overview ¶
Package wave provides runtime services that may be linked into production binaries.
Build-time and dev-time functionality is in the wave/tooling subpackage. Keeping this split explicit lets applications use runtime-only code in production while avoiding build-tool dependencies in shipped binaries.
Index ¶
- Constants
- Variables
- func GetIsDev() bool
- func GetPort() int
- func GetRefreshServerPort() int
- func MustGetPort() int
- func RefreshScriptInner(port int) string
- func RefreshScriptInnerWithParsedConfig(port int, parsedConfig *ParsedConfig) string
- func SetModeToDev()
- func SetPort(port int)
- func SetRefreshServerPort(port int)
- type CSSEntryFiles
- type Config
- type CoreConfig
- type DistLayout
- func (d DistLayout) Binary() string
- func (d DistLayout) CriticalCSS() string
- func (d DistLayout) Internal() string
- func (d DistLayout) KeepFile() string
- func (d DistLayout) NormalCSSRef() string
- func (d DistLayout) PrivateFileMapGob() string
- func (d DistLayout) PublicFileMapGob() string
- func (d DistLayout) PublicFileMapRef() string
- func (d DistLayout) Static() string
- func (d DistLayout) StaticAssets() string
- func (d DistLayout) StaticPrivate() string
- func (d DistLayout) StaticPublic() string
- type FileMap
- type FileVal
- type GoBuildOverlay
- type HookCallbackTimeoutConfig
- type HookCommandTimeoutConfig
- type HookContext
- type OnChangeHook
- type ParsedConfig
- func (parsedConfig *ParsedConfig) BrowserPublicURLResolverFunctionName() string
- func (parsedConfig *ParsedConfig) BrowserRevalidateFunctionName() string
- func (parsedConfig *ParsedConfig) BrowserRuntimeNamespace() string
- func (parsedConfig *ParsedConfig) Clone() *ParsedConfig
- func (cfg *ParsedConfig) CopyFrameworkRuntimeFieldsFrom(previousParsedConfig *ParsedConfig)
- func (parsedConfig *ParsedConfig) CriticalCSSEntry() string
- func (parsedConfig *ParsedConfig) CriticalCSSStyleElementID() string
- func (parsedConfig *ParsedConfig) HealthcheckEndpoint() string
- func (parsedConfig *ParsedConfig) NonCriticalCSSEntry() string
- func (parsedConfig *ParsedConfig) NonCriticalCSSLinkElementID() string
- func (parsedConfig *ParsedConfig) PublicPathPrefix() string
- func (parsedConfig *ParsedConfig) RefreshRebuildingOverlayElementID() string
- func (parsedConfig *ParsedConfig) UsingBrowser() bool
- func (parsedConfig *ParsedConfig) UsingVite() bool
- func (parsedConfig *ParsedConfig) ViteManifestPath() string
- func (parsedConfig *ParsedConfig) WatchRoot() string
- type PortResolver
- type RefreshAction
- type SortedHooks
- type StaticAssetDirs
- type Timing
- type ViteConfig
- type WatchConfig
- type WatchedFile
- type Wave
- func (w *Wave) AddFrameworkWatchPatterns(patterns []WatchedFile)
- func (w *Wave) AddIgnoredPatterns(patterns []string)
- func (w *Wave) FaviconRedirect() middleware.Middleware
- func (w *Wave) GetBaseFS() (fs.FS, error)
- func (w *Wave) GetBuildtimeParsedConfig() *ParsedConfig
- func (w *Wave) GetConfigFile() string
- func (w *Wave) GetCriticalCSS() template.CSS
- func (w *Wave) GetCriticalCSSElementID() string
- func (w *Wave) GetCriticalCSSStyleElement() template.HTML
- func (w *Wave) GetCriticalCSSStyleElementSha256Hash() string
- func (w *Wave) GetDistDir() string
- func (w *Wave) GetIsDev() bool
- func (w *Wave) GetParsedConfig() *ParsedConfig
- func (w *Wave) GetPrivateFS() (fs.FS, error)
- func (w *Wave) GetPrivateStaticDir() string
- func (w *Wave) GetPublicFS() (fs.FS, error)
- func (w *Wave) GetPublicFileMap() (FileMap, error)
- func (w *Wave) GetPublicFileMapElements() template.HTML
- func (w *Wave) GetPublicFileMapScriptSha256Hash() string
- func (w *Wave) GetPublicFileMapURL() string
- func (w *Wave) GetPublicPathPrefix() string
- func (w *Wave) GetPublicStaticDir() string
- func (w *Wave) GetPublicURL(original string) string
- func (w *Wave) GetRefreshScript() template.HTML
- func (w *Wave) GetRefreshScriptSha256Hash() string
- func (w *Wave) GetServeStaticHandler(immutable bool) (http.Handler, error)
- func (w *Wave) GetStaticPrivateOutDir() string
- func (w *Wave) GetStaticPublicOutDir() string
- func (w *Wave) GetStyleSheetElementID() string
- func (w *Wave) GetStyleSheetLinkElement() template.HTML
- func (w *Wave) GetStyleSheetURL() string
- func (w *Wave) GetViteManifestLocation() string
- func (w *Wave) GetViteOutDir() string
- func (w *Wave) IsPublicAsset(urlPath string) bool
- func (w *Wave) Logger() *slog.Logger
- func (w *Wave) MustGetPort() int
- func (w *Wave) MustGetPrivateFS() fs.FS
- func (w *Wave) MustGetPublicFS() fs.FS
- func (w *Wave) MustGetServeStaticHandler(immutable bool) http.Handler
- func (w *Wave) RawConfigJSON() []byte
- func (w *Wave) RegisterFrameworkSchemaSection(name string, schema jsonschema.Entry)
- func (w *Wave) ServeStatic(immutable bool) func(http.Handler) http.Handler
- func (w *Wave) SetBrowserPublicURLResolverFunctionName(functionName string)
- func (w *Wave) SetBrowserRevalidateFunctionName(functionName string)
- func (w *Wave) SetBrowserRuntimeNamespace(namespace string)
- func (w *Wave) SetCriticalCSSStyleElementID(elementID string)
- func (w *Wave) SetFrameworkDevBuildHookCommand(command string)
- func (w *Wave) SetFrameworkPrepareGoBuildOverlay(preparer func() (*GoBuildOverlay, error))
- func (w *Wave) SetFrameworkProdBuildHookCommand(command string)
- func (w *Wave) SetFrameworkRunBuildHookRunner(runner func(context.Context, bool) error)
- func (w *Wave) SetModeToDev()
- func (w *Wave) SetNonCriticalCSSLinkElementID(elementID string)
- func (w *Wave) SetPortResolver(portResolver *PortResolver)
- func (w *Wave) SetPublicFileMapOutDir(dir string)
- func (w *Wave) SetRefreshRebuildingOverlayElementID(elementID string)
Constants ¶
const ( PrehashedDirname = "prehashed" NohashDirname = "__nohash" HashedOutputPrefix = "vorma_out_" HashedOutputPrefixNoTrailing = "vorma_out" NormalCSSBaseName = "vorma_internal_normal.css" NormalCSSGlobPattern = HashedOutputPrefix + "vorma_internal_normal_*.css" GeneratedTSFileName = "index.ts" PublicFileMapTSName = "filemap.ts" PublicFileMapJSONName = "filemap.json" FileMapJSGlobPattern = HashedOutputPrefix + "vorma_internal_public_filemap_*.js" )
Public constants
const ( DefaultBrowserRuntimeNamespace = "__wave" DefaultBrowserPublicURLResolverFunctionName = "getPublicURL" DefaultBrowserRevalidateFunctionName = "__waveRevalidate" DefaultRefreshRebuildingOverlayElementID = "wave-refreshscript-rebuilding" DefaultCriticalCSSStyleElementID = "wave-critical-css" DefaultNonCriticalCSSLinkElementID = "wave-normal-css" )
Runtime browser integration defaults.
const ( CriticalCSSElementID = DefaultCriticalCSSStyleElementID StyleSheetElementID = DefaultNonCriticalCSSLinkElementID )
Variables ¶
var RelPaths = relPaths{}
RelPaths provides fs.FS-relative paths (no leading slash, forward slashes).
Functions ¶
func GetRefreshServerPort ¶
func GetRefreshServerPort() int
func MustGetPort ¶
func MustGetPort() int
MustGetPort returns the application port. In dev mode, finds a free port if needed.
func RefreshScriptInner ¶
RefreshScriptInner returns the raw JavaScript for the refresh script. Exported so devserver can serve it via HTTP endpoint.
func RefreshScriptInnerWithParsedConfig ¶
func RefreshScriptInnerWithParsedConfig(port int, parsedConfig *ParsedConfig) string
RefreshScriptInnerWithParsedConfig returns the raw JavaScript for the refresh script, resolving runtime browser integration names from ParsedConfig.
func SetModeToDev ¶
func SetModeToDev()
func SetRefreshServerPort ¶
func SetRefreshServerPort(port int)
Types ¶
type CSSEntryFiles ¶
type Config ¶
type Config struct {
// Required -- Raw Wave configuration JSON.
// This is the single app-facing configuration input path.
WaveConfigJSON []byte
// Required -- be sure to pass in a file system that has your
// <distDir>/static directory as its ROOT.
// If you are using an embedded filesystem, you may need to use fs.Sub to get the
// correct subdirectory.
// Using go:embed is recommended for simpler deployments and improved performance.
DistStaticFS fs.FS
// Optional -- a logger instance.
// If not provided, a default logger will be created that writes to standard out.
Logger *slog.Logger
}
Config configures Wave initialization.
type CoreConfig ¶
type CoreConfig struct {
ConfigLocation string `json:"ConfigLocation,omitempty"`
DevBuildHook string `json:"DevBuildHook,omitempty"`
DevBuildHookTimeoutMilliseconds int `json:"DevBuildHookTimeoutMilliseconds,omitempty"`
ProdBuildHook string `json:"ProdBuildHook,omitempty"`
ProdBuildHookTimeoutMilliseconds int `json:"ProdBuildHookTimeoutMilliseconds,omitempty"`
MainAppEntry string `json:"MainAppEntry"`
DistDir string `json:"DistDir"`
StaticAssetDirs StaticAssetDirs `json:"StaticAssetDirs"`
CSSEntryFiles CSSEntryFiles `json:"CSSEntryFiles,omitempty"`
PublicPathPrefix string `json:"PublicPathPrefix,omitempty"`
ServerOnlyMode bool `json:"ServerOnlyMode,omitempty"`
SequentialGoBuild bool `json:"SequentialGoBuild,omitempty"`
}
type DistLayout ¶
type DistLayout struct {
Root string
}
DistLayout provides computed paths for the dist directory structure.
func (DistLayout) Binary ¶
func (d DistLayout) Binary() string
func (DistLayout) CriticalCSS ¶
func (d DistLayout) CriticalCSS() string
func (DistLayout) Internal ¶
func (d DistLayout) Internal() string
func (DistLayout) KeepFile ¶
func (d DistLayout) KeepFile() string
func (DistLayout) NormalCSSRef ¶
func (d DistLayout) NormalCSSRef() string
func (DistLayout) PrivateFileMapGob ¶
func (d DistLayout) PrivateFileMapGob() string
func (DistLayout) PublicFileMapGob ¶
func (d DistLayout) PublicFileMapGob() string
func (DistLayout) PublicFileMapRef ¶
func (d DistLayout) PublicFileMapRef() string
func (DistLayout) Static ¶
func (d DistLayout) Static() string
func (DistLayout) StaticAssets ¶
func (d DistLayout) StaticAssets() string
func (DistLayout) StaticPrivate ¶
func (d DistLayout) StaticPrivate() string
func (DistLayout) StaticPublic ¶
func (d DistLayout) StaticPublic() string
type GoBuildOverlay ¶
type HookCallbackTimeoutConfig ¶
type HookCallbackTimeoutConfig struct {
PreCallbackTimeoutMilliseconds int `json:"PreCallbackTimeoutMilliseconds,omitempty"`
ConcurrentCallbackTimeoutMilliseconds int `json:"ConcurrentCallbackTimeoutMilliseconds,omitempty"`
ConcurrentNoWaitCallbackTimeoutMilliseconds int `json:"ConcurrentNoWaitCallbackTimeoutMilliseconds,omitempty"`
PostCallbackTimeoutMilliseconds int `json:"PostCallbackTimeoutMilliseconds,omitempty"`
}
type HookCommandTimeoutConfig ¶
type HookCommandTimeoutConfig struct {
PreCommandTimeoutMilliseconds int `json:"PreCommandTimeoutMilliseconds,omitempty"`
ConcurrentCommandTimeoutMilliseconds int `json:"ConcurrentCommandTimeoutMilliseconds,omitempty"`
ConcurrentNoWaitCommandTimeoutMilliseconds int `json:"ConcurrentNoWaitCommandTimeoutMilliseconds,omitempty"`
PostCommandTimeoutMilliseconds int `json:"PostCommandTimeoutMilliseconds,omitempty"`
}
type HookContext ¶
type HookContext struct {
// ExecutionContext is canceled when the surrounding execution pipeline is
// canceled (for example, concurrent stage cancellation after build failure).
// Callback hooks can watch this context for cooperative cancellation.
ExecutionContext context.Context
// FilePath is the absolute path of the changed file.
FilePath string
// ChangedFilePaths contains all changed file paths associated with the hook
// execution context. For deduped pattern hook execution, this includes all
// files in the matched batch.
ChangedFilePaths []string
// AppStoppedForBatch is true when the app has been stopped as part of batch
// processing (e.g., a Go file changed in the same batch). When true, HTTP
// endpoints on the running app cannot be called.
AppStoppedForBatch bool
}
HookContext provides context to callbacks during file change handling.
type OnChangeHook ¶
type OnChangeHook struct {
// Cmd is a shell command to run.
Cmd string `json:"Cmd,omitempty"`
// CommandTimeoutMilliseconds overrides stage-level command timeout for this hook when > 0.
CommandTimeoutMilliseconds int `json:"CommandTimeoutMilliseconds,omitempty"`
// DisableStageCommandTimeout disables stage-level command timeout for this hook.
DisableStageCommandTimeout bool `json:"DisableStageCommandTimeout,omitempty"`
// CallbackTimeoutMilliseconds overrides stage-level callback timeout for this hook when > 0.
CallbackTimeoutMilliseconds int `json:"CallbackTimeoutMilliseconds,omitempty"`
// DisableStageCallbackTimeout disables stage-level callback timeout for this hook.
DisableStageCallbackTimeout bool `json:"DisableStageCallbackTimeout,omitempty"`
// RunCombinedDevBuildHookCommands executes the configured development build
// hooks in order (Core.DevBuildHook then framework dev build hook).
RunCombinedDevBuildHookCommands bool `json:"RunCombinedDevBuildHookCommands,omitempty"`
// Timing controls when the hook runs relative to Wave's rebuild process.
Timing Timing `json:"Timing,omitempty"`
// Exclude contains glob patterns for files to exclude from triggering this hook.
Exclude []string `json:"Exclude,omitempty"`
// Callback is a Go function to run. Framework use only (not JSON-configurable).
// If the callback returns a non-nil RefreshAction, it controls what Wave does
// after all hooks complete. Multiple RefreshActions are merged with OR semantics.
Callback func(*HookContext) (*RefreshAction, error) `json:"-"`
}
OnChangeHook defines an action to run when a watched file changes.
type ParsedConfig ¶
type ParsedConfig struct {
Core *CoreConfig `json:"Core"`
Vite *ViteConfig `json:"Vite,omitempty"`
Watch *WatchConfig `json:"Watch,omitempty"`
Dist DistLayout `json:"-"`
FrameworkWatchPatterns []WatchedFile `json:"-"`
FrameworkIgnoredPatterns []string `json:"-"`
FrameworkPublicFileMapOutDir string `json:"-"`
FrameworkSchemaExtensions map[string]jsonschema.Entry `json:"-"`
FrameworkDevBuildHook string `json:"-"`
FrameworkProdBuildHook string `json:"-"`
FrameworkRunBuildHook func(context.Context, bool) error `json:"-"`
FrameworkPrepareGoBuildOverlay func() (*GoBuildOverlay, error) `json:"-"`
FrameworkBrowserRuntimeNamespace string `json:"-"`
FrameworkBrowserPublicURLResolverFunctionName string `json:"-"`
FrameworkBrowserRevalidateFunctionName string `json:"-"`
FrameworkRefreshRebuildingOverlayElementID string `json:"-"`
FrameworkCriticalCSSStyleElementID string `json:"-"`
FrameworkNonCriticalCSSLinkElementID string `json:"-"`
}
ParsedConfig is the parsed and validated Wave configuration payload.
func ParseConfig ¶
func ParseConfig(data []byte) (*ParsedConfig, error)
ParseConfig parses Wave config JSON bytes into a ParsedConfig. This performs minimal validation to prevent nil pointer panics during parsing. Full validation of required fields should be done at build time via tooling.ValidateConfig.
func ParseConfigFile ¶
func ParseConfigFile(path string) (*ParsedConfig, error)
ParseConfigFile reads and parses a config file.
func (*ParsedConfig) BrowserPublicURLResolverFunctionName ¶
func (parsedConfig *ParsedConfig) BrowserPublicURLResolverFunctionName() string
func (*ParsedConfig) BrowserRevalidateFunctionName ¶
func (parsedConfig *ParsedConfig) BrowserRevalidateFunctionName() string
func (*ParsedConfig) BrowserRuntimeNamespace ¶
func (parsedConfig *ParsedConfig) BrowserRuntimeNamespace() string
func (*ParsedConfig) Clone ¶
func (parsedConfig *ParsedConfig) Clone() *ParsedConfig
Clone returns a defensive public snapshot of parsed config values. Internal framework-only mutable fields are intentionally omitted.
func (*ParsedConfig) CopyFrameworkRuntimeFieldsFrom ¶
func (cfg *ParsedConfig) CopyFrameworkRuntimeFieldsFrom( previousParsedConfig *ParsedConfig, )
func (*ParsedConfig) CriticalCSSEntry ¶
func (parsedConfig *ParsedConfig) CriticalCSSEntry() string
func (*ParsedConfig) CriticalCSSStyleElementID ¶
func (parsedConfig *ParsedConfig) CriticalCSSStyleElementID() string
func (*ParsedConfig) HealthcheckEndpoint ¶
func (parsedConfig *ParsedConfig) HealthcheckEndpoint() string
func (*ParsedConfig) NonCriticalCSSEntry ¶
func (parsedConfig *ParsedConfig) NonCriticalCSSEntry() string
func (*ParsedConfig) NonCriticalCSSLinkElementID ¶
func (parsedConfig *ParsedConfig) NonCriticalCSSLinkElementID() string
func (*ParsedConfig) PublicPathPrefix ¶
func (parsedConfig *ParsedConfig) PublicPathPrefix() string
func (*ParsedConfig) RefreshRebuildingOverlayElementID ¶
func (parsedConfig *ParsedConfig) RefreshRebuildingOverlayElementID() string
func (*ParsedConfig) UsingBrowser ¶
func (parsedConfig *ParsedConfig) UsingBrowser() bool
func (*ParsedConfig) UsingVite ¶
func (parsedConfig *ParsedConfig) UsingVite() bool
func (*ParsedConfig) ViteManifestPath ¶
func (parsedConfig *ParsedConfig) ViteManifestPath() string
func (*ParsedConfig) WatchRoot ¶
func (parsedConfig *ParsedConfig) WatchRoot() string
type PortResolver ¶
type PortResolver struct {
// contains filtered or unexported fields
}
func NewPortResolver ¶
func NewPortResolver() *PortResolver
func (*PortResolver) MustGetPort ¶
func (resolver *PortResolver) MustGetPort() int
MustGetPort returns a cached application port scoped to this resolver. In dev mode, finds a free port if needed.
type RefreshAction ¶
type RefreshAction struct {
// ReloadBrowser triggers a browser reload via WebSocket.
// Ignored if TriggerRestart is true.
ReloadBrowser bool
// WaitForApp polls the app's healthcheck before reloading the browser.
// Ignored if TriggerRestart is true.
WaitForApp bool
// WaitForVite waits for Vite dev server to be ready before reloading.
// Ignored if TriggerRestart is true.
WaitForVite bool
// TriggerRestart causes Wave to restart the app process.
// When true, ReloadBrowser/WaitForApp/WaitForVite are ignored.
TriggerRestart bool
// RecompileGo recompiles the Go binary before restart.
// Only relevant when TriggerRestart is true.
RecompileGo bool
}
RefreshAction specifies what Wave should do after a callback completes. Multiple RefreshActions from different hooks are merged with OR semantics.
func (RefreshAction) IsZero ¶
func (refreshAction RefreshAction) IsZero() bool
IsZero returns true if this RefreshAction specifies no action.
func (RefreshAction) Merge ¶
func (refreshAction RefreshAction) Merge(other RefreshAction) RefreshAction
Merge combines two RefreshActions with OR semantics. TriggerRestart takes precedence over browser reload.
type SortedHooks ¶
type SortedHooks struct {
Pre []OnChangeHook
Concurrent []OnChangeHook
ConcurrentNoWait []OnChangeHook
Post []OnChangeHook
}
type StaticAssetDirs ¶
type Timing ¶
type Timing string
Timing represents when an OnChangeHook runs relative to Wave's rebuild process
const ( // Blocks build, use when build depends on hook output (e.g., code generation) OnChangeStrategyPre Timing = "pre" // Blocks reload, use when hook depends on build output (e.g., something that reads compiled artifacts) OnChangeStrategyPost Timing = "post" // Runs during build, blocks reload, saves time when hook and build are independent OnChangeStrategyConcurrent Timing = "concurrent" // Fire-and-forget, blocks nothing OnChangeStrategyConcurrentNoWait Timing = "concurrent-no-wait" )
type ViteConfig ¶
type WatchConfig ¶
type WatchConfig struct {
WatchRoot string `json:"WatchRoot,omitempty"`
HealthcheckEndpoint string `json:"HealthcheckEndpoint,omitempty"`
HookCommandTimeouts HookCommandTimeoutConfig `json:"HookCommandTimeouts,omitempty"`
HookCallbackTimeouts HookCallbackTimeoutConfig `json:"HookCallbackTimeouts,omitempty"`
Include []WatchedFile `json:"Include,omitempty"`
Exclude struct {
Dirs []string `json:"Dirs,omitempty"`
Files []string `json:"Files,omitempty"`
} `json:"Exclude,omitempty"`
}
type WatchedFile ¶
type WatchedFile struct {
Pattern string `json:"Pattern"`
OnChangeHooks []OnChangeHook `json:"OnChangeHooks,omitempty"`
RecompileGoBinary bool `json:"RecompileGoBinary,omitempty"`
RestartApp bool `json:"RestartApp,omitempty"`
OnlyRunClientDefinedRevalidateFunc bool `json:"OnlyRunClientDefinedRevalidateFunc,omitempty"`
RunOnChangeOnly bool `json:"RunOnChangeOnly,omitempty"`
SkipRebuildingNotification bool `json:"SkipRebuildingNotification,omitempty"`
TreatAsNonGo bool `json:"TreatAsNonGo,omitempty"`
SortedHooks *SortedHooks `json:"-"`
}
func (*WatchedFile) Sort ¶
func (wf *WatchedFile) Sort()
type Wave ¶
type Wave struct {
// contains filtered or unexported fields
}
Wave provides runtime services for Wave applications.
func (*Wave) AddFrameworkWatchPatterns ¶
func (w *Wave) AddFrameworkWatchPatterns(patterns []WatchedFile)
AddFrameworkWatchPatterns adds watch patterns for use during development.
func (*Wave) AddIgnoredPatterns ¶
AddIgnoredPatterns adds glob patterns for files/directories to ignore during watching.
func (*Wave) FaviconRedirect ¶
func (w *Wave) FaviconRedirect() middleware.Middleware
func (*Wave) GetBuildtimeParsedConfig ¶
func (w *Wave) GetBuildtimeParsedConfig() *ParsedConfig
GetBuildtimeParsedConfig returns a defensive parsed-config snapshot for build/dev tooling. Unlike GetParsedConfig, this includes framework build callbacks and schema extensions.
func (*Wave) GetConfigFile ¶
func (*Wave) GetCriticalCSS ¶
func (*Wave) GetCriticalCSSElementID ¶
func (*Wave) GetCriticalCSSStyleElement ¶
func (*Wave) GetCriticalCSSStyleElementSha256Hash ¶
func (*Wave) GetDistDir ¶
func (*Wave) GetParsedConfig ¶
func (w *Wave) GetParsedConfig() *ParsedConfig
GetParsedConfig returns the parsed configuration for use by tooling. This should only be used by build-time tooling, not at runtime. The returned value is a defensive snapshot and omits unstable internal-only runtime callback/schema fields.
func (*Wave) GetPrivateStaticDir ¶
func (*Wave) GetPublicFileMap ¶
func (*Wave) GetPublicFileMapElements ¶
func (*Wave) GetPublicFileMapScriptSha256Hash ¶
func (*Wave) GetPublicFileMapURL ¶
func (*Wave) GetPublicPathPrefix ¶
func (*Wave) GetPublicStaticDir ¶
func (*Wave) GetPublicURL ¶
func (*Wave) GetRefreshScript ¶
func (*Wave) GetRefreshScriptSha256Hash ¶
func (*Wave) GetServeStaticHandler ¶
func (*Wave) GetStaticPrivateOutDir ¶
func (*Wave) GetStaticPublicOutDir ¶
func (*Wave) GetStyleSheetElementID ¶
func (*Wave) GetStyleSheetLinkElement ¶
func (*Wave) GetStyleSheetURL ¶
func (*Wave) GetViteManifestLocation ¶
func (*Wave) GetViteOutDir ¶
func (*Wave) IsPublicAsset ¶
func (*Wave) MustGetPort ¶
MustGetPort returns the application port.
func (*Wave) MustGetPrivateFS ¶
func (*Wave) MustGetPublicFS ¶
func (*Wave) MustGetServeStaticHandler ¶
func (*Wave) RawConfigJSON ¶
RawConfigJSON returns the raw bytes of the configuration file.
func (*Wave) RegisterFrameworkSchemaSection ¶
func (w *Wave) RegisterFrameworkSchemaSection( name string, schema jsonschema.Entry, )
RegisterFrameworkSchemaSection registers a framework-owned schema extension for wave.config.json generation at build time.
func (*Wave) ServeStatic ¶
func (*Wave) SetBrowserPublicURLResolverFunctionName ¶
func (*Wave) SetBrowserRevalidateFunctionName ¶
func (*Wave) SetBrowserRuntimeNamespace ¶
func (*Wave) SetCriticalCSSStyleElementID ¶
func (*Wave) SetFrameworkDevBuildHookCommand ¶
SetFrameworkDevBuildHookCommand sets the framework dev build hook command.
func (*Wave) SetFrameworkPrepareGoBuildOverlay ¶
func (w *Wave) SetFrameworkPrepareGoBuildOverlay( preparer func() (*GoBuildOverlay, error), )
SetFrameworkPrepareGoBuildOverlay sets the framework Go build overlay callback.
func (*Wave) SetFrameworkProdBuildHookCommand ¶
SetFrameworkProdBuildHookCommand sets the framework production build hook command.
func (*Wave) SetFrameworkRunBuildHookRunner ¶
SetFrameworkRunBuildHookRunner sets the framework build hook runner callback.
func (*Wave) SetModeToDev ¶
func (w *Wave) SetModeToDev()
SetModeToDev sets the environment to development mode.
func (*Wave) SetNonCriticalCSSLinkElementID ¶
func (*Wave) SetPortResolver ¶
func (w *Wave) SetPortResolver(portResolver *PortResolver)
func (*Wave) SetPublicFileMapOutDir ¶
SetPublicFileMapOutDir sets the directory where Wave should write the public filemap TypeScript file.