From 6408e10df98c9ed0860f1f09e79fd741566e8f24 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Thu, 5 Dec 2024 16:37:50 +0100 Subject: [PATCH] Relocating module `@kbn/rule-data-utils` --- .buildkite/scripts/pipelines/pull_request/pipeline.ts | 2 +- .github/CODEOWNERS | 2 +- package.json | 2 +- .../platform/packages/shared}/kbn-rule-data-utils/index.ts | 0 .../packages/shared}/kbn-rule-data-utils/jest.config.js | 4 ++-- .../packages/shared}/kbn-rule-data-utils/kibana.jsonc | 0 .../packages/shared}/kbn-rule-data-utils/package.json | 0 .../shared}/kbn-rule-data-utils/src/alerts_as_data_cases.ts | 0 .../kbn-rule-data-utils/src/alerts_as_data_rbac.test.ts | 0 .../shared}/kbn-rule-data-utils/src/alerts_as_data_rbac.ts | 0 .../kbn-rule-data-utils/src/alerts_as_data_severity.ts | 0 .../shared}/kbn-rule-data-utils/src/alerts_as_data_status.ts | 0 .../shared}/kbn-rule-data-utils/src/default_alerts_as_data.ts | 0 .../shared}/kbn-rule-data-utils/src/legacy_alerts_as_data.ts | 0 .../kbn-rule-data-utils/src/routes/stack_rule_paths.ts | 0 .../shared}/kbn-rule-data-utils/src/rule_types/index.ts | 0 .../shared}/kbn-rule-data-utils/src/rule_types/o11y_rules.ts | 0 .../shared}/kbn-rule-data-utils/src/rule_types/stack_rules.ts | 0 .../shared}/kbn-rule-data-utils/src/technical_field_names.ts | 0 .../packages/shared}/kbn-rule-data-utils/tsconfig.json | 2 +- tsconfig.base.json | 4 ++-- yarn.lock | 2 +- 22 files changed, 9 insertions(+), 9 deletions(-) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/jest.config.js (83%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/kibana.jsonc (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/package.json (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/alerts_as_data_cases.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/alerts_as_data_rbac.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/alerts_as_data_rbac.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/alerts_as_data_severity.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/alerts_as_data_status.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/default_alerts_as_data.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/legacy_alerts_as_data.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/routes/stack_rule_paths.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/rule_types/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/rule_types/o11y_rules.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/rule_types/stack_rules.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/src/technical_field_names.ts (100%) rename {packages => src/platform/packages/shared}/kbn-rule-data-utils/tsconfig.json (82%) diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index ad71f70258a23..8308c64ca742c 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -291,7 +291,7 @@ const getPipeline = (filename: string, removeSteps = true) => { /^packages\/kbn-grouping/, /^packages\/kbn-resizable-layout/, /^packages\/kbn-rison/, - /^packages\/kbn-rule-data-utils/, + /^src\/platform\/packages\/shared\/kbn-rule-data-utils/, /^packages\/kbn-safer-lodash-set/, /^packages\/kbn-search-types/, /^packages\/kbn-securitysolution-.*/, diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1bf4354a52401..3330c413b9471 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -464,7 +464,6 @@ packages/kbn-rison @elastic/kibana-operations packages/kbn-router-to-openapispec @elastic/kibana-core packages/kbn-router-utils @elastic/obs-ux-logs-team packages/kbn-rrule @elastic/response-ops -packages/kbn-rule-data-utils @elastic/security-detections-response @elastic/response-ops @elastic/obs-ux-management-team packages/kbn-safer-lodash-set @elastic/kibana-security packages/kbn-saved-objects-settings @elastic/appex-sharedux packages/kbn-saved-search-component @elastic/obs-ux-logs-team @@ -623,6 +622,7 @@ packages/shared-ux/storybook/mock @elastic/appex-sharedux packages/shared-ux/table_persist @elastic/appex-sharedux src/core @elastic/kibana-core src/platform/packages/shared/kbn-doc-links @elastic/docs +src/platform/packages/shared/kbn-rule-data-utils @elastic/security-detections-response @elastic/response-ops @elastic/obs-ux-management-team src/plugins/advanced_settings @elastic/appex-sharedux @elastic/kibana-management src/plugins/ai_assistant_management/selection @elastic/obs-ai-assistant src/plugins/bfetch @elastic/appex-sharedux diff --git a/package.json b/package.json index 05f10169d5e81..f7960d38c6c04 100644 --- a/package.json +++ b/package.json @@ -769,7 +769,7 @@ "@kbn/router-utils": "link:packages/kbn-router-utils", "@kbn/routing-example-plugin": "link:examples/routing_example", "@kbn/rrule": "link:packages/kbn-rrule", - "@kbn/rule-data-utils": "link:packages/kbn-rule-data-utils", + "@kbn/rule-data-utils": "link:src/platform/packages/shared/kbn-rule-data-utils", "@kbn/rule-registry-plugin": "link:x-pack/plugins/rule_registry", "@kbn/runtime-fields-plugin": "link:x-pack/plugins/runtime_fields", "@kbn/safer-lodash-set": "link:packages/kbn-safer-lodash-set", diff --git a/packages/kbn-rule-data-utils/index.ts b/src/platform/packages/shared/kbn-rule-data-utils/index.ts similarity index 100% rename from packages/kbn-rule-data-utils/index.ts rename to src/platform/packages/shared/kbn-rule-data-utils/index.ts diff --git a/packages/kbn-rule-data-utils/jest.config.js b/src/platform/packages/shared/kbn-rule-data-utils/jest.config.js similarity index 83% rename from packages/kbn-rule-data-utils/jest.config.js rename to src/platform/packages/shared/kbn-rule-data-utils/jest.config.js index fd0feabd9f0ad..c8cb6a4bbec63 100644 --- a/packages/kbn-rule-data-utils/jest.config.js +++ b/src/platform/packages/shared/kbn-rule-data-utils/jest.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-rule-data-utils'], + rootDir: '../../../../..', + roots: ['/src/platform/packages/shared/kbn-rule-data-utils'], }; diff --git a/packages/kbn-rule-data-utils/kibana.jsonc b/src/platform/packages/shared/kbn-rule-data-utils/kibana.jsonc similarity index 100% rename from packages/kbn-rule-data-utils/kibana.jsonc rename to src/platform/packages/shared/kbn-rule-data-utils/kibana.jsonc diff --git a/packages/kbn-rule-data-utils/package.json b/src/platform/packages/shared/kbn-rule-data-utils/package.json similarity index 100% rename from packages/kbn-rule-data-utils/package.json rename to src/platform/packages/shared/kbn-rule-data-utils/package.json diff --git a/packages/kbn-rule-data-utils/src/alerts_as_data_cases.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/alerts_as_data_cases.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/alerts_as_data_cases.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/alerts_as_data_cases.ts diff --git a/packages/kbn-rule-data-utils/src/alerts_as_data_rbac.test.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/alerts_as_data_rbac.test.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/alerts_as_data_rbac.test.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/alerts_as_data_rbac.test.ts diff --git a/packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/alerts_as_data_rbac.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/alerts_as_data_rbac.ts diff --git a/packages/kbn-rule-data-utils/src/alerts_as_data_severity.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/alerts_as_data_severity.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/alerts_as_data_severity.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/alerts_as_data_severity.ts diff --git a/packages/kbn-rule-data-utils/src/alerts_as_data_status.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/alerts_as_data_status.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/alerts_as_data_status.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/alerts_as_data_status.ts diff --git a/packages/kbn-rule-data-utils/src/default_alerts_as_data.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/default_alerts_as_data.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/default_alerts_as_data.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/default_alerts_as_data.ts diff --git a/packages/kbn-rule-data-utils/src/legacy_alerts_as_data.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/legacy_alerts_as_data.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/legacy_alerts_as_data.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/legacy_alerts_as_data.ts diff --git a/packages/kbn-rule-data-utils/src/routes/stack_rule_paths.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/routes/stack_rule_paths.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/routes/stack_rule_paths.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/routes/stack_rule_paths.ts diff --git a/packages/kbn-rule-data-utils/src/rule_types/index.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/rule_types/index.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/rule_types/index.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/rule_types/index.ts diff --git a/packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/rule_types/o11y_rules.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/rule_types/o11y_rules.ts diff --git a/packages/kbn-rule-data-utils/src/rule_types/stack_rules.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/rule_types/stack_rules.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/rule_types/stack_rules.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/rule_types/stack_rules.ts diff --git a/packages/kbn-rule-data-utils/src/technical_field_names.ts b/src/platform/packages/shared/kbn-rule-data-utils/src/technical_field_names.ts similarity index 100% rename from packages/kbn-rule-data-utils/src/technical_field_names.ts rename to src/platform/packages/shared/kbn-rule-data-utils/src/technical_field_names.ts diff --git a/packages/kbn-rule-data-utils/tsconfig.json b/src/platform/packages/shared/kbn-rule-data-utils/tsconfig.json similarity index 82% rename from packages/kbn-rule-data-utils/tsconfig.json rename to src/platform/packages/shared/kbn-rule-data-utils/tsconfig.json index 77352c4f44209..536c1110ab3e3 100644 --- a/packages/kbn-rule-data-utils/tsconfig.json +++ b/src/platform/packages/shared/kbn-rule-data-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/tsconfig.base.json b/tsconfig.base.json index 85eaafc729e61..808be8de04e50 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1504,8 +1504,8 @@ "@kbn/routing-example-plugin/*": ["examples/routing_example/*"], "@kbn/rrule": ["packages/kbn-rrule"], "@kbn/rrule/*": ["packages/kbn-rrule/*"], - "@kbn/rule-data-utils": ["packages/kbn-rule-data-utils"], - "@kbn/rule-data-utils/*": ["packages/kbn-rule-data-utils/*"], + "@kbn/rule-data-utils": ["src/platform/packages/shared/kbn-rule-data-utils"], + "@kbn/rule-data-utils/*": ["src/platform/packages/shared/kbn-rule-data-utils/*"], "@kbn/rule-registry-plugin": ["x-pack/plugins/rule_registry"], "@kbn/rule-registry-plugin/*": ["x-pack/plugins/rule_registry/*"], "@kbn/runtime-fields-plugin": ["x-pack/plugins/runtime_fields"], diff --git a/yarn.lock b/yarn.lock index 31b75569d8c6a..ab073210555e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6824,7 +6824,7 @@ version "0.0.0" uid "" -"@kbn/rule-data-utils@link:packages/kbn-rule-data-utils": +"@kbn/rule-data-utils@link:src/platform/packages/shared/kbn-rule-data-utils": version "0.0.0" uid ""