Documentation
¶
Overview ¶
Package jsbridge discovers, bundles, and runs TypeScript extensions in isolated Sobek runtimes backed by the Go-native extension API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Discover ¶
func Discover(options DiscoveryOptions) []string
Discover returns extension entry points in upstream load order with the first spelling of an absolute path winning deduplication.
Types ¶
type DiscoveryOptions ¶
type DiscoveryOptions struct {
CWD string
AgentDir string
ProjectTrusted bool
ConfiguredPaths []string
ProjectConfiguredPaths []string
ResolvedPackagePaths []string
ProjectResolvedPackagePaths []string
ExplicitPaths []string
}
DiscoveryOptions contains local paths after settings and package resolution. WP-360 supplies resolved package paths; this package does not install packages.
type LoadResult ¶
type LoadResult struct {
Registry *extensions.Registry
Paths []string
Errors []LoadError
}
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader owns the build cache and one isolated Sobek VM per loaded extension.
func NewLoader ¶
func NewLoader(options DiscoveryOptions) *Loader
func (*Loader) RegisterInto ¶
func (loader *Loader) RegisterInto(ctx context.Context, registry *extensions.Registry) LoadResult
RegisterInto registers one factory per discovered extension into the shared product registry. Each factory run (initial load and every Registry.Fresh on /reload) rebuilds changed bundles and replaces that path's VM, matching upstream reload semantics.