Commit graph

3 commits

Author SHA1 Message Date
Gerard Soldevila
6a7c904f92
SKA: Relocate "platform" packages that remain on /packages (#208704)
## Summary

The `/packages` folder at the root of the Kibana repository used to
contain a lot of packages.
In the context of SKA, they have been gradually moved to various
locations:
* `src/platform/packages`
* `x-pack/platform/packages`
* `src/core/packages`

Currently, only `devOnly: true` packages are left in this folder. This
comprises libraries for CLI scripts as well as testing utilities.

With this PR, we are moving ~half of these packages under
`src/platform/packages/(private|shared)/`.
In particular, we are moving those packages that are being used from
platform and/or solutions.

Since they are `"devOnly": true`, this means they are ONLY used from
tests, cypress tests, storybook configs, ./scripts/ folders inside some
modules, or other non-prod-time logic. Nonetheless, they are effectively
referenced from platform and/or solutions code, hence I decided they
should be placed under `platform` folders.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-24 11:03:30 +00:00
Gerard Soldevila
3b42b80bce
SKA: Relocate Script v7.1 (#206233)
## Summary

* Fix an issue with the `--list` command failing the 1st run.
* Allow passing in no filters, and relocate "incorrect" modules (aka
modules that are not in the correct folder) in that case.
2025-01-10 10:47:47 +00:00
Gerard Soldevila
ca42d93bd4
SKA: Relocate Script v7 (#205732)
## Summary

Addresses the following:
* Simplify `isInTargetFolder`, and leverage existing
`calculateModuleTargetFolder`. It solves a bug with "current" location
being incorrectly determined, as we were using the `group` and
`visibility` inferred from path, rather than those in the manifest.
* Move the `pre-relocation` hook to BEFORE calculating the list of
modules. This allows to update a manifest to re-relocate a module (e.g.
when changing its group or visibility).
* Fix a bug that caused modules under `src/core/packages` to not be
considered in the "correct location".
* Fix a bug in the replace logic specific to `pipeline.ts`. We were
updating paths that we shouldn't have updated.
2025-01-07 19:27:36 +00:00