Documentation
¶
Overview ¶
Package waveframework provides framework/tooling-facing helpers that operate on Wave runtime instances without expanding the end-user `wave` API surface.
Index ¶
- Constants
- func BrowserPublicURLResolverFunctionName(parsedConfig waveconfig.ParsedConfig) string
- func BrowserRevalidateFunctionName(parsedConfig waveconfig.ParsedConfig) string
- func BrowserRuntimeNamespace(parsedConfig waveconfig.ParsedConfig) string
- func ConfigureReloadedConfigForTooling(source waveconfig.ParsedConfig, target waveconfig.ParsedConfig, ...) error
- func CopyRuntimeStateForToolingReload(target waveconfig.ParsedConfig, source waveconfig.ParsedConfig)
- func CriticalCSSStyleElementID(parsedConfig waveconfig.ParsedConfig) string
- func NonCriticalCSSLinkElementID(parsedConfig waveconfig.ParsedConfig) string
- func RefreshRebuildingOverlayElementID(parsedConfig waveconfig.ParsedConfig) string
- type ConfigState
- type GoBuildOverlay
Constants ¶
const FrameworkRuntimeReloadAttemptIDHeaderName = "X-Wave-Framework-Reload-Attempt-Id"
FrameworkRuntimeReloadAttemptIDHeaderName is the request header carrying framework runtime reload attempt identifier.
const FrameworkRuntimeReloadExpectedBuildIDHeaderName = "X-Wave-Framework-Reload-Expected-Build-Id"
FrameworkRuntimeReloadExpectedBuildIDHeaderName is the request header carrying expected framework runtime build identifier.
const FrameworkRuntimeReloadTriggerHeaderName = "X-Wave-Framework-Reload-Trigger"
FrameworkRuntimeReloadTriggerHeaderName is the request header carrying framework runtime reload trigger identifier.
const ViteFileMapChangedNotifyEndpointPath = "/__wave_notify_filemap_changed"
ViteFileMapChangedNotifyEndpointPath is the Vite devserver endpoint path used by Wave to notify that the public filemap has changed.
Variables ¶
This section is empty.
Functions ¶
func BrowserPublicURLResolverFunctionName ¶
func BrowserPublicURLResolverFunctionName( parsedConfig waveconfig.ParsedConfig, ) string
BrowserPublicURLResolverFunctionName returns the browser helper function name used for resolving public asset URLs.
func BrowserRevalidateFunctionName ¶
func BrowserRevalidateFunctionName( parsedConfig waveconfig.ParsedConfig, ) string
BrowserRevalidateFunctionName returns the browser helper function name used for route revalidation.
func BrowserRuntimeNamespace ¶
func BrowserRuntimeNamespace(parsedConfig waveconfig.ParsedConfig) string
BrowserRuntimeNamespace returns the browser global namespace used by runtime integration scripts.
func ConfigureReloadedConfigForTooling ¶
func ConfigureReloadedConfigForTooling( source waveconfig.ParsedConfig, target waveconfig.ParsedConfig, rawConfigJSON []byte, ) error
ConfigureReloadedConfigForTooling applies framework-specific config reload wiring for one parsed config reload transition when configured by the framework.
func CopyRuntimeStateForToolingReload ¶
func CopyRuntimeStateForToolingReload( target waveconfig.ParsedConfig, source waveconfig.ParsedConfig, )
CopyRuntimeStateForToolingReload transfers framework state from source to target when config is reparsed from disk.
func CriticalCSSStyleElementID ¶
func CriticalCSSStyleElementID(parsedConfig waveconfig.ParsedConfig) string
CriticalCSSStyleElementID returns the DOM element id used for injected critical CSS.
func NonCriticalCSSLinkElementID ¶
func NonCriticalCSSLinkElementID(parsedConfig waveconfig.ParsedConfig) string
NonCriticalCSSLinkElementID returns the DOM element id used for injected non-critical stylesheet links.
func RefreshRebuildingOverlayElementID ¶
func RefreshRebuildingOverlayElementID( parsedConfig waveconfig.ParsedConfig, ) string
RefreshRebuildingOverlayElementID returns the DOM element id used for the rebuild overlay during dev refresh cycles.
Types ¶
type ConfigState ¶
type ConfigState struct {
WatchPatterns []wavewatch.WatchedFile
IgnoredPatterns []string
SchemaExtensions map[string]jsonschema.Entry
DevBuildHook string
ProdBuildHook string
RunBuildHook func(context.Context, bool) error
PrepareGoBuildOverlay func() (*GoBuildOverlay, error)
ConfigureForToolingReload func(waveconfig.ParsedConfig, []byte) error
PublicFileMapReloadEndpointPath string
BrowserRuntimeNamespace string
BrowserPublicURLResolverFunctionName string
BrowserRevalidateFunctionName string
RefreshRebuildingOverlayElementID string
CriticalCSSStyleElementID string
NonCriticalCSSLinkElementID string
}
ConfigState stores framework-owned runtime/buildtime mutable state for one parsed Wave config.
func StateForConfig ¶
func StateForConfig(parsedConfig waveconfig.ParsedConfig) *ConfigState
StateForConfig returns mutable framework state for one parsed config.
type GoBuildOverlay ¶
GoBuildOverlay describes a temporary overlay used for Go build execution.