waveframework

package
v0.85.0-pre.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

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

View Source
const FrameworkRuntimeReloadAttemptIDHeaderName = "X-Wave-Framework-Reload-Attempt-Id"

FrameworkRuntimeReloadAttemptIDHeaderName is the request header carrying framework runtime reload attempt identifier.

View Source
const FrameworkRuntimeReloadExpectedBuildIDHeaderName = "X-Wave-Framework-Reload-Expected-Build-Id"

FrameworkRuntimeReloadExpectedBuildIDHeaderName is the request header carrying expected framework runtime build identifier.

View Source
const FrameworkRuntimeReloadTriggerHeaderName = "X-Wave-Framework-Reload-Trigger"

FrameworkRuntimeReloadTriggerHeaderName is the request header carrying framework runtime reload trigger identifier.

View Source
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

type GoBuildOverlay struct {
	OverlayConfigPath string
	Cleanup           func() error
}

GoBuildOverlay describes a temporary overlay used for Go build execution.

Jump to

Keyboard shortcuts

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