kibana/packages/kbn-plugin-discovery
Tiago Costa e41569b4a6
fix(NA): wrongly spread stripInternal and rootDir configs across packages (#144463)
* chore(NA): remove overrides for rootDir on packages

* chore(NA): replace './target_types' with 'target_types' on packages

* chore(NA): removes stripInternal false configs

* chore(NA): remove unused strip internals
2022-11-03 01:04:55 +00:00
..
src [ts] stop building @types packages in bootstrap 2022-10-28 14:03:55 -05:00
BUILD.bazel [auto] migrate existing plugin/package configs 2022-10-28 14:06:46 -05:00
index.js [ts] stop building @types packages in bootstrap 2022-10-28 14:03:55 -05:00
kibana.jsonc add kibana.jsonc files to existing packages (#138965) 2022-09-08 13:31:57 -07:00
package.json [auto] migrate existing plugin/package configs 2022-10-28 14:06:46 -05:00
README.mdx [kbn/pm] rewrite to avoid needing a build process (#136207) 2022-07-18 08:46:13 -07:00
tsconfig.json fix(NA): wrongly spread stripInternal and rootDir configs across packages (#144463) 2022-11-03 01:04:55 +00:00

---
id: kibDevDocsOpsPluginDiscovery
slug: /kibana-dev-docs/ops/plugin-discovery
title: "@kbn/plugin-discovery"
description: A package with logic used to find plugins in the repository
date: 2022-06-06
tags: ['kibana', 'dev', 'contributor', 'operations', 'plugin', 'discovery']
---

At the moment plugins can live in a couple of different places and in the future will be able 
to live anywhere in the repository. This is a package that holds custom logic useful to find and 
parse those.

## API

### parseKibanaPlatformPlugin

It returns a platform plugin for a given manifest path

### getPluginSearchPaths

It returns the paths where plugins will be searched for

### simpleKibanaPlatformPluginDiscovery

It finds and returns the new platform plugins 

## NOTE:

This code is needed in order to properly bootstrap the repository. As such, it can't have any NPM dependencies or require being built. This code is loaded directly into the node.js process that boostraps the repository from source while also being built into a package and exposed to the rest of the package system. Please consider this when making any changes to the source.

The code is still type-checked as JS with JSDoc comments, and a single .ts file which provides interfaces to the JS validation and are publically available to package consumers.