## Summary Good place for one off utils to use and reduce/remove the circular deps we have between security_solutions, lists, and anywhere else we have them for different utils. Phase 1: Adds kbn package of `kbn-securitysolution-utils` through lift and shift Phase 2: Deprecated the functions Phase 3: Removes the functions in favor of using the `kbn-securitysolution-utils` Phase 4+: Adds more and removes dependencies/copies across plugins within the security solution. Maybe we break things out by domain later as this grows in size. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
85 lines
1.9 KiB
Text
85 lines
1.9 KiB
Text
[[monorepo-packages]]
|
|
== {kib} Monorepo Packages
|
|
|
|
Currently {kib} works as a monorepo composed by a core, plugins and packages.
|
|
The latest are located in a folder called `packages` and are pieces of software that
|
|
composes a set of features that can be isolated and reused across the entire repository.
|
|
They are also supposed to be able to imported just like any other `node_module`.
|
|
|
|
Previously we relied solely on `@kbn/pm` to manage the development tools of those packages, but we are
|
|
now in the middle of migrating those responsibilities into Bazel. Every package already migrated
|
|
will contain in its root folder a `BUILD.bazel` file and other `build` and `watching` strategies should be used.
|
|
|
|
Remember that any time you need to make sure the monorepo is ready to be used just run:
|
|
|
|
[source,bash]
|
|
----
|
|
yarn kbn bootstrap
|
|
----
|
|
|
|
[discrete]
|
|
=== Building Non Bazel Packages
|
|
|
|
Non Bazel packages can be built independently with
|
|
|
|
[source,bash]
|
|
----
|
|
yarn kbn run build -i PACKAGE_NAME
|
|
----
|
|
|
|
[discrete]
|
|
=== Watching Non Bazel Packages
|
|
|
|
Non Bazel packages can be watched independently with
|
|
|
|
[source,bash]
|
|
----
|
|
yarn kbn watch -i PACKAGE_NAME
|
|
----
|
|
|
|
[discrete]
|
|
=== Building Bazel Packages
|
|
|
|
Bazel packages are built as a whole for now. You can use:
|
|
|
|
[source,bash]
|
|
----
|
|
yarn kbn build-bazel
|
|
----
|
|
|
|
[discrete]
|
|
=== Watching Bazel Packages
|
|
|
|
Bazel packages are watched as a whole for now. You can use:
|
|
|
|
[source,bash]
|
|
----
|
|
yarn kbn watch-bazel
|
|
----
|
|
|
|
|
|
[discrete]
|
|
=== List of Already Migrated Packages to Bazel
|
|
|
|
- @elastic/datemath
|
|
- @elastic/eslint-config-kibana
|
|
- @elastic/safer-lodash-set
|
|
- @kbn/analytics
|
|
- @kbn/apm-config-loader
|
|
- @kbn/apm-utils
|
|
- @kbn/babel-code-parser
|
|
- @kbn/babel-preset
|
|
- @kbn/config-schema
|
|
- @kbn/dev-utils
|
|
- @kbn/eslint-import-resolver-kibana
|
|
- @kbn/eslint-plugin-eslint
|
|
- @kbn/expect
|
|
- @kbn/legacy-logging
|
|
- @kbn/logging
|
|
- @kbn/securitysolution-utils
|
|
- @kbn/securitysolution-io-ts-utils
|
|
- @kbn/std
|
|
- @kbn/tinymath
|
|
- @kbn/utility-types
|
|
- @kbn/utils
|
|
|