Skip to content

Commit

Permalink
Relocating module @kbn/screenshotting-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
gsoldevila committed Dec 9, 2024
1 parent 1d9ca1e commit dc60dd5
Show file tree
Hide file tree
Showing 133 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ x-pack/packages/security/ui_components @elastic/kibana-security
x-pack/performance @elastic/appex-qa
x-pack/platform/packages/shared/kbn-entities-schema @elastic/obs-entities
x-pack/platform/plugins/shared/entity_manager @elastic/obs-entities
x-pack/platform/plugins/shared/screenshotting @elastic/kibana-reporting-services
x-pack/plugins/actions @elastic/response-ops
x-pack/plugins/ai_infra/llm_tasks @elastic/appex-ai-infra
x-pack/plugins/ai_infra/product_doc_base @elastic/appex-ai-infra
Expand Down Expand Up @@ -960,7 +961,6 @@ x-pack/plugins/rollup @elastic/kibana-management
x-pack/plugins/rule_registry @elastic/response-ops @elastic/obs-ux-management-team
x-pack/plugins/runtime_fields @elastic/kibana-management
x-pack/plugins/saved_objects_tagging @elastic/appex-sharedux
x-pack/plugins/screenshotting @elastic/kibana-reporting-services
x-pack/plugins/search_assistant @elastic/search-kibana
x-pack/plugins/search_connectors @elastic/search-kibana
x-pack/plugins/search_homepage @elastic/search-kibana
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ Elastic.
|Add tagging capability to saved objects
|{kib-repo}blob/{branch}/x-pack/plugins/screenshotting/README.md[screenshotting]
|{kib-repo}blob/{branch}/x-pack/platform/plugins/shared/screenshotting/README.md[screenshotting]
|This plugin provides functionality to take screenshots of the Kibana pages.
It uses Chromium and Puppeteer underneath to run the browser in headless mode.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@
"@kbn/screenshot-mode-example-plugin": "link:examples/screenshot_mode_example",
"@kbn/screenshot-mode-plugin": "link:src/plugins/screenshot_mode",
"@kbn/screenshotting-example-plugin": "link:x-pack/examples/screenshotting_example",
"@kbn/screenshotting-plugin": "link:x-pack/plugins/screenshotting",
"@kbn/screenshotting-plugin": "link:x-pack/platform/plugins/shared/screenshotting",
"@kbn/screenshotting-server": "link:packages/kbn-screenshotting-server",
"@kbn/search-api-keys-components": "link:packages/kbn-search-api-keys-components",
"@kbn/search-api-keys-server": "link:packages/kbn-search-api-keys-server",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-cli-dev-mode/src/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Log } from './log';
const packageMatcher = makeMatcher([
'**/*',
'!**/.*',
'!x-pack/plugins/screenshotting/chromium/**',
'!x-pack/platform/plugins/shared/screenshotting/chromium/**',
'!x-pack/plugins/canvas/shareable_runtime/**',
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ const log = new ToolingLog({
});

describe(`enumeratePatterns`, () => {
it(`should resolve x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts to kibana-screenshotting`, () => {
it(`should resolve x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/unzip.ts to kibana-screenshotting`, () => {
const actual = enumeratePatterns(REPO_ROOT)(log)(
new Map([['x-pack/plugins/screenshotting', ['kibana-screenshotting']]])
new Map([['x-pack/platform/plugins/shared/screenshotting', ['kibana-screenshotting']]])
);

expect(actual.flat()).toContain(
'x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts kibana-screenshotting'
'x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/unzip.ts kibana-screenshotting'
);
});
it(`should resolve src/plugins/charts/common/static/color_maps/color_maps.ts to kibana-app`, () => {
Expand Down
12 changes: 6 additions & 6 deletions src/dev/precommit_hook/casing_check_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ export const TEMPORARILY_IGNORED_PATHS = [
'x-pack/plugins/monitoring/public/icons/health-green.svg',
'x-pack/plugins/monitoring/public/icons/health-red.svg',
'x-pack/plugins/monitoring/public/icons/health-yellow.svg',
'x-pack/plugins/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Medium.ttf',
'x-pack/plugins/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Regular.ttf',
'x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Italic.ttf',
'x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Medium.ttf',
'x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Regular.ttf',
'x-pack/plugins/screenshotting/server/assets/img/logo-grey.png',
'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Medium.ttf',
'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Regular.ttf',
'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Italic.ttf',
'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Medium.ttf',
'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Regular.ttf',
'x-pack/platform/plugins/shared/screenshotting/server/assets/img/logo-grey.png',
];
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1554,8 +1554,8 @@
"@kbn/screenshot-mode-plugin/*": ["src/plugins/screenshot_mode/*"],
"@kbn/screenshotting-example-plugin": ["x-pack/examples/screenshotting_example"],
"@kbn/screenshotting-example-plugin/*": ["x-pack/examples/screenshotting_example/*"],
"@kbn/screenshotting-plugin": ["x-pack/plugins/screenshotting"],
"@kbn/screenshotting-plugin/*": ["x-pack/plugins/screenshotting/*"],
"@kbn/screenshotting-plugin": ["x-pack/platform/plugins/shared/screenshotting"],
"@kbn/screenshotting-plugin/*": ["x-pack/platform/plugins/shared/screenshotting/*"],
"@kbn/screenshotting-server": ["packages/kbn-screenshotting-server"],
"@kbn/screenshotting-server/*": ["packages/kbn-screenshotting-server/*"],
"@kbn/search-api-keys-components": ["packages/kbn-search-api-keys-components"],
Expand Down
2 changes: 1 addition & 1 deletion x-pack/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/test/functional/apps/**/reports/session
/test/reporting/configs/failure_debug/
/plugins/reporting/.chromium/
/plugins/screenshotting/chromium/
/platform/plugins/shared/screenshotting/chromium/
/plugins/reporting/.phantom/
/.aws-config.json
/.env
Expand Down
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"plugins/rollup"
],
"xpack.runtimeFields": "plugins/runtime_fields",
"xpack.screenshotting": "plugins/screenshotting",
"xpack.screenshotting": "platform/plugins/shared/screenshotting",
"xpack.searchSharedUI": "packages/search/shared_ui",
"xpack.searchHomepage": "plugins/search_homepage",
"xpack.searchIndices": "plugins/search_indices",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Here is an example of how you can take a screenshot of a Kibana URL.
```typescript
import { lastValueFrom } from 'rxjs';
import type { CoreSetup, Plugin } from 'src/core/server';
import type { ScreenshottingStart } from 'x-pack/plugins/screenshotting/server';
import type { ScreenshottingStart } from 'x-pack/platform/plugins/shared/screenshotting/server';


interface StartDeps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/x-pack/plugins/screenshotting'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/x-pack/plugins/screenshotting',
rootDir: '../../../../..',
roots: ['<rootDir>/x-pack/platform/plugins/shared/screenshotting'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/x-pack/platform/plugins/shared/screenshotting',
coverageReporters: ['text', 'html'],
collectCoverageFrom: ['<rootDir>/x-pack/plugins/screenshotting/server/**/*.{ts}'],
collectCoverageFrom: ['<rootDir>/x-pack/platform/plugins/shared/screenshotting/server/**/*.{ts}'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

module.exports = {
preset: '@kbn/test/jest_integration',
rootDir: '../../..',
roots: ['<rootDir>/x-pack/plugins/screenshotting'],
rootDir: '../../../../..',
roots: ['<rootDir>/x-pack/platform/plugins/shared/screenshotting'],
};
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
*/

// eslint-disable-next-line @kbn/imports/no_boundary_crossing
require('../../../../../../../src/setup_node_env');
require('../../../../../../../../../src/setup_node_env');
// eslint-disable-next-line @kbn/imports/uniform_imports
require('./worker.ts');
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('class Screenshots', () => {
let mockLogger: Logger;
let mockScreenshotModeSetup: ScreenshotModePluginSetup;

const mockBinaryPath = '/kibana/x-pack/plugins/screenshotting/chromium/linux/headless_shell';
const mockBinaryPath = '/kibana/x-pack/platform/plugins/shared/screenshotting/chromium/linux/headless_shell';
const mockBasePath = '/kibanaTest1';

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"extends": "../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
},
"include": [
"common/**/*",
"public/**/*",
"server/**/*",
"../../../typings/**/*"
"../../../../../typings/**/*"
],
"kbn_references": [
"@kbn/core",
{ "path": "../../../src/setup_node_env/tsconfig.json" },
{ "path": "../../../../../src/setup_node_env/tsconfig.json" },
"@kbn/expressions-plugin",
"@kbn/screenshot-mode-plugin",
"@kbn/cloud-plugin",
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/lens/public/app_plugin/share_action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface ShareableConfiguration
export const DEFAULT_LENS_LAYOUT_DIMENSIONS = {
width: 1793,
// this is a magic number from the reporting tool implementation
// see: x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts#L146
// see: x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver_factory/index.ts#L146
height: 1086,
};

Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6924,7 +6924,7 @@
version "0.0.0"
uid ""

"@kbn/screenshotting-plugin@link:x-pack/plugins/screenshotting":
"@kbn/screenshotting-plugin@link:x-pack/platform/plugins/shared/screenshotting":
version "0.0.0"
uid ""

Expand Down

0 comments on commit dc60dd5

Please sign in to comment.