diff --git a/.eslintignore b/.eslintignore index 270762242c87e..e85d3f95f2bbd 100644 --- a/.eslintignore +++ b/.eslintignore @@ -38,7 +38,7 @@ snapshots.js /packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/ /packages/kbn-ui-framework/dist /src/platform/packages/shared/kbn-flot-charts/lib -/packages/kbn-monaco/src/**/antlr +/src/platform/packages/shared/kbn-monaco/src/**/antlr /src/platform/packages/shared/kbn-esql-ast/src/**/antlr # Bazel diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 11aa030036094..3de04d5928815 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -208,7 +208,6 @@ packages/kbn-management/storybook/config @elastic/kibana-management packages/kbn-manifest @elastic/kibana-core packages/kbn-mock-idp-plugin @elastic/kibana-security packages/kbn-mock-idp-utils @elastic/kibana-security -packages/kbn-monaco @elastic/appex-sharedux packages/kbn-object-versioning @elastic/appex-sharedux packages/kbn-object-versioning-utils @elastic/appex-sharedux packages/kbn-openapi-bundler @elastic/security-detection-rule-management @@ -505,6 +504,7 @@ src/platform/packages/shared/kbn-management/settings/components/field_row @elast src/platform/packages/shared/kbn-management/settings/field_definition @elastic/kibana-management 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-monaco @elastic/appex-sharedux src/platform/packages/shared/kbn-openapi-common @elastic/security-detection-rule-management src/platform/packages/shared/kbn-osquery-io-ts-types @elastic/security-asset-management src/platform/packages/shared/kbn-profiling-utils @elastic/obs-ux-infra_services-team @@ -1206,7 +1206,7 @@ src/platform/plugins/shared/discover/public/context_awareness/profile_providers/ /test/api_integration/apis/event_annotations @elastic/kibana-visualizations /x-pack/test_serverless/functional/test_suites/common/visualizations/ @elastic/kibana-visualizations /x-pack/test_serverless/functional/fixtures/kbn_archiver/lens/ @elastic/kibana-visualizations -packages/kbn-monaco/src/esql @elastic/kibana-esql +src/platform/packages/shared/kbn-monaco/src/esql @elastic/kibana-esql # ESQL /test/api_integration/apis/esql/*.ts @elastic/kibana-esql diff --git a/.i18nrc.json b/.i18nrc.json index b20d17ce789f8..8541a1a5fd55c 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -93,7 +93,7 @@ "src/platform/packages/shared/kbn-management", "packages/kbn-management" ], - "monaco": "packages/kbn-monaco/src", + "monaco": "src/platform/packages/shared/kbn-monaco/src", "navigation": ["src/platform/plugins/shared/navigation", "packages/solution-nav"], "links": "src/platform/plugins/private/links", "newsfeed": "src/platform/plugins/shared/newsfeed", diff --git a/kbn_pm/src/lib/bazel.mjs b/kbn_pm/src/lib/bazel.mjs index 3904db2c750b5..b4203dda07519 100644 --- a/kbn_pm/src/lib/bazel.mjs +++ b/kbn_pm/src/lib/bazel.mjs @@ -22,7 +22,7 @@ const BAZEL_RUNNER_SRC = '../../../packages/kbn-bazel-runner/index.js'; const BAZEL_TARGETS = [ '//src/platform/packages/private/kbn-ui-shared-deps-npm:shared_built_assets', '//src/platform/packages/private/kbn-ui-shared-deps-src:shared_built_assets', - '//packages/kbn-monaco:target_workers', + '//src/platform/packages/shared/kbn-monaco:target_workers', ]; async function getBazelRunner() { diff --git a/package.json b/package.json index 22bed25e89e1c..e3562fed4a99f 100644 --- a/package.json +++ b/package.json @@ -682,7 +682,7 @@ "@kbn/ml-ui-actions": "link:x-pack/platform/packages/private/ml/ui_actions", "@kbn/ml-url-state": "link:x-pack/platform/packages/private/ml/url_state", "@kbn/ml-validators": "link:x-pack/platform/packages/private/ml/validators", - "@kbn/monaco": "link:packages/kbn-monaco", + "@kbn/monaco": "link:src/platform/packages/shared/kbn-monaco", "@kbn/monitoring-collection-plugin": "link:x-pack/platform/plugins/private/monitoring_collection", "@kbn/monitoring-plugin": "link:x-pack/platform/plugins/private/monitoring", "@kbn/navigation-plugin": "link:src/platform/plugins/shared/navigation", diff --git a/packages/kbn-plugin-helpers/src/tasks/bazel_packages.ts b/packages/kbn-plugin-helpers/src/tasks/bazel_packages.ts index 38189aa4e86a7..c7a6ad85bab1f 100644 --- a/packages/kbn-plugin-helpers/src/tasks/bazel_packages.ts +++ b/packages/kbn-plugin-helpers/src/tasks/bazel_packages.ts @@ -19,7 +19,7 @@ export async function buildBazelPackages({ log, dist }: TaskContext) { 'build', '//src/platform/packages/private/kbn-ui-shared-deps-npm:shared_built_assets', '//src/platform/packages/private/kbn-ui-shared-deps-src:shared_built_assets', - '//packages/kbn-monaco:target_workers', + '//src/platform/packages/shared/kbn-monaco:target_workers', '--show_result=1', ].concat(dist ? [`--define=dist=true`] : []), { diff --git a/src/dev/build/tasks/build_packages_task.ts b/src/dev/build/tasks/build_packages_task.ts index 1947de06e0019..b7e48064be192 100644 --- a/src/dev/build/tasks/build_packages_task.ts +++ b/src/dev/build/tasks/build_packages_task.ts @@ -111,7 +111,7 @@ export const BuildPackages: Task = { 'build', '//src/platform/packages/private/kbn-ui-shared-deps-npm:shared_built_assets', '//src/platform/packages/private/kbn-ui-shared-deps-src:shared_built_assets', - '//packages/kbn-monaco:target_workers', + '//src/platform/packages/shared/kbn-monaco:target_workers', '--show_result=1', '--define=dist=true', ], diff --git a/src/platform/packages/private/kbn-esql-editor/README.md b/src/platform/packages/private/kbn-esql-editor/README.md index f36b3388160a6..2c3e64f6a7dab 100644 --- a/src/platform/packages/private/kbn-esql-editor/README.md +++ b/src/platform/packages/private/kbn-esql-editor/README.md @@ -6,7 +6,7 @@ Contains the editor for text based languages. Specifically for: --- Contains the ESQL editor with the autocomplete and the autosuggest functionality (based on atlr). -The antlr code can be found in packages/kbn-monaco/src/esql +The antlr code can be found in src/platform/packages/shared/kbn-monaco/src/esql A **monaco** based editor that is part of the unified search experience. It is rendered for all the applications that support text-based languages. In order to enable text based languages on your unified search bar add `textBasedLanguages: ['ESQL', '...']` to the dataViewPicker properties. diff --git a/src/platform/packages/private/kbn-ui-shared-deps-src/BUILD.bazel b/src/platform/packages/private/kbn-ui-shared-deps-src/BUILD.bazel index aa06f2d430fe7..0cccba9b65a1a 100644 --- a/src/platform/packages/private/kbn-ui-shared-deps-src/BUILD.bazel +++ b/src/platform/packages/private/kbn-ui-shared-deps-src/BUILD.bazel @@ -26,7 +26,7 @@ webpack_cli( "//src/platform/packages/shared/kbn-i18n-react", "//src/platform/packages/shared/kbn-ebt-tools", "//src/platform/packages/shared/kbn-esql-ast", - "//packages/kbn-monaco", + "//src/platform/packages/shared/kbn-monaco", "//src/platform/packages/shared/kbn-datemath", "//src/platform/packages/shared/kbn-analytics", "//src/platform/packages/shared/kbn-crypto-browser", diff --git a/packages/kbn-monaco/BUILD.bazel b/src/platform/packages/shared/kbn-monaco/BUILD.bazel similarity index 100% rename from packages/kbn-monaco/BUILD.bazel rename to src/platform/packages/shared/kbn-monaco/BUILD.bazel diff --git a/packages/kbn-monaco/README.md b/src/platform/packages/shared/kbn-monaco/README.md similarity index 100% rename from packages/kbn-monaco/README.md rename to src/platform/packages/shared/kbn-monaco/README.md diff --git a/packages/kbn-monaco/index.ts b/src/platform/packages/shared/kbn-monaco/index.ts similarity index 100% rename from packages/kbn-monaco/index.ts rename to src/platform/packages/shared/kbn-monaco/index.ts diff --git a/packages/kbn-monaco/jest.config.js b/src/platform/packages/shared/kbn-monaco/jest.config.js similarity index 84% rename from packages/kbn-monaco/jest.config.js rename to src/platform/packages/shared/kbn-monaco/jest.config.js index 8971b491714c1..1480df58c72f4 100644 --- a/packages/kbn-monaco/jest.config.js +++ b/src/platform/packages/shared/kbn-monaco/jest.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-monaco'], + rootDir: '../../../../..', + roots: ['/src/platform/packages/shared/kbn-monaco'], }; diff --git a/packages/kbn-monaco/kibana.jsonc b/src/platform/packages/shared/kbn-monaco/kibana.jsonc similarity index 100% rename from packages/kbn-monaco/kibana.jsonc rename to src/platform/packages/shared/kbn-monaco/kibana.jsonc diff --git a/packages/kbn-monaco/package.json b/src/platform/packages/shared/kbn-monaco/package.json similarity index 100% rename from packages/kbn-monaco/package.json rename to src/platform/packages/shared/kbn-monaco/package.json diff --git a/packages/kbn-monaco/scripts/antlr4_tools/.gitignore b/src/platform/packages/shared/kbn-monaco/scripts/antlr4_tools/.gitignore similarity index 100% rename from packages/kbn-monaco/scripts/antlr4_tools/.gitignore rename to src/platform/packages/shared/kbn-monaco/scripts/antlr4_tools/.gitignore diff --git a/packages/kbn-monaco/scripts/antlr4_tools/README.md b/src/platform/packages/shared/kbn-monaco/scripts/antlr4_tools/README.md similarity index 100% rename from packages/kbn-monaco/scripts/antlr4_tools/README.md rename to src/platform/packages/shared/kbn-monaco/scripts/antlr4_tools/README.md diff --git a/packages/kbn-monaco/scripts/antlr4_tools/brewfile b/src/platform/packages/shared/kbn-monaco/scripts/antlr4_tools/brewfile similarity index 100% rename from packages/kbn-monaco/scripts/antlr4_tools/brewfile rename to src/platform/packages/shared/kbn-monaco/scripts/antlr4_tools/brewfile diff --git a/packages/kbn-monaco/scripts/constants.js b/src/platform/packages/shared/kbn-monaco/scripts/constants.js similarity index 100% rename from packages/kbn-monaco/scripts/constants.js rename to src/platform/packages/shared/kbn-monaco/scripts/constants.js diff --git a/packages/kbn-monaco/scripts/esql_update_ast_script.js b/src/platform/packages/shared/kbn-monaco/scripts/esql_update_ast_script.js similarity index 100% rename from packages/kbn-monaco/scripts/esql_update_ast_script.js rename to src/platform/packages/shared/kbn-monaco/scripts/esql_update_ast_script.js diff --git a/packages/kbn-monaco/scripts/fix_generated_antlr.js b/src/platform/packages/shared/kbn-monaco/scripts/fix_generated_antlr.js similarity index 100% rename from packages/kbn-monaco/scripts/fix_generated_antlr.js rename to src/platform/packages/shared/kbn-monaco/scripts/fix_generated_antlr.js diff --git a/packages/kbn-monaco/scripts/generate_autocomplete.js b/src/platform/packages/shared/kbn-monaco/scripts/generate_autocomplete.js similarity index 100% rename from packages/kbn-monaco/scripts/generate_autocomplete.js rename to src/platform/packages/shared/kbn-monaco/scripts/generate_autocomplete.js diff --git a/packages/kbn-monaco/scripts/utils/clone_es.js b/src/platform/packages/shared/kbn-monaco/scripts/utils/clone_es.js similarity index 100% rename from packages/kbn-monaco/scripts/utils/clone_es.js rename to src/platform/packages/shared/kbn-monaco/scripts/utils/clone_es.js diff --git a/packages/kbn-monaco/scripts/utils/create_autocomplete_definitions.js b/src/platform/packages/shared/kbn-monaco/scripts/utils/create_autocomplete_definitions.js similarity index 100% rename from packages/kbn-monaco/scripts/utils/create_autocomplete_definitions.js rename to src/platform/packages/shared/kbn-monaco/scripts/utils/create_autocomplete_definitions.js diff --git a/packages/kbn-monaco/scripts/utils/create_autocomplete_definitions.test.js b/src/platform/packages/shared/kbn-monaco/scripts/utils/create_autocomplete_definitions.test.js similarity index 100% rename from packages/kbn-monaco/scripts/utils/create_autocomplete_definitions.test.js rename to src/platform/packages/shared/kbn-monaco/scripts/utils/create_autocomplete_definitions.test.js diff --git a/packages/kbn-monaco/scripts/utils/create_autocomplete_exports.js b/src/platform/packages/shared/kbn-monaco/scripts/utils/create_autocomplete_exports.js similarity index 100% rename from packages/kbn-monaco/scripts/utils/create_autocomplete_exports.js rename to src/platform/packages/shared/kbn-monaco/scripts/utils/create_autocomplete_exports.js diff --git a/packages/kbn-monaco/scripts/utils/index.js b/src/platform/packages/shared/kbn-monaco/scripts/utils/index.js similarity index 100% rename from packages/kbn-monaco/scripts/utils/index.js rename to src/platform/packages/shared/kbn-monaco/scripts/utils/index.js diff --git a/packages/kbn-monaco/server.ts b/src/platform/packages/shared/kbn-monaco/server.ts similarity index 100% rename from packages/kbn-monaco/server.ts rename to src/platform/packages/shared/kbn-monaco/server.ts diff --git a/packages/kbn-monaco/src/__jest__/jest.mocks.ts b/src/platform/packages/shared/kbn-monaco/src/__jest__/jest.mocks.ts similarity index 100% rename from packages/kbn-monaco/src/__jest__/jest.mocks.ts rename to src/platform/packages/shared/kbn-monaco/src/__jest__/jest.mocks.ts diff --git a/packages/kbn-monaco/src/__jest__/types.ts b/src/platform/packages/shared/kbn-monaco/src/__jest__/types.ts similarity index 100% rename from packages/kbn-monaco/src/__jest__/types.ts rename to src/platform/packages/shared/kbn-monaco/src/__jest__/types.ts diff --git a/packages/kbn-monaco/src/ace_migration/setup_worker.ts b/src/platform/packages/shared/kbn-monaco/src/ace_migration/setup_worker.ts similarity index 100% rename from packages/kbn-monaco/src/ace_migration/setup_worker.ts rename to src/platform/packages/shared/kbn-monaco/src/ace_migration/setup_worker.ts diff --git a/packages/kbn-monaco/src/ace_migration/types.ts b/src/platform/packages/shared/kbn-monaco/src/ace_migration/types.ts similarity index 100% rename from packages/kbn-monaco/src/ace_migration/types.ts rename to src/platform/packages/shared/kbn-monaco/src/ace_migration/types.ts diff --git a/packages/kbn-monaco/src/ace_migration/worker_proxy.ts b/src/platform/packages/shared/kbn-monaco/src/ace_migration/worker_proxy.ts similarity index 100% rename from packages/kbn-monaco/src/ace_migration/worker_proxy.ts rename to src/platform/packages/shared/kbn-monaco/src/ace_migration/worker_proxy.ts diff --git a/packages/kbn-monaco/src/code_editor/constants.ts b/src/platform/packages/shared/kbn-monaco/src/code_editor/constants.ts similarity index 100% rename from packages/kbn-monaco/src/code_editor/constants.ts rename to src/platform/packages/shared/kbn-monaco/src/code_editor/constants.ts diff --git a/packages/kbn-monaco/src/code_editor/index.ts b/src/platform/packages/shared/kbn-monaco/src/code_editor/index.ts similarity index 100% rename from packages/kbn-monaco/src/code_editor/index.ts rename to src/platform/packages/shared/kbn-monaco/src/code_editor/index.ts diff --git a/packages/kbn-monaco/src/code_editor/theme.ts b/src/platform/packages/shared/kbn-monaco/src/code_editor/theme.ts similarity index 100% rename from packages/kbn-monaco/src/code_editor/theme.ts rename to src/platform/packages/shared/kbn-monaco/src/code_editor/theme.ts diff --git a/packages/kbn-monaco/src/common/diagnostics_adapter.test.ts b/src/platform/packages/shared/kbn-monaco/src/common/diagnostics_adapter.test.ts similarity index 100% rename from packages/kbn-monaco/src/common/diagnostics_adapter.test.ts rename to src/platform/packages/shared/kbn-monaco/src/common/diagnostics_adapter.test.ts diff --git a/packages/kbn-monaco/src/common/diagnostics_adapter.ts b/src/platform/packages/shared/kbn-monaco/src/common/diagnostics_adapter.ts similarity index 100% rename from packages/kbn-monaco/src/common/diagnostics_adapter.ts rename to src/platform/packages/shared/kbn-monaco/src/common/diagnostics_adapter.ts diff --git a/packages/kbn-monaco/src/common/error_listener.ts b/src/platform/packages/shared/kbn-monaco/src/common/error_listener.ts similarity index 100% rename from packages/kbn-monaco/src/common/error_listener.ts rename to src/platform/packages/shared/kbn-monaco/src/common/error_listener.ts diff --git a/packages/kbn-monaco/src/common/lexer_rules.ts b/src/platform/packages/shared/kbn-monaco/src/common/lexer_rules.ts similarity index 100% rename from packages/kbn-monaco/src/common/lexer_rules.ts rename to src/platform/packages/shared/kbn-monaco/src/common/lexer_rules.ts diff --git a/packages/kbn-monaco/src/common/theme.ts b/src/platform/packages/shared/kbn-monaco/src/common/theme.ts similarity index 100% rename from packages/kbn-monaco/src/common/theme.ts rename to src/platform/packages/shared/kbn-monaco/src/common/theme.ts diff --git a/packages/kbn-monaco/src/common/worker_proxy.ts b/src/platform/packages/shared/kbn-monaco/src/common/worker_proxy.ts similarity index 100% rename from packages/kbn-monaco/src/common/worker_proxy.ts rename to src/platform/packages/shared/kbn-monaco/src/common/worker_proxy.ts diff --git a/packages/kbn-monaco/src/console/console_errors_provider.ts b/src/platform/packages/shared/kbn-monaco/src/console/console_errors_provider.ts similarity index 100% rename from packages/kbn-monaco/src/console/console_errors_provider.ts rename to src/platform/packages/shared/kbn-monaco/src/console/console_errors_provider.ts diff --git a/packages/kbn-monaco/src/console/console_parsed_requests_provider.ts b/src/platform/packages/shared/kbn-monaco/src/console/console_parsed_requests_provider.ts similarity index 100% rename from packages/kbn-monaco/src/console/console_parsed_requests_provider.ts rename to src/platform/packages/shared/kbn-monaco/src/console/console_parsed_requests_provider.ts diff --git a/packages/kbn-monaco/src/console/console_worker_proxy.ts b/src/platform/packages/shared/kbn-monaco/src/console/console_worker_proxy.ts similarity index 100% rename from packages/kbn-monaco/src/console/console_worker_proxy.ts rename to src/platform/packages/shared/kbn-monaco/src/console/console_worker_proxy.ts diff --git a/packages/kbn-monaco/src/console/constants.ts b/src/platform/packages/shared/kbn-monaco/src/console/constants.ts similarity index 100% rename from packages/kbn-monaco/src/console/constants.ts rename to src/platform/packages/shared/kbn-monaco/src/console/constants.ts diff --git a/packages/kbn-monaco/src/console/folding_range_provider/folding_range_provider.ts b/src/platform/packages/shared/kbn-monaco/src/console/folding_range_provider/folding_range_provider.ts similarity index 100% rename from packages/kbn-monaco/src/console/folding_range_provider/folding_range_provider.ts rename to src/platform/packages/shared/kbn-monaco/src/console/folding_range_provider/folding_range_provider.ts diff --git a/packages/kbn-monaco/src/console/folding_range_provider/folding_range_utils.test.ts b/src/platform/packages/shared/kbn-monaco/src/console/folding_range_provider/folding_range_utils.test.ts similarity index 100% rename from packages/kbn-monaco/src/console/folding_range_provider/folding_range_utils.test.ts rename to src/platform/packages/shared/kbn-monaco/src/console/folding_range_provider/folding_range_utils.test.ts diff --git a/packages/kbn-monaco/src/console/folding_range_provider/folding_range_utils.ts b/src/platform/packages/shared/kbn-monaco/src/console/folding_range_provider/folding_range_utils.ts similarity index 100% rename from packages/kbn-monaco/src/console/folding_range_provider/folding_range_utils.ts rename to src/platform/packages/shared/kbn-monaco/src/console/folding_range_provider/folding_range_utils.ts diff --git a/packages/kbn-monaco/src/console/folding_range_provider/index.ts b/src/platform/packages/shared/kbn-monaco/src/console/folding_range_provider/index.ts similarity index 100% rename from packages/kbn-monaco/src/console/folding_range_provider/index.ts rename to src/platform/packages/shared/kbn-monaco/src/console/folding_range_provider/index.ts diff --git a/packages/kbn-monaco/src/console/index.ts b/src/platform/packages/shared/kbn-monaco/src/console/index.ts similarity index 100% rename from packages/kbn-monaco/src/console/index.ts rename to src/platform/packages/shared/kbn-monaco/src/console/index.ts diff --git a/packages/kbn-monaco/src/console/language.ts b/src/platform/packages/shared/kbn-monaco/src/console/language.ts similarity index 100% rename from packages/kbn-monaco/src/console/language.ts rename to src/platform/packages/shared/kbn-monaco/src/console/language.ts diff --git a/packages/kbn-monaco/src/console/lexer_rules/console_editor.ts b/src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/console_editor.ts similarity index 100% rename from packages/kbn-monaco/src/console/lexer_rules/console_editor.ts rename to src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/console_editor.ts diff --git a/packages/kbn-monaco/src/console/lexer_rules/console_output.ts b/src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/console_output.ts similarity index 100% rename from packages/kbn-monaco/src/console/lexer_rules/console_output.ts rename to src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/console_output.ts diff --git a/packages/kbn-monaco/src/console/lexer_rules/index.ts b/src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/index.ts similarity index 100% rename from packages/kbn-monaco/src/console/lexer_rules/index.ts rename to src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/index.ts diff --git a/packages/kbn-monaco/src/console/lexer_rules/nested_painless.ts b/src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/nested_painless.ts similarity index 100% rename from packages/kbn-monaco/src/console/lexer_rules/nested_painless.ts rename to src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/nested_painless.ts diff --git a/packages/kbn-monaco/src/console/lexer_rules/nested_sql.ts b/src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/nested_sql.ts similarity index 100% rename from packages/kbn-monaco/src/console/lexer_rules/nested_sql.ts rename to src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/nested_sql.ts diff --git a/packages/kbn-monaco/src/console/lexer_rules/shared.ts b/src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/shared.ts similarity index 100% rename from packages/kbn-monaco/src/console/lexer_rules/shared.ts rename to src/platform/packages/shared/kbn-monaco/src/console/lexer_rules/shared.ts diff --git a/packages/kbn-monaco/src/console/output_parser.js b/src/platform/packages/shared/kbn-monaco/src/console/output_parser.js similarity index 100% rename from packages/kbn-monaco/src/console/output_parser.js rename to src/platform/packages/shared/kbn-monaco/src/console/output_parser.js diff --git a/packages/kbn-monaco/src/console/output_parser.test.ts b/src/platform/packages/shared/kbn-monaco/src/console/output_parser.test.ts similarity index 100% rename from packages/kbn-monaco/src/console/output_parser.test.ts rename to src/platform/packages/shared/kbn-monaco/src/console/output_parser.test.ts diff --git a/packages/kbn-monaco/src/console/parser.js b/src/platform/packages/shared/kbn-monaco/src/console/parser.js similarity index 100% rename from packages/kbn-monaco/src/console/parser.js rename to src/platform/packages/shared/kbn-monaco/src/console/parser.js diff --git a/packages/kbn-monaco/src/console/parser.test.ts b/src/platform/packages/shared/kbn-monaco/src/console/parser.test.ts similarity index 100% rename from packages/kbn-monaco/src/console/parser.test.ts rename to src/platform/packages/shared/kbn-monaco/src/console/parser.test.ts diff --git a/packages/kbn-monaco/src/console/theme.ts b/src/platform/packages/shared/kbn-monaco/src/console/theme.ts similarity index 100% rename from packages/kbn-monaco/src/console/theme.ts rename to src/platform/packages/shared/kbn-monaco/src/console/theme.ts diff --git a/packages/kbn-monaco/src/console/types.ts b/src/platform/packages/shared/kbn-monaco/src/console/types.ts similarity index 100% rename from packages/kbn-monaco/src/console/types.ts rename to src/platform/packages/shared/kbn-monaco/src/console/types.ts diff --git a/packages/kbn-monaco/src/console/worker/console.worker.ts b/src/platform/packages/shared/kbn-monaco/src/console/worker/console.worker.ts similarity index 100% rename from packages/kbn-monaco/src/console/worker/console.worker.ts rename to src/platform/packages/shared/kbn-monaco/src/console/worker/console.worker.ts diff --git a/packages/kbn-monaco/src/console/worker/console_worker.ts b/src/platform/packages/shared/kbn-monaco/src/console/worker/console_worker.ts similarity index 100% rename from packages/kbn-monaco/src/console/worker/console_worker.ts rename to src/platform/packages/shared/kbn-monaco/src/console/worker/console_worker.ts diff --git a/packages/kbn-monaco/src/console/worker/index.ts b/src/platform/packages/shared/kbn-monaco/src/console/worker/index.ts similarity index 100% rename from packages/kbn-monaco/src/console/worker/index.ts rename to src/platform/packages/shared/kbn-monaco/src/console/worker/index.ts diff --git a/packages/kbn-monaco/src/esql/index.ts b/src/platform/packages/shared/kbn-monaco/src/esql/index.ts similarity index 100% rename from packages/kbn-monaco/src/esql/index.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/index.ts diff --git a/packages/kbn-monaco/src/esql/language.test.ts b/src/platform/packages/shared/kbn-monaco/src/esql/language.test.ts similarity index 100% rename from packages/kbn-monaco/src/esql/language.test.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/language.test.ts diff --git a/packages/kbn-monaco/src/esql/language.ts b/src/platform/packages/shared/kbn-monaco/src/esql/language.ts similarity index 100% rename from packages/kbn-monaco/src/esql/language.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/language.ts diff --git a/packages/kbn-monaco/src/esql/lib/constants.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/constants.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/constants.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/constants.ts diff --git a/packages/kbn-monaco/src/esql/lib/converters/actions.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/converters/actions.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/converters/actions.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/converters/actions.ts diff --git a/packages/kbn-monaco/src/esql/lib/converters/positions.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/converters/positions.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/converters/positions.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/converters/positions.ts diff --git a/packages/kbn-monaco/src/esql/lib/converters/suggestions.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/converters/suggestions.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/converters/suggestions.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/converters/suggestions.ts diff --git a/packages/kbn-monaco/src/esql/lib/esql_ast_provider.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_ast_provider.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/esql_ast_provider.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_ast_provider.ts diff --git a/packages/kbn-monaco/src/esql/lib/esql_line_tokens.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_line_tokens.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/esql_line_tokens.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_line_tokens.ts diff --git a/packages/kbn-monaco/src/esql/lib/esql_state.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_state.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/esql_state.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_state.ts diff --git a/packages/kbn-monaco/src/esql/lib/esql_theme.test.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_theme.test.ts similarity index 98% rename from packages/kbn-monaco/src/esql/lib/esql_theme.test.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_theme.test.ts index 88ce26c7c58ff..ffe77a7a18c26 100644 --- a/packages/kbn-monaco/src/esql/lib/esql_theme.test.ts +++ b/src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_theme.test.ts @@ -50,7 +50,7 @@ describe('ESQL Theme', () => { const theme = buildESQLTheme(mockTheme); // These names aren't from the lexer... they are added on our side - // see packages/kbn-monaco/src/esql/lib/esql_token_helpers.ts + // see src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_token_helpers.ts const syntheticNames = ['functions', 'nulls_order', 'timespan_literal']; const rulesWithNoName: string[] = []; diff --git a/packages/kbn-monaco/src/esql/lib/esql_theme.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_theme.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/esql_theme.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_theme.ts diff --git a/packages/kbn-monaco/src/esql/lib/esql_token.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_token.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/esql_token.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_token.ts diff --git a/packages/kbn-monaco/src/esql/lib/esql_token_helpers.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_token_helpers.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/esql_token_helpers.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_token_helpers.ts diff --git a/packages/kbn-monaco/src/esql/lib/esql_tokens_provider.test.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_tokens_provider.test.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/esql_tokens_provider.test.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_tokens_provider.test.ts diff --git a/packages/kbn-monaco/src/esql/lib/esql_tokens_provider.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_tokens_provider.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/esql_tokens_provider.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_tokens_provider.ts diff --git a/packages/kbn-monaco/src/esql/lib/hover/hover.test.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/hover/hover.test.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/hover/hover.test.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/hover/hover.test.ts diff --git a/packages/kbn-monaco/src/esql/lib/hover/hover.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/hover/hover.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/hover/hover.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/hover/hover.ts diff --git a/packages/kbn-monaco/src/esql/lib/index.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/index.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/index.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/index.ts diff --git a/packages/kbn-monaco/src/esql/lib/shared/utils.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/shared/utils.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/shared/utils.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/shared/utils.ts diff --git a/packages/kbn-monaco/src/esql/lib/signature/index.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/signature/index.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/signature/index.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/signature/index.ts diff --git a/packages/kbn-monaco/src/esql/lib/types.ts b/src/platform/packages/shared/kbn-monaco/src/esql/lib/types.ts similarity index 100% rename from packages/kbn-monaco/src/esql/lib/types.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/lib/types.ts diff --git a/packages/kbn-monaco/src/esql/worker/esql.worker.ts b/src/platform/packages/shared/kbn-monaco/src/esql/worker/esql.worker.ts similarity index 100% rename from packages/kbn-monaco/src/esql/worker/esql.worker.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/worker/esql.worker.ts diff --git a/packages/kbn-monaco/src/esql/worker/esql_worker.ts b/src/platform/packages/shared/kbn-monaco/src/esql/worker/esql_worker.ts similarity index 100% rename from packages/kbn-monaco/src/esql/worker/esql_worker.ts rename to src/platform/packages/shared/kbn-monaco/src/esql/worker/esql_worker.ts diff --git a/packages/kbn-monaco/src/helpers.ts b/src/platform/packages/shared/kbn-monaco/src/helpers.ts similarity index 100% rename from packages/kbn-monaco/src/helpers.ts rename to src/platform/packages/shared/kbn-monaco/src/helpers.ts diff --git a/packages/kbn-monaco/src/monaco_imports.test.ts b/src/platform/packages/shared/kbn-monaco/src/monaco_imports.test.ts similarity index 100% rename from packages/kbn-monaco/src/monaco_imports.test.ts rename to src/platform/packages/shared/kbn-monaco/src/monaco_imports.test.ts diff --git a/packages/kbn-monaco/src/monaco_imports.ts b/src/platform/packages/shared/kbn-monaco/src/monaco_imports.ts similarity index 100% rename from packages/kbn-monaco/src/monaco_imports.ts rename to src/platform/packages/shared/kbn-monaco/src/monaco_imports.ts diff --git a/packages/kbn-monaco/src/painless/README.md b/src/platform/packages/shared/kbn-monaco/src/painless/README.md similarity index 100% rename from packages/kbn-monaco/src/painless/README.md rename to src/platform/packages/shared/kbn-monaco/src/painless/README.md diff --git a/packages/kbn-monaco/src/painless/antlr/painless_lexer.g4 b/src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_lexer.g4 similarity index 100% rename from packages/kbn-monaco/src/painless/antlr/painless_lexer.g4 rename to src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_lexer.g4 diff --git a/packages/kbn-monaco/src/painless/antlr/painless_lexer.interp b/src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_lexer.interp similarity index 100% rename from packages/kbn-monaco/src/painless/antlr/painless_lexer.interp rename to src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_lexer.interp diff --git a/packages/kbn-monaco/src/painless/antlr/painless_lexer.tokens b/src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_lexer.tokens similarity index 100% rename from packages/kbn-monaco/src/painless/antlr/painless_lexer.tokens rename to src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_lexer.tokens diff --git a/packages/kbn-monaco/src/painless/antlr/painless_lexer.ts b/src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_lexer.ts similarity index 100% rename from packages/kbn-monaco/src/painless/antlr/painless_lexer.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_lexer.ts diff --git a/packages/kbn-monaco/src/painless/antlr/painless_parser.g4 b/src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_parser.g4 similarity index 100% rename from packages/kbn-monaco/src/painless/antlr/painless_parser.g4 rename to src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_parser.g4 diff --git a/packages/kbn-monaco/src/painless/antlr/painless_parser.interp b/src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_parser.interp similarity index 100% rename from packages/kbn-monaco/src/painless/antlr/painless_parser.interp rename to src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_parser.interp diff --git a/packages/kbn-monaco/src/painless/antlr/painless_parser.tokens b/src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_parser.tokens similarity index 100% rename from packages/kbn-monaco/src/painless/antlr/painless_parser.tokens rename to src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_parser.tokens diff --git a/packages/kbn-monaco/src/painless/antlr/painless_parser.ts b/src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_parser.ts similarity index 100% rename from packages/kbn-monaco/src/painless/antlr/painless_parser.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_parser.ts diff --git a/packages/kbn-monaco/src/painless/antlr/painless_parser_listener.ts b/src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_parser_listener.ts similarity index 100% rename from packages/kbn-monaco/src/painless/antlr/painless_parser_listener.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_parser_listener.ts diff --git a/packages/kbn-monaco/src/painless/autocomplete_definitions/boolean_script_field_script_field.json b/src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/boolean_script_field_script_field.json similarity index 100% rename from packages/kbn-monaco/src/painless/autocomplete_definitions/boolean_script_field_script_field.json rename to src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/boolean_script_field_script_field.json diff --git a/packages/kbn-monaco/src/painless/autocomplete_definitions/common.json b/src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/common.json similarity index 100% rename from packages/kbn-monaco/src/painless/autocomplete_definitions/common.json rename to src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/common.json diff --git a/packages/kbn-monaco/src/painless/autocomplete_definitions/date_script_field.json b/src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/date_script_field.json similarity index 100% rename from packages/kbn-monaco/src/painless/autocomplete_definitions/date_script_field.json rename to src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/date_script_field.json diff --git a/packages/kbn-monaco/src/painless/autocomplete_definitions/double_script_field_script_field.json b/src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/double_script_field_script_field.json similarity index 100% rename from packages/kbn-monaco/src/painless/autocomplete_definitions/double_script_field_script_field.json rename to src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/double_script_field_script_field.json diff --git a/packages/kbn-monaco/src/painless/autocomplete_definitions/filter.json b/src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/filter.json similarity index 100% rename from packages/kbn-monaco/src/painless/autocomplete_definitions/filter.json rename to src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/filter.json diff --git a/packages/kbn-monaco/src/painless/autocomplete_definitions/index.ts b/src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/index.ts similarity index 100% rename from packages/kbn-monaco/src/painless/autocomplete_definitions/index.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/index.ts diff --git a/packages/kbn-monaco/src/painless/autocomplete_definitions/ip_script_field_script_field.json b/src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/ip_script_field_script_field.json similarity index 100% rename from packages/kbn-monaco/src/painless/autocomplete_definitions/ip_script_field_script_field.json rename to src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/ip_script_field_script_field.json diff --git a/packages/kbn-monaco/src/painless/autocomplete_definitions/long_script_field_script_field.json b/src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/long_script_field_script_field.json similarity index 100% rename from packages/kbn-monaco/src/painless/autocomplete_definitions/long_script_field_script_field.json rename to src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/long_script_field_script_field.json diff --git a/packages/kbn-monaco/src/painless/autocomplete_definitions/processor_conditional.json b/src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/processor_conditional.json similarity index 100% rename from packages/kbn-monaco/src/painless/autocomplete_definitions/processor_conditional.json rename to src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/processor_conditional.json diff --git a/packages/kbn-monaco/src/painless/autocomplete_definitions/score.json b/src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/score.json similarity index 100% rename from packages/kbn-monaco/src/painless/autocomplete_definitions/score.json rename to src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/score.json diff --git a/packages/kbn-monaco/src/painless/autocomplete_definitions/string_script_field_script_field.json b/src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/string_script_field_script_field.json similarity index 100% rename from packages/kbn-monaco/src/painless/autocomplete_definitions/string_script_field_script_field.json rename to src/platform/packages/shared/kbn-monaco/src/painless/autocomplete_definitions/string_script_field_script_field.json diff --git a/packages/kbn-monaco/src/painless/completion_adapter.ts b/src/platform/packages/shared/kbn-monaco/src/painless/completion_adapter.ts similarity index 100% rename from packages/kbn-monaco/src/painless/completion_adapter.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/completion_adapter.ts diff --git a/packages/kbn-monaco/src/painless/constants.ts b/src/platform/packages/shared/kbn-monaco/src/painless/constants.ts similarity index 100% rename from packages/kbn-monaco/src/painless/constants.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/constants.ts diff --git a/packages/kbn-monaco/src/painless/index.ts b/src/platform/packages/shared/kbn-monaco/src/painless/index.ts similarity index 100% rename from packages/kbn-monaco/src/painless/index.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/index.ts diff --git a/packages/kbn-monaco/src/painless/language.ts b/src/platform/packages/shared/kbn-monaco/src/painless/language.ts similarity index 100% rename from packages/kbn-monaco/src/painless/language.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/language.ts diff --git a/packages/kbn-monaco/src/painless/lexer_rules/index.ts b/src/platform/packages/shared/kbn-monaco/src/painless/lexer_rules/index.ts similarity index 100% rename from packages/kbn-monaco/src/painless/lexer_rules/index.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/lexer_rules/index.ts diff --git a/packages/kbn-monaco/src/painless/lexer_rules/painless.ts b/src/platform/packages/shared/kbn-monaco/src/painless/lexer_rules/painless.ts similarity index 100% rename from packages/kbn-monaco/src/painless/lexer_rules/painless.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/lexer_rules/painless.ts diff --git a/packages/kbn-monaco/src/painless/lib/editor_state.ts b/src/platform/packages/shared/kbn-monaco/src/painless/lib/editor_state.ts similarity index 100% rename from packages/kbn-monaco/src/painless/lib/editor_state.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/lib/editor_state.ts diff --git a/packages/kbn-monaco/src/painless/lib/index.ts b/src/platform/packages/shared/kbn-monaco/src/painless/lib/index.ts similarity index 100% rename from packages/kbn-monaco/src/painless/lib/index.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/lib/index.ts diff --git a/packages/kbn-monaco/src/painless/types.ts b/src/platform/packages/shared/kbn-monaco/src/painless/types.ts similarity index 100% rename from packages/kbn-monaco/src/painless/types.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/types.ts diff --git a/packages/kbn-monaco/src/painless/worker/index.ts b/src/platform/packages/shared/kbn-monaco/src/painless/worker/index.ts similarity index 100% rename from packages/kbn-monaco/src/painless/worker/index.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/worker/index.ts diff --git a/packages/kbn-monaco/src/painless/worker/lib/autocomplete.test.ts b/src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/autocomplete.test.ts similarity index 100% rename from packages/kbn-monaco/src/painless/worker/lib/autocomplete.test.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/autocomplete.test.ts diff --git a/packages/kbn-monaco/src/painless/worker/lib/autocomplete.ts b/src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/autocomplete.ts similarity index 100% rename from packages/kbn-monaco/src/painless/worker/lib/autocomplete.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/autocomplete.ts diff --git a/packages/kbn-monaco/src/painless/worker/lib/autocomplete_utils.test.ts b/src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/autocomplete_utils.test.ts similarity index 100% rename from packages/kbn-monaco/src/painless/worker/lib/autocomplete_utils.test.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/autocomplete_utils.test.ts diff --git a/packages/kbn-monaco/src/painless/worker/lib/autocomplete_utils.ts b/src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/autocomplete_utils.ts similarity index 100% rename from packages/kbn-monaco/src/painless/worker/lib/autocomplete_utils.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/autocomplete_utils.ts diff --git a/packages/kbn-monaco/src/painless/worker/lib/index.ts b/src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/index.ts similarity index 100% rename from packages/kbn-monaco/src/painless/worker/lib/index.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/index.ts diff --git a/packages/kbn-monaco/src/painless/worker/lib/lexer.ts b/src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/lexer.ts similarity index 100% rename from packages/kbn-monaco/src/painless/worker/lib/lexer.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/lexer.ts diff --git a/packages/kbn-monaco/src/painless/worker/lib/parser.ts b/src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/parser.ts similarity index 100% rename from packages/kbn-monaco/src/painless/worker/lib/parser.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/worker/lib/parser.ts diff --git a/packages/kbn-monaco/src/painless/worker/painless.worker.ts b/src/platform/packages/shared/kbn-monaco/src/painless/worker/painless.worker.ts similarity index 100% rename from packages/kbn-monaco/src/painless/worker/painless.worker.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/worker/painless.worker.ts diff --git a/packages/kbn-monaco/src/painless/worker/painless_worker.ts b/src/platform/packages/shared/kbn-monaco/src/painless/worker/painless_worker.ts similarity index 100% rename from packages/kbn-monaco/src/painless/worker/painless_worker.ts rename to src/platform/packages/shared/kbn-monaco/src/painless/worker/painless_worker.ts diff --git a/packages/kbn-monaco/src/register_globals.ts b/src/platform/packages/shared/kbn-monaco/src/register_globals.ts similarity index 100% rename from packages/kbn-monaco/src/register_globals.ts rename to src/platform/packages/shared/kbn-monaco/src/register_globals.ts diff --git a/packages/kbn-monaco/src/sql/constants.ts b/src/platform/packages/shared/kbn-monaco/src/sql/constants.ts similarity index 100% rename from packages/kbn-monaco/src/sql/constants.ts rename to src/platform/packages/shared/kbn-monaco/src/sql/constants.ts diff --git a/packages/kbn-monaco/src/sql/index.ts b/src/platform/packages/shared/kbn-monaco/src/sql/index.ts similarity index 100% rename from packages/kbn-monaco/src/sql/index.ts rename to src/platform/packages/shared/kbn-monaco/src/sql/index.ts diff --git a/packages/kbn-monaco/src/sql/lexer_rules/index.ts b/src/platform/packages/shared/kbn-monaco/src/sql/lexer_rules/index.ts similarity index 100% rename from packages/kbn-monaco/src/sql/lexer_rules/index.ts rename to src/platform/packages/shared/kbn-monaco/src/sql/lexer_rules/index.ts diff --git a/packages/kbn-monaco/src/sql/lexer_rules/sql.ts b/src/platform/packages/shared/kbn-monaco/src/sql/lexer_rules/sql.ts similarity index 100% rename from packages/kbn-monaco/src/sql/lexer_rules/sql.ts rename to src/platform/packages/shared/kbn-monaco/src/sql/lexer_rules/sql.ts diff --git a/packages/kbn-monaco/src/types.ts b/src/platform/packages/shared/kbn-monaco/src/types.ts similarity index 100% rename from packages/kbn-monaco/src/types.ts rename to src/platform/packages/shared/kbn-monaco/src/types.ts diff --git a/packages/kbn-monaco/src/typings.d.ts b/src/platform/packages/shared/kbn-monaco/src/typings.d.ts similarity index 100% rename from packages/kbn-monaco/src/typings.d.ts rename to src/platform/packages/shared/kbn-monaco/src/typings.d.ts diff --git a/packages/kbn-monaco/src/xjson/README.md b/src/platform/packages/shared/kbn-monaco/src/xjson/README.md similarity index 100% rename from packages/kbn-monaco/src/xjson/README.md rename to src/platform/packages/shared/kbn-monaco/src/xjson/README.md diff --git a/packages/kbn-monaco/src/xjson/constants.ts b/src/platform/packages/shared/kbn-monaco/src/xjson/constants.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/constants.ts rename to src/platform/packages/shared/kbn-monaco/src/xjson/constants.ts diff --git a/packages/kbn-monaco/src/xjson/grammar.test.ts b/src/platform/packages/shared/kbn-monaco/src/xjson/grammar.test.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/grammar.test.ts rename to src/platform/packages/shared/kbn-monaco/src/xjson/grammar.test.ts diff --git a/packages/kbn-monaco/src/xjson/grammar.ts b/src/platform/packages/shared/kbn-monaco/src/xjson/grammar.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/grammar.ts rename to src/platform/packages/shared/kbn-monaco/src/xjson/grammar.ts diff --git a/packages/kbn-monaco/src/xjson/index.ts b/src/platform/packages/shared/kbn-monaco/src/xjson/index.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/index.ts rename to src/platform/packages/shared/kbn-monaco/src/xjson/index.ts diff --git a/packages/kbn-monaco/src/xjson/language.ts b/src/platform/packages/shared/kbn-monaco/src/xjson/language.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/language.ts rename to src/platform/packages/shared/kbn-monaco/src/xjson/language.ts diff --git a/packages/kbn-monaco/src/xjson/lexer_rules/index.ts b/src/platform/packages/shared/kbn-monaco/src/xjson/lexer_rules/index.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/lexer_rules/index.ts rename to src/platform/packages/shared/kbn-monaco/src/xjson/lexer_rules/index.ts diff --git a/packages/kbn-monaco/src/xjson/lexer_rules/xjson.ts b/src/platform/packages/shared/kbn-monaco/src/xjson/lexer_rules/xjson.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/lexer_rules/xjson.ts rename to src/platform/packages/shared/kbn-monaco/src/xjson/lexer_rules/xjson.ts diff --git a/packages/kbn-monaco/src/xjson/worker/index.ts b/src/platform/packages/shared/kbn-monaco/src/xjson/worker/index.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/worker/index.ts rename to src/platform/packages/shared/kbn-monaco/src/xjson/worker/index.ts diff --git a/packages/kbn-monaco/src/xjson/worker/xjson.worker.ts b/src/platform/packages/shared/kbn-monaco/src/xjson/worker/xjson.worker.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/worker/xjson.worker.ts rename to src/platform/packages/shared/kbn-monaco/src/xjson/worker/xjson.worker.ts diff --git a/packages/kbn-monaco/src/xjson/worker/xjson_worker.ts b/src/platform/packages/shared/kbn-monaco/src/xjson/worker/xjson_worker.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/worker/xjson_worker.ts rename to src/platform/packages/shared/kbn-monaco/src/xjson/worker/xjson_worker.ts diff --git a/packages/kbn-monaco/src/yaml/constants.ts b/src/platform/packages/shared/kbn-monaco/src/yaml/constants.ts similarity index 100% rename from packages/kbn-monaco/src/yaml/constants.ts rename to src/platform/packages/shared/kbn-monaco/src/yaml/constants.ts diff --git a/packages/kbn-monaco/src/yaml/index.ts b/src/platform/packages/shared/kbn-monaco/src/yaml/index.ts similarity index 100% rename from packages/kbn-monaco/src/yaml/index.ts rename to src/platform/packages/shared/kbn-monaco/src/yaml/index.ts diff --git a/packages/kbn-monaco/src/yaml/worker/yaml.worker.ts b/src/platform/packages/shared/kbn-monaco/src/yaml/worker/yaml.worker.ts similarity index 100% rename from packages/kbn-monaco/src/yaml/worker/yaml.worker.ts rename to src/platform/packages/shared/kbn-monaco/src/yaml/worker/yaml.worker.ts diff --git a/packages/kbn-monaco/tsconfig.json b/src/platform/packages/shared/kbn-monaco/tsconfig.json similarity index 95% rename from packages/kbn-monaco/tsconfig.json rename to src/platform/packages/shared/kbn-monaco/tsconfig.json index 85cf6805e83ce..d94e0ce93fdd9 100644 --- a/packages/kbn-monaco/tsconfig.json +++ b/src/platform/packages/shared/kbn-monaco/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/packages/kbn-monaco/webpack.config.js b/src/platform/packages/shared/kbn-monaco/webpack.config.js similarity index 100% rename from packages/kbn-monaco/webpack.config.js rename to src/platform/packages/shared/kbn-monaco/webpack.config.js diff --git a/src/platform/plugins/shared/console/README.md b/src/platform/plugins/shared/console/README.md index 3b3bc1a5a5ade..778493f9a69ae 100644 --- a/src/platform/plugins/shared/console/README.md +++ b/src/platform/plugins/shared/console/README.md @@ -44,7 +44,7 @@ POST /_some_endpoint ``` ## Architecture -Console uses Monaco editor that is wrapped with [`kbn-monaco`](https://github.com/elastic/kibana/blob/main/packages/kbn-monaco/index.ts), so that if needed it can easily be replaced with another editor. +Console uses Monaco editor that is wrapped with [`kbn-monaco`](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-monaco/index.ts), so that if needed it can easily be replaced with another editor. The autocomplete logic is located in [`autocomplete`](https://github.com/elastic/kibana/blob/main/src/platform/plugins/shared/console/public/lib/autocomplete) folder. Autocomplete rules are computed by classes in `components` sub-folder. ## Autocomplete definitions diff --git a/test/functional/services/monaco_editor.ts b/test/functional/services/monaco_editor.ts index 5e942c8d7e7ad..46b0141ea5cd4 100644 --- a/test/functional/services/monaco_editor.ts +++ b/test/functional/services/monaco_editor.ts @@ -28,7 +28,7 @@ export class MonacoEditorService extends FtrService { await this.retry.try(async () => { values = await this.browser.execute( () => - // @ts-expect-error this value is provided in @kbn/monaco for this specific purpose, see {@link packages/kbn-monaco/src/register_globals.ts} + // @ts-expect-error this value is provided in @kbn/monaco for this specific purpose, see {@link src/platform/packages/shared/kbn-monaco/src/register_globals.ts} (window.MonacoEnvironment?.monaco.editor as typeof monaco.editor) .getModels() .map((model: any) => model.getValue()) as string[] @@ -48,7 +48,7 @@ export class MonacoEditorService extends FtrService { await this.retry.try(async () => { await this.browser.execute( (editorIndex, codeEditorValue) => { - // @ts-expect-error this value is provided in @kbn/monaco for this specific purpose, see {@link packages/kbn-monaco/src/register_globals.ts} + // @ts-expect-error this value is provided in @kbn/monaco for this specific purpose, see {@link src/platform/packages/shared/kbn-monaco/src/register_globals.ts} const editor = window.MonacoEnvironment?.monaco.editor as typeof monaco.editor; const textModels = editor.getModels(); diff --git a/tsconfig.base.json b/tsconfig.base.json index 34130a508f3ba..8e604593f98d9 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1298,8 +1298,8 @@ "@kbn/mock-idp-plugin/*": ["packages/kbn-mock-idp-plugin/*"], "@kbn/mock-idp-utils": ["packages/kbn-mock-idp-utils"], "@kbn/mock-idp-utils/*": ["packages/kbn-mock-idp-utils/*"], - "@kbn/monaco": ["packages/kbn-monaco"], - "@kbn/monaco/*": ["packages/kbn-monaco/*"], + "@kbn/monaco": ["src/platform/packages/shared/kbn-monaco"], + "@kbn/monaco/*": ["src/platform/packages/shared/kbn-monaco/*"], "@kbn/monitoring-collection-plugin": ["x-pack/platform/plugins/private/monitoring_collection"], "@kbn/monitoring-collection-plugin/*": ["x-pack/platform/plugins/private/monitoring_collection/*"], "@kbn/monitoring-plugin": ["x-pack/platform/plugins/private/monitoring"], diff --git a/x-pack/platform/plugins/shared/integration_assistant/server/util/painless.ts b/x-pack/platform/plugins/shared/integration_assistant/server/util/painless.ts index 797a14422f7b2..55e9e123c2502 100644 --- a/x-pack/platform/plugins/shared/integration_assistant/server/util/painless.ts +++ b/x-pack/platform/plugins/shared/integration_assistant/server/util/painless.ts @@ -45,7 +45,7 @@ const INGEST_PIPELINE_PAINLESS_CONTEXT = 'ctx' as const as SafePainlessExpressio * - Subsequent characters can be underscores, letters, or digits. * * This is the ID and DOTID regexp in the Painless grammar under the following link: - * @link packages/kbn-monaco/src/painless/antlr/painless_parser.g4 + * @link src/platform/packages/shared/kbn-monaco/src/painless/antlr/painless_parser.g4 */ const PAINLESS_IDENTIFIER_REGEXP = /^[_a-zA-Z][_a-zA-Z0-9]*$/; diff --git a/yarn.lock b/yarn.lock index 53715ae9ca429..b0d78388e9aa0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6449,7 +6449,7 @@ version "0.0.0" uid "" -"@kbn/monaco@link:packages/kbn-monaco": +"@kbn/monaco@link:src/platform/packages/shared/kbn-monaco": version "0.0.0" uid ""