Sustainable Kibana Architecture: Update tooling to take into account the new folders (#202327)

## Summary

Otherwise we're going to be removing APIs of relocated modules.
This commit is contained in:
Gerard Soldevila 2024-12-02 11:04:35 +01:00 committed by GitHub
parent d8f3f4cb3c
commit 397314c952
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 39 additions and 3 deletions

View file

@ -457,7 +457,11 @@ function getTsProject(repoPath: string, overridePath?: string) {
if (!overridePath) {
project.addSourceFilesAtPaths([`${repoPath}/x-pack/plugins/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/x-pack/packages/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/x-pack/platform/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/x-pack/solutions/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/src/plugins/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/src/platform/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/src/core/packages/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/packages/**/*.ts`, '!**/*.d.ts']);
} else {
project.addSourceFilesAtPaths([`${overridePath}/**/*.ts`, '!**/*.d.ts']);

View file

@ -32,6 +32,14 @@ export const INTERNAL_PLUGIN_LOCATIONS: Array<{ name: string; value: string }> =
name: 'Kibana OSS',
value: Path.resolve(REPO_ROOT, 'src/plugins'),
},
{
name: 'Kibana Platform OSS (private)',
value: Path.resolve(REPO_ROOT, 'src/platform/plugins/private'),
},
{
name: 'Kibana Platform OSS (shared)',
value: Path.resolve(REPO_ROOT, 'src/platform/plugins/shared'),
},
{
name: 'Kibana OSS Functional Testing',
value: Path.resolve(REPO_ROOT, 'test/plugin_functional/plugins'),
@ -40,6 +48,26 @@ export const INTERNAL_PLUGIN_LOCATIONS: Array<{ name: string; value: string }> =
name: 'X-Pack',
value: Path.resolve(REPO_ROOT, 'x-pack/plugins'),
},
{
name: 'X-Pack Platform (private)',
value: Path.resolve(REPO_ROOT, 'x-pack/platform/plugins/private'),
},
{
name: 'X-Pack Platform (shared)',
value: Path.resolve(REPO_ROOT, 'x-pack/platform/plugins/shared'),
},
{
name: 'X-Pack Observability',
value: Path.resolve(REPO_ROOT, 'x-pack/solutions/observability/plugins'),
},
{
name: 'X-Pack Security',
value: Path.resolve(REPO_ROOT, 'x-pack/solutions/security/plugins'),
},
{
name: 'X-Pack Search',
value: Path.resolve(REPO_ROOT, 'x-pack/solutions/search/plugins'),
},
{
name: 'X-Pack Functional Testing',
value: Path.resolve(REPO_ROOT, 'x-pack/test/plugin_functional/plugins'),
@ -67,7 +95,7 @@ export const QUESTIONS = [
{
name: 'ui',
type: 'confirm',
message: 'Should an UI plugin be generated?',
message: 'Should a UI plugin be generated?',
default: true,
},
{

View file

@ -37,10 +37,14 @@ export async function generateNoticeFromSource({ productName, directory, log }:
const select = [
'**/*.{js,mjs,scss,css,ts,tsx}',
'!{node_modules,build,dist,data,built_assets,shared_built_assets}/**',
'!packages/*/{node_modules,build,dist}/**',
'!packages/**/{node_modules,build,dist}/**',
'!src/plugins/*/{node_modules,build,dist}/**',
'!src/core/packages/**/{node_modules,build,dist}/**',
'!src/platform/**/{node_modules,build,dist}/**',
'!x-pack/{node_modules,build,dist,data}/**',
'!x-pack/packages/*/{node_modules,build,dist}/**',
'!x-pack/packages/**/{node_modules,build,dist}/**',
'!x-pack/platform/**/{node_modules,build,dist}/**',
'!x-pack/solutions/**/{node_modules,build,dist}/**',
'!x-pack/plugins/**/{node_modules,build,dist}/**',
'!**/target/**',
];