mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
* [NP] Expose global config to the plugins (#51478) * [NP] Expose global config to the plugins * globalConfig in Plugin context: expose read-only methods only * SharedGlobalConfig rework + Moving pkg, fromRoot & path utils from legacy to NP * Updated API docs * Fix test references to the moved utils * Replace zip with combineLatest * Change tests to describe/it + remove "(deprecated)" from the test description * Moving path files to a folder + exposing the config path in the contract * deepFreeze the globalConfig in the pluginContext * Fix types in tests with new path.config * Move fromRoot and package_json utils to core/server/utils * Rename globalConfig to legacy.globalConfig$ * path.config renamed to path.configDir (not renaming path.data because it might be a breaking change) * Change configDir in mocker as well * Fix test after config renamed to configDir * Fix API docs conflicts * Rename the path properties when exposing them * path.configDir removed from the path config-schema * Remove path.configDir. It is already in env.configs * Add Migration documentation and examples * Fix 'kibana/server' imports in the MIGRATION docs * Disable eslint complain for the legacy config/schema.js import
1.4 KiB
1.4 KiB
Home > kibana-plugin-server > PluginInitializerContext
PluginInitializerContext interface
Context that's available to plugins during initialization stage.
Signature:
export interface PluginInitializerContext<ConfigSchema = unknown>
Properties
Property | Type | Description |
---|---|---|
config | { legacy: { globalConfig$: Observable<SharedGlobalConfig>; }; create: <T = ConfigSchema>() => Observable<T>; createIfExists: <T = ConfigSchema>() => Observable<T | undefined>; } |
|
env | { mode: EnvironmentMode; packageInfo: Readonly<PackageInfo>; } |
|
logger | LoggerFactory |
|
opaqueId | PluginOpaqueId |