From 84255346902b9ba84f566fc97a73f44c9fb963a4 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Mon, 16 Dec 2024 21:57: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 16c4241de75de..7e0c914b5a35f 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -294,7 +294,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 40f38ba5b713f..501d72591dff7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -438,7 +438,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 @@ -615,6 +614,7 @@ src/platform/packages/shared/kbn-management/settings/field_definition @elastic/k src/platform/packages/shared/kbn-management/settings/types @elastic/kibana-management src/platform/packages/shared/kbn-management/settings/utilities @elastic/kibana-management src/platform/packages/shared/kbn-osquery-io-ts-types @elastic/security-asset-management +src/platform/packages/shared/kbn-rule-data-utils @elastic/security-detections-response @elastic/response-ops @elastic/obs-ux-management-team src/platform/packages/shared/kbn-securitysolution-ecs @elastic/security-threat-hunting-explore src/platform/packages/shared/kbn-server-route-repository @elastic/obs-knowledge-team src/platform/packages/shared/kbn-server-route-repository-client @elastic/obs-knowledge-team diff --git a/package.json b/package.json index c57c367729750..fe42431602f2f 100644 --- a/package.json +++ b/package.json @@ -773,7 +773,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/platform/plugins/private/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 b11c8632ff3b8..4108bf6c745e9 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1516,8 +1516,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/platform/plugins/private/runtime_fields"], diff --git a/yarn.lock b/yarn.lock index aceaaf9498384..46e4960012ae2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6849,7 +6849,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 ""