diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index 3c404083174b1..5de09ff5d811e 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 4e1cb694a66cf..9a539fcd9dc31 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -457,7 +457,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 @@ -626,6 +625,7 @@ src/platform/packages/shared/kbn-esql-ast @elastic/kibana-esql src/platform/packages/shared/kbn-esql-utils @elastic/kibana-esql src/platform/packages/shared/kbn-esql-validation-autocomplete @elastic/kibana-esql 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/plugins/shared/esql @elastic/kibana-esql src/platform/plugins/shared/esql_datagrid @elastic/kibana-esql src/plugins/advanced_settings @elastic/appex-sharedux @elastic/kibana-management diff --git a/package.json b/package.json index 47f098d33f40d..c5396556a5de6 100644 --- a/package.json +++ b/package.json @@ -770,7 +770,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 bc77936f8d3b9..53959b65c7dc5 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1506,8 +1506,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 860efbbc2c5c2..b6d43df6d5037 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6828,7 +6828,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 ""