From 06d98dc49061d890a287b634890e82f0dd0d28f3 Mon Sep 17 00:00:00 2001 From: Kfir Peled <61654899+kfirpeled@users.noreply.github.com> Date: Tue, 15 Oct 2024 12:51:18 +0100 Subject: [PATCH] [8.x] [Cloud Security] Refactoring cloud-security-posture packages' folder structure (#196008) (#196267) # Backport This will backport the following commits from `main` to `8.x`: - [[Cloud Security] Refactoring cloud-security-posture packages' folder structure (#196008)](https://github.com/elastic/kibana/pull/196008) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) --- package.json | 4 ++-- tsconfig.base.json | 8 ++++---- .../kbn-cloud-security-posture/README.md | 16 +++++++++++++++- .../common}/README.md | 0 .../common}/constants.ts | 0 .../common}/index.ts | 0 .../common}/jest.config.js | 4 ++-- .../common}/kibana.jsonc | 0 .../common}/package.json | 0 .../common}/schema/graph/index.ts | 0 .../common}/schema/graph/latest.ts | 0 .../common}/schema/graph/v1.ts | 0 .../common}/schema/rules/index.ts | 0 .../common}/schema/rules/latest.ts | 0 .../common}/schema/rules/v1.ts | 0 .../common}/schema/rules/v2.ts | 0 .../common}/schema/rules/v3.ts | 0 .../common}/schema/rules/v4.ts | 0 .../common}/schema/rules/v5.ts | 0 .../vulnerabilities/csp_vulnerability_finding.ts | 0 .../common}/schema/vulnerabilities/latest.ts | 0 .../common}/tsconfig.json | 2 +- .../common}/types/benchmark.ts | 0 .../common}/types/findings.ts | 0 .../common}/types/graph/index.ts | 0 .../common}/types/graph/latest.ts | 0 .../common}/types/graph/v1.ts | 0 .../common}/types/status.ts | 0 .../common}/types/vulnerabilities.ts | 0 .../common}/utils/get_abbreviated_number.test.ts | 0 .../common}/utils/get_abbreviated_number.ts | 0 .../common}/utils/helpers.test.ts | 0 .../common}/utils/helpers.ts | 0 .../common}/utils/ui_metrics.ts | 0 .../kbn-cloud-security-posture/graph/README.md | 4 ++-- .../{ => graph}/storybook/config/constants.ts | 0 .../{ => graph}/storybook/config/index.ts | 0 .../{ => graph}/storybook/config/main.ts | 0 .../{ => graph}/storybook/config/manager.ts | 0 .../{ => graph}/storybook/config/preview.ts | 0 .../{ => graph}/storybook/config/styles.css | 0 .../graph/tsconfig.json | 3 ++- .../{ => public}/index.ts | 6 +++--- .../{ => public}/jest.config.js | 4 ++-- .../{ => public}/kibana.jsonc | 0 .../{ => public}/package.json | 0 .../src/components/csp_evaluation_badge.tsx | 2 +- .../src/components/vulnerability_badges.tsx | 0 .../src}/constants/component_constants.ts | 0 .../{ => public/src}/constants/navigation.ts | 0 .../src/hooks/use_csp_setup_status_api.ts | 0 .../{ => public}/src/hooks/use_data_view.ts | 0 .../hooks/use_get_benchmark_rules_state_api.ts | 0 .../src/hooks/use_misconfiguration_findings.ts | 2 +- .../src/hooks/use_misconfiguration_preview.ts | 2 +- .../src/hooks/use_navigate_findings.test.ts | 0 .../src/hooks/use_navigate_findings.ts | 2 +- .../src/hooks/use_vulnerabilities_findings.ts | 2 +- .../src/hooks/use_vulnerabilities_preview.ts | 2 +- .../{type.ts => public/src/types.ts} | 0 .../src/utils/get_vulnerabilitiy_colors.test.ts | 0 .../src/utils/get_vulnerability_colors.ts | 0 .../src/utils/get_vulnerability_text.test.ts | 0 .../src/utils/get_vulnerability_text.ts | 0 .../{ => public}/src/utils/hooks_utils.test.ts | 0 .../{ => public}/src/utils/hooks_utils.ts | 2 +- .../{ => public}/src/utils/query_utils.ts | 0 .../{ => public}/src/utils/show_error_toast.ts | 0 .../src/utils/vulnerability_helpers.test.ts | 0 .../src/utils/vulnerability_helpers.ts | 0 .../{ => public}/tsconfig.json | 3 +-- .../public/common/navigation/constants.ts | 2 +- yarn.lock | 4 ++-- 73 files changed, 44 insertions(+), 30 deletions(-) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/README.md (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/constants.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/index.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/jest.config.js (77%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/kibana.jsonc (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/package.json (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/graph/index.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/graph/latest.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/graph/v1.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/rules/index.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/rules/latest.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/rules/v1.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/rules/v2.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/rules/v3.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/rules/v4.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/rules/v5.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/vulnerabilities/csp_vulnerability_finding.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/schema/vulnerabilities/latest.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/tsconfig.json (88%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/types/benchmark.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/types/findings.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/types/graph/index.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/types/graph/latest.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/types/graph/v1.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/types/status.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/types/vulnerabilities.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/utils/get_abbreviated_number.test.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/utils/get_abbreviated_number.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/utils/helpers.test.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/utils/helpers.ts (100%) rename x-pack/packages/{kbn-cloud-security-posture-common => kbn-cloud-security-posture/common}/utils/ui_metrics.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => graph}/storybook/config/constants.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => graph}/storybook/config/index.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => graph}/storybook/config/main.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => graph}/storybook/config/manager.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => graph}/storybook/config/preview.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => graph}/storybook/config/styles.css (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/index.ts (87%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/jest.config.js (74%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/kibana.jsonc (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/package.json (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/components/csp_evaluation_badge.tsx (95%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/components/vulnerability_badges.tsx (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public/src}/constants/component_constants.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public/src}/constants/navigation.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/hooks/use_csp_setup_status_api.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/hooks/use_data_view.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/hooks/use_get_benchmark_rules_state_api.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/hooks/use_misconfiguration_findings.ts (99%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/hooks/use_misconfiguration_preview.ts (98%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/hooks/use_navigate_findings.test.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/hooks/use_navigate_findings.ts (97%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/hooks/use_vulnerabilities_findings.ts (99%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/hooks/use_vulnerabilities_preview.ts (99%) rename x-pack/packages/kbn-cloud-security-posture/{type.ts => public/src/types.ts} (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/utils/get_vulnerabilitiy_colors.test.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/utils/get_vulnerability_colors.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/utils/get_vulnerability_text.test.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/utils/get_vulnerability_text.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/utils/hooks_utils.test.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/utils/hooks_utils.ts (99%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/utils/query_utils.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/utils/show_error_toast.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/utils/vulnerability_helpers.test.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/src/utils/vulnerability_helpers.ts (100%) rename x-pack/packages/kbn-cloud-security-posture/{ => public}/tsconfig.json (92%) diff --git a/package.json b/package.json index 131fc9f5bcebb..e9f675a0a46d3 100644 --- a/package.json +++ b/package.json @@ -218,8 +218,8 @@ "@kbn/cloud-integration-saml-provider-plugin": "link:x-pack/test/cloud_integration/plugins/saml_provider", "@kbn/cloud-links-plugin": "link:x-pack/plugins/cloud_integrations/cloud_links", "@kbn/cloud-plugin": "link:x-pack/plugins/cloud", - "@kbn/cloud-security-posture": "link:x-pack/packages/kbn-cloud-security-posture", - "@kbn/cloud-security-posture-common": "link:x-pack/packages/kbn-cloud-security-posture-common", + "@kbn/cloud-security-posture": "link:x-pack/packages/kbn-cloud-security-posture/public", + "@kbn/cloud-security-posture-common": "link:x-pack/packages/kbn-cloud-security-posture/common", "@kbn/cloud-security-posture-graph": "link:x-pack/packages/kbn-cloud-security-posture/graph", "@kbn/cloud-security-posture-plugin": "link:x-pack/plugins/cloud_security_posture", "@kbn/code-editor": "link:packages/shared-ux/code_editor/impl", diff --git a/tsconfig.base.json b/tsconfig.base.json index 67b6784f8de54..dbd9b7b8b1e56 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -174,10 +174,10 @@ "@kbn/cloud-links-plugin/*": ["x-pack/plugins/cloud_integrations/cloud_links/*"], "@kbn/cloud-plugin": ["x-pack/plugins/cloud"], "@kbn/cloud-plugin/*": ["x-pack/plugins/cloud/*"], - "@kbn/cloud-security-posture": ["x-pack/packages/kbn-cloud-security-posture"], - "@kbn/cloud-security-posture/*": ["x-pack/packages/kbn-cloud-security-posture/*"], - "@kbn/cloud-security-posture-common": ["x-pack/packages/kbn-cloud-security-posture-common"], - "@kbn/cloud-security-posture-common/*": ["x-pack/packages/kbn-cloud-security-posture-common/*"], + "@kbn/cloud-security-posture": ["x-pack/packages/kbn-cloud-security-posture/public"], + "@kbn/cloud-security-posture/*": ["x-pack/packages/kbn-cloud-security-posture/public/*"], + "@kbn/cloud-security-posture-common": ["x-pack/packages/kbn-cloud-security-posture/common"], + "@kbn/cloud-security-posture-common/*": ["x-pack/packages/kbn-cloud-security-posture/common/*"], "@kbn/cloud-security-posture-graph": ["x-pack/packages/kbn-cloud-security-posture/graph"], "@kbn/cloud-security-posture-graph/*": ["x-pack/packages/kbn-cloud-security-posture/graph/*"], "@kbn/cloud-security-posture-plugin": ["x-pack/plugins/cloud_security_posture"], diff --git a/x-pack/packages/kbn-cloud-security-posture/README.md b/x-pack/packages/kbn-cloud-security-posture/README.md index 29a14fbeb825b..cf5450f059773 100644 --- a/x-pack/packages/kbn-cloud-security-posture/README.md +++ b/x-pack/packages/kbn-cloud-security-posture/README.md @@ -4,6 +4,20 @@ This package includes - Hooks that's used on Flyout component that's used in Alerts page on Security Solution Plugins as well as components on CSP plugin - Utilities and types thats used for the Hooks above as well as in CSP plugins +The code is under the `public` folder. + +# @kbn/cloud-security-posture-common + +Common types of `cloud-security-posture` plugin. + +The code is under the `common` folder. + +# @kbn/cloud-security-posture-graph + +Reusable graph component to present entities' relationships and exploration. + +The code is under the `graph` folder. + ## Storybook General look of the component can be checked visually running the following storybook: @@ -11,6 +25,6 @@ General look of the component can be checked visually running the following stor Note that all the interactions are mocked. -## Maintainers +# Maintainers Maintained by the Cloud Security Team \ No newline at end of file diff --git a/x-pack/packages/kbn-cloud-security-posture-common/README.md b/x-pack/packages/kbn-cloud-security-posture/common/README.md similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/README.md rename to x-pack/packages/kbn-cloud-security-posture/common/README.md diff --git a/x-pack/packages/kbn-cloud-security-posture-common/constants.ts b/x-pack/packages/kbn-cloud-security-posture/common/constants.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/constants.ts rename to x-pack/packages/kbn-cloud-security-posture/common/constants.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/index.ts b/x-pack/packages/kbn-cloud-security-posture/common/index.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/index.ts rename to x-pack/packages/kbn-cloud-security-posture/common/index.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/jest.config.js b/x-pack/packages/kbn-cloud-security-posture/common/jest.config.js similarity index 77% rename from x-pack/packages/kbn-cloud-security-posture-common/jest.config.js rename to x-pack/packages/kbn-cloud-security-posture/common/jest.config.js index d6f06d2bcc21c..62d5a239b9dc9 100644 --- a/x-pack/packages/kbn-cloud-security-posture-common/jest.config.js +++ b/x-pack/packages/kbn-cloud-security-posture/common/jest.config.js @@ -7,6 +7,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/x-pack/packages/kbn-cloud-security-posture-common'], + rootDir: '../../../..', + roots: ['/x-pack/packages/kbn-cloud-security-posture/common'], }; diff --git a/x-pack/packages/kbn-cloud-security-posture-common/kibana.jsonc b/x-pack/packages/kbn-cloud-security-posture/common/kibana.jsonc similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/kibana.jsonc rename to x-pack/packages/kbn-cloud-security-posture/common/kibana.jsonc diff --git a/x-pack/packages/kbn-cloud-security-posture-common/package.json b/x-pack/packages/kbn-cloud-security-posture/common/package.json similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/package.json rename to x-pack/packages/kbn-cloud-security-posture/common/package.json diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/graph/index.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/graph/index.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/graph/index.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/graph/index.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/graph/latest.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/graph/latest.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/graph/latest.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/graph/latest.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/graph/v1.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/graph/v1.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/graph/v1.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/graph/v1.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/rules/index.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/rules/index.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/rules/index.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/rules/index.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/rules/latest.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/rules/latest.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/rules/latest.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/rules/latest.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/rules/v1.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/rules/v1.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/rules/v1.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/rules/v1.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/rules/v2.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/rules/v2.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/rules/v2.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/rules/v2.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/rules/v3.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/rules/v3.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/rules/v3.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/rules/v3.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/rules/v4.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/rules/v4.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/rules/v4.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/rules/v4.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/rules/v5.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/rules/v5.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/rules/v5.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/rules/v5.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/vulnerabilities/csp_vulnerability_finding.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/vulnerabilities/csp_vulnerability_finding.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/vulnerabilities/csp_vulnerability_finding.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/vulnerabilities/csp_vulnerability_finding.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/schema/vulnerabilities/latest.ts b/x-pack/packages/kbn-cloud-security-posture/common/schema/vulnerabilities/latest.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/schema/vulnerabilities/latest.ts rename to x-pack/packages/kbn-cloud-security-posture/common/schema/vulnerabilities/latest.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/tsconfig.json b/x-pack/packages/kbn-cloud-security-posture/common/tsconfig.json similarity index 88% rename from x-pack/packages/kbn-cloud-security-posture-common/tsconfig.json rename to x-pack/packages/kbn-cloud-security-posture/common/tsconfig.json index c6bdf82c1d223..c7cf1e9208bfc 100644 --- a/x-pack/packages/kbn-cloud-security-posture-common/tsconfig.json +++ b/x-pack/packages/kbn-cloud-security-posture/common/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/x-pack/packages/kbn-cloud-security-posture-common/types/benchmark.ts b/x-pack/packages/kbn-cloud-security-posture/common/types/benchmark.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/types/benchmark.ts rename to x-pack/packages/kbn-cloud-security-posture/common/types/benchmark.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/types/findings.ts b/x-pack/packages/kbn-cloud-security-posture/common/types/findings.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/types/findings.ts rename to x-pack/packages/kbn-cloud-security-posture/common/types/findings.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/types/graph/index.ts b/x-pack/packages/kbn-cloud-security-posture/common/types/graph/index.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/types/graph/index.ts rename to x-pack/packages/kbn-cloud-security-posture/common/types/graph/index.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/types/graph/latest.ts b/x-pack/packages/kbn-cloud-security-posture/common/types/graph/latest.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/types/graph/latest.ts rename to x-pack/packages/kbn-cloud-security-posture/common/types/graph/latest.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/types/graph/v1.ts b/x-pack/packages/kbn-cloud-security-posture/common/types/graph/v1.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/types/graph/v1.ts rename to x-pack/packages/kbn-cloud-security-posture/common/types/graph/v1.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/types/status.ts b/x-pack/packages/kbn-cloud-security-posture/common/types/status.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/types/status.ts rename to x-pack/packages/kbn-cloud-security-posture/common/types/status.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/types/vulnerabilities.ts b/x-pack/packages/kbn-cloud-security-posture/common/types/vulnerabilities.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/types/vulnerabilities.ts rename to x-pack/packages/kbn-cloud-security-posture/common/types/vulnerabilities.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/utils/get_abbreviated_number.test.ts b/x-pack/packages/kbn-cloud-security-posture/common/utils/get_abbreviated_number.test.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/utils/get_abbreviated_number.test.ts rename to x-pack/packages/kbn-cloud-security-posture/common/utils/get_abbreviated_number.test.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/utils/get_abbreviated_number.ts b/x-pack/packages/kbn-cloud-security-posture/common/utils/get_abbreviated_number.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/utils/get_abbreviated_number.ts rename to x-pack/packages/kbn-cloud-security-posture/common/utils/get_abbreviated_number.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/utils/helpers.test.ts b/x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.test.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/utils/helpers.test.ts rename to x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.test.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/utils/helpers.ts b/x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/utils/helpers.ts rename to x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts diff --git a/x-pack/packages/kbn-cloud-security-posture-common/utils/ui_metrics.ts b/x-pack/packages/kbn-cloud-security-posture/common/utils/ui_metrics.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture-common/utils/ui_metrics.ts rename to x-pack/packages/kbn-cloud-security-posture/common/utils/ui_metrics.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/graph/README.md b/x-pack/packages/kbn-cloud-security-posture/graph/README.md index 2e495ce4e6be8..c67ca622fe414 100644 --- a/x-pack/packages/kbn-cloud-security-posture/graph/README.md +++ b/x-pack/packages/kbn-cloud-security-posture/graph/README.md @@ -2,12 +2,12 @@ ## Motivation -The idea behind this package is to have a reusable graph component, embedding the features available to alerts flyout in +The idea behind this package is to have a reusable graph component, embedding the features available to the alert's flyout in security solution plugin. ## How to use this -Standalone examples will follow. In the meantime checkout storybook to view the graphs progress. +Standalone examples will follow. In the meantime check out storybook to view the graph's progress. ## The most important public api members diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/constants.ts b/x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/constants.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/constants.ts rename to x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/constants.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/index.ts b/x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/index.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/index.ts rename to x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/index.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/main.ts b/x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/main.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/main.ts rename to x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/main.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/manager.ts b/x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/manager.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/manager.ts rename to x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/manager.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/preview.ts b/x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/preview.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/preview.ts rename to x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/preview.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/styles.css b/x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/styles.css similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/styles.css rename to x-pack/packages/kbn-cloud-security-posture/graph/storybook/config/styles.css diff --git a/x-pack/packages/kbn-cloud-security-posture/graph/tsconfig.json b/x-pack/packages/kbn-cloud-security-posture/graph/tsconfig.json index 55cafeb069d0f..d97809a59772d 100644 --- a/x-pack/packages/kbn-cloud-security-posture/graph/tsconfig.json +++ b/x-pack/packages/kbn-cloud-security-posture/graph/tsconfig.json @@ -12,6 +12,7 @@ ], "kbn_references": [ "@kbn/cloud-security-posture-common", - "@kbn/utility-types" + "@kbn/utility-types", + "@kbn/storybook" ] } diff --git a/x-pack/packages/kbn-cloud-security-posture/index.ts b/x-pack/packages/kbn-cloud-security-posture/public/index.ts similarity index 87% rename from x-pack/packages/kbn-cloud-security-posture/index.ts rename to x-pack/packages/kbn-cloud-security-posture/public/index.ts index b7e45a546f3d5..c39a86f5ec64b 100644 --- a/x-pack/packages/kbn-cloud-security-posture/index.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -export * from './type'; -export * from './constants/component_constants'; -export * from './constants/navigation'; +export * from './src/types'; +export * from './src/constants/component_constants'; +export * from './src/constants/navigation'; export type { NavFilter } from './src/hooks/use_navigate_findings'; export { showErrorToast } from './src/utils/show_error_toast'; export { encodeQuery, decodeQuery } from './src/utils/query_utils'; diff --git a/x-pack/packages/kbn-cloud-security-posture/jest.config.js b/x-pack/packages/kbn-cloud-security-posture/public/jest.config.js similarity index 74% rename from x-pack/packages/kbn-cloud-security-posture/jest.config.js rename to x-pack/packages/kbn-cloud-security-posture/public/jest.config.js index 7273e0452cf60..1c1a8c84561c1 100644 --- a/x-pack/packages/kbn-cloud-security-posture/jest.config.js +++ b/x-pack/packages/kbn-cloud-security-posture/public/jest.config.js @@ -7,6 +7,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/x-pack/packages/kbn-cloud-security-posture'], + rootDir: '../../../..', + roots: ['/x-pack/packages/kbn-cloud-security-posture/public'], }; diff --git a/x-pack/packages/kbn-cloud-security-posture/kibana.jsonc b/x-pack/packages/kbn-cloud-security-posture/public/kibana.jsonc similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/kibana.jsonc rename to x-pack/packages/kbn-cloud-security-posture/public/kibana.jsonc diff --git a/x-pack/packages/kbn-cloud-security-posture/package.json b/x-pack/packages/kbn-cloud-security-posture/public/package.json similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/package.json rename to x-pack/packages/kbn-cloud-security-posture/public/package.json diff --git a/x-pack/packages/kbn-cloud-security-posture/src/components/csp_evaluation_badge.tsx b/x-pack/packages/kbn-cloud-security-posture/public/src/components/csp_evaluation_badge.tsx similarity index 95% rename from x-pack/packages/kbn-cloud-security-posture/src/components/csp_evaluation_badge.tsx rename to x-pack/packages/kbn-cloud-security-posture/public/src/components/csp_evaluation_badge.tsx index 8048414c8f8a5..f84ac26d68767 100644 --- a/x-pack/packages/kbn-cloud-security-posture/src/components/csp_evaluation_badge.tsx +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/components/csp_evaluation_badge.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { EuiBadge, type EuiBadgeProps } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { css } from '@emotion/react'; -import { statusColors } from '../../constants/component_constants'; +import { statusColors } from '../constants/component_constants'; interface Props { type?: 'passed' | 'failed'; diff --git a/x-pack/packages/kbn-cloud-security-posture/src/components/vulnerability_badges.tsx b/x-pack/packages/kbn-cloud-security-posture/public/src/components/vulnerability_badges.tsx similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/components/vulnerability_badges.tsx rename to x-pack/packages/kbn-cloud-security-posture/public/src/components/vulnerability_badges.tsx diff --git a/x-pack/packages/kbn-cloud-security-posture/constants/component_constants.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/constants/component_constants.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/constants/navigation.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/constants/navigation.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/constants/navigation.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/constants/navigation.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_csp_setup_status_api.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_csp_setup_status_api.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/hooks/use_csp_setup_status_api.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_csp_setup_status_api.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_data_view.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_data_view.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/hooks/use_data_view.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_data_view.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_get_benchmark_rules_state_api.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_get_benchmark_rules_state_api.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/hooks/use_get_benchmark_rules_state_api.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_get_benchmark_rules_state_api.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_misconfiguration_findings.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_misconfiguration_findings.ts similarity index 99% rename from x-pack/packages/kbn-cloud-security-posture/src/hooks/use_misconfiguration_findings.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_misconfiguration_findings.ts index fe25224cf417a..40880b132537d 100644 --- a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_misconfiguration_findings.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_misconfiguration_findings.ts @@ -15,7 +15,7 @@ import type { LatestFindingsRequest, LatestFindingsResponse, UseCspOptions, -} from '../../type'; +} from '../types'; import { useGetCspBenchmarkRulesStatesApi } from './use_get_benchmark_rules_state_api'; import { diff --git a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_misconfiguration_preview.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_misconfiguration_preview.ts similarity index 98% rename from x-pack/packages/kbn-cloud-security-posture/src/hooks/use_misconfiguration_preview.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_misconfiguration_preview.ts index 75bd0d3952bd7..067cd22a9e1a9 100644 --- a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_misconfiguration_preview.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_misconfiguration_preview.ts @@ -14,7 +14,7 @@ import type { LatestFindingsRequest, LatestFindingsResponse, UseCspOptions, -} from '../../type'; +} from '../types'; import { useGetCspBenchmarkRulesStatesApi } from './use_get_benchmark_rules_state_api'; import { buildMisconfigurationsFindingsQuery, diff --git a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_navigate_findings.test.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_navigate_findings.test.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/hooks/use_navigate_findings.test.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_navigate_findings.test.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_navigate_findings.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_navigate_findings.ts similarity index 97% rename from x-pack/packages/kbn-cloud-security-posture/src/hooks/use_navigate_findings.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_navigate_findings.ts index a8420b17dd4f9..454c9a0056a58 100644 --- a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_navigate_findings.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_navigate_findings.ts @@ -14,7 +14,7 @@ import { } from '@kbn/cloud-security-posture-common'; import type { CoreStart } from '@kbn/core/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { findingsNavigation } from '../../constants/navigation'; +import { findingsNavigation } from '../constants/navigation'; import { useDataView } from './use_data_view'; import { CspClientPluginStartDeps } from '../..'; import { encodeQuery } from '../utils/query_utils'; diff --git a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_vulnerabilities_findings.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_vulnerabilities_findings.ts similarity index 99% rename from x-pack/packages/kbn-cloud-security-posture/src/hooks/use_vulnerabilities_findings.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_vulnerabilities_findings.ts index ba13ec983893f..062f5c7740c73 100644 --- a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_vulnerabilities_findings.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_vulnerabilities_findings.ts @@ -16,7 +16,7 @@ import { } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { CspVulnerabilityFinding } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest'; import type { CoreStart } from '@kbn/core/public'; -import type { CspClientPluginStartDeps, UseCspOptions } from '../../type'; +import type { CspClientPluginStartDeps, UseCspOptions } from '../types'; import { showErrorToast } from '../..'; import { getVulnerabilitiesAggregationCount, getVulnerabilitiesQuery } from '../utils/hooks_utils'; diff --git a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_vulnerabilities_preview.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_vulnerabilities_preview.ts similarity index 99% rename from x-pack/packages/kbn-cloud-security-posture/src/hooks/use_vulnerabilities_preview.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_vulnerabilities_preview.ts index 82b3f41d26819..ac34636720143 100644 --- a/x-pack/packages/kbn-cloud-security-posture/src/hooks/use_vulnerabilities_preview.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_vulnerabilities_preview.ts @@ -16,7 +16,7 @@ import { } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { CspVulnerabilityFinding } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest'; import type { CoreStart } from '@kbn/core/public'; -import type { CspClientPluginStartDeps, UseCspOptions } from '../../type'; +import type { CspClientPluginStartDeps, UseCspOptions } from '../types'; import { showErrorToast } from '../..'; import { getVulnerabilitiesAggregationCount, getVulnerabilitiesQuery } from '../utils/hooks_utils'; diff --git a/x-pack/packages/kbn-cloud-security-posture/type.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/types.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/type.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/types.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/utils/get_vulnerabilitiy_colors.test.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerabilitiy_colors.test.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/utils/get_vulnerabilitiy_colors.test.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerabilitiy_colors.test.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/utils/get_vulnerability_colors.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_colors.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/utils/get_vulnerability_colors.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_colors.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/utils/get_vulnerability_text.test.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_text.test.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/utils/get_vulnerability_text.test.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_text.test.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/utils/get_vulnerability_text.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_text.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/utils/get_vulnerability_text.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_text.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/utils/hooks_utils.test.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/hooks_utils.test.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/utils/hooks_utils.test.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/utils/hooks_utils.test.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/utils/hooks_utils.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/hooks_utils.ts similarity index 99% rename from x-pack/packages/kbn-cloud-security-posture/src/utils/hooks_utils.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/utils/hooks_utils.ts index d06f4efbde026..a621e1d01add8 100644 --- a/x-pack/packages/kbn-cloud-security-posture/src/utils/hooks_utils.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/hooks_utils.ts @@ -13,7 +13,7 @@ import { } from '@kbn/cloud-security-posture-common'; import type { CspBenchmarkRulesStates } from '@kbn/cloud-security-posture-common/schema/rules/latest'; import { buildMutedRulesFilter } from '@kbn/cloud-security-posture-common'; -import type { UseCspOptions } from '../../type'; +import type { UseCspOptions } from '../types'; const MISCONFIGURATIONS_SOURCE_FIELDS = ['result.*', 'rule.*', 'resource.*']; interface AggregationBucket { diff --git a/x-pack/packages/kbn-cloud-security-posture/src/utils/query_utils.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/query_utils.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/utils/query_utils.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/utils/query_utils.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/utils/show_error_toast.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/show_error_toast.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/utils/show_error_toast.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/utils/show_error_toast.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/utils/vulnerability_helpers.test.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.test.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/utils/vulnerability_helpers.test.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.test.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/src/utils/vulnerability_helpers.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/src/utils/vulnerability_helpers.ts rename to x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/tsconfig.json b/x-pack/packages/kbn-cloud-security-posture/public/tsconfig.json similarity index 92% rename from x-pack/packages/kbn-cloud-security-posture/tsconfig.json rename to x-pack/packages/kbn-cloud-security-posture/public/tsconfig.json index 38799e07182d9..e7f69a99c5199 100644 --- a/x-pack/packages/kbn-cloud-security-posture/tsconfig.json +++ b/x-pack/packages/kbn-cloud-security-posture/public/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", }, @@ -35,6 +35,5 @@ "@kbn/ui-theme", "@kbn/i18n-react", "@kbn/rison", - "@kbn/storybook", ] } diff --git a/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts b/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts index 9444b7b4b1922..be2a7c75aad46 100644 --- a/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts +++ b/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts @@ -10,7 +10,7 @@ import { KSPM_POLICY_TEMPLATE, CLOUD_SECURITY_POSTURE_BASE_PATH, } from '@kbn/cloud-security-posture-common'; -import { NAV_ITEMS_NAMES } from '@kbn/cloud-security-posture/constants/navigation'; +import { NAV_ITEMS_NAMES } from '@kbn/cloud-security-posture/src/constants/navigation'; import { CNVM_POLICY_TEMPLATE } from '../../../common/constants'; import type { CspBenchmarksPage, CspPage, CspPageNavigationItem } from './types'; diff --git a/yarn.lock b/yarn.lock index 4aff910b4f839..4cd2e2f4306aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3639,7 +3639,7 @@ version "0.0.0" uid "" -"@kbn/cloud-security-posture-common@link:x-pack/packages/kbn-cloud-security-posture-common": +"@kbn/cloud-security-posture-common@link:x-pack/packages/kbn-cloud-security-posture/common": version "0.0.0" uid "" @@ -3651,7 +3651,7 @@ version "0.0.0" uid "" -"@kbn/cloud-security-posture@link:x-pack/packages/kbn-cloud-security-posture": +"@kbn/cloud-security-posture@link:x-pack/packages/kbn-cloud-security-posture/public": version "0.0.0" uid ""