Docs/API Reference/Plugins

Server entry point

@veap/plugins/server is the server-side aggregate entry point. It re-exports the registry, router, navigation and server UI, and adds compatibility aliases for the older…

2 min read

@veap/plugins/server is the server-side aggregate entry point. It re-exports the registry, router, navigation and server UI, and adds compatibility aliases for the older module-oriented API. Use it in server components, route handlers and server actions.

What it re-exports#

  • The root barrel (@veap/plugins) — common contracts and types.
  • ./actions — the server actions (see Actions and models).
  • ./registry — PluginRegistry, its contracts, tokens and facade helpers (see Registry).
  • ./router — the virtual router (see Virtual router).
  • ./navigation — navigation and breadcrumbs (see Navigation).
  • Server UI: ExtensionPoint / PluginExtensionPoint, WidgetArea / PluginWidgetArea, and WidgetComposer (see Widgets and extension points).
  • PluginManifestSchema re-exported as ModuleManifestSchema.

Compatibility aliases#

For code written against the earlier "module" naming, server.ts exports aliases. Prefer the plugin-named originals in new code.

AliasOriginal
ModuleManifestSchemaPluginManifestSchema
getBreadcrumbsgetPluginBreadcrumbs
getPublicNavigationgetPluginNavigation
getVeapModuleNavigationGroupedgetVeapPluginNavigationGrouped
applyFiltersapplyPluginFilters
getModuleConfiggetPluginConfig
getModule / getModuleStatusgetPluginStatus
getModulesgetPluginsStatus
hasExtensionhasPluginExtension
hasHookshasPluginHooks
toggleModuleStatetogglePluginState
updateModuleConfigupdatePluginConfig

The registry class itself is also aliased: PluginsServiceProvider is exported as PluginServiceProvider and RouterServiceProvider.

Server/client split#

Keep this entry point on the server. The client counterpart is @veap/plugins/client (see Client hooks and components); the interactive widgets and hooks there must not be imported into server code, and the server components here must not be imported into client components.

veap
Preparing0%