From d6cb398d1ab09af93369e84f0aa13f0688357082 Mon Sep 17 00:00:00 2001 From: seanrathier Date: Wed, 18 Dec 2024 07:09:38 -0500 Subject: [PATCH] [Cloud Security] Move @kbn/cloud-security-posture-storybook-config for Kibana sustainability (#204500) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Move @kbn/cloud-security-posture-storybook-config package to `x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook` Renamed removed the `config` folder to align with the `.storybook` [naming convention](https://github.com/elastic/kibana/pull/204500/files#diff-91918a63f6365a8f40f674ab54a8df7ce9aeb313f77fe8eda76284d712ef5425R21). ![Screenshot 2024-12-16 at 5 50 53 PM](https://github.com/user-attachments/assets/de1d0a81-353f-434c-bb2d-989210b35b43) ### Related Issues - https://github.com/elastic/kibana/pull/202862 --------- Co-authored-by: Brad White --- src/dev/storybook/aliases.ts | 3 ++- .../storybook/config/tsconfig.json | 20 ------------------- .../.storybook}/README.mdx | 0 .../.storybook}/babel_with_emotion.ts | 0 .../.storybook}/constants.ts | 0 .../.storybook}/index.ts | 0 .../.storybook}/main.ts | 2 +- .../.storybook}/manager.ts | 0 .../.storybook}/package.json | 0 .../.storybook}/preview.ts | 0 .../.storybook}/styles.css | 0 .../.storybook/tsconfig.json | 10 ++++++++++ .../kbn-cloud-security-posture/README.md | 0 .../graph/jest.config.js | 2 +- 14 files changed, 14 insertions(+), 23 deletions(-) delete mode 100644 x-pack/packages/kbn-cloud-security-posture/storybook/config/tsconfig.json rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/README.mdx (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/babel_with_emotion.ts (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/constants.ts (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/index.ts (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/main.ts (89%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/manager.ts (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/package.json (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/preview.ts (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/styles.css (100%) create mode 100644 x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/tsconfig.json rename x-pack/{ => solutions/security}/packages/kbn-cloud-security-posture/README.md (100%) diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index c2c24528e3dc7..2bf3888ce6cb2 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -17,7 +17,8 @@ export const storybookAliases = { canvas: 'x-pack/plugins/canvas/storybook', cases: 'packages/kbn-cases-components/.storybook', cell_actions: 'src/platform/packages/shared/kbn-cell-actions/.storybook', - cloud_security_posture_packages: 'x-pack/packages/kbn-cloud-security-posture/storybook/config', + cloud_security_posture_packages: + 'x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook', cloud: 'packages/cloud/.storybook', coloring: 'packages/kbn-coloring/.storybook', language_documentation_popover: diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/tsconfig.json b/x-pack/packages/kbn-cloud-security-posture/storybook/config/tsconfig.json deleted file mode 100644 index 1f8b2275f5191..0000000000000 --- a/x-pack/packages/kbn-cloud-security-posture/storybook/config/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../../../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "target/types", - "types": [ - "jest", - "node", - "@kbn/ambient-storybook-types", - ] - }, - "include": [ - "**/*.ts" - ], - "kbn_references": [ - "@kbn/storybook", - ], - "exclude": [ - "target/**/*", - ] -} diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/README.mdx b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/README.mdx similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/README.mdx rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/README.mdx diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/babel_with_emotion.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/babel_with_emotion.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/babel_with_emotion.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/babel_with_emotion.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/constants.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/constants.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/constants.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/constants.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/index.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/index.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/index.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/index.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/main.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/main.ts similarity index 89% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/main.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/main.ts index 4e7fca030c2f6..2d455283571a3 100644 --- a/x-pack/packages/kbn-cloud-security-posture/storybook/config/main.ts +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/main.ts @@ -9,7 +9,7 @@ import { defaultConfig } from '@kbn/storybook'; module.exports = { ...defaultConfig, - stories: ['../../**/*.stories.+(tsx|mdx)'], + stories: ['../**/*.stories.+(tsx|mdx)'], reactOptions: { strictMode: true, }, diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/manager.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/manager.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/manager.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/manager.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/package.json b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/package.json similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/package.json rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/package.json diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/preview.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/preview.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/preview.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/preview.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/styles.css b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/styles.css similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/styles.css rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/styles.css diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/tsconfig.json b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/tsconfig.json new file mode 100644 index 0000000000000..6126ec1825c9e --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": ["jest", "node", "@kbn/ambient-storybook-types"] + }, + "include": ["**/*.ts"], + "kbn_references": ["@kbn/storybook"], + "exclude": ["target/**/*"] +} diff --git a/x-pack/packages/kbn-cloud-security-posture/README.md b/x-pack/solutions/security/packages/kbn-cloud-security-posture/README.md similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/README.md rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/README.md diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/jest.config.js b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/jest.config.js index 0448a8a11bc86..3933698808c14 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/jest.config.js +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/jest.config.js @@ -11,7 +11,7 @@ module.exports = { rootDir: '../../../../../..', transform: { '^.+\\.(js|tsx?)$': - '/x-pack/packages/kbn-cloud-security-posture/storybook/config/babel_with_emotion.ts', + '/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/babel_with_emotion.ts', }, setupFiles: ['jest-canvas-mock'], setupFilesAfterEnv: [